/* ============================================
   UAGTools - Dark Blue Theme Stylesheet
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #101829;
    --bg-card: #151d30;
    --bg-card-hover: #1a2440;
    --bg-input: #111a2e;
    --border: rgba(59, 130, 246, 0.12);
    --border-hover: rgba(59, 130, 246, 0.3);

    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;

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

    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --glow: 0 0 20px rgba(59, 130, 246, 0.15);
    --glow-strong: 0 0 40px rgba(59, 130, 246, 0.25);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Light Theme ---------- */
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #e4e7ec;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9fb;
    --bg-input: #f4f6f8;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(59, 130, 246, 0.3);

    --text-primary: #1a1d26;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --glow: 0 0 20px rgba(59, 130, 246, 0.08);
    --glow-strong: 0 0 40px rgba(59, 130, 246, 0.12);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.9) !important;
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .nav-link {
    color: var(--text-secondary) !important;
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: var(--blue-600) !important;
}

[data-theme="light"] .nav-user-btn {
    background: rgba(59, 130, 246, 0.06);
}
[data-theme="light"] .nav-user-dropdown {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .hero {
    background: linear-gradient(135deg, #e8edf5 0%, #dce3f0 50%, #eef1f8 100%);
}

[data-theme="light"] .hero h1,
[data-theme="light"] .hero p {
    color: var(--text-primary);
}

[data-theme="light"] .hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] .footer {
    background: #1a1d26;
    color: #e2e8f0;
}

[data-theme="light"] .toast {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .modal {
    background: #ffffff;
}

[data-theme="light"] .ss-dropdown {
    background: #ffffff;
}

[data-theme="light"] .ss-option:hover {
    background: #f0f4ff;
}

[data-theme="light"] .admin-topbar {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .admin-topbar-title {
    color: var(--text-primary);
}

[data-theme="light"] .admin-topbar-user-btn {
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .admin-topbar-user-btn:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .admin-topbar-dropdown {
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .admin-topbar-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.06);
}

[data-theme="light"] .admin-topbar-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .admin-sidebar {
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .admin-sidebar-link:hover {
    background: rgba(59, 130, 246, 0.06);
}

[data-theme="light"] .admin-sidebar-link.active {
    background: rgba(59, 130, 246, 0.1);
}

[data-theme="light"] .admin-toolbar {
    background: #f8f9fb;
}

/* ---------- Theme Toggle ---------- */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--blue-400);
    color: var(--blue-400);
    background: var(--bg-card-hover);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--blue-400);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--blue-300);
}

img {
    max-width: 100%;
}

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* ---------- Typography ---------- */
.text-gradient {
    background: linear-gradient(135deg, var(--blue-400), var(--blue-200));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--blue-400);
    border: 1.5px solid var(--blue-500);
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--blue-400);
    color: var(--blue-300);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

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

/* ---------- Navbar ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
}

.brand-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.brand-accent {
    color: var(--blue-400);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.brand-logo {
    height: 36px;
    width: auto;
    border-radius: 8px;
}

.nav-link {
    padding: 0.5rem 0.9rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(59, 130, 246, 0.08);
}

.nav-credits {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--blue-300);
    font-size: 0.85rem;
    font-weight: 600;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---------- Nav User Dropdown ---------- */
.nav-user-wrapper {
    position: relative;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem 0.35rem 0.35rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
}

.nav-user-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--blue-600);
}

.nav-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.nav-user-name {
    font-size: 0.82rem;
    font-weight: 600;
}

.nav-user-balance {
    font-size: 0.72rem;
    color: var(--blue-300);
    font-weight: 500;
}

.nav-user-arrow {
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: var(--transition);
    margin-left: 0.15rem;
}

.nav-user-wrapper.open .nav-user-arrow {
    transform: rotate(180deg);
}

.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1100;
    overflow: hidden;
}

.nav-user-wrapper.open .nav-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(59, 130, 246, 0.04);
}

.nav-user-dropdown-divider {
    height: 1px;
    background: var(--border);
}

.nav-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1rem;
    font-size: 0.84rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-user-dropdown-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
}

.nav-user-dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.82rem;
}

.nav-user-dropdown-danger {
    color: var(--error);
}

.nav-user-dropdown-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--error);
}

/* ---------- User Avatar (Large - Account Page) ---------- */
.user-avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

