/* ============================================================
   Özking Bayi - Dark Mode Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-card: #252836;
    --bg-card-hover: #2d3142;
    --bg-input: #1e2130;
    --border-color: #2d3142;
    --border-light: #363a4e;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-purple: #6c5ce7;
    --accent-purple-hover: #5f4dd0;
    --accent-purple-glow: rgba(108, 92, 231, 0.3);
    --accent-teal: #00cec9;
    --accent-teal-glow: rgba(0, 206, 201, 0.3);
    --accent-orange: #f39c12;
    --accent-green: #00b894;
    --accent-red: #ff6b6b;
    --accent-blue: #74b9ff;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 20px var(--accent-purple-glow);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ LIGHT MODE ============ */
[data-theme="light"] {
    --bg-primary: #f0f2f8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9ff;
    --bg-input: #f5f6fa;
    --border-color: #e2e6f0;
    --border-light: #dde1ef;

    --text-primary: #1a1d2e;
    --text-secondary: #4a5568;
    --text-muted: #8896aa;

    --accent-purple: #6c5ce7;
    --accent-purple-hover: #5f4dd0;
    --accent-purple-glow: rgba(108, 92, 231, 0.15);
    --accent-teal: #00a8a5;
    --accent-teal-glow: rgba(0, 168, 165, 0.15);
    --accent-orange: #e67e22;
    --accent-green: #00965c;
    --accent-red: #e74c3c;
    --accent-blue: #3498db;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 20px var(--accent-purple-glow);
}

/* ============ THEME TOGGLE BUTTON ============ */
.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 44px;
    height: 24px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 2px;
    flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent-purple); }
.theme-toggle .toggle-knob {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-purple);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
}
[data-theme="light"] .theme-toggle .toggle-knob {
    transform: translateX(20px);
}

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

html {
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--accent-purple);
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

/* ============ LOGIN PAGE ============ */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at 30% 50%, rgba(108,92,231,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(0,206,201,0.06) 0%, transparent 50%),
                var(--bg-primary);
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: fadeInUp 0.6s ease;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo h1 {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-logo p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* ============ LAYOUT ============ */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 10px 24px 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sidebar-brand span {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-nav { list-style: none; padding: 0 12px; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: rgba(108,92,231,0.12);
    color: var(--accent-purple);
}
.sidebar-nav a.active {
    background: rgba(108,92,231,0.18);
    font-weight: 600;
}
.sidebar-nav .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

/* ============ TOP BAR ============ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 30px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.topbar-left h1 {
    font-size: 20px;
    font-weight: 700;
}

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

.balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-teal));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

/* ============ PAGE CONTENT ============ */
.page-content {
    padding: 30px;
    width: 100%;
    max-width: 100%;
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-teal));
    opacity: 0;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-purple);
}
.stat-card:hover::before { opacity: 1; }

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.stat-card .stat-icon.purple { background: rgba(108,92,231,0.15); color: var(--accent-purple); }
.stat-card .stat-icon.teal { background: rgba(0,206,201,0.15); color: var(--accent-teal); }
.stat-card .stat-icon.orange { background: rgba(243,156,18,0.15); color: var(--accent-orange); }
.stat-card .stat-icon.green { background: rgba(0,184,148,0.15); color: var(--accent-green); }
.stat-card .stat-icon.red { background: rgba(255,107,107,0.15); color: var(--accent-red); }
.stat-card .stat-icon.blue { background: rgba(116,185,255,0.15); color: var(--accent-blue); }

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}
.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

/* ============ DATA CARD ============ */
.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}
.data-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}
.data-card-header h3 {
    font-size: 16px;
    font-weight: 700;
}
.data-card-body { padding: 24px; }

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

.product-admin-toolbar {
    align-items: center;
}

.product-admin-toolbar #btnSaveSort {
    margin-left: auto;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.sort-button-grid {
    display: grid;
    grid-template-columns: repeat(2, 28px);
    gap: 4px;
}

