/* ============================================
   СВЕЖ САХА ADMIN - Modern CSS Styles
   ============================================ */

/* === VARIABLES === */
:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #86efac;
    --secondary: #3b82f6;
    --secondary-dark: #2563eb;
    --accent: #f97316;
    --danger: #ef4444;
    --warning: #eab308;
    --success: #22c55e;
    
    --dark: #1e293b;
    --dark-light: #334155;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
}

/* === AUTH PAGES === */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--dark) 100%);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo {
    font-size: 48px;
    margin-bottom: 16px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 14px;
}

.auth-form h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--gray-900);
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #ea580c 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.btn-accent:hover {
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* === DASHBOARD LAYOUT === */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    width: 280px;
    background: var(--dark);
    color: var(--white);
    padding: 24px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    font-size: 32px;
}

.sidebar-logo h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.sidebar-logo span {
    font-size: 12px;
    color: var(--gray-400);
    display: block;
    margin-top: 2px;
}

.sidebar-menu {
    flex: 1;
    padding: 16px 0;
}

.menu-section {
    margin-bottom: 24px;
}

.menu-section-title {
    padding: 8px 24px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--gray-400);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--white);
    border-left-color: var(--gray-500);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.15) 0%, transparent 100%);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-item-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.nav-item-badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
}

.user-details span {
    font-size: 12px;
    color: var(--gray-400);
}

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: var(--white);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-500);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-action {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
}

.topbar-action:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.topbar-action .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* === STATS CARDS === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
    border: 1px solid var(--gray-100);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.2) 100%);
    color: var(--primary);
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.2) 100%);
    color: var(--secondary);
}

.stat-icon.orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0.2) 100%);
    color: var(--accent);
}

.stat-icon.red {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.2) 100%);
    color: var(--danger);
}

.stat-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.stat-content p {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

/* === CARDS & TABLES === */
.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* === TABLE === */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--gray-50);
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-200);
}

td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

tr:hover td {
    background: var(--gray-50);
}

tr:last-child td {
    border-bottom: none;
}

/* === BADGES & STATUS === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge.pending {
    background: rgba(234, 179, 8, 0.15);
    color: #a16207;
}

.badge.confirmed {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.badge.preparing {
    background: rgba(168, 85, 247, 0.15);
    color: #7c3aed;
}

.badge.on_way {
    background: rgba(249, 115, 22, 0.15);
    color: #c2410c;
}

.badge.delivered {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.badge.cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.badge.completed {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.badge.processing {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.badge.rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

/* === MODALS === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger);
    color: var(--white);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* === FILE UPLOAD === */
.file-upload {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.file-upload:hover {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.05);
}

.file-upload.active {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.1);
}

.file-upload-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.file-upload-text {
    font-size: 14px;
    color: var(--gray-600);
}

.file-upload-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 8px;
}

.file-preview {
    margin-top: 16px;
}

.file-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--radius);
    object-fit: cover;
}

/* === IMAGES PREVIEW CONTAINER === */
.images-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.image-preview-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    transition: var(--transition);
}

.image-preview-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.image-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 0, 0, 0.8);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(4px);
}

.image-preview-item:hover .image-preview-remove {
    opacity: 1;
}

.image-preview-remove:hover {
    background: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* === DAY SELECTOR === */
.days-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.day-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.day-checkbox input[type="checkbox"] {
    display: none;
}

.day-checkbox span {
    font-weight: 600;
    color: var(--gray-600);
    transition: var(--transition);
}

.day-checkbox:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.day-checkbox input[type="checkbox"]:checked + span {
    color: var(--primary);
}

.day-checkbox:has(input[type="checkbox"]:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.card-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 24px 0;
}

.hint {
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 8px;
}

/* === PRODUCT GRID === */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.product-image {
    height: 180px;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 4px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.product-category {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.product-price-old {
    font-size: 14px;
    color: var(--gray-400);
    text-decoration: line-through;
    margin-left: 8px;
}

.product-stock {
    font-size: 13px;
    color: var(--gray-600);
}

.product-actions {
    display: flex;
    gap: 8px;
}

.product-actions .btn {
    flex: 1;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 64px 24px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 24px;
}

/* === ALERTS === */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.alert.active {
    display: flex;
}

.alert.success {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert.warning {
    background: rgba(234, 179, 8, 0.1);
    color: #a16207;
    border: 1px solid rgba(234, 179, 8, 0.2);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === PAGES === */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === BALANCE CARD === */
.balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--dark) 100%);
    border-radius: var(--radius-xl);
    padding: 32px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.balance-label {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 24px;
}

.balance-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.balance-stat {
    text-align: center;
}

.balance-stat-value {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.balance-stat-label {
    font-size: 12px;
    opacity: 0.8;
}

/* === FILTERS === */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    min-width: 150px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 16px 0;
    }
    
    .sidebar-header {
        padding: 0 16px 16px;
    }
    
    .sidebar-logo h2,
    .sidebar-logo span,
    .menu-section-title,
    .nav-item span,
    .nav-item-badge,
    .user-details,
    .sidebar-footer {
        display: none;
    }
    
    .nav-item {
        justify-content: center;
        padding: 14px 16px;
    }
    
    .nav-item-icon {
        margin: 0;
    }
    
    .main-content {
        margin-left: 80px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        padding: 16px;
    }
    
    .content {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .balance-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* === LOADING === */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === SWITCH/TOGGLE === */
.toggle {
    position: relative;
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.toggle input {
    display: none;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* === FORM SWITCH LINK === */
.form-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray-500);
}

.form-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.form-switch a:hover {
    text-decoration: underline;
}

/* === MESSAGE === */
.message {
    display: none;
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.message.success {
    display: block;
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* === NOTIFICATION/TOAST SYSTEM === */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    min-width: 320px;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: all;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--gray-400);
    position: relative;
    overflow: hidden;
}

@keyframes slideInRight {
    from {
        transform: translateX(420px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(420px);
        opacity: 0;
    }
}

.notification.hiding {
    animation: slideOutRight 0.3s ease-out;
}

.notification.success {
    border-left-color: var(--success);
}

.notification.success .notification-icon {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.notification.error {
    border-left-color: var(--danger);
}

.notification.error .notification-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.notification.warning {
    border-left-color: var(--warning);
}

.notification.warning .notification-icon {
    background: rgba(234, 179, 8, 0.1);
    color: var(--warning);
}

.notification.info {
    border-left-color: var(--secondary);
}

.notification.info .notification-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--secondary);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    padding-top: 2px;
}

.notification-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--gray-900);
    margin-bottom: 4px;
    line-height: 1.3;
}

.notification-message {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.4;
    word-break: break-word;
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    font-size: 20px;
    line-height: 1;
    opacity: 0.6;
    transition: var(--transition);
    flex-shrink: 0;
}

.notification-close:hover {
    opacity: 1;
    color: var(--gray-600);
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gray-200);
    overflow: hidden;
}

.notification-progress-bar {
    height: 100%;
    background: var(--gray-400);
    transition: width linear;
}

.notification.success .notification-progress-bar {
    background: var(--success);
}

.notification.error .notification-progress-bar {
    background: var(--danger);
}

.notification.warning .notification-progress-bar {
    background: var(--warning);
}

.notification.info .notification-progress-bar {
    background: var(--secondary);
}

/* Mobile notifications */
@media (max-width: 768px) {
    .notification-container {
        left: 12px;
        right: 12px;
        top: 12px;
    }
    
    .notification {
        min-width: auto;
        max-width: 100%;
    }
}