/* ---------- Announcement Bar ---------- */
.announcement-bar {
    margin-top: 70px;
    padding: 0.6rem 0;
    background: linear-gradient(90deg, var(--blue-700), var(--blue-600));
    text-align: center;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--blue-100);
    animation: slideDown 0.4s ease;
}

.announcement-bar + .flash-message {
    margin-top: 0;
}

.announcement-bar ~ main .hero {
    padding-top: 8rem;
}

/* ---------- API Docs ---------- */
.apidocs {
    padding-top: 6rem;
    padding-bottom: 3rem;
}

.apidocs-header {
    text-align: center;
    margin-bottom: 3rem;
}

.endpoint-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.endpoint-header:hover {
    background: rgba(59, 130, 246, 0.03);
}

.endpoint-method {
    padding: 0.25rem 0.6rem;
    background: var(--blue-600);
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.endpoint-path {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.endpoint-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-left: auto;
}

.endpoint-body {
    padding: 1.5rem;
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.param-table th,
.param-table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
}

.param-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.param-required {
    color: var(--error);
    font-size: 0.7rem;
    font-weight: 600;
}

.param-optional {
    color: var(--text-muted);
    font-size: 0.7rem;
}

.code-block {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow-x: auto;
    color: var(--text-secondary);
    white-space: pre;
}

.code-block .code-key {
    color: var(--blue-300);
}

.code-block .code-string {
    color: var(--success);
}

.code-block .code-comment {
    color: var(--text-muted);
    font-style: italic;
}

/* ---------- Toast Notifications ---------- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 1.25rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
    width: calc(100% - 2.5rem);
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.toast.toast-removing {
    animation: toastSlideOut 0.35s cubic-bezier(0.5, 0, 0.7, 0) forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-top: 1px;
}

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

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.toast-info .toast-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.toast-success .toast-title { color: var(--success); }
.toast-error .toast-title { color: var(--error); }
.toast-info .toast-title { color: var(--primary); }

.toast-msg {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.4;
    word-break: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 12px 12px;
    animation: toastProgress linear forwards;
}

.toast-success .toast-progress { background: var(--success); }
.toast-error .toast-progress { background: var(--error); }
.toast-info .toast-progress { background: var(--primary); }

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

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
        max-height: 200px;
        margin-bottom: 0;
    }
    to {
        opacity: 0;
        transform: translateX(100px);
        max-height: 0;
        margin-bottom: -0.75rem;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    padding: 10rem 0 5rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-glow {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.2rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--blue-300);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.hero-stat-icon {
    width: 42px;
    height: 42px;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-400);
    font-size: 1rem;
}

.stat-number {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ---------- Sections ---------- */
.section {
    padding: 5rem 0;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--blue-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto;
}

/* ---------- Features Grid ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--blue-400);
    margin-bottom: 1.25rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---------- Services ---------- */
.services-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.5rem 1.3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.tab-btn:hover,
.tab-btn.active {
    background: rgba(59, 130, 246, 0.12);
    border-color: var(--blue-500);
    color: var(--blue-300);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    position: relative;
    padding: 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--glow);
}

.service-card.hidden {
    display: none;
}

.service-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.2rem 0.7rem;
    background: var(--blue-600);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-premium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--blue-400);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.service-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--blue-300);
}

/* ---------- Stats Section ---------- */
.stats-section {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow);
}

.stat-card .stat-icon {
    font-size: 1.5rem;
    color: var(--blue-400);
    margin-bottom: 0.75rem;
}

.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---------- Resellers / Partners ---------- */
.resellers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.25rem;
}

.reseller-card {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reseller-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--glow);
}

.reseller-avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-400));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
}

.reseller-type {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    margin-bottom: 0.6rem;
}

.reseller-type-reseller {
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue-400);
}

.reseller-type-distributor {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
}

.reseller-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
    color: var(--text);
}

.reseller-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.6rem 0 0.85rem;
    width: 100%;
}

.reseller-link-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    overflow: hidden;
}

.reseller-link-item i {
    font-size: 0.72rem;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
    color: var(--blue-400);
}

.reseller-link-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reseller-link-item:hover {
    color: var(--blue-400);
}

.reseller-socials {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    width: 100%;
}

.reseller-socials a {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.reseller-socials a:hover {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue-300);
    border-color: var(--blue-500);
}