.sort-button-grid .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sort-input {
    width: 58px;
    min-width: 58px;
    padding: 7px 6px;
    text-align: center;
}

.revenue-calendar-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.revenue-calendar-summary > div,
.revenue-mini-stat {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
}

.revenue-calendar-summary span,
.revenue-mini-stat span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 5px;
}

.revenue-calendar-summary strong,
.revenue-mini-stat strong {
    font-size: 17px;
}

.revenue-date-form {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.revenue-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.revenue-calendar-weekdays,
.revenue-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.revenue-calendar-weekdays {
    margin-bottom: 6px;
}

.revenue-calendar-weekdays span {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
}

.revenue-day {
    min-height: 74px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 8px;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: var(--transition);
}

.revenue-day:hover {
    border-color: var(--accent-purple);
    transform: translateY(-1px);
}

.revenue-day.empty {
    pointer-events: none;
    opacity: 0;
}

.revenue-day.selected {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(0,184,148,0.18);
}

.revenue-day.has-revenue {
    background: rgba(0,184,148,0.08);
}

.revenue-day .day-number {
    font-weight: 800;
    font-size: 14px;
}

.revenue-day .day-revenue {
    color: var(--accent-green);
    font-size: 12px;
    font-weight: 700;
}

.revenue-day .day-orders {
    color: var(--text-muted);
    font-size: 11px;
}

table {
    width: 100%;
    border-collapse: collapse;
}
table th {
    background: var(--bg-secondary);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
table td {
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    vertical-align: middle;
}
table tr:hover td {
    background: rgba(108,92,231,0.04);
}

.data-card table tbody td {
    border-top-width: 2px;
    border-top-color: rgba(148, 163, 184, 0.45);
}
.data-card table tbody td:first-child {
    border-left: 4px solid transparent;
}
.data-card table tbody tr:nth-child(6n+1) td {
    border-top-color: rgba(108, 92, 231, 0.9);
}
.data-card table tbody tr:nth-child(6n+2) td {
    border-top-color: rgba(0, 206, 201, 0.85);
}
.data-card table tbody tr:nth-child(6n+3) td {
    border-top-color: rgba(243, 156, 18, 0.88);
}
.data-card table tbody tr:nth-child(6n+4) td {
    border-top-color: rgba(0, 184, 148, 0.85);
}
.data-card table tbody tr:nth-child(6n+5) td {
    border-top-color: rgba(116, 185, 255, 0.88);
}
.data-card table tbody tr:nth-child(6n) td {
    border-top-color: rgba(255, 107, 107, 0.85);
}
.data-card table tbody tr:nth-child(6n+1) td:first-child {
    border-left-color: var(--accent-purple);
}
.data-card table tbody tr:nth-child(6n+2) td:first-child {
    border-left-color: var(--accent-teal);
}
.data-card table tbody tr:nth-child(6n+3) td:first-child {
    border-left-color: var(--accent-orange);
}
.data-card table tbody tr:nth-child(6n+4) td:first-child {
    border-left-color: var(--accent-green);
}
.data-card table tbody tr:nth-child(6n+5) td:first-child {
    border-left-color: var(--accent-blue);
}
.data-card table tbody tr:nth-child(6n) td:first-child {
    border-left-color: var(--accent-red);
}

/* ============ BADGES ============ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}
.badge-success { background: rgba(0,184,148,0.15); color: var(--accent-green); }
.badge-warning { background: rgba(243,156,18,0.15); color: var(--accent-orange); }
.badge-danger { background: rgba(255,107,107,0.15); color: var(--accent-red); }
.badge-info { background: rgba(0,206,201,0.15); color: var(--accent-teal); }
.badge-primary { background: rgba(108,92,231,0.15); color: var(--accent-purple); }
.badge-accent { background: rgba(116,185,255,0.15); color: var(--accent-blue); }
.badge-secondary { background: rgba(100,116,139,0.15); color: var(--text-muted); }

/* ============ FORMS ============ */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-purple-glow);
}
.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

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

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--accent-purple);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-purple-hover);
    box-shadow: 0 4px 15px var(--accent-purple-glow);
    transform: translateY(-1px);
    color:#fff;
}

