/* ============================================
   NOMAGRI ADMIN PANEL — PREMIUM DESIGN SYSTEM
   Tailwind CDN + Custom Premium Styles
   ============================================ */

/* ---------- Custom Properties ---------- */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-900: #312e81;
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 72px;

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --gradient-sidebar: linear-gradient(180deg, #0f172a 0%, #1a1f3a 50%, #1e293b 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

    /* Color aliases (used by reports, etc.) */
    --color-primary: #6366f1;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
    --bg-secondary: #f1f5f9;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

/* ---------- Animations & Keyframes ---------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes progress-bar {
    from { width: 100%; }
    to { width: 0%; }
}

.animate-fade-in-up { animation: fadeInUp 0.5s ease-out both; }
.animate-fade-in-down { animation: fadeInDown 0.3s ease-out both; }
.animate-fade-in { animation: fadeIn 0.4s ease-out both; }
.animate-slide-in-left { animation: slideInLeft 0.4s ease-out both; }
.animate-slide-in-right { animation: slideInRight 0.4s ease-out both; }
.animate-scale-in { animation: scaleIn 0.3s ease-out both; }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ---------- Global Styles ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

[x-cloak] { display: none !important; }

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--primary);
    color: white;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- SIDEBAR ---------- */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--gradient-sidebar);
    z-index: 50;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.sidebar-logo {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.sidebar-logo__icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: transform 0.3s ease;
}
.sidebar-logo__icon:hover { transform: rotate(-5deg) scale(1.05); }
.sidebar-logo__icon svg { width: 22px; height: 22px; }

.sidebar-logo__text {
    font-size: 22px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px;
    position: relative;
    z-index: 1;
}
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.sidebar-nav-group { margin-bottom: 4px; }
.sidebar-nav-group__title {
    padding: 16px 12px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(148, 163, 184, 0.7);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 2px;
}
.sidebar-nav-item:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}
.sidebar-nav-item.active,
.sidebar-nav-item.active:hover {
    color: white;
    background: rgba(99, 102, 241, 0.2);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.3);
}
.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-nav-item__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-nav-item__icon svg { width: 20px; height: 20px; }

.sidebar-nav-item__text { flex: 1; white-space: nowrap; }

.sidebar-nav-item__arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}
.sidebar-nav-item__arrow svg { width: 16px; height: 16px; }
.sidebar-nav-item.open .sidebar-nav-item__arrow,
.sidebar-nav-item--has-sub.open .sidebar-nav-item__arrow {
    transform: rotate(90deg);
}

/* Sub menu */
.sidebar-sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-sub-menu.open { max-height: 500px; }

.sidebar-sub-item {
    display: block;
    padding: 8px 12px 8px 20px;
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 4px;
    position: relative;
}
.sidebar-sub-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 1px;
    background: rgba(148, 163, 184, 0.4);
}
.sidebar-sub-item:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
}
.sidebar-sub-item.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
    font-weight: 500;
}
.sidebar-sub-item.active::before {
    background: var(--primary-light);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(0, -50%);
    left: -3px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}
.sidebar-footer__user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-footer__avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}
.sidebar-footer__info { min-width: 0; }
.sidebar-footer__name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-footer__role {
    font-size: 11px;
    color: #64748b;
    margin-top: 1px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Collapsed */
.admin-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}
.admin-sidebar.collapsed .sidebar-logo__text,
.admin-sidebar.collapsed .sidebar-nav-group__title,
.admin-sidebar.collapsed .sidebar-nav-item__text,
.admin-sidebar.collapsed .sidebar-nav-item__arrow,
.admin-sidebar.collapsed .sidebar-sub-menu,
.admin-sidebar.collapsed .sidebar-footer__info { display: none; }
.admin-sidebar.collapsed .sidebar-logo { justify-content: center; padding: 24px 8px; }
.admin-sidebar.collapsed .sidebar-nav-item { justify-content: center; padding: 12px; }
.admin-sidebar.collapsed .sidebar-footer { padding: 16px 8px; justify-content: center; }
.admin-sidebar.collapsed .sidebar-footer__user { justify-content: center; }