/* ---------- CTA Section ---------- */
.cta-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 6rem 0;
}

/* ---------- Forms ---------- */
.auth-container {
    max-width: 440px;
    margin: 6rem auto 3rem;
    padding: 0 1rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.auth-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    text-align: center;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ---------- Dashboard ---------- */
.dashboard {
    padding-top: 5.5rem;
    padding-bottom: 3rem;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dash-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
}

.dash-header .dash-role {
    padding: 0.3rem 0.8rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border);
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue-400);
    text-transform: uppercase;
}

.dash-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.dash-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.dash-card:hover {
    border-color: var(--border-hover);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.dash-card-icon {
    width: 42px;
    height: 42px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-400);
    font-size: 1rem;
}

.dash-card-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.dash-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* ---------- Panels / Tables ---------- */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.panel.panel-overflow-visible {
    overflow: visible;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-body {
    padding: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(59, 130, 246, 0.03);
}

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

.data-table tr:hover td {
    background: rgba(59, 130, 246, 0.03);
}

/* ---------- Status Badges ---------- */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-pending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.status-processing {
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue-400);
}

.status-completed {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.status-rejected,
.status-cancelled {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
}

/* ---------- Order Form ---------- */
.order-container {
    max-width: 600px;
    margin: 6rem auto 3rem;
    padding: 0 1rem;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.order-service-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.order-service-info .service-icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

.order-service-details h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.order-service-details span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------- Credits Page ---------- */
.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.credit-card {
    padding: 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.credit-card:hover {
    border-color: var(--blue-500);
    transform: translateY(-3px);
    box-shadow: var(--glow);
}

.credit-card.popular {
    border-color: var(--blue-500);
    box-shadow: var(--glow);
}

.credit-card.popular::after {
    content: 'POPULAR';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.2rem 0.8rem;
    background: var(--blue-600);
    color: #fff;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.credit-card h4 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.credit-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--blue-300);
    margin-bottom: 0.25rem;
}

.credit-bonus {
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 600;
    margin-bottom: 1rem;
}

.credit-price {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.credit-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.credit-card-actions .pay-btn {
    font-size: 0.82rem;
    padding: 0.55rem 1rem;
}

/* Custom Amount */
.custom-amount-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.custom-amount-input-wrap {
    position: relative;
    flex: 0 0 200px;
}

.custom-amount-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    pointer-events: none;
}

.custom-amount-input {
    padding-left: 28px !important;
    font-size: 1.1rem !important;
    font-weight: 600;
    height: 44px;
}

.custom-amount-summary {
    font-size: 0.88rem;
    color: var(--text-secondary);
    flex: 1;
    min-width: 150px;
}

.custom-amount-summary strong {
    color: var(--blue-300);
}

.custom-amount-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.custom-amount-buttons .pay-btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .custom-amount-row {
        flex-direction: column;
        align-items: stretch;
    }
    .custom-amount-input-wrap {
        flex: 1;
    }
    .custom-amount-buttons {
        flex-direction: column;
    }
}

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */

/* --- Admin Top Bar --- */
.admin-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    z-index: 200;
    backdrop-filter: blur(12px);
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-topbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.admin-topbar-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text);
}

.admin-topbar-logo {
    height: 30px;
    width: auto;
}

.admin-topbar-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600, #4f46e5));
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
}

.admin-topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.admin-topbar-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue-400);
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-topbar-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.admin-topbar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.admin-topbar .theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.admin-topbar-user {
    position: relative;
}

.admin-topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

.admin-topbar-user-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--blue-500);
}

.admin-topbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-600, #6366f1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.admin-topbar-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.admin-topbar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
}

.admin-topbar-user-role {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.admin-topbar-arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.admin-topbar-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.35rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 300;
}

.admin-topbar-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    border-radius: 7px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.admin-topbar-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.admin-topbar-dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.8rem;
}

.admin-topbar-dropdown-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
}

.admin-topbar-dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.3rem 0;
}

/* --- Layout --- */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
    padding-top: 56px;
}

/* --- Sidebar --- */
.admin-sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    z-index: 40;
}

