* { box-sizing: border-box; }
:root {
    --c1: #667eea;
    --c2: #764ba2;
    --c3: #f093fb;
    --c4: #4facfe;
    --c-blue: #2563eb;
    --c-purple: #7c3aed;
    --c-pink: #ec4899;
    --c-orange: #f59e0b;
    --c-green: #10b981;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f4f6fb;
    margin: 0;
    color: #1f2937;
    min-height: 100vh;
}
body.bg-gradient {
    background:
        radial-gradient(circle at 10% 0%, rgba(102,126,234,.18) 0, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(240,147,251,.18) 0, transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(79,172,254,.15) 0, transparent 45%),
        linear-gradient(180deg, #faf5ff 0%, #eef2ff 100%);
}
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Hero */
.hero { padding: 30px 0 20px; }
.hero-icon {
    font-size: 48px; margin-bottom: 8px;
    filter: drop-shadow(0 6px 12px rgba(102,126,234,.4));
}
.hero-title {
    font-size: 32px; font-weight: 800; margin: 0 0 6px;
    background: linear-gradient(135deg, var(--c1), var(--c2), var(--c-pink));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-title-sm {
    font-size: 22px; font-weight: 700; margin: 0;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub { color: #6b7280; margin: 0; font-size: 15px; }

.panel-glow {
    box-shadow: 0 10px 40px -10px rgba(102,126,234,.3),
                0 4px 12px rgba(0,0,0,.05);
    border: 1px solid rgba(102,126,234,.1);
}

/* Hazır məbləğ böyük düymələr */
.amount-grid-big {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 8px;
}
.amount-btn-big {
    aspect-ratio: 1/1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: all .2s;
    position: relative;
    overflow: hidden;
}
.amount-btn-big::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    opacity: 0; transition: opacity .2s;
    z-index: 0;
}
.amount-btn-big:hover,
.amount-btn-big.active {
    border-color: var(--c1);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -10px rgba(102,126,234,.5);
}
.amount-btn-big:hover::before,
.amount-btn-big.active::before { opacity: 1; }
.amount-btn-big:hover .amt,
.amount-btn-big:hover .azn,
.amount-btn-big.active .amt,
.amount-btn-big.active .azn { color: #fff; }
.amount-btn-big .amt {
    font-size: 28px; font-weight: 800;
    color: #1e3a8a; z-index: 1; position: relative;
    transition: color .2s;
}
.amount-btn-big .azn {
    font-size: 11px; font-weight: 600; letter-spacing: 1px;
    color: #6b7280; z-index: 1; position: relative;
    transition: color .2s;
}

.or-divider {
    text-align: center; margin: 20px 0 14px;
    position: relative; color: #9ca3af; font-size: 13px;
}
.or-divider::before, .or-divider::after {
    content:""; position: absolute; top: 50%; width: calc(50% - 30px);
    height: 1px; background: #e5e7eb;
}
.or-divider::before { left: 0; }
.or-divider::after { right: 0; }
.or-divider span { background: #fff; padding: 0 12px; }

.custom-amount { display: flex; gap: 8px; }
.custom-amount .input-big { flex: 1; }
.input-big {
    padding: 14px 16px; font-size: 16px; border-radius: 12px;
}

.btn-grad {
    background: linear-gradient(135deg, var(--c1), var(--c2)) !important;
    color: #fff !important;
    box-shadow: 0 6px 20px -6px rgba(102,126,234,.6);
    border: 0;
}
.btn-grad:hover {
    box-shadow: 0 8px 24px -6px rgba(102,126,234,.8);
    transform: translateY(-1px);
}

.step-row {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, rgba(102,126,234,.08), rgba(118,75,162,.08));
    padding: 14px 18px; border-radius: 12px;
    border: 1px solid rgba(102,126,234,.15);
}
.step-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.step-value {
    font-size: 26px; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.azn-sm { font-size: 14px; color: #6b7280; font-weight: 600; -webkit-text-fill-color: #6b7280; }

.wrap { max-width: 920px; margin: 0 auto; padding: 24px 16px; }
.center { text-align: center; }
.muted { color: #6b7280; }
.small { font-size: 13px; }
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}
.mb8{margin-bottom:8px}.mb16{margin-bottom:16px}.mb24{margin-bottom:24px}

/* Card view */
.card {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1.586/1;
    border-radius: 18px;
    padding: 22px;
    color: #fff;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    box-shadow: 0 18px 40px -12px rgba(30,58,138,.45);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card::before {
    content:""; position:absolute; right:-40px; top:-40px;
    width:200px; height:200px; border-radius:50%;
    background: rgba(255,255,255,.08);
}
.card::after {
    content:""; position:absolute; right:-80px; bottom:-80px;
    width:240px; height:240px; border-radius:50%;
    background: rgba(255,255,255,.05);
}
.card .bank { font-weight: 700; font-size: 18px; letter-spacing:.5px; }
.card .chip {
    width: 42px; height: 32px; border-radius: 6px;
    background: linear-gradient(135deg, #fcd34d, #b45309);
    margin-top: 6px;
}
.card .num {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 22px;
    letter-spacing: 2px;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index:1;
    position:relative;
}
.card .row {
    display: flex; justify-content: space-between; align-items: flex-end;
    z-index:1; position:relative;
}
.card .label { font-size: 10px; opacity: .7; text-transform: uppercase; letter-spacing: 1px; }
.card .val { font-size: 14px; font-weight: 600; margin-top: 2px; }
.card .copy {
    background: rgba(255,255,255,.18);
    border: 0; color: #fff; padding: 6px 10px;
    border-radius: 8px; font-size: 12px; cursor:pointer;
    transition: background .15s;
}
.card .copy:hover { background: rgba(255,255,255,.3); }

/* Buttons */
.btn {
    display: inline-block; padding: 12px 18px;
    background: #2563eb; color: #fff; border-radius: 10px;
    border: 0; font-weight: 600; cursor: pointer;
    text-decoration: none; font-size: 15px;
    transition: background .15s, transform .05s;
}
.btn:hover { background: #1d4ed8; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-block { display:block; width:100%; }
.btn-secondary { background:#e5e7eb; color:#111827; }
.btn-secondary:hover { background:#d1d5db; }
.btn-success { background:#16a34a; }
.btn-success:hover { background:#15803d; }
.btn-danger { background:#dc2626; }
.btn-danger:hover { background:#b91c1c; }
.btn-warning { background:#f59e0b; color:#111827; }
.btn-wa { background:#25d366; }
.btn-wa:hover { background:#1ebd5b; }
.btn-tg { background:#229ED9; }
.btn-tg:hover { background:#1a85b8; }
.btn-sm { padding:7px 12px; font-size:13px; border-radius:8px; }

/* Amounts grid */
.amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 16px;
}
.amount-btn {
    padding: 14px 0;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all .15s;
}
.amount-btn:hover { border-color: #2563eb; color:#2563eb; }
.amount-btn.active { background:#2563eb; color:#fff; border-color:#2563eb; }

.input, select, textarea {
    width: 100%; padding: 11px 13px;
    border: 1px solid #d1d5db; border-radius: 9px;
    font-size: 15px; background:#fff;
    font-family: inherit;
}
.input:focus, select:focus, textarea:focus {
    outline:none; border-color:#2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
label { display:block; font-weight: 600; margin: 12px 0 6px; font-size:14px; }

.panel {
    background:#fff; border-radius: 14px; padding: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    margin-bottom: 18px;
}

/* Note box */
.note {
    background:#fef3c7; border-left: 4px solid #f59e0b;
    padding: 12px 14px; border-radius: 8px; margin: 14px 0;
    font-size: 14px; line-height: 1.5; color:#78350f;
}
.success-box {
    background:#dcfce7; border-left:4px solid #16a34a;
    padding:14px; border-radius:8px; color:#14532d;
}
.error-box {
    background:#fee2e2; border-left:4px solid #dc2626;
    padding:14px; border-radius:8px; color:#7f1d1d;
}

.payment-id {
    font-family: "SF Mono", Menlo, monospace;
    font-size: 26px; font-weight: 700;
    letter-spacing: 2px;
    background:#f3f4f6; padding: 14px;
    border-radius: 10px; text-align:center;
    display: flex; align-items:center; justify-content:center; gap: 12px;
}

/* Admin */
.admin-nav {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #581c87 100%);
    color:#fff;
    box-shadow: 0 4px 16px rgba(30,27,75,.25);
    border-bottom: 1px solid rgba(255,255,255,.08);
    position: relative;
    overflow: hidden;
}
.admin-nav::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 50%, rgba(236,72,153,.2) 0, transparent 50%);
    pointer-events: none;
}
.admin-nav-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 16px;
    min-height: 58px;
    display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.admin-nav .brand {
    font-weight:700; color:#fff; font-size:16px;
    padding: 14px 0;
}
.admin-links {
    display:flex; gap: 4px; align-items: center; flex-wrap: wrap;
    margin-right: auto;
}
.admin-links a {
    color:#cbd5e1; font-weight:500; font-size:14px;
    padding: 8px 14px; border-radius: 8px;
    transition: background .15s, color .15s;
    position: relative;
}
.admin-links a:hover {
    color:#fff; background: #1f2937; text-decoration: none;
}
.admin-links a.active {
    color:#fff;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    box-shadow: 0 4px 12px -4px rgba(59,130,246,.6);
}
.admin-nav .badge {
    background:#dc2626; color:#fff; font-size:11px;
    padding:2px 7px; border-radius:10px; margin-left:5px;
    font-weight:700;
}
.logout-btn {
    color:#fff !important; font-weight:600; font-size:14px;
    padding: 8px 16px; border-radius: 8px;
    background: #dc2626;
    border: 1px solid #ef4444;
    transition: background .15s, transform .05s;
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: auto;
}
.logout-btn:hover {
    background: #b91c1c; text-decoration: none;
}
.logout-btn:active { transform: scale(.97); }
.nav-toggle { display: none; }
.mobile-logout { display: none; }

@media (max-width: 760px) {
    .admin-nav-inner {
        padding: 12px 16px;
        align-items: center;
        flex-wrap: nowrap;
    }
    .admin-nav .brand {
        margin-right: auto;
        padding: 0;
        font-size: 15px;
        flex: 1;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .desktop-logout { display: none; }
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 38px; height: 38px;
        background: transparent;
        border: 1px solid #374151;
        border-radius: 8px;
        cursor: pointer;
        padding: 8px;
    }
    .nav-toggle span {
        display: block; height: 2px; width: 100%;
        background: #fff; border-radius: 2px;
        transition: transform .2s, opacity .2s;
    }
    body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .admin-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: #111827;
        padding: 8px 12px 14px;
        gap: 4px;
        border-top: 1px solid #1f2937;
        box-shadow: 0 8px 20px rgba(0,0,0,.25);
        z-index: 50;
        margin-right: 0;
    }
    body.nav-open .admin-links { display: flex; }
    .admin-links a { padding: 11px 14px; font-size: 15px; }
    .mobile-logout { display: inline-block; margin-top: 8px; text-align: center; }
    .admin-nav { position: relative; }
    .admin-nav-inner { position: relative; }
}
.admin-wrap { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.admin-wrap h2 {
    position: relative; padding-left: 14px; margin-bottom: 18px;
}
.admin-wrap h2::before {
    content: ""; position: absolute; left: 0; top: 4px; bottom: 4px;
    width: 5px; border-radius: 3px;
    background: linear-gradient(180deg, var(--c1), var(--c2));
}

.stats {
    display:grid; gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 20px;
}
.stat {
    background:#fff; padding: 18px; border-radius: 14px;
    box-shadow: 0 4px 14px -6px rgba(0,0,0,.08);
    position: relative; overflow: hidden;
    border-top: 3px solid var(--c-blue);
    transition: transform .15s, box-shadow .15s;
}
.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -8px rgba(0,0,0,.12);
}
.stat::before {
    content: ""; position: absolute; right: -20px; top: -20px;
    width: 80px; height: 80px; border-radius: 50%;
    background: var(--c-blue); opacity: .07;
}
.stat .lbl { font-size: 11px; color:#6b7280; text-transform:uppercase; letter-spacing:.6px; font-weight: 600; }
.stat .val { font-size: 26px; font-weight: 800; margin-top: 6px; color: #111827; }
.stat .sub { font-size: 12px; color:#6b7280; margin-top:4px; }

.stat-blue   { border-top-color: #3b82f6; }
.stat-blue::before   { background: #3b82f6; }
.stat-purple { border-top-color: #8b5cf6; }
.stat-purple::before { background: #8b5cf6; }
.stat-pink   { border-top-color: #ec4899; }
.stat-pink::before   { background: #ec4899; }
.stat-orange { border-top-color: #f59e0b; }
.stat-orange::before { background: #f59e0b; }
.stat-green  { border-top-color: #10b981; }
.stat-green::before  { background: #10b981; }
.stat-red    { border-top-color: #ef4444; }
.stat-red::before    { background: #ef4444; }
.stat-cyan   { border-top-color: #06b6d4; }
.stat-cyan::before   { background: #06b6d4; }
.stat-indigo { border-top-color: #6366f1; }
.stat-indigo::before { background: #6366f1; }

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background:#fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
table { width:100%; border-collapse: collapse; background:#fff; border-radius: 12px; overflow:hidden;}
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #f3f4f6; font-size:14px; vertical-align: middle;}
th { background:#f9fafb; font-weight:600; color:#374151; font-size:12px; text-transform:uppercase; letter-spacing:.3px;}
tr:last-child td { border-bottom: 0; }
tr:hover td { background:#fafbfc; }

.status {
    display:inline-block; padding: 3px 9px; border-radius: 6px;
    font-size: 12px; font-weight: 600;
}
.status-active { background:#dcfce7; color:#166534; }
.status-blocked { background:#e5e7eb; color:#374151; }
.status-expired { background:#fee2e2; color:#991b1b; }
.status-pending { background:#fef3c7; color:#92400e; }
.status-approved { background:#dcfce7; color:#166534; }
.status-cancelled { background:#fee2e2; color:#991b1b; }

.flash {
    padding: 12px 16px; border-radius: 9px; margin-bottom: 14px;
    font-weight: 500;
}
.flash-success { background:#dcfce7; color:#14532d; }
.flash-error { background:#fee2e2; color:#7f1d1d; }

.actions { display:flex; gap:6px; flex-wrap:wrap;}
.toast-area {
    position: fixed; right: 20px; bottom: 20px; z-index: 999;
    display:flex; flex-direction: column; gap: 10px;
}
.toast {
    background:#111827; color:#fff; padding: 12px 18px;
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
    font-size:14px; min-width: 240px;
    animation: slideIn .25s ease-out;
}
.toast.success { background:#16a34a; }
@keyframes slideIn { from { transform: translateX(120%); opacity: 0;} to { transform: translateX(0); opacity:1;} }

.copy-btn {
    background:#e0e7ff; color:#1e3a8a; border:0;
    padding: 4px 9px; border-radius: 6px; cursor:pointer;
    font-size: 12px; font-weight:600;
}
.copy-btn:hover { background:#c7d2fe; }

.row-form { display:grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.row-form .full { grid-column: 1/-1; }
@media (max-width: 600px){
    .row-form { grid-template-columns: 1fr; }
    .amount-grid { grid-template-columns: repeat(2, 1fr);}
}

.empty {
    padding: 40px; text-align: center; color: #6b7280;
    background:#fff; border-radius: 12px;
}
.color-dot { display:inline-block; width:14px; height:14px; border-radius:4px; vertical-align:middle; margin-right:6px;}

.filter-bar {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.filter-tabs {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.filter-search {
    margin-left: auto; display: flex; gap: 8px;
}
.filter-search input[type=text] { width: 220px; }
@media (max-width: 700px) {
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-search { margin-left: 0; }
    .filter-search input[type=text] { width: 100%; flex: 1; }
    .filter-tabs .btn-sm { flex: 1; min-width: 0; text-align: center; }
}

.two-col {
    display: grid; grid-template-columns: 1.2fr 1fr;
    gap: 24px; align-items: start;
}
.two-col-equal {
    display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
@media (max-width: 900px) {
    .two-col, .two-col-equal { grid-template-columns: 1fr; gap: 16px; }
}

.page-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
@media (max-width: 480px) {
    .page-head { flex-direction: column; align-items: stretch; }
    .page-head .btn { width: 100%; text-align: center; }
}

/* ===== Mobile responsive ===== */
@media (max-width: 900px) {
    .admin-wrap { padding: 14px 12px; }
    .panel { padding: 16px; }
    h2 { font-size: 20px; }
    h3 { font-size: 17px; }

    /* Stat cards */
    .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat { padding: 14px; }
    .stat .val { font-size: 22px; }
    .stat .lbl { font-size: 11px; }

    /* Form grid - tək sütun */
    .row-form { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Cədvəlləri horizontal scroll-a sal */
    table { font-size: 13px; min-width: 600px; }
    th, td { padding: 10px 8px; }

    /* Cədvəl başlığı düymə ilə yan-yana */
    .panel[style*="flex"] { gap: 8px !important; }
}

@media (max-width: 640px) {
    .admin-wrap { padding: 10px 8px; }
    .panel { padding: 14px; border-radius: 10px; }

    /* Brand kiçil */
    .admin-nav .brand { font-size: 14px; }
    .admin-links a { font-size: 13px; padding: 7px 11px; }

    /* Stats: 1 sütun-a ən kiçik ekranda */
    .stats { grid-template-columns: 1fr 1fr; }
    .stat .val { font-size: 20px; }

    /* Buttons */
    .btn { padding: 11px 14px; font-size: 14px; }
    .btn-sm { padding: 6px 10px; font-size: 12px; }

    /* Cədvəl daxilində əməliyyat düymələri */
    .actions { flex-direction: column; align-items: stretch; gap: 4px;}
    .actions .btn-sm { width: 100%; text-align: center; }

    /* Amount grid */
    .amount-grid { grid-template-columns: repeat(2, 1fr); }

    /* Filter panel */
    .panel[style*="flex"] { flex-direction: column !important; align-items: stretch !important; }
    .panel[style*="flex"] form { margin-left: 0 !important; width: 100%; }
    .panel[style*="flex"] input[type=text] { width: 100% !important; }

    /* Cədvəl başlıqları gizlət, label kimi göstər (alternativ stil) */
    table { font-size: 12px; min-width: 520px; }
    th, td { padding: 8px 6px; }

    .payment-id { font-size: 18px; padding: 12px; }
    .card { max-width: 100%; }
    .card .num { font-size: 18px; letter-spacing: 1.5px; }

    /* Card edit önizləmə altda */
    .admin-wrap > div[style*="grid-template-columns"] { display: block !important;}
    .admin-wrap > div[style*="grid-template-columns"] > * { margin-bottom: 16px; }

    /* Toast */
    .toast-area { right: 10px; left: 10px; bottom: 10px; }
    .toast { min-width: 0; width: 100%; font-size: 13px; }

    /* Flash */
    .flash { padding: 10px 12px; font-size: 13px; }

    /* Forma label/input */
    label { margin-top: 10px; font-size: 13px; }
    .input, select, textarea { padding: 10px 12px; font-size: 14px; }
}

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

/* iOS Safari input zoom-u söndür */
@media (max-width: 640px) {
    input, select, textarea { font-size: 16px !important; }
}