/* ---------- MAIN AREA ---------- */
.admin-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f1f5f9;
}
.sidebar-collapsed .admin-main {
    margin-left: var(--sidebar-collapsed-width);
}

/* ---------- HEADER ---------- */
.admin-header {
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.admin-header__left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.admin-header__toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.admin-header__toggle:hover {
    background: #f1f5f9;
    color: #334155;
}
.admin-header__toggle svg { width: 22px; height: 22px; }

.admin-header__search {
    position: relative;
    max-width: 420px;
    flex: 1;
}
.admin-header__search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}
.admin-header__search-input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    background: #f1f5f9;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.3s ease;
    outline: none;
}
.admin-header__search-input::placeholder { color: #94a3b8; }
.admin-header__search-input:focus {
    background: white;
    border-color: var(--primary-200);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.admin-header__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-header__icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.admin-header__icon-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}
.admin-header__icon-btn svg { width: 22px; height: 22px; }

.admin-header__badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    animation: scaleIn 0.3s ease-out;
}

/* Profile */
.admin-header__profile { position: relative; }
.admin-header__profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.admin-header__profile-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.admin-header__profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: white;
}
.admin-header__profile-name {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

/* Dropdowns */
.admin-header__notifications,
.admin-header__profile { position: relative; }

.admin-header__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    min-width: 280px;
    overflow: hidden;
    animation: fadeInDown 0.2s ease-out;
    z-index: 50;
}
.admin-header__dropdown--notifications { min-width: 360px; }