.admin-sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-sidebar-logo {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.admin-sidebar-title {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.admin-sidebar-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Sidebar Navigation --- */
.admin-sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.admin-sidebar-section {
    padding: 0.85rem 1.25rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
}

.admin-sidebar-link:hover {
    background: rgba(59, 130, 246, 0.05);
    color: var(--text-primary);
}

.admin-sidebar-link.active {
    background: rgba(59, 130, 246, 0.08);
    color: var(--blue-400);
    border-left-color: var(--blue-500);
    font-weight: 600;
}

.admin-sidebar-link i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.admin-sidebar-badge {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue-400);
}

.admin-sidebar-badge.badge-warning {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}

.admin-sidebar-badge.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.admin-sidebar-footer {
    padding: 0.5rem 0;
    border-top: 1px solid var(--border);
}

/* --- Main Content --- */
.admin-main {
    flex: 1;
    min-width: 0;
    padding: 1.75rem 2rem 3rem;
}

/* --- Stats Grid --- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.admin-stat-card:hover {
    border-color: var(--border-hover);
}

.admin-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1rem;
    flex-shrink: 0;
}

.admin-stat-content {
    display: flex;
    flex-direction: column;
}

.admin-stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
}

.admin-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

/* --- Content Header --- */
.admin-content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-content-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.admin-content-header h2 i {
    color: var(--blue-400);
    font-size: 1.1rem;
}

.admin-content-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

/* --- Admin Panels --- */
.admin-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.admin-panel.panel-overflow-visible {
    overflow: visible;
}

.admin-panel-warning {
    border-color: rgba(234, 179, 8, 0.3);
}

.admin-panel-highlight {
    border-color: rgba(59, 130, 246, 0.25);
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.admin-panel-header h3 {
    font-size: 0.92rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-panel-header h3 i {
    color: var(--blue-400);
    font-size: 0.85rem;
}

.admin-panel-body {
    padding: 1.25rem;
}

/* --- Admin Table --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.7rem 0.85rem;
    text-align: left;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table th {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: rgba(59, 130, 246, 0.03);
    white-space: nowrap;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

.td-truncate {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Admin UI Elements --- */
.admin-id-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: rgba(59, 130, 246, 0.08);
    color: var(--blue-400);
    white-space: nowrap;
}

.admin-code {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.admin-muted {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.admin-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 0.75rem;
}

.admin-hint code {
    font-size: 0.72rem;
    padding: 0.1rem 0.35rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 3px;
}

.admin-hint-box {
    background: rgba(59, 130, 246, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: var(--radius);
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
}

/* --- Action Buttons --- */
.admin-actions-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.admin-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.78rem;
    text-decoration: none;
}

.admin-action-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--blue-500);
    color: var(--blue-400);
}

.admin-action-warning:hover {
    background: rgba(234, 179, 8, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.admin-action-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

/* --- Admin Empty State --- */
.admin-empty {
    padding: 3rem 2rem;
    text-align: center;
}

.admin-empty i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: block;
}

.admin-empty h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.admin-empty p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Admin User Profile Grid --- */
.admin-user-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.admin-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.admin-detail-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.admin-detail-value {
    font-size: 0.88rem;
    font-weight: 500;
}

/* --- Admin Toolbar (Search/Sort/PerPage) --- */
.admin-toolbar {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.admin-toolbar-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.admin-search-input {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.admin-search-input i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.82rem;
    pointer-events: none;
}

.admin-search-input .form-control {
    padding-left: 2.3rem;
    font-size: 0.85rem;
    height: 38px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.admin-search-input .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.admin-toolbar-form .form-control {
    width: auto;
}

.admin-select {
    height: 38px;
    font-size: 0.82rem;
    padding: 0 2rem 0 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    min-width: 130px;
    width: auto;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: border-color 0.2s ease;
}

.admin-select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.admin-select-sm {
    min-width: 75px;
    width: 75px;
}

.admin-search-btn {
    height: 38px;
    width: 38px;
    min-width: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.82rem;
    flex-shrink: 0;
}

/* --- Admin Table Footer --- */
.admin-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-table-footer-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.admin-table-footer-info strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.admin-table-footer .pagination {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
}

/* --- Settings Sub-Layout --- */
.settings-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.settings-nav {
    width: 200px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.4rem;
    position: sticky;
    top: calc(56px + 1.75rem);
}

.settings-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.settings-nav-link i {
    width: 16px;
    text-align: center;
    font-size: 0.82rem;
}

.settings-nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.settings-nav-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-400);
    font-weight: 600;
}

.settings-content {
    flex: 1;
    min-width: 0;
}

.form-hint {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.4;
}

.settings-preview {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.settings-preview-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.settings-preview-img {
    max-height: 48px;
    width: auto;
}

.settings-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.88rem;
}

.settings-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.settings-toggle-switch {
    display: inline-block;
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    flex-shrink: 0;
    transition: background 0.25s ease;
}

.settings-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.settings-checkbox:checked + .settings-toggle-switch {
    background: var(--blue-500);
}

.settings-checkbox:checked + .settings-toggle-switch::after {
    transform: translateX(20px);
}

.settings-checkbox:focus-visible + .settings-toggle-switch {
    outline: 2px solid var(--blue-400);
    outline-offset: 2px;
}

[data-theme="light"] .settings-toggle-switch {
    background: #cbd5e1;
}

[data-theme="light"] .settings-checkbox:checked + .settings-toggle-switch {
    background: var(--blue-500);
}

[data-theme="light"] .settings-nav {
    background: #ffffff;
}

[data-theme="light"] .settings-nav-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .settings-nav-link.active {
    background: rgba(59, 130, 246, 0.08);
}

/* --- Responsive Admin --- */
@media (max-width: 1024px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-main {
        padding: 1.25rem 1rem 2rem;
    }
}

@media (max-width: 768px) {
    .admin-topbar-toggle {
        display: flex;
    }

    .admin-topbar-link span {
        display: none;
    }

    .admin-topbar-user-info {
        display: none;
    }

    .admin-sidebar {
        position: fixed;
        left: -280px;
        top: 56px;
        height: calc(100vh - 56px);
        transition: left 0.3s ease;
        z-index: 100;
        box-shadow: none;
    }

    .admin-sidebar.open {
        left: 0;
        box-shadow: 8px 0 30px rgba(0,0,0,0.4);
    }

    .admin-layout {
        flex-direction: column;
    }

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

    .admin-main {
        padding: 1rem 0.75rem 2rem;
    }

    .admin-toolbar-form {
        gap: 0.5rem;
    }

    .admin-search-input {
        min-width: 100%;
    }

    .admin-select {
        flex: 1;
        min-width: 0;
    }

    .admin-select-sm {
        min-width: 0;
        width: auto;
        flex: 0 1 75px;
    }

    .admin-table-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    .settings-layout {
        flex-direction: column;
    }

    .settings-nav {
        width: 100%;
        position: static;
        flex-direction: row;
        overflow-x: auto;
        gap: 0.25rem;
        padding: 0.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
        margin-bottom: 1rem;
    }

    .settings-nav-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .settings-content {
        padding: 0;
    }
}

/* Old admin tabs (keep for backward compat) */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 0.6rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-tab:hover,
.admin-tab.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--blue-500);
    color: var(--blue-300);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.15);
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 0.35rem;
}