.btn-success {
    background: var(--accent-green);
    color: #fff;
}
.btn-success:hover {
    background: #00a884;
    color:#fff;
}

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}
.btn-danger:hover {
    background: #ee5a5a;
    color:#fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
}

.btn-teal {
    background: var(--accent-teal);
    color: #0f1117;
    font-weight: 700;
}
.btn-teal:hover {
    background: #00b5b0;
    color: #0f1117;
}

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* ============ PRODUCT GRID (v1.2 - E-Commerce Compact) ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), 0 0 15px rgba(108,92,231,0.08);
    border-color: var(--accent-purple);
}

.product-card-image {
    position: relative;
    height: 140px;
    background: var(--bg-secondary);
    overflow: hidden;
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.product-card:hover .product-card-image img {
    transform: scale(1.05);
}
.product-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
}
.product-card-discount {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-red);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}
.product-card-stock {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    backdrop-filter: blur(8px);
}
.product-card-stock.in-stock {
    background: rgba(0,184,148,0.85);
    color: #fff;
}
.product-card-stock.out-of-stock {
    background: rgba(255,107,107,0.85);
    color: #fff;
}

.product-card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card-category {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.product-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex: 1;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}
.product-card-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.product-card-price .current-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-teal);
}
.product-card-price .original-price {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ============ NOTIFICATION BELL ============ */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 20px;
    line-height: 1;
}
.notification-bell:hover {
    background: rgba(108,92,231,0.12);
}
.notification-bell .notif-count {
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--accent-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    animation: pulse 2s infinite;
}
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 340px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    display: none;
}
.notification-dropdown.show { display: block; animation: fadeIn 0.2s ease; }
.notification-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 14px;
}
.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    display: block;
    color: inherit;
    text-decoration: none;
}
.notification-item:hover { background: rgba(108,92,231,0.06); color: inherit; }
.notification-item.unread { background: rgba(108,92,231,0.05); }
.notification-item .notif-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
}
.notification-item .notif-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}
.notification-item .notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}
.notification-empty {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ PRODUCT DETAIL ============ */
.product-detail-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
}
.product-detail-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}
.product-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}
.product-detail-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
}

/* ============ STOCK INFO ============ */
.stock-info {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.stock-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}
.stock-stat .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.stock-stat .dot.green { background: var(--accent-green); }
.stock-stat .dot.red { background: var(--accent-red); }
.stock-stat .dot.gray { background: var(--text-muted); }

