/* ═══════════════════════════════════════════════════════════════
   PayHub Admin Panel — Design System
   Dark mode, Glassmorphism, Premium UI
═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --bg-primary: #0d0f1a;
    --bg-secondary: #141627;
    --bg-card: rgba(255,255,255,0.04);
    --bg-card-hover: rgba(255,255,255,0.07);
    --bg-sidebar: #0f1123;
    --bg-topbar: rgba(13,15,26,0.85);
    --bg-hover: rgba(255,255,255,0.05);
    --border-color: rgba(255,255,255,0.08);
    --border-glow: rgba(99,102,241,0.4);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-1: #6366f1; /* indigo */
    --accent-2: #8b5cf6; /* violet */
    --accent-3: #06b6d4; /* cyan */
    --accent-4: #10b981; /* emerald */
    --accent-5: #f59e0b; /* amber */
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;
    --gradient-brand: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-card: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(139,92,246,0.08) 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444, #dc2626);
    --gradient-success: linear-gradient(135deg, #10b981, #059669);
    --gradient-amber: linear-gradient(135deg, #f59e0b, #d97706);
    --gradient-cyan: linear-gradient(135deg, #06b6d4, #0891b2);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 30px rgba(99,102,241,0.15);
    --shadow-hover: 0 8px 32px rgba(0,0,0,0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(15, 23, 42, 0.04);
    --bg-card-hover: rgba(15, 23, 42, 0.07);
    --bg-sidebar: #f8fafc;
    --bg-topbar: rgba(255, 255, 255, 0.85);
    --bg-hover: rgba(15, 23, 42, 0.05);
    --border-color: rgba(15, 23, 42, 0.08);
    --border-glow: rgba(99, 102, 241, 0.2);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);
    --gradient-card: linear-gradient(135deg, rgba(99,102,241,0.05) 0%, rgba(139,92,246,0.03) 100%);
    --shadow-glow: 0 0 30px rgba(99,102,241,0.05);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.2);
    }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-brand);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(99,102,241,0.4);
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
}

    .sidebar-logo-text .brand-name {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-primary);
        letter-spacing: -0.3px;
        background: var(--gradient-brand);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .sidebar-logo-text .brand-sub {
        font-size: 10px;
        color: var(--text-muted);
        font-weight: 500;
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 10px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

    .nav-item:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }

    .nav-item.active {
        background: rgba(99,102,241,0.15);
        color: var(--accent-1);
        font-weight: 600;
    }

        .nav-item.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 60%;
            background: var(--gradient-brand);
            border-radius: 0 2px 2px 0;
        }

    .nav-item .nav-icon {
        font-size: 16px;
        width: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .nav-item .nav-badge {
        margin-left: auto;
        background: var(--accent-danger);
        color: white;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 6px;
        border-radius: 10px;
        min-width: 18px;
        text-align: center;
    }

.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid var(--border-color);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    transition: all var(--transition);
}

    .user-card:hover {
        background: var(--bg-card-hover);
    }

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ── Main Layout ────────────────────────────────────────────── */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--bg-topbar);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    z-index: 50;
}

.topbar-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.topbar-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.topbar-spacer {
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 16px;
}

    .topbar-btn:hover {
        background: var(--bg-card-hover);
        color: var(--text-primary);
        border-color: var(--border-glow);
    }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-4);
    box-shadow: 0 0 8px rgba(16,185,129,0.6);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        box-shadow: 0 0 8px rgba(16,185,129,0.6);
    }

    50% {
        box-shadow: 0 0 14px rgba(16,185,129,0.9);
    }
}

.page-content {
    flex: 1;
    padding: 28px;
}

