* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* Екран авторизації */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #000 0%, #333 100%);
}

.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #000;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 15px;
}

.btn-login:hover {
    background: #333;
}

.login-hint {
    text-align: center;
    font-size: 12px;
    color: #999;
}

.login-hint code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* Адмін-панель */
.admin-panel {
    min-height: 100vh;
}

.admin-header {
    background: #000;
    color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
}

.admin-header-actions {
    display: flex;
    gap: 15px;
}

.btn-view-site,
.btn-logout {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-view-site {
    background: #fff;
    color: #000;
}

.btn-view-site:hover {
    background: #f0f0f0;
}

.btn-logout {
    background: #333;
    color: #fff;
}

.btn-logout:hover {
    background: #555;
}

.admin-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

/* Бічне меню */
.admin-sidebar {
    width: 250px;
    background: #fff;
    border-radius: 12px;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f5f5f5;
    color: #000;
}

.nav-item.active {
    background: #f5f5f5;
    color: #000;
    border-left-color: #000;
    font-weight: 600;
}

.nav-icon {
    font-size: 20px;
}

/* Основний контент */
.admin-content {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-section h2 {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    font-size: 40px;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 14px;
}

/* Таблиці */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table thead {
    background: #f5f5f5;
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.admin-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.admin-table tbody tr:hover {
    background: #fafafa;
}

/* Кнопки */
.btn-primary {
    padding: 10px 20px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #333;
}

.btn-danger {
    padding: 10px 20px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.3s;
}

.btn-edit {
    background: #007bff;
    color: #fff;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-delete {
    background: #dc3545;
    color: #fff;
}

.btn-delete:hover {
    background: #c82333;
}

/* Модальні вікна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-overlay.active {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    z-index: 1001;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.modal-close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: 20px;
}

.modal-content .form-group {
    margin-bottom: 20px;
}

.modal-content label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: #000;
}

/* Медіа */
.upload-buttons {
    display: flex;
    gap: 10px;
}

.media-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.tab-btn.active {
    color: #000;
    border-bottom-color: #000;
}

.media-tab {
    display: none;
}

.media-tab.active {
    display: block;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.media-item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.media-item-name {
    padding: 10px;
    background: #fff;
    font-size: 12px;
    word-break: break-all;
}

/* Фільтри */
.filter-buttons {
    display: flex;
    gap: 10px;
}

.btn-filter {
    padding: 8px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-filter.active {
    background: #000;
    color: #fff;
}

/* Пошук */
.search-input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    width: 300px;
}

.search-input:focus {
    outline: none;
    border-color: #000;
}

/* Статуси */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

/* Звіти */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.reports-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.reports-tabs .tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -12px;
    transition: all 0.3s;
}

.reports-tabs .tab-btn:hover {
    color: #0088ff;
}

.reports-tabs .tab-btn.active {
    color: #0088ff;
    border-bottom-color: #0088ff;
    font-weight: 600;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.report-card {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    background: #fff;
}

.report-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.report-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.report-card p {
    color: #666;
    font-size: 14px;
}

.report-content {
    margin-top: 20px;
}

.report-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.warehouse-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.warehouse-tab {
    display: none;
}

.warehouse-tab.active {
    display: block;
}

.warehouse-table-container {
    overflow-x: auto;
}

/* Ролі та бейджі */
.role-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-owner {
    background: #ff4444;
    color: white;
}

.role-admin {
    background: #ff8800;
    color: white;
}

.role-manager {
    background: #ffbb00;
    color: white;
}

.role-accountant {
    background: #00aa00;
    color: white;
}

.role-marketer {
    background: #0088ff;
    color: white;
}

/* Адаптивність */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        position: static;
    }
    
    .admin-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .nav-item {
        white-space: nowrap;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px;
    }
}