/* ============ ANIMATIONS ============ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ============ RESPONSIVE ============ */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close-btn { display: block !important; }
    .main-content { margin-left: 0; min-width: 0; width: 100%; }
    .mobile-menu-btn { display: block; }
    .topbar { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
    .page-content { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card .stat-value { font-size: 22px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
    .product-card-image { height: 110px !important; }
    .product-card-image img { height: 110px !important; }
    .product-card-title { font-size: 13px !important; }
    .product-card-desc { display: none !important; }
    .product-detail-grid { grid-template-columns: 1fr; gap: 24px; }
    .topbar-right { gap: 8px; margin-left: auto; }
    .balance-display { padding: 6px 10px; font-size: 13px; }
    .modal-overlay { align-items: flex-start !important; padding: 10px !important; overflow-y: auto !important; }
    .modal { max-width: 100%; margin: 20px auto !important; max-height: none !important; }
}

@media (max-width: 480px) {
    .user-info span { display: none; }
    .stat-card .stat-label { font-size: 11px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .topbar-left h1 { font-size: 18px; }
    .topbar-right { gap: 6px; }
    .balance-display { font-size: 12px; padding: 4px 8px; }
}


/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.show { display: flex; }

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}
.modal-close:hover { background: var(--accent-red); color: #fff; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ============ DELIVERY BOX ============ */
.delivery-box {
    background: var(--bg-primary);
    border: 1px solid var(--accent-teal);
    border-radius: var(--radius-md);
    padding: 20px;
    margin: 16px 0;
}
.delivery-box .delivery-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.delivery-box .delivery-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.delivery-box .delivery-row:last-child { border-bottom: none; }
.delivery-box .delivery-key {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}
.delivery-box .delivery-value {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    user-select: all;
}

.copy-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.copy-btn:hover { border-color: var(--accent-teal); color: var(--accent-teal); }
.copy-btn.copied { background: var(--accent-green); color: #fff; border-color: var(--accent-green); }

/* ============ TOAST ============ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    min-width: 280px;
    box-shadow: var(--shadow-lg);
    animation: slideRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast-success { background: rgba(0,184,148,0.95); color: #fff; }
.toast-error { background: rgba(255,107,107,0.95); color: #fff; }
.toast-info { background: rgba(108,92,231,0.95); color: #fff; }
.toast-warning { background: rgba(243,156,18,0.95); color: #fff; }

/* ============ FLASH MESSAGES ============ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: rgba(0,184,148,0.12); border: 1px solid rgba(0,184,148,0.3); color: var(--accent-green); }
.alert-error { background: rgba(255,107,107,0.12); border: 1px solid rgba(255,107,107,0.3); color: var(--accent-red); }
.alert-info { background: rgba(108,92,231,0.12); border: 1px solid rgba(108,92,231,0.3); color: var(--accent-purple); }

/* ============ WHATSAPP FAB ============ */
.whatsapp-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 999;
    transition: var(--transition);
    color: #fff;
    font-size: 28px;
}
.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37,211,102,0.5);
    color: #fff;
}

/* ============ FILE UPLOAD ============ */
.file-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.file-upload:hover {
    border-color: var(--accent-purple);
    background: rgba(108,92,231,0.05);
}
.file-upload input[type="file"] {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    cursor: pointer;
}
.file-upload .upload-icon { font-size: 36px; margin-bottom: 12px; color: var(--text-muted); }
.file-upload .upload-text { color: var(--text-secondary); font-size: 14px; }
.file-upload .upload-hint { color: var(--text-muted); font-size: 12px; margin-top: 6px; }

/* ============ TABS ============ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
}
.tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
    color: var(--accent-purple);
    border-bottom-color: var(--accent-purple);
    font-weight: 600;
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; }

/* ============ TEXT UTILITIES ============ */
.text-danger { color: var(--accent-red) !important; }
.text-success { color: var(--accent-green) !important; }
.text-warning { color: var(--accent-orange) !important; }
.text-info { color: var(--accent-teal) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--accent-purple) !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 20px 0;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
}
.pagination a:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
.pagination .active {
    background: var(--accent-purple);
    color: #fff;
    border-color: var(--accent-purple);
}


#notifList { max-height: 240px; overflow-y: auto; }
.notification-dropdown.show { display: flex !important; flex-direction: column; }
.dropdown-menu.show { display: block !important; }

