/**
 * ============================================================
 * ADMIN PANEL STYLESHEET
 * PUBG Mobile UC / Free Fire / Steam E-Pin Satis Sistemi
 * ============================================================
 */

/* ========== VARIABLES ========== */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
    --radius: 10px;
    --transition: all 0.3s ease;
    --sidebar-width: 260px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f1f5f9;
    color: var(--dark);
    font-size: 14px;
    line-height: 1.5;
}

a { text-decoration: none; color: var(--primary); }
code {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}
pre.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 12px;
}

/* ========== LOGIN PAGE ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background:
        linear-gradient(120deg, rgba(14, 165, 233, 0.10), transparent 34%),
        linear-gradient(315deg, rgba(16, 185, 129, 0.10), transparent 30%),
        #eef3f8;
}

.login-shell {
    width: 100%;
    max-width: 1040px;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
}

.login-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 46px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96)),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 42px);
}

.login-brand-top {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #e2e8f0;
    font-weight: 700;
    letter-spacing: 0;
}

.login-brand-mark {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: #38bdf8;
    font-size: 22px;
}

.login-brand-copy {
    margin: 44px 0;
}

.login-eyebrow {
    margin-bottom: 10px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.login-brand h1 {
    max-width: 420px;
    margin-bottom: 14px;
    font-size: 42px;
    line-height: 1.15;
    color: #ffffff;
}

.login-brand p {
    max-width: 440px;
    color: #cbd5e1;
    font-size: 16px;
}

.login-brand .login-eyebrow {
    color: #7dd3fc;
}

.login-preview {
    width: min(360px, 100%);
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.preview-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
}

.preview-bar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(226, 232, 240, 0.55);
}

.preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    color: #cbd5e1;
}

.preview-row:first-of-type {
    border-top: 0;
}

.preview-row b {
    color: #ffffff;
    font-size: 14px;
}

.preview-row.strong {
    padding: 16px;
    margin-bottom: 4px;
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.12);
}

.preview-row.strong small {
    display: block;
    margin-bottom: 3px;
    color: #bae6fd;
}

.preview-row.strong b {
    font-size: 28px;
    line-height: 1;
}

.preview-row.strong i {
    color: #34d399;
    font-size: 22px;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 40px;
    background: #ffffff;
}

.login-header {
    margin-bottom: 30px;
}

.login-header h2 {
    font-size: 30px;
    line-height: 1.15;
    color: var(--dark);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--secondary);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--dark);
}

.login-input {
    position: relative;
}

.login-input > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 15px;
    pointer-events: none;
}

.login-input input {
    width: 100%;
    min-height: 50px;
    display: block;
    padding: 12px 46px 12px 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--dark);
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0;
    border-radius: 8px;
}

.toggle-password:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.login-submit {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.login-submit:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.26);
}

.login-footer {
    margin-top: 28px;
    text-align: center;
    color: var(--gray);
    font-size: 12px;
}

@media (max-width: 820px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-brand {
        padding: 32px;
    }

    .login-brand h1 {
        font-size: 28px;
    }

    .login-panel {
        padding: 32px;
    }
}

@media (max-width: 520px) {
    .login-page {
        padding: 14px;
    }

    .login-brand {
        padding: 26px;
    }

    .login-brand p {
        font-size: 14px;
    }

    .login-panel {
        padding: 26px;
    }

    .login-preview {
        display: none;
    }
}

/* ========== AUTH REDESIGN ========== */
.login-page.auth-redesign {
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    padding: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 24%, rgba(20, 184, 166, 0.18), transparent 32%),
        radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.16), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #172033 45%, #eef2f7 45%, #ffffff 100%);
}

.auth-topbar {
    width: min(1180px, calc(100% - 32px));
    min-height: 74px;
    margin: 18px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(18px);
}

.auth-logo,
.auth-nav {
    display: flex;
    align-items: center;
}

.auth-logo {
    gap: 12px;
    color: #ffffff;
}