/* ── Cards & Glassmorphism ──────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

    .card:hover {
        border-color: rgba(255,255,255,0.12);
        box-shadow: var(--shadow-card);
    }

.card-glass {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.card-body {
    padding: 22px;
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition);
    cursor: default;
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--stat-gradient, var(--gradient-brand));
        opacity: 0;
        transition: opacity var(--transition);
    }

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-card);
        border-color: rgba(255,255,255,0.12);
    }

        .stat-card:hover::before {
            opacity: 1;
        }

.stat-card-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: var(--stat-gradient, var(--gradient-brand));
    box-shadow: 0 4px 14px rgba(99,102,241,0.25);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.8px;
    line-height: 1.1;
    margin-top: 12px;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

    .stat-change.up {
        color: var(--accent-4);
    }

    .stat-change.down {
        color: var(--accent-danger);
    }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

thead tr {
    border-bottom: 1px solid var(--border-color);
}

thead th {
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background var(--transition);
}

    tbody tr:hover {
        background: rgba(255,255,255,0.03);
    }

    tbody tr:last-child {
        border-bottom: none;
    }

tbody td {
    padding: 13px 16px;
    color: var(--text-primary);
    vertical-align: middle;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

    .badge::before {
        content: '';
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: currentColor;
    }

.badge-success {
    background: rgba(16,185,129,0.15);
    color: #34d399;
}

.badge-danger {
    background: rgba(239,68,68,0.15);
    color: #f87171;
}

.badge-warning {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
}

.badge-info {
    background: rgba(6,182,212,0.15);
    color: #22d3ee;
}

.badge-secondary {
    background: rgba(148,163,184,0.15);
    color: #94a3b8;
}

.badge-purple {
    background: rgba(139,92,246,0.15);
    color: #a78bfa;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(99,102,241,0.5);
        color: white;
    }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

    .btn-secondary:hover {
        background: var(--bg-card-hover);
        color: var(--text-primary);
        border-color: rgba(255,255,255,0.15);
    }

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}

    .btn-danger:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(239,68,68,0.5);
    }

.btn-sm {
    padding: 5px 11px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn:disabled, .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 9px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13.5px;
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
}

    .form-control:focus {
        border-color: var(--accent-1);
        background: rgba(99,102,241,0.05);
        box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    }

    .form-control::placeholder {
        color: var(--text-muted);
    }

select.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    animation: slideUp 0.2s ease;
}

.modal-lg {
    max-width: 680px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    transition: all var(--transition);
}

    .modal-close:hover {
        background: var(--bg-card-hover);
        color: var(--text-primary);
    }

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ── Toasts ─────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    min-width: 300px;
    max-width: 400px;
    pointer-events: all;
    animation: slideInRight 0.3s ease;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.toast-message {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.toast-success {
    border-left: 3px solid var(--accent-4);
}

.toast-error {
    border-left: 3px solid var(--accent-danger);
}

.toast-warning {
    border-left: 3px solid var(--accent-warning);
}

.toast-info {
    border-left: 3px solid var(--accent-3);
}

/* ── Loading ────────────────────────────────────────────────── */
.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: var(--accent-1);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-header-left h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.page-header-left p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ── Search ─────────────────────────────────────────────────── */
.search-box {
    position: relative;
    display: inline-flex;
    align-items: center;
}

    .search-box .search-icon {
        position: absolute;
        left: 12px;
        color: var(--text-muted);
        font-size: 14px;
        pointer-events: none;
    }

    .search-box input {
        padding-left: 36px;
        width: 260px;
    }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* ── Copy button ────────────────────────────────────────────── */
.copy-field {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
}
.copy-field .copy-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--accent-1);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all var(--transition);
    flex-shrink: 0;
}

    .copy-btn:hover {
        background: rgba(99,102,241,0.15);
    }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-success {
    color: var(--accent-4) !important;
}

.text-danger {
    color: var(--accent-danger) !important;
}

.text-warning {
    color: var(--accent-warning) !important;
}

.text-accent {
    color: var(--accent-1) !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.d-flex {
    display: flex !important;
}

.align-center {
    align-items: center !important;
}

.gap-8 {
    gap: 8px !important;
}

.gap-12 {
    gap: 12px !important;
}

.gap-16 {
    gap: 16px !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-8 {
    margin-bottom: 8px !important;
}

.mb-16 {
    margin-bottom: 16px !important;
}

.mb-24 {
    margin-bottom: 24px !important;
}

.mt-auto {
    margin-top: auto !important;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Blazor validation */
.blazor-error-boundary {
    display: none;
}

/* Error page */
#blazor-error-ui {
    background: rgba(239,68,68,0.1);
    border-top: 2px solid var(--accent-danger);
    color: var(--text-primary);
    padding: 12px 20px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
}

    #blazor-error-ui .reload {
        color: var(--accent-3);
        cursor: pointer;
        text-decoration: underline;
    }

    #blazor-error-ui .dismiss {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
    }