/* ============ RESPONSIVE FILTER BAR ============ */
.filter-bar-responsive {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
@media (max-width: 768px) {
    .filter-bar-responsive {
        flex-direction: column;
        align-items: stretch !important;
    }
    .product-admin-toolbar #btnSaveSort {
        margin-left: 0;
    }
    .product-admin-toolbar {
        position: sticky;
        top: 0;
        z-index: 20;
        background: var(--bg-primary);
        padding: 8px 0;
    }
    .sort-control {
        min-width: 140px;
    }
    .sort-button-grid {
        grid-template-columns: repeat(2, 34px);
    }
    .sort-button-grid .btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
    .sort-input {
        width: 64px;
        min-width: 64px;
        height: 42px;
    }
    .revenue-calendar-summary {
        grid-template-columns: 1fr;
    }
    .revenue-date-form {
        flex-direction: column;
    }
    .revenue-calendar-nav {
        align-items: stretch;
    }
    .revenue-calendar-nav strong {
        text-align: center;
        align-self: center;
    }
    .revenue-calendar-weekdays,
    .revenue-calendar-grid {
        gap: 4px;
    }
    .revenue-day {
        min-height: 62px;
        padding: 6px 4px;
    }
    .revenue-day .day-revenue,
    .revenue-day .day-orders {
        font-size: 10px;
        line-height: 1.15;
    }
    .filter-bar-responsive form {
        margin-left: 0 !important;
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .filter-bar-responsive form .form-control {
        flex: 1;
        margin: 0;
    }
}

/* ============ MOBILE USABILITY POLISH ============ */
@media (max-width: 900px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        font-size: 14px;
    }

    .sidebar {
        width: min(86vw, 310px);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-nav a {
        min-height: 44px;
        padding: 12px 16px;
    }

    .app-layout:has(.sidebar.open)::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 80;
        pointer-events: none;
    }

    .topbar {
        align-items: flex-start;
        padding: 12px 14px;
    }

    .topbar-left {
        min-width: 0;
        flex: 1 1 auto;
    }

    .topbar-left h1,
    .topbar-left a {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-left h1 {
        font-size: 18px;
    }

    .topbar-right {
        flex: 1 1 100%;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
        margin-left: 0;
    }

    .topbar-right > .btn,
    .topbar-right > a.btn,
    .topbar-right > button.btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .user-info {
        min-height: 40px;
        max-width: 100%;
    }

    .user-info span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .notification-bell {
        min-width: 42px;
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .notification-dropdown {
        position: fixed;
        top: 70px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: 70vh;
    }

    .page-content {
        padding: 14px;
    }

    .data-card {
        border-radius: var(--radius-md);
        margin-bottom: 16px;
    }

    .data-card-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
        padding: 16px;
    }

    .data-card-header h3 {
        line-height: 1.35;
    }

    .data-card-header > div,
    .data-card-header form,
    .data-card-header [style*="width:300px"],
    .data-card-header [style*="width: 300px"] {
        width: 100% !important;
    }

    .data-card-body,
    .modal-body {
        padding: 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 16px;
    }

    .stat-card {
        border-radius: var(--radius-md);
        padding: 14px;
        min-height: 130px;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
        font-size: 20px;
    }

    .stat-card .stat-value {
        font-size: 20px;
        overflow-wrap: anywhere;
    }

    .btn {
        min-height: 44px;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }

    .btn-sm {
        min-height: 38px;
        padding: 8px 12px;
    }

    .form-control {
        min-height: 44px;
        font-size: 16px;
    }

    textarea.form-control {
        min-height: 110px;
    }

    input[type="checkbox"],
    input[type="radio"] {
        min-width: 22px;
        min-height: 22px;
    }

    .filter-bar-responsive {
        gap: 8px;
        margin-bottom: 14px;
    }

    .filter-bar-responsive .btn,
    .filter-bar-responsive > a,
    .filter-bar-responsive > button {
        width: 100%;
    }

    .filter-bar-responsive form {
        flex-direction: column;
    }

    .page-content > div[style*="display:grid"],
    .modal-body div[style*="display:grid"],
    .data-card-body div[style*="display:grid"] {
        grid-template-columns: 1fr !important;
    }

    .page-content div[style*="grid-template-columns:1fr 1fr"],
    .page-content div[style*="grid-template-columns: 1fr 1fr"],
    .page-content div[style*="grid-template-columns:400px 1fr"],
    .page-content div[style*="grid-template-columns: 400px 1fr"],
    .modal-body div[style*="grid-template-columns:1fr 1fr"],
    .modal-body div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .page-content div[style*="display:flex"][style*="align-items:end"],
    .page-content div[style*="display:flex"][style*="align-items:center"][style*="gap:16px"],
    .modal-body div[style*="display:flex"][style*="gap"] {
        flex-wrap: wrap !important;
    }

    .page-content [style*="width:100px"],
    .page-content [style*="width: 100px"],
    .modal-body [style*="width:100px"],
    .modal-body [style*="width: 100px"] {
        width: 100% !important;
    }

    .page-content [style*="max-width:300px"],
    .page-content [style*="max-width: 300px"],
    .page-content [style*="width:300px"],
    .page-content [style*="width: 300px"] {
        max-width: none !important;
        width: 100% !important;
    }

    .table-responsive .form-control[style*="width:120px"],
    .table-responsive .form-control[style*="width: 120px"],
    .table-responsive .form-control[style*="width:100px"],
    .table-responsive .form-control[style*="width: 100px"] {
        width: 96px !important;
        min-height: 38px;
        font-size: 14px;
    }

    .table-responsive {
        margin-left: -1px;
        margin-right: -1px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
    }

    .table-responsive table {
        min-width: 760px;
    }

    .table-responsive th,
    .table-responsive td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .table-responsive td:last-child {
        min-width: 140px;
    }

    /* İşlem/Stok/Ad sütunları mobilde tablonun başına taşınır (app.js).
       Butonlar hücreden taşıp yandaki sütuna binmesin diye sarmaya izin ver,
       hücreyi net bir dikey çizgiyle diğer sütunlardan ayır. */
    .table-responsive table.actions-left th:first-child,
    .table-responsive table.actions-left td:first-child {
        white-space: normal !important;
        border-right: 1px solid var(--border-color);
        padding-right: 14px;
    }

    /* İkonlu butonlar: 2 sütunlu eşit grid */
    .table-responsive table.actions-left td.action-grid {
        min-width: 240px;
        max-width: 264px;
    }

    /* Yazılı butonlar (Detay/Onayla/Reddet): alt alta tam genişlik */
    .table-responsive table.actions-left td.action-stack {
        min-width: 150px;
        max-width: 178px;
    }

    /* Tek ikon butonu (örn. stok silme): dar hücre, kalan alan veriye kalsın */
    .table-responsive table.actions-left td.action-single {
        min-width: 72px;
        max-width: 96px;
        text-align: center;
    }

    .table-responsive table.actions-left td.action-single .btn {
        width: 100%;
        min-width: 46px;
    }

    /* Uzun key/hesap verileri okunaklı sarılsın */
    .table-responsive table.actions-left td code {
        word-break: break-all;
        font-size: 12px;
    }

    .table-responsive table.actions-left td.action-cell .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        vertical-align: top;
        height: 40px;
        line-height: 1;
        font-size: 13px;
        white-space: nowrap;
        padding: 6px 8px;
        margin: 0 0 6px 0;
    }

    .table-responsive table.actions-left td.action-grid .btn {
        width: calc(50% - 4px);
    }

    .table-responsive table.actions-left td.action-stack .btn,
    .table-responsive table.actions-left td.action-stack div .btn {
        display: flex;
        width: 100%;
        margin-right: 0;
    }

    .table-responsive table.actions-left th:nth-child(2),
    .table-responsive table.actions-left td:nth-child(2),
    .table-responsive table.actions-left th:nth-child(3),
    .table-responsive table.actions-left td:nth-child(3) {
        padding-left: 14px;
    }

    .table-responsive td:last-child .btn,
    .table-responsive td:last-child a.btn,
    .table-responsive td:last-child button.btn {
        margin-bottom: 4px;
    }

    .modal-overlay {
        padding: 8px !important;
        align-items: flex-start !important;
    }

    .modal {
        border-radius: var(--radius-lg);
        max-height: calc(100vh - 16px) !important;
        margin: 8px auto !important;
    }

    .modal-header,
    .modal-footer {
        padding: 14px 16px;
    }

    .modal-header {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--bg-secondary);
    }

    .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: var(--bg-secondary);
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .product-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 18px;
    }

    .product-detail-image {
        max-height: 360px;
    }

    .product-detail-image img {
        max-height: 360px;
        object-fit: contain;
        background: var(--bg-secondary);
    }

    .product-detail-info h1 {
        font-size: 22px !important;
        line-height: 1.25;
    }

    .buy-section {
        padding: 16px !important;
    }

    .buy-section .btn-lg {
        width: 100%;
    }

    .product-description {
        padding: 56px 14px 16px 14px !important;
        overflow-wrap: anywhere;
    }

    .delivery-box {
        padding: 14px;
    }

    .delivery-box .delivery-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .delivery-box .delivery-value {
        width: 100%;
        overflow-wrap: anywhere;
    }

    code,
    pre,
    .delivery-value,
    .notif-desc,
    .product-card-title,
    .product-card-category {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .copy-btn {
        width: 100%;
        min-height: 38px;
    }

    .pagination {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        top: 12px;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .login-wrapper {
        padding: 12px;
        align-items: flex-start;
    }

    .login-card {
        padding: 28px 18px;
        border-radius: var(--radius-lg);
        margin-top: 18px;
    }

    .topbar {
        position: sticky;
    }

    .topbar-left {
        width: 100%;
    }

    .topbar-right {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-right .notification-bell,
    .topbar-right .theme-toggle,
    .topbar-right .lang-selector {
        justify-self: stretch;
    }

    .lang-selector {
        width: 100%;
    }

    .lang-selector > button {
        width: 100%;
        min-height: 40px;
        justify-content: center;
    }

    .lang-selector .dropdown-menu {
        left: 0 !important;
        right: auto !important;
        width: 100%;
        min-width: 0 !important;
    }

    .theme-toggle {
        width: 54px;
        height: 30px;
        justify-content: flex-start;
        justify-self: start;
    }

    [data-theme="light"] .theme-toggle .toggle-knob {
        transform: translateX(24px);
    }

    .user-info,
    .balance-display {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-stats,
    .dashboard-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px;
    }

    .dashboard-stats .stat-card,
    .dashboard-actions .stat-card {
        min-height: 118px;
        padding: 12px;
    }

    .dashboard-stats .stat-card .stat-icon,
    .dashboard-actions .stat-card .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
        margin-bottom: 10px;
    }

    .dashboard-stats .stat-card .stat-value,
    .dashboard-actions .stat-card .stat-value {
        font-size: clamp(18px, 5.2vw, 24px);
        line-height: 1.15;
    }

    .dashboard-stats .stat-card .stat-label,
    .dashboard-actions .stat-card .stat-label {
        font-size: 11px;
        line-height: 1.25;
    }

    .dashboard-topbar-actions {
        grid-template-columns: minmax(0, 1fr) 54px 54px !important;
        align-items: center;
    }

    .dashboard-topbar-actions > .btn,
    .dashboard-topbar-actions > a.btn {
        grid-column: 1;
        width: 100%;
        min-height: 42px;
        margin-right: 0 !important;
        padding: 8px 10px;
        white-space: nowrap;
    }

    .dashboard-topbar-actions .theme-toggle {
        grid-column: 2;
        justify-self: center;
    }

    .dashboard-topbar-actions .notification-bell {
        grid-column: 3;
        justify-self: center;
        width: 44px;
        height: 44px;
    }

    .dashboard-topbar-actions .user-info,
    .dashboard-topbar-actions .balance-display {
        grid-column: 1 / -1;
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    .dashboard-topbar-actions .user-info span,
    .dashboard-topbar-actions .balance-display {
        display: inline-flex;
        align-items: center;
    }

    .dashboard-topbar-actions .lang-selector {
        grid-column: 1;
        width: 100%;
    }

    .dashboard-topbar-actions .lang-selector > button {
        width: 100%;
        min-height: 42px;
    }

    .stat-card {
        min-height: auto;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-card-body {
        padding: 10px;
    }

    .product-card-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .product-card-footer .btn {
        width: 100%;
        min-height: 36px;
    }

    .notification-dropdown {
        top: 112px;
    }

    .table-responsive table {
        min-width: 680px;
    }

    .revenue-calendar-weekdays,
    .revenue-calendar-grid {
        gap: 3px;
    }

    .revenue-day {
        min-height: 58px;
        padding: 5px 3px;
    }

    .revenue-day .day-number {
        font-size: 12px;
    }

    .revenue-day .day-revenue {
        font-size: 9px;
    }

    .revenue-day .day-orders {
        display: none;
    }
}