.auth-logo:hover {
    color: #ffffff;
}

.auth-logo-icon,
.auth-card-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #14b8a6;
    color: #052e2b;
    font-size: 18px;
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.28);
}

.auth-logo strong {
    display: block;
    font-size: 18px;
    line-height: 1.1;
}

.auth-logo small {
    display: block;
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 12px;
}

.auth-nav {
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.auth-nav span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: #e5e7eb;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.auth-layout {
    width: min(1180px, calc(100% - 32px));
    min-height: calc(100vh - 110px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    align-items: center;
    gap: 44px;
    padding: 36px 0 54px;
}

.auth-hero {
    color: #ffffff;
}

.auth-kicker {
    margin-bottom: 12px;
    color: #5eead4;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.auth-hero h1 {
    max-width: 660px;
    margin-bottom: 18px;
    color: #ffffff;
    font-size: 54px;
    line-height: 1.04;
}

.auth-hero p {
    max-width: 560px;
    color: #dbeafe;
    font-size: 17px;
}

.auth-metrics {
    max-width: 640px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 34px;
}

.auth-metrics div {
    min-height: 92px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.09);
}

.auth-metrics span {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
}

.auth-metrics strong {
    display: block;
    margin-top: 10px;
    color: #ffffff;
    font-size: 24px;
}

.auth-card {
    width: 100%;
    padding: 30px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.20);
}

.auth-card-head {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 26px;
}

.auth-card-icon {
    flex: 0 0 auto;
    background: #f59e0b;
    color: #1f2937;
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
}

.auth-card h2 {
    margin-bottom: 5px;
    color: #111827;
    font-size: 30px;
}

.auth-card p {
    color: #64748b;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-footnote {
    margin-top: 22px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 900px) {
    .login-page.auth-redesign {
        background: linear-gradient(180deg, #0f172a 0%, #172033 46%, #f8fafc 46%, #ffffff 100%);
    }

    .auth-topbar,
    .auth-layout {
        width: min(100% - 24px, 680px);
    }

    .auth-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-nav {
        justify-content: flex-start;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 30px;
    }

    .auth-hero h1 {
        font-size: 36px;
    }

    .auth-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .auth-nav {
        display: none;
    }

    .auth-hero h1 {
        font-size: 30px;
    }

    .auth-card {
        padding: 22px;
    }

    .auth-card-head {
        flex-direction: column;
    }
}

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

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-logo i {
    font-size: 24px;
    color: var(--primary);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.sidebar-nav {
    padding: 15px 10px;
}

.nav-section {
    padding: 15px 15px 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #cbd5e1;
    border-radius: 8px;
    margin: 2px 0;
    transition: var(--transition);
    position: relative;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 16px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item .badge {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    bottom: 0;
    background: var(--dark);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    color: #ef4444;
    border-radius: 8px;
    transition: var(--transition);
}

.logout-btn:hover {
    background: rgba(239,68,68,0.1);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.main-header {
    background: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--dark);
}

.header-search {
    display: flex;
    align-items: center;
    background: var(--light);
    border-radius: 8px;
    padding: 8px 15px;
    width: 300px;
}

.header-search i {
    color: var(--gray);
    margin-right: 10px;
}

.header-search input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    font-size: 14px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--secondary);
    transition: var(--transition);
}

.header-btn:hover {
    background: var(--light);
    color: var(--primary);
}

.header-btn.has-badge::after {
    content: attr(data-count);
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 10px;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.header-profile i {
    font-size: 28px;
    color: var(--primary);
}

.content-wrapper {
    padding: 30px;
}

/* ========== PAGE HEADER ========== */
.page-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 24px;
    color: var(--dark);
}

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

.breadcrumb i {
    font-size: 10px;
}

/* ========== GRID ========== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8 {
    padding: 0 10px;
    margin-bottom: 20px;
}

.col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-lg-5 { flex: 0 0 41.667%; max-width: 41.667%; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-lg-8 { flex: 0 0 66.667%; max-width: 66.667%; }

.col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 10px; }

/* ========== CARDS ========== */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

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

.card-header h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--primary);
}