.admin-header__dropdown-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}
.admin-header__dropdown-title a {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.admin-header__dropdown-title a:hover { text-decoration: underline; }

.admin-header__dropdown-list {
    max-height: 320px;
    overflow-y: auto;
}

.admin-header__dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #334155;
    font-size: 13px;
    transition: background 0.15s ease;
    cursor: pointer;
}
.admin-header__dropdown-item:hover { background: #f8fafc; }
.admin-header__dropdown-item.unread { background: var(--primary-50); }
.admin-header__dropdown-item svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: #64748b; }

.admin-header__dropdown-item-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.admin-header__dropdown-item-icon svg { width: 18px; height: 18px; color: #64748b; }

.admin-header__dropdown-item-content { flex: 1; min-width: 0; }
.admin-header__dropdown-item-text { font-size: 13px; color: #334155; line-height: 1.4; }
.admin-header__dropdown-item-time { font-size: 11px; color: #94a3b8; margin-top: 4px; }

.admin-header__dropdown-empty {
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.admin-header__dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 0;
}

.admin-header__dropdown-item--danger { color: var(--danger) !important; }
.admin-header__dropdown-item--danger svg { color: var(--danger) !important; }

/* ---------- CONTENT AREA ---------- */
.admin-content {
    padding: 28px;
    animation: fadeIn 0.3s ease-out;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 8px;
}
.breadcrumb a { color: #64748b; text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb__separator { color: #cbd5e1; }
.breadcrumb__item--active { color: #334155; font-weight: 500; }

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}
.page-header__title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.page-header__subtitle {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}
.page-header__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- CARDS ---------- */
.admin-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.admin-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
}
.admin-card + .admin-card { margin-top: 20px; }
.order-detail__main > .admin-card + .admin-card,
.order-detail__sidebar > .admin-card + .admin-card,
.dashboard-tables > .admin-card + .admin-card { margin-top: 0; }

.admin-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}
.admin-card__title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}
.admin-card__body { padding: 24px; }
.admin-card__footer {
    padding: 16px 24px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

/* ---------- STAT CARDS ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}
.stats-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 28px;
}
.stats-grid--4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid--3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid--2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1200px) {
    .stats-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .stats-grid--4,
    .stats-grid--3,
    .stats-grid--2 { grid-template-columns: 1fr; }
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-card--orders::before { background: var(--gradient-primary); }
.stat-card--revenue::before { background: var(--gradient-success); }
.stat-card--products::before { background: var(--gradient-accent); }
.stat-card--users::before { background: var(--gradient-warning); }

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-card__icon svg { width: 24px; height: 24px; }

.stat-card--orders .stat-card__icon { background: var(--primary-50); color: var(--primary); }
.stat-card--revenue .stat-card__icon { background: var(--success-light); color: var(--success); }
.stat-card--products .stat-card__icon { background: #e0f2fe; color: var(--accent); }
.stat-card--users .stat-card__icon { background: var(--warning-light); color: var(--warning); }

.stat-card__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-card__label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
}
.stat-card__value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.5px;
    line-height: 1;
}

/* Stat card icon variants for sub-pages */
.stat-card__icon--primary { background: var(--primary-50, #eef2ff); color: var(--primary, #6366f1); }
.stat-card__icon--success { background: var(--success-light, #ecfdf5); color: var(--success, #10b981); }
.stat-card__icon--warning { background: var(--warning-light, #fffbeb); color: var(--warning, #f59e0b); }
.stat-card__icon--danger { background: var(--danger-light, #fef2f2); color: var(--danger, #ef4444); }
.stat-card__icon--info { background: #e0f2fe; color: #0ea5e9; }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary, .btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.btn--primary:hover, .btn-primary:hover {
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn--success, .btn-success { background: var(--gradient-success); color: white; box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); }
.btn--success:hover { box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4); transform: translateY(-1px); }

.btn--danger, .btn-danger { background: var(--gradient-danger); color: white; box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3); }
.btn--danger:hover { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4); transform: translateY(-1px); }

.btn--warning, .btn-warning { background: var(--gradient-warning); color: white; box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3); }
.btn--warning:hover { box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4); transform: translateY(-1px); }

.btn--outline, .btn-outline {
    background: white;
    border: 1px solid #e2e8f0;
    color: #334155;
}
.btn--outline:hover, .btn-outline:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn--ghost {
    background: transparent;
    color: #64748b;
    padding: 8px 12px;
}
.btn--ghost:hover {
    background: #f1f5f9;
    color: #334155;
}

.btn--sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 10px;
}
.btn--sm svg { width: 15px; height: 15px; }

.btn--full { width: 100%; }

.btn--icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
}
.btn--icon svg { width: 16px; height: 16px; }

.btn--icon.btn--danger {
    background: transparent;
    color: #ef4444;
    box-shadow: none;
}
.btn--icon.btn--danger:hover {
    background: #fee2e2;
    box-shadow: none;
}
.btn--icon.btn--ghost {
    background: transparent;
    color: #64748b;
}
.btn--icon.btn--ghost:hover {
    background: #f1f5f9;
    color: var(--primary);
}

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

/* ---------- FORM ELEMENTS ---------- */
.form-group { margin-bottom: 20px; }
.form-row > .form-group { margin-bottom: 0; }
.form-row:last-child { margin-bottom: 0; }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    outline: none;
    font-family: inherit;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary-200);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.08);
}
.form-input::placeholder { color: #94a3b8; }

.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
.form-select--sm { padding: 6px 32px 6px 10px; font-size: 13px; border-radius: 8px; }

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

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

.form-hint { font-size: 12px; color: #94a3b8; margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.text-danger { color: var(--danger, #ef4444); }
.text-success { color: var(--success, #22c55e); }
.text-warning { color: var(--warning, #f59e0b); }
.text-muted { color: #94a3b8; }

/* ---------- PRODUCT FORM LAYOUT ---------- */
.product-form__layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}
.product-form__main { min-width: 0; }
.product-form__sidebar { min-width: 0; }

.file-upload {
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}
.file-upload:hover,
.file-upload--dragover { border-color: var(--primary); background: rgba(99, 102, 241, 0.03); }
.file-upload__label { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}
.image-preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid #e2e8f0;
}
.image-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.image-preview-item__remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.image-preview-item__badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(99, 102, 241, 0.85);
    color: white;
    font-size: 11px;
    text-align: center;
    padding: 2px;
}

.variant-table { overflow-x: auto; }
.form-input--sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }

/* ---------- DATA TABLES ---------- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}
.data-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.data-table thead th.sortable:hover { color: var(--primary); }
.sort-icon { color: var(--primary); font-size: 12px; margin-left: 4px; }

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}
.data-table tbody tr {
    transition: background 0.15s ease;
}
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table--mini { font-size: 13px; }
.data-table--mini thead th { padding: 10px 14px; font-size: 11px; }
.data-table--mini tbody td { padding: 10px 14px; }

/* Table Cells */
.table-product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.table-product-cell__image {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}
.table-product-cell__name {
    color: #1e293b;
    font-weight: 500;
    text-decoration: none;
    display: block;
    line-height: 1.3;
}
.table-product-cell__name:hover { color: var(--primary); }

.table-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

/* ---------- BADGES ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.badge--active, .badge--success { background: var(--success-light); color: #065f46; }
.badge--inactive, .badge--warning, .badge--draft { background: var(--warning-light); color: #92400e; }
.badge--danger, .badge--error { background: var(--danger-light); color: #991b1b; }
.badge--info { background: var(--info-light); color: #1e40af; }
.badge--primary { background: var(--primary-100); color: var(--primary-900); }
.badge--default { background: #f1f5f9; color: #475569; }
.badge--paid { background: var(--success-light); color: #065f46; }
.badge--unpaid { background: var(--danger-light); color: #991b1b; }

/* ---------- AVATAR ---------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-50);
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}
.avatar--xs { width: 28px; height: 28px; font-size: 10px; }
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 48px; height: 48px; font-size: 18px; }

/* ---------- STOCK INDICATOR ---------- */
.stock-indicator {
    font-weight: 600;
    font-size: 13px;
}
.stock-indicator--success { color: var(--success); }
.stock-indicator--warning { color: var(--warning); }
.stock-indicator--danger { color: var(--danger); }

/* ---------- FILTER BAR ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-bar__left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}
.filter-bar__search { position: relative; min-width: 260px; flex: 1; max-width: 380px; }
.filter-bar__right { display: flex; align-items: center; gap: 12px; }

/* ---------- BULK ACTIONS ---------- */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: 12px;
    margin-bottom: 16px;
    animation: fadeInDown 0.3s ease-out;
}
.bulk-actions__count { font-size: 13px; font-weight: 600; color: var(--primary-dark); }

/* ---------- PAGINATION ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 16px;
    flex-wrap: wrap;
}
.pagination__info { font-size: 13px; color: #64748b; }
.pagination__buttons { display: flex; gap: 4px; }
.pagination__btn {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    color: #334155;
    transition: all 0.2s ease;
    font-family: inherit;
}
.pagination__btn:hover:not(:disabled) { border-color: var(--primary-200); color: var(--primary); background: var(--primary-50); }
.pagination__btn--active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}
.pagination__btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- EMPTY STATE ---------- */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: #94a3b8;
}
.empty-state svg { margin: 0 auto 16px; color: #cbd5e1; }
.empty-state p { margin-bottom: 16px; font-size: 14px; }
.empty-state--sm { padding: 24px; }

/* ---------- LOADING STATE ---------- */
.loading-state {
    padding: 48px 24px;
    text-align: center;
    color: #94a3b8;
}
.loading-state__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

/* ---------- CHARTS ---------- */
.dashboard-charts {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}
@media (max-width: 1024px) {
    .dashboard-charts { grid-template-columns: 1fr; }
}

.chart-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.chart-container__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}
.chart-container__title { font-size: 16px; font-weight: 600; color: #0f172a; }
.chart-container__body { padding: 24px; min-height: 350px; position: relative; }
.chart-container__body canvas { display: block; }

/* ---------- DASHBOARD ---------- */
.dashboard-quick-actions { margin-bottom: 28px; }
.section-title { font-size: 16px; font-weight: 600; color: #0f172a; margin-bottom: 16px; }

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: white;
    border-radius: 14px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.quick-action-btn svg { width: 20px; height: 20px; color: var(--primary); }
.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-200);
    color: var(--primary);
}

.dashboard-tables {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

/* Low Stock */
.low-stock-list { padding: 4px 0; }
.low-stock-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    transition: background 0.15s;
}
.low-stock-item:hover { background: #f8fafc; }
.low-stock-item__image { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #f1f5f9; }
.low-stock-item__image img { width: 100%; height: 100%; object-fit: cover; }
.low-stock-item__info { flex: 1; min-width: 0; }
.low-stock-item__name { font-size: 13px; font-weight: 500; color: #1e293b; text-decoration: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.low-stock-item__name:hover { color: var(--primary); }
.low-stock-item__sku { font-size: 11px; color: #94a3b8; }
.low-stock-item__stock { text-align: right; }

/* ---------- TOASTS ---------- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    min-width: 320px;
    max-width: 420px;
    pointer-events: all;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.toast.removing { animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) reverse forwards; }

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}
.toast--success::before { background: var(--gradient-success); }
.toast--error::before { background: var(--gradient-danger); }
.toast--warning::before { background: var(--gradient-warning); }
.toast--info::before { background: var(--gradient-accent); }

.toast__icon { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; }
.toast__icon svg { width: 22px; height: 22px; }
.toast--success .toast__icon { color: var(--success); }
.toast--error .toast__icon { color: var(--danger); }
.toast--warning .toast__icon { color: var(--warning); }
.toast--info .toast__icon { color: var(--info); }

.toast__content { flex: 1; }
.toast__title { font-size: 14px; font-weight: 600; color: #0f172a; }
.toast__message { font-size: 13px; color: #64748b; margin-top: 2px; }

.toast__close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.toast__close:hover { background: #f1f5f9; color: #334155; }
.toast__close svg { width: 16px; height: 16px; }

.toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    animation: progress-bar linear forwards;
    border-radius: 0 3px 0 0;
}
.toast--success .toast__progress { background: var(--success); }
.toast--error .toast__progress { background: var(--danger); }
.toast--warning .toast__progress { background: var(--warning); }
.toast--info .toast__progress { background: var(--info); }

/* ---------- CONFIRM MODAL ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 24px;
}

.modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 480px;
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}
.modal--lg { max-width: 640px; }
.modal--xl { max-width: 800px; }

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.modal__close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--bg-hover);
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.modal__close:hover { background: var(--danger-light); color: var(--danger); }

.modal__body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* ---------- ALERT ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
}
.alert--danger {
    background: var(--danger-light, #fef2f2);
    color: var(--danger, #ef4444);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.alert--warning {
    background: var(--warning-light, #fffbeb);
    color: var(--warning, #f59e0b);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.alert--success {
    background: var(--success-light, #f0fdf4);
    color: var(--success, #22c55e);
    border: 1px solid rgba(34, 197, 94, 0.2);
}
.alert--info {
    background: var(--info-light, #eff6ff);
    color: var(--info, #3b82f6);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.confirm-modal__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.confirm-modal__icon svg { width: 28px; height: 28px; }
.confirm-modal__icon--danger { background: var(--danger-light); color: var(--danger); }
.confirm-modal__icon--warning { background: var(--warning-light); color: var(--warning); }
.confirm-modal__icon--info { background: var(--info-light); color: var(--info); }

.confirm-modal__title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
    margin-bottom: 8px;
}
.confirm-modal__message {
    font-size: 14px;
    color: #64748b;
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}
.confirm-modal__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.confirm-modal__actions .btn { flex: 1; max-width: 160px; }

/* ---------- SETTINGS ---------- */
.settings-nav__item--active {
    color: var(--primary) !important;
    background: var(--primary-50) !important;
    font-weight: 600;
}

/* ---------- ORDER DETAIL ---------- */
.order-detail-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}
.order-detail__main { display: flex; flex-direction: column; gap: 20px; }
.order-detail__sidebar { display: flex; flex-direction: column; gap: 20px; }
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row__label { font-weight: 500; color: #64748b; font-size: 13px; }

/* Order Totals */
.order-totals { padding: 8px 0; }
.order-totals__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.order-totals__row:last-child { border-bottom: none; }
.order-totals__row--total {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    border-top: 2px solid #e2e8f0;
    margin-top: 4px;
    padding-top: 14px;
}

/* Order Timeline */
.order-timeline { position: relative; padding: 8px 0; }
.order-timeline__item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    position: relative;
}
.order-timeline__item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 30px;
    bottom: -4px;
    width: 2px;
    background: #e2e8f0;
}
.order-timeline__dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
    border: 3px solid var(--primary-50);
}
.order-timeline__content {
    flex: 1;
    min-width: 0;
}
.order-timeline__content strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 4px;
}
.order-timeline__content p {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 4px 0;
    line-height: 1.5;
}
.order-timeline__content small {
    font-size: 12px;
    color: #94a3b8;
}

/* ---------- TEXT UTILITIES ---------- */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: #94a3b8 !important; }
.text-center { text-align: center !important; }
.text-sm { font-size: 12px !important; }

code {
    padding: 2px 8px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 12px;
    color: #e11d48;
    font-family: 'JetBrains Mono', monospace;
}

/* ---------- LOGIN PAGE ---------- */
.login-body {
    min-height: 100vh;
    background: var(--gradient-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}
.login-body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    pointer-events: none;
}
.login-body::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    pointer-events: none;
}

.login-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.6s ease-out;
}