.admin-tab.active .tab-count {
    background: rgba(59, 130, 246, 0.25);
    color: var(--blue-300);
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.pagination-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--blue-500);
    color: var(--blue-300);
}

.pagination-btn.active {
    background: var(--blue-600);
    border-color: var(--blue-500);
    color: #fff;
    font-weight: 700;
}

.pagination-dots {
    color: var(--text-muted);
    font-size: 0.84rem;
    padding: 0 0.25rem;
}

/* ---------- Table Footer (generic) ---------- */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.table-footer-info {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.table-footer .pagination {
    margin: 0;
    padding: 0;
}

/* ---------- Sortable Table Headers ---------- */
.th-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.th-sort:hover {
    color: var(--blue-300);
}

.th-sort i {
    font-size: 0.7rem;
    color: var(--blue-400);
}

/* ==========================================================================
   ORDERS PAGE
   ========================================================================== */

/* --- Page Header --- */
.orders-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.orders-page-title h1 {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.orders-page-title h1 i {
    color: var(--blue-400);
    font-size: 1.2rem;
}

.orders-page-title p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

.orders-page-actions {
    display: flex;
    gap: 0.6rem;
}

/* --- Stats Cards --- */
.orders-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.orders-stat-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.orders-stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.orders-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1rem;
    flex-shrink: 0;
}

.orders-stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.orders-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.2;
}