/* ── Detail Modal Tabs & Panels ─────────────────────────────── */
.modal-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    padding-bottom: 2px;
}

.modal-tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    cursor: pointer;
    position: relative;
    transition: all var(--transition);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

    .modal-tab:hover {
        color: var(--text-primary);
        background: rgba(255,255,255,0.03);
    }

    .modal-tab.active {
        color: var(--accent-1);
    }

        .modal-tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--gradient-brand);
            border-radius: 2px;
        }

.dev-sub-tabs {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.2);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.dev-sub-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

    .dev-sub-tab:hover {
        color: var(--text-primary);
    }

    .dev-sub-tab.active {
        background: var(--accent-1);
        color: white;
        box-shadow: 0 2px 8px rgba(99,102,241,0.3);
    }

.code-container {
    position: relative;
    background: #090a12;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-top: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.5;
    overflow-x: auto;
    max-height: 350px;
}

    .code-container pre {
        margin: 0;
        padding: 0;
        color: #e2e8f0;
    }

    .code-container .copy-code-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(255,255,255,0.05);
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 11px;
        cursor: pointer;
        transition: all var(--transition);
    }

        .code-container .copy-code-btn:hover {
            background: rgba(255,255,255,0.1);
            color: var(--text-primary);
            border-color: var(--border-glow);
        }

.env-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.env-badge-group {
    display: flex;
    gap: 8px;
}

.env-badge-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

    .env-badge-btn.active.test {
        background: rgba(245,158,11,0.15);
        color: #fbbf24;
        border-color: rgba(245,158,11,0.4);
        box-shadow: 0 0 12px rgba(245,158,11,0.1);
    }

    .env-badge-btn.active.live {
        background: rgba(16,185,129,0.15);
        color: #34d399;
        border-color: rgba(16,185,129,0.4);
        box-shadow: 0 0 12px rgba(16,185,129,0.1);
    }

/* Responsive overrides and Hybrid/Mobile adjustments */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
    }
    .main-wrapper {
        margin-left: 0 !important;
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 95;
        animation: fadeIn 0.25s ease;
    }

    .hamburger-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        color: var(--text-primary);
        width: 36px;
        height: 36px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 18px;
        margin-right: 12px;
    }
    .topbar {
        padding: 0 16px;
    }
    .stat-grid {
        grid-template-columns: 1fr !important;
    }
}

.hamburger-btn {
    display: none;
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .page-header button, .page-header .btn {
        width: 100% !important;
        justify-content: center;
    }
    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .card-header .search-box, .card-header input {
        width: 100% !important;
    }
    
    .grid-2, .grid-3, .grid-4, 
    [style*="grid-template-columns"], 
    [style*="display: grid"] {
        grid-template-columns: 1fr !important;
    }
    .modal-footer {
        flex-direction: column !important;
    }
    .modal-footer button {
        width: 100% !important;
    }
    .page-content {
        padding: 16px;
    }
}

/* ── Hybrid App Adjustments ─────────────────────────────────── */
.is-hybrid, .is-hybrid * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.is-hybrid input, 
.is-hybrid textarea, 
.is-hybrid pre, 
.is-hybrid code, 
.is-hybrid select, 
.is-hybrid .copy-value,
.is-hybrid [contenteditable="true"] {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* ── Notification Dropdown & Badges ────────────────────────── */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-danger);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    border: 1.5px solid var(--bg-secondary);
    line-height: 1;
}

.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    background: transparent;
    cursor: default;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.notifications-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.btn-link-custom {
    background: none;
    border: none;
    color: var(--accent-1);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}
.btn-link-custom:hover {
    text-decoration: underline;
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 340px;
}

.notification-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    transition: background-color var(--transition);
}
.notification-item:hover {
    background: var(--bg-card-hover);
}
.notification-item:last-child {
    border-bottom: none;
}

.notification-item-icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-item-title {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-primary);
}

.notification-item-message {
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notification-item-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Global Responsive Grid Helper ──────────────────────────── */
@media (max-width: 768px) {
    [style*="display: grid"],
    [style*="grid-template-columns"],
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-card-summary,
    .dashboard-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
    }
}
>>>>>>> Ödeme altyapısı değişikliği