.login-card__logo { text-align: center; margin-bottom: 36px; }
.login-card__logo-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    margin-bottom: 16px;
}
.login-card__logo-icon svg { width: 28px; height: 28px; }
.login-card__title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}
.login-card__subtitle { font-size: 14px; color: rgba(148, 163, 184, 0.8); }

.login-card__error {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #fca5a5;
    font-size: 13px;
    margin-bottom: 20px;
    animation: fadeInDown 0.3s ease-out;
}

.login-card .form-label { color: rgba(226, 232, 240, 0.9); }
.login-card .form-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    border-radius: 12px;
    height: 48px;
    width: 100%;
    box-sizing: border-box;
}

.login-card .form-group {
    width: 100%;
}

.login-card__form {
    width: 100%;
    overflow: hidden;
}
.login-card .form-input::placeholder { color: rgba(148, 163, 184, 0.5); }
.login-card .form-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.login-card .btn--primary {
    height: 48px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 8px;
    border-radius: 12px;
}

.login-card__footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.login-card__footer p { font-size: 12px; color: rgba(148, 163, 184, 0.5); }

.btn__spinner { animation: spin 1s linear infinite; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1280px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid--4 { grid-template-columns: repeat(2, 1fr); }
    .dashboard-charts { grid-template-columns: 1fr; }
    .dashboard-tables { grid-template-columns: 1fr; }
    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
    .order-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    .admin-main {
        margin-left: 0;
    }
    .sidebar-collapsed .admin-main {
        margin-left: 0;
    }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
    .settings-nav__item { width: auto; }
}