.orders-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

/* --- Toolbar --- */
.orders-toolbar {
    margin-bottom: 1.5rem;
}

.orders-filters {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.orders-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.orders-filter-pill:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.orders-filter-pill.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--blue-500);
    color: var(--blue-300);
    font-weight: 600;
}

.orders-filter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.orders-filter-dot.dot-active { background: var(--warning); }
.orders-filter-dot.dot-completed { background: var(--success); }
.orders-filter-dot.dot-rejected { background: var(--error); }

.orders-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: rgba(255,255,255,0.06);
    font-size: 0.68rem;
    font-weight: 700;
}

.orders-filter-pill.active .orders-filter-count {
    background: rgba(59, 130, 246, 0.2);
}

/* --- Search Bar --- */
.orders-search-bar {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.orders-search-input {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.orders-search-input > i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

.orders-search-input .form-control {
    padding-left: 2.2rem;
    padding-right: 2rem;
    height: 40px;
    border-radius: var(--radius);
}

.orders-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.orders-search-clear:hover {
    color: var(--error);
}

.orders-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.orders-select {
    width: auto !important;
    min-width: 150px;
    height: 40px !important;
    border-radius: var(--radius) !important;
    font-size: 0.82rem !important;
}

.orders-select-sm {
    min-width: 90px !important;
}

.orders-search-btn {
    height: 40px;
    width: 40px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    flex-shrink: 0;
}

/* --- Search Notice --- */
.orders-search-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.orders-search-notice i {
    color: var(--blue-400);
}

.orders-search-notice a {
    margin-left: auto;
    color: var(--blue-400);
    font-weight: 500;
    font-size: 0.78rem;
}

/* --- Table Wrapper --- */
.orders-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

/* --- Empty State --- */
.orders-empty {
    padding: 3.5rem 2rem;
    text-align: center;
}

.orders-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.orders-empty-icon i {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.orders-empty h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.orders-empty p {
    color: var(--text-muted);
    font-size: 0.88rem;
    max-width: 360px;
    margin: 0 auto;
}

/* --- Table Header --- */
.orders-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.orders-table-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.orders-table-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}

.orders-table-range {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.orders-table-page-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Table Rows --- */
.orders-table tbody tr {
    transition: var(--transition);
}

.orders-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

/* Order ID badge */
.order-id-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: rgba(59, 130, 246, 0.08);
    color: var(--blue-400);
}

/* Service column */
.order-service-name {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.35;
    max-width: 320px;
}

.order-service-cat {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* IMEI */
.order-imei {
    font-size: 0.78rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Price */
.order-price {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Status badge */
.order-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.order-status-badge i {
    font-size: 0.62rem;
}

.order-status-badge.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.order-status-badge.status-pending {
    background: rgba(234, 179, 8, 0.1);
    color: var(--warning);
}

.order-status-badge.status-processing {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-400);
}

.order-status-badge.status-rejected,
.order-status-badge.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

/* Result column */
.order-result {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: default;
}

.order-no-result {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Date column */
.order-date {
    font-size: 0.82rem;
    white-space: nowrap;
}

.order-date-full {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* --- Table Footer --- */
.orders-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.orders-table-footer-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.orders-table-footer-info strong {
    color: var(--text-secondary);
}

.orders-table-footer .pagination {
    margin: 0;
    padding: 0;
    border: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .orders-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .orders-stat-card {
        padding: 0.85rem;
    }

    .orders-stat-value {
        font-size: 1rem;
    }

    .orders-page-header {
        flex-direction: column;
    }

    .orders-search-bar {
        flex-direction: column;
    }

    .orders-search-input {
        width: 100%;
        min-width: unset;
    }

    .orders-controls {
        width: 100%;
        flex-wrap: wrap;
    }

    .orders-select {
        flex: 1;
        min-width: 0 !important;
    }

    .orders-table-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .orders-stats {
        grid-template-columns: 1fr 1fr;
    }

    .orders-stat-icon {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .orders-filters {
        gap: 0.3rem;
    }

    .orders-filter-pill {
        padding: 0.35rem 0.65rem;
        font-size: 0.72rem;
    }
}

/* ---------- Modal ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

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

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

/* ---------- Download Page ---------- */
.download-page {
    padding: 2rem 0 4rem;
}

.download-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

.download-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.download-header h1 i {
    color: var(--blue-400);
}

.download-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.download-grid {
    display: grid;
    gap: 1.25rem;
}

.download-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.download-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--glow);
}

.download-card-featured {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.75rem;
    padding: 2rem 2.5rem;
}

.download-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.download-card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.download-card-body p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    max-width: 480px;
}

.download-card-meta {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.download-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.download-card-meta span i {
    color: var(--blue-400);
    font-size: 0.72rem;
}

.download-card-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.download-card-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.download-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.download-empty i {
    font-size: 2.5rem;
    color: var(--text-muted);
    opacity: 0.4;
    display: block;
    margin-bottom: 1rem;
}

.download-empty h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.download-empty p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.download-instructions {
    margin-top: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
}

.download-instructions h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-instructions h3 i {
    color: var(--blue-400);
}

.download-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.download-step {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.download-step-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--blue-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.download-step h4 {
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.download-step p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .download-header {
        flex-direction: column;
    }

    .download-card-featured {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .download-card-icon {
        margin: 0 auto;
    }

    .download-card-meta {
        justify-content: center;
    }

    .download-steps {
        grid-template-columns: 1fr;
    }
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ---------- Footer ---------- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 3rem;
}

.footer-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-top: 1rem;
    line-height: 1.7;
    max-width: 300px;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.social-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-link:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--blue-500);
    color: var(--blue-400);
}

.footer-links h4 {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--blue-400);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--blue-800);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(20px);
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: 0.25rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 0.75rem 1rem;
    }

    .nav-user-wrapper {
        width: 100%;
    }

    .nav-user-btn {
        width: 100%;
        border-radius: var(--radius-sm);
    }

    .nav-user-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        margin-top: 0.5rem;
        display: none;
    }

    .nav-user-wrapper.open .nav-user-dropdown {
        display: block;
    }

    .hero {
        padding: 7rem 0 3rem;
        min-height: auto;
    }

    .hero-stats {
        gap: 1rem;
    }

    .hero-stat {
        flex: 1 1 140px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: span 2;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .features-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

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

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

    .footer-brand {
        grid-column: span 1;
    }

    .hero-title {
        font-size: 2rem;
    }

    .auth-card {
        padding: 1.75rem;
    }
}

/* ---------- User Detail View ---------- */
.user-detail-item {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.user-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.user-detail-value {
    font-size: 0.95rem;
    color: var(--text);
    word-break: break-all;
}

/* ---------- Searchable Select ---------- */
.ss-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
}

.ss-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 46px;
    overflow: hidden;
}

.ss-trigger:hover {
    border-color: var(--primary);
}

.ss-wrapper.ss-open .ss-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ss-wrapper.ss-open .ss-trigger .ss-arrow {
    transform: rotate(180deg);
}

.ss-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.ss-placeholder {
    color: var(--text-muted);
}

.ss-arrow {
    flex-shrink: 0;
    margin-left: 0.5rem;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.ss-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-top: none;
    border-radius: 0 0 10px 10px;
    z-index: 1000;
    display: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    max-height: 300px;
    overflow: hidden;
    flex-direction: column;
}

.ss-wrapper.ss-open .ss-dropdown {
    display: flex;
}

.ss-dropdown.ss-above {
    top: auto;
    bottom: 100%;
    border: 1px solid var(--primary);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.4);
}

.ss-wrapper.ss-open.ss-above .ss-trigger {
    border-radius: 0 0 10px 10px;
    border-top-color: transparent;
}

.ss-search-wrap {
    position: relative;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.ss-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.ss-search {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2.25rem;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.ss-search:focus {
    border-color: var(--primary);
}

.ss-search::placeholder {
    color: var(--text-muted);
}

.ss-list {
    overflow-y: auto;
    max-height: 220px;
    padding: 0.35rem;
}

.ss-list::-webkit-scrollbar {
    width: 6px;
}

.ss-list::-webkit-scrollbar-track {
    background: transparent;
}

.ss-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.ss-option {
    padding: 0.6rem 0.85rem;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}

.ss-option:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text);
}

.ss-option.ss-selected {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    font-weight: 500;
}

.ss-highlight {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text);
    border-radius: 2px;
    padding: 0 1px;
}

.ss-no-results {
    padding: 1.25rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}