.card-body {
    padding: 25px;
}

/* ========== STATS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.stat-primary::before { background: var(--primary); }
.stat-success::before { background: var(--success); }
.stat-warning::before { background: var(--warning); }
.stat-info::before { background: var(--info); }
.stat-danger::before { background: var(--danger); }

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-primary .stat-icon { background: #dbeafe; color: var(--primary); }
.stat-success .stat-icon { background: #d1fae5; color: var(--success); }
.stat-warning .stat-icon { background: #fef3c7; color: var(--warning); }
.stat-info .stat-icon { background: #cffafe; color: var(--info); }
.stat-danger .stat-icon { background: #fee2e2; color: var(--danger); }

.stat-info h3 {
    font-size: 22px;
    margin-bottom: 2px;
}

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

.stat-trend {
    margin-left: auto;
    color: var(--success);
}

/* Quick Stats */
.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quick-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--light);
    border-radius: 8px;
}

.quick-stat-label {
    color: var(--secondary);
    font-size: 13px;
}

.quick-stat-label i {
    margin-right: 5px;
    color: var(--primary);
}

.quick-stat-value {
    font-weight: 600;
    font-size: 16px;
}

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

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

.data-table th {
    text-align: left;
    padding: 12px 15px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-active { background: #d1fae5; color: #065f46; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-inactive { background: #f1f5f9; color: #475569; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-failed { background: #fee2e2; color: #991b1b; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-available { background: #d1fae5; color: #065f46; }
.status-used { background: #dbeafe; color: #1e40af; }
.status-deleted { background: #fee2e2; color: #991b1b; }
.status-expired { background: #f1f5f9; color: #475569; }
.status-paid { background: #d1fae5; color: #065f46; }

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #cffafe; color: #0e7490; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d97706; }

.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #0891b2; }

.btn-secondary { background: var(--light); color: var(--dark); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

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

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-group {
    display: flex;
    gap: 5px;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
}

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    flex: 1 1 auto;
}

.input-group .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn,
.input-group .input-group-text {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-text {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-left: 0;
    background: #f8fafc;
    color: var(--secondary);
    font-size: 13px;
}

/* ========== FILTERS ========== */
.filters {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light);
    border-radius: 8px;
}

.filter-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-form .form-group {
    margin-bottom: 0;
    min-width: 180px;
}

/* ========== STATUS TABS ========== */
.status-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-tab {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--secondary);
    background: var(--light);
    transition: var(--transition);
}

.status-tab:hover {
    background: var(--border);
}

.status-tab.active {
    background: var(--primary);
    color: white;
}

.status-tab .badge {
    margin-left: 5px;
    background: rgba(0,0,0,0.1);
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.page-info {
    color: var(--gray);
    font-size: 13px;
}

/* ========== ALERTS ========== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

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

/* ========== MODALS ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

.modal-content.modal-lg {
    max-width: 700px;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

.modal-header h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
    line-height: 1;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid var(--border);
}

/* ========== USER INFO ========== */
.user-info {
    display: flex;
    flex-direction: column;
}

.user-info small {
    color: var(--gray);
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ========== TOP REFERRERS ========== */
.top-referrers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-referrer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--light);
    border-radius: 8px;
}

.top-ref-rank {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.top-ref-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-ref-info small {
    color: var(--gray);
}

.top-ref-stats {
    display: flex;
    gap: 5px;
}

/* ========== CHECKBOX GROUP ========== */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

/* ========== TEXT UTILITIES ========== */
.text-center { text-align: center; }
.text-muted { color: var(--gray); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .header-search {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form .form-group {
        min-width: 100%;
    }
    
    .status-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .setting-item {
        flex-direction: column;
    }
    
    .setting-input {
        min-width: 100%;
    }
}

/* ========== DARK SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