@media (max-width: 768px) {
    .admin-header { padding: 0 16px; }
    .admin-header__search { display: none; }
    .admin-header__profile-name { display: none; }
    .admin-content { padding: 16px; }
    .page-header__title { font-size: 22px; }
    .stat-grid { grid-template-columns: 1fr; }
    .stats-grid--4, .stats-grid--3, .stats-grid--2 { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar__left { flex-direction: column; }
    .filter-bar__search { min-width: unset; max-width: unset; }
    .data-table { font-size: 13px; }
    .data-table thead th, .data-table tbody td { padding: 10px 12px; }
    .pagination { flex-direction: column; align-items: center; }
    .quick-actions-grid { grid-template-columns: 1fr; }
    .login-card { padding: 36px 28px; }
    .form-row { grid-template-columns: 1fr; }
    .product-form__layout { grid-template-columns: 1fr; }
    .order-detail-layout { grid-template-columns: 1fr; }
}

/* ---------- TAB NAVIGATION ---------- */
.tab-nav {
    display: flex;
    gap: 4px;
    background: white;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
}
.tab-nav__item {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}
.tab-nav__item:hover { color: #334155; background: #f1f5f9; }
.tab-nav__item--active {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ---------- STOCK MOVEMENT TABLE ---------- */
.movement-badge--in { background: var(--success-light); color: #065f46; }
.movement-badge--out { background: var(--danger-light); color: #991b1b; }
.movement-badge--adjust { background: var(--warning-light); color: #92400e; }

/* ---------- LOG STYLES ---------- */
.log-item {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background 0.15s;
}
.log-item:hover { background: #f8fafc; }
.log-item:last-child { border-bottom: none; }
.log-item__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.log-item__icon--info { background: var(--info-light); color: var(--info); }
.log-item__icon--warning { background: var(--warning-light); color: var(--warning); }
.log-item__icon--danger { background: var(--danger-light); color: var(--danger); }
.log-item__icon--success { background: var(--success-light); color: var(--success); }
.log-item__content { flex: 1; min-width: 0; }
.log-item__title { font-size: 14px; font-weight: 500; color: #1e293b; }
.log-item__meta { font-size: 12px; color: #94a3b8; margin-top: 2px; }

/* ---------- REVIEW STYLES ---------- */
.review-stars { color: #f59e0b; font-size: 14px; letter-spacing: 1px; }

/* ---------- NOTIFICATION LIST ---------- */
.notification-list-item {
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: background 0.15s;
    cursor: pointer;
}
.notification-list-item:hover { background: #f8fafc; }
.notification-list-item.unread { background: var(--primary-50); }
.notification-list-item.unread:hover { background: var(--primary-100); }
.notification-list-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notification-list-item__content { flex: 1; }
.notification-list-item__title { font-size: 14px; font-weight: 500; color: #1e293b; }
.notification-list-item__body { font-size: 13px; color: #64748b; margin-top: 2px; }
.notification-list-item__time { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* ---------- API KEY STYLES ---------- */
.api-key-code {
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
    padding: 8px 14px;
    background: #0f172a;
    color: #a5f3fc;
    border-radius: 10px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    overflow-x: auto;
}
.api-key-code button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}
.api-key-code button:hover { background: rgba(255, 255, 255, 0.2); color: white; }

/* ---------- SEO SCORE ---------- */
.seo-score {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}
.seo-score--good { background: var(--success-light); color: var(--success); }
.seo-score--average { background: var(--warning-light); color: var(--warning); }
.seo-score--bad { background: var(--danger-light); color: var(--danger); }

/* ---------- INVOICE STYLES ---------- */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}
.invoice-total {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

/* ---------- RETURN STYLES ---------- */
.return-reason {
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 3px solid var(--warning);
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
}

/* ---------- LOOKUP STYLES ---------- */
.lookup-tabs {
    display: flex;
    gap: 4px;
    background: white;
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
    flex-wrap: wrap;
}
.lookup-tab {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}
.lookup-tab:hover { color: #334155; background: #f1f5f9; }
.lookup-tab.active {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ---------- SECURITY STYLES ---------- */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.security-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.security-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.security-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.security-card__icon svg { width: 22px; height: 22px; }
.security-card__title { font-size: 16px; font-weight: 600; color: #0f172a; }
