:root {
    --bg: #0f1610;
    --panel: rgba(19, 32, 22, 0.92);
    --panel-2: rgba(26, 43, 29, 0.88);
    --line: rgba(199, 214, 160, 0.14);
    --text: #f0f5df;
    --muted: #b0b89a;
    --gold: #d6b766;
    --accent: #79a86b;
    --danger: #cf6666;
    --success: #78c08c;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    --radius: 20px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #0b100c; color: var(--text); font-family: Inter, Arial, sans-serif; }

html, body { overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; height: auto; }
.site-frame, .site-frame > *, .app-topbar, .hero, .hero > *, .grid > *, .card, .table-card, .auth-card, .list-item, .admin-player-card, .card-inline { min-width: 0; }
.list-item, .note-box, .drawer-link, .topbar-chip, td, th, .field input, .field textarea, .field select, .btn { overflow-wrap: anywhere; word-break: break-word; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    width: 18px;
    z-index: 1;
    background:
      radial-gradient(circle at 20% 15%, #566a3f 0 11px, transparent 12px),
      radial-gradient(circle at 70% 30%, #2d3a24 0 16px, transparent 17px),
      radial-gradient(circle at 45% 55%, #6d7a42 0 13px, transparent 14px),
      radial-gradient(circle at 75% 78%, #1f281b 0 12px, transparent 13px),
      radial-gradient(circle at 30% 90%, #445232 0 14px, transparent 15px),
      linear-gradient(180deg, #202a1f, #33402b 45%, #151b14);
    opacity: .92;
}
body::before { left: 0; }
body::after { right: 0; }

.camo-shell {
    --frame-max-width: 1080px;
    min-height: 100vh;
    padding: 12px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background:
        radial-gradient(circle at top, rgba(138, 170, 108, 0.13), transparent 35%),
        linear-gradient(180deg, rgba(18, 26, 20, 0.97), rgba(9, 12, 10, 1));
}

.site-ornament,
.site-frame {
    width: 100%;
    max-width: var(--frame-max-width);
}

.site-ornament {
    position: relative;
    z-index: 2;
    line-height: 0;
    flex: 0 0 auto;
}

.site-ornament-top {
    margin: 0 auto 6px;
}

.site-ornament-bottom {
    margin: 6px auto 0;
}

.site-ornament img {
    display: block;
    width: 100%;
    height: auto;
}

.site-frame {
    position: relative;
    z-index: 2;
    margin: 0 auto;
    min-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
}
.site-frame > .footer,
.site-frame > .site-footer-fixed {
    margin-top: auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    margin: 6px 0 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 25, 19, 0.84);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.brand {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.brand-branding {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.04);
    box-shadow: 0 8px 22px rgba(0,0,0,.22);
    flex: 0 0 auto;
}
.settings-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.settings-upload-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(7, 12, 8, .38);
}
.settings-upload-label {
    color: #dbe5c1;
    font-size: .95rem;
    font-weight: 700;
}
.settings-upload-preview {
    min-height: 120px;
    border-radius: 16px;
    border: 1px dashed rgba(214,183,102,.34);
    background: rgba(255,255,255,.03);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--muted);
    text-align: center;
}
.settings-upload-preview img {
    display: block;
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
}
.settings-upload-preview-icon img {
    max-width: 72px;
    max-height: 72px;
}
.settings-upload-preview-banner {
    min-height: 96px;
}
.settings-upload-preview-banner img {
    width: 100%;
    max-height: 140px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    vertical-align: middle;
    accent-color: #1f7aff;
    flex: 0 0 18px;
}
.field label:has(input[type="checkbox"]) {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1.35;
}
.field label:has(input[type="checkbox"]) input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
    position: relative;
    top: -1px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.35;
}
.settings-shortcuts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.settings-shortcut {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(7, 12, 8, .34);
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.settings-shortcut:hover,
.settings-shortcut.is-active {
    transform: translateY(-1px);
    border-color: rgba(121, 168, 107, .32);
    background: rgba(121, 168, 107, .14);
}
.settings-shortcut-title {
    color: var(--text);
    font-size: .98rem;
}
.settings-shortcut-note {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.45;
}
.brand-sub { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }
.topnav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.topnav a {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    font-size: .92rem;
}
.nav-pill span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
    border-radius: 999px; background: var(--danger); color: #fff; font-size: .8rem;
}

.hero,
.card,
.stat-card,
.table-card,
.auth-card {
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero {
    overflow: hidden;
    padding: 22px;
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 16px;
    margin-bottom: 18px;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.hero p { margin: 0 0 12px; color: var(--muted); line-height: 1.6; }
.hero-badge,
.badge {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(121, 168, 107, .12);
    color: #dce8c1;
    border: 1px solid rgba(121, 168, 107, .2);
    font-size: .86rem;
}
.hero-badge { margin-bottom: 12px; }
.account-hero h1 { margin-top: 2px; }
.hero-panel {
    padding: 16px;
    border-radius: 18px;
    background: rgba(7, 12, 8, 0.36);
    border: 1px solid rgba(255,255,255,.06);
}
.hero-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.hero-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px dashed rgba(255,255,255,.08); }

.grid {
    display: grid;
    gap: 16px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: 1.2fr .8fr; }

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
}
.section-title h2,
.section-title h3 { margin: 0; font-size: 1.05rem; }
.muted { color: var(--muted); }

.card,
.table-card,
.auth-card { padding: 18px; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.stat-card {
    padding: 16px;
    position: relative;
    overflow: hidden;
}
.stat-card small { display: block; color: var(--muted); margin-bottom: 8px; }
.stat-card strong { font-size: 1.4rem; display: block; }
.stat-card::after {
    content: "";
    position: absolute;
    inset: auto -20px -28px auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(214,183,102,.16), transparent 65%);
}

.alert {
    margin: 0 0 14px;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.08);
}
.alert-success { background: rgba(76, 127, 88, .18); color: #d8f2df; }
.alert-error { background: rgba(170, 66, 66, .18); color: #ffd9d9; }
.alert-info { background: rgba(88, 122, 168, .16); color: #dceaff; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.field { display: grid; gap: 8px; }
.field label { color: #dbe5c1; font-size: .92rem; }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(7, 12, 8, .55);
    color: var(--text);
    outline: none;
}
.field textarea { min-height: 110px; resize: vertical; }
.security-code-box {
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px dashed rgba(214,183,102,.42);
    background: rgba(255,255,255,.04);
    color: var(--gold);
    font-weight: 800;
    letter-spacing: .34em;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    white-space: nowrap;
}

.security-inline-row {
    display: grid;
    grid-template-columns: minmax(118px, 150px) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}
.security-inline-row .security-code-box {
    min-height: 50px;
    padding-left: 12px;
    padding-right: 12px;
    letter-spacing: .22em;
}
.security-inline-row input {
    min-width: 0;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: rgba(214,183,102,.6); box-shadow: 0 0 0 3px rgba(214,183,102,.12); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #d3b261, #8f7a35); color: #121512; }
.btn-secondary { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid rgba(255,255,255,.08); }
.btn-danger { background: linear-gradient(135deg, #d27676, #8d3333); color: white; }
.btn-success { background: linear-gradient(135deg, #77b37d, #2e7741); color: white; }
.btn-block { width: 100%; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 580px; }
th, td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    vertical-align: top;
}
th { color: #d8dfbd; font-size: .88rem; }
td { color: #f1f5df; font-size: .93rem; }
.table-mini table { min-width: 100%; }

.list-stack { display: grid; gap: 12px; }
.list-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(9, 14, 10, .5);
    border: 1px solid rgba(255,255,255,.05);
}
.list-item strong { display: block; margin-bottom: 6px; }
.note-box {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(10, 15, 10, .45);
    border: 1px dashed rgba(255,255,255,.08);
    color: var(--muted);
}

.auth-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 18px;
}
.auth-card h2 { margin-top: 0; }

.auth-shell-single {
    max-width: 980px;
    margin: 0 auto 18px;
}

.home-auth-shell {
    max-width: 1240px;
}

.auth-panels-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.auth-panel-card {
    padding: 22px;
}
.auth-card-wide {
    padding: 22px;
}
.auth-grid-tight {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}
.compact-center {
    justify-content: center;
    text-align: center;
}
.field-span-2 {
    grid-column: span 2;
}
.stacked-actions {
    flex-direction: column;
}
.topnav:empty {
    display: none;
}

.home-leaderboards {
    display: grid;
    gap: 18px;
    width: 100%;
    max-width: 980px;
    margin: 0 auto 18px;
}

.home-leaderboards-desktop {
    max-width: 1240px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
}

.leaderboard-card {
    width: 100%;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(199, 214, 160, 0.14);
    box-shadow: var(--shadow);
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
}

.leaderboard-card-dark {
    background:
        linear-gradient(90deg, rgba(185, 176, 92, .38), rgba(185, 176, 92, .02) 4%, rgba(5, 8, 6, .94) 12%, rgba(5, 8, 6, .94) 88%, rgba(185, 176, 92, .02) 96%, rgba(185, 176, 92, .32)),
        linear-gradient(180deg, rgba(10, 14, 11, .97), rgba(2, 5, 3, .97));
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.leaderboard-grid-dark {
    align-items: start;
}

.leaderboard-panel {
    width: 100%;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.08);
    min-width: 0;
}

.leaderboard-panel-light {
    background: rgba(255,255,255,.93);
    color: #404413;
}

.leaderboard-panel-dark {
    background: rgba(0, 0, 0, .38);
    color: #eef2e1;
    border-color: rgba(185, 176, 92, .28);
}

.leaderboard-title {
    margin-bottom: 14px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .05em;
    color: var(--gold);
    text-transform: uppercase;
}

.leaderboard-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 0 10px;
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(144, 150, 52, .32);
    font-size: .92rem;
    font-weight: 800;
    color: #7d830f;
}

.leaderboard-heading-dark {
    border-bottom-color: rgba(185, 176, 92, .32);
    color: #f3cb45;
}

.leaderboard-list {
    display: grid;
    gap: 8px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(142, 155, 75, .08);
}

.leaderboard-row strong {
    display: block;
    min-width: 0;
    font-size: .95rem;
}

.leaderboard-row span {
    font-weight: 800;
    white-space: nowrap;
}

.leaderboard-row-dark {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.04);
}

.command-resource-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(199, 214, 160, 0.14);
    box-shadow: var(--shadow);
    background: linear-gradient(180deg, rgba(19,32,22,.96), rgba(26,43,29,.96));
}

.command-resource-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.command-resource-item {
    display: grid;
    gap: 10px;
    align-content: start;
    min-width: 0;
    padding: 16px;
    border-radius: 18px;
    background: rgba(7, 12, 8, 0.45);
    border: 1px solid rgba(255,255,255,.06);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.command-resource-name {
    text-align: center;
    color: #dbe5c1;
    font-size: .88rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.command-resource-value {
    color: #f0f5df;
    font-size: clamp(1.05rem, 2vw, 1.4rem);
    font-weight: 800;
    line-height: 1.25;
}

.command-resource-meta {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.55;
}

.notification-list { display: grid; gap: 12px; }
.notification-card {
    padding: 14px;
    border-radius: 16px;
    background: rgba(8, 13, 9, .5);
    border: 1px solid rgba(255,255,255,.06);
}
.notification-card.unread { border-color: rgba(214,183,102,.5); }
.notification-card h4 { margin: 0 0 6px; }
.notification-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.notification-meta { margin-top: 10px; color: #cad2ae; font-size: .84rem; }

.footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 18px 6px 26px;
    color: var(--muted);
    text-align: center;
}
.footer p { margin: 6px 0 0; }
.footer-note { display: flex; align-items: center; justify-content: center; }
.footer-center-block { width: 100%; display: grid; gap: 6px; justify-items: center; }
.footer-note-centered { justify-content: center; }
.footer-links { display:flex; flex-wrap:wrap; gap:12px 16px; justify-content:center; margin:4px 0 2px; }
.footer-links a { color:#dce8c1; font-weight:600; text-decoration:none; padding:2px 0; }
.footer-links a:hover { color:#f0cb71; text-decoration:underline; }

.login-tip {
    padding: 12px 14px;
    margin-top: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.05);
    color: var(--muted);
}

.countdown {
    font-weight: 700;
    color: var(--gold);
}

@media (max-width: 920px) {
    .hero,
    .grid-main,
    .auth-grid,
    .auth-grid-tight,
    .grid-2,
    .grid-3,
    .stats-row,
    .form-grid,
    .auth-panels-grid,
    .home-leaderboards-desktop {
        grid-template-columns: 1fr;
    }

    .field-span-2 {
        grid-column: auto;
    }

    .security-inline-row {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 10px;
    }

    .security-inline-row .security-code-box {
        letter-spacing: .16em;
        font-size: .95rem;
    }

    .topbar,
    .footer {
        flex-direction: column;
        align-items: stretch;
    }

    .topnav { justify-content: flex-start; }
    .camo-shell { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 600px) {
    body::before,
    body::after { width: 12px; }

    .camo-shell { padding: 8px 14px; }
    .site-ornament-top { margin-bottom: 4px; }
    .site-ornament-bottom { margin-top: 4px; }
    .topbar { padding: 14px; }
    .card,
    .table-card,
    .auth-card,
    .hero,
    .leaderboard-card,
    .command-resource-card { padding: 16px; }
    .brand { font-size: 1.15rem; }
    .stat-card strong { font-size: 1.22rem; }
    .field input,
    .field select,
    .field textarea {
        font-size: 16px;
        min-height: 52px;
    }
    table { min-width: 520px; }
}


.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .78rem;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    text-transform: capitalize;
}
.tag-asker { background: rgba(121, 168, 107, .14); }
.tag-ucak { background: rgba(101, 140, 183, .18); }
.tag-tank { background: rgba(150, 118, 82, .22); }
.tag-destek { background: rgba(153, 132, 191, .18); }
.tag-weapon { background: rgba(214, 183, 102, .14); }
.compact-list .list-item { padding: 12px 14px; }


.note-box {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.05);
    color: var(--text);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 6, .78);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 5000;
}

.modal-overlay.is-visible { display: flex; }

.modal-card {
    width: min(100%, 520px);
    background: linear-gradient(180deg, var(--panel), var(--panel-2));
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: var(--text);
    font-size: 1.3rem;
    cursor: pointer;
}

.modal-body { display: grid; gap: 10px; }

.modal-alert {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.08);
    line-height: 1.6;
}

.modal-success { background: rgba(76, 127, 88, .18); color: #d8f2df; }
.modal-error { background: rgba(170, 66, 66, .18); color: #ffd9d9; }
.modal-info { background: rgba(88, 122, 168, .16); color: #dceaff; }

@media (max-width: 860px) {
    .hero, .grid-main, .grid-2, .grid-3, .stats-row, .form-grid {
        grid-template-columns: 1fr;
    }

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

    .topnav {
        width: 100%;
        justify-content: flex-start;
    }
}

.site-frame-minimal { max-width: 1240px; }
.camo-shell-minimal { --frame-max-width: 1240px; padding-top: 18px; }

.admin-camo-shell {
    --frame-max-width: 1380px;
    padding-left: 18px;
    padding-right: 18px;
}

.admin-site-frame {
    max-width: 1380px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 12px;
    background: linear-gradient(180deg, rgba(22,33,23,.96), rgba(13,19,14,.96));
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.admin-sidebar-head {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.admin-logo-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #152015;
    background: linear-gradient(135deg, #d6b766, #7e9f63);
}

.admin-brand { font-size: 1.15rem; }
.admin-menu-group + .admin-menu-group { margin-top: 18px; }
.admin-menu-title {
    color: #dce5c2;
    font-size: .82rem;
    letter-spacing: .12em;
    font-weight: 800;
    margin-bottom: 10px;
}

.admin-menu { display: grid; gap: 8px; }
.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.03);
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.admin-menu-item:hover { transform: translateY(-1px); border-color: rgba(214,183,102,.35); }
.admin-menu-item.is-active {
    background: linear-gradient(135deg, rgba(214,183,102,.18), rgba(121,168,107,.12));
    border-color: rgba(214,183,102,.35);
}

.rankings-layout { align-items: start; }
.ranking-filter-card { min-width: 0; }
.rankings-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.rankings-filter-grid .field,
.rankings-filter-grid .actions {
    min-width: 0;
}
.rankings-filter-actions {
    align-items: end;
    flex-wrap: wrap;
}
.ranking-player-card,
.attack-player-card {
    min-width: 0;
}
.ranking-list-footer {
    padding-top: 12px;
}
.ranking-sentinel {
    width: 100%;
    height: 2px;
}
[data-load-more-item].is-hidden {
    display: none;
}
@media (max-width: 700px) {
    .rankings-filter-grid {
        grid-template-columns: 1fr;
    }
}

.admin-menu-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,.07);
}

.admin-main {
    min-width: 0;
}

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-page-title {
    margin: 10px 0 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.admin-player-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-player-card,
.card-inline {
    padding: 16px;
    border-radius: 18px;
    background: rgba(9, 14, 10, .5);
    border: 1px solid rgba(255,255,255,.06);
}

.admin-player-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.admin-player-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.admin-player-metrics span {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    color: var(--muted);
}
.admin-player-metrics strong { display: block; color: var(--text); margin-top: 4px; }

.admin-summary-grid .stat-card { min-height: 130px; }
.admin-shortcut { display: block; }
.admin-shortcut strong { margin-bottom: 6px; }
.compact-player-card { padding: 14px; }
.compact-actions { gap: 8px; }

.admin-hero { margin-bottom: 0; }

.tag-danger {
    background: rgba(207,102,102,.16);
    border-color: rgba(207,102,102,.28);
}
.tag-success {
    background: rgba(120,192,140,.14);
    border-color: rgba(120,192,140,.28);
}

@media (max-width: 1080px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

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

@media (max-width: 700px) {
    .admin-toolbar,
    .admin-player-card-head,
    .admin-player-metrics {
        grid-template-columns: 1fr;
        display: grid;
    }

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

.app-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin: 6px 0 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 25, 19, 0.84);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.admin-topbar {
    background: rgba(16, 22, 18, 0.92);
}

.menu-toggle,
.drawer-close {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
}

.app-topbar-text {
    min-width: 0;
    flex: 1;
}

.app-topbar-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

.app-topbar-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.35;
}

.topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    white-space: nowrap;
    font-size: .86rem;
}
.topbar-chip-mail {
    min-width: 48px;
    justify-content: center;
    position: relative;
    color: var(--gold);
}

.topbar-chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.topbar-chip-icon svg {
    width: 22px;
    height: 22px;
}

.topbar-chip-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: .76rem;
    border: 2px solid rgba(11, 16, 12, 0.95);
}
.hero-badge { margin-bottom: 12px; }
.account-hero h1 { margin-top: 2px; }

.topbar-chip-badge,
.drawer-link-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: .76rem;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .48);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
    z-index: 40;
}

.drawer-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.drawer-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, calc(100vw - 34px));
    padding: 18px 16px 24px;
    background: linear-gradient(180deg, rgba(17, 24, 18, 0.98), rgba(9, 13, 10, 0.98));
    border-right: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 24px 44px rgba(0, 0, 0, .44);
    transform: translateX(-105%);
    transition: transform .22s ease;
    z-index: 50;
    overflow-y: auto;
}

.drawer-panel.is-open {
    transform: translateX(0);
}

.drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.drawer-brand {
    font-size: 1.15rem;
}

.drawer-menu-grouped {
    gap: 12px;
}
.drawer-group {
    display: grid;
    gap: 8px;
}
.drawer-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.04);
    color: var(--text);
    cursor: pointer;
}
.drawer-group-toggle.is-active,
.drawer-group-toggle:hover {
    background: rgba(121, 168, 107, .14);
    border-color: rgba(121, 168, 107, .28);
}
.drawer-group-label {
    flex: 1;
    text-align: left;
}
.drawer-group-arrow {
    font-size: .9rem;
    transition: transform .18s ease;
}
.drawer-group.is-open .drawer-group-arrow {
    transform: rotate(180deg);
}
.drawer-submenu {
    display: none;
    padding-left: 14px;
    gap: 8px;
}
.drawer-sublink {
    background: rgba(255,255,255,.025);
}

.drawer-menu {
    display: grid;
    gap: 10px;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
}

.drawer-link.is-active,
.drawer-link:hover {
    background: rgba(121, 168, 107, .14);
    border-color: rgba(121, 168, 107, .28);
}

.drawer-link-icon {
    width: 28px;
    text-align: center;
    font-size: 1rem;
}

.panel-group {
    display: grid;
    gap: 16px;
}

.panel-screen {
    display: none;
    animation: panelFade .18s ease;
}

.panel-screen.is-active {
    display: block;
}
.panel-view-card + .panel-view-card {
    margin-top: 16px;
}

@keyframes panelFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.player-hero {
    margin-top: 0;
}

.compact-stats-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.guest-topbar {
    justify-content: center;
    text-align: center;
}

@media (max-width: 900px) {
    .compact-stats-row,
    .stats-row,
    .command-resource-grid,
    .leaderboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .app-topbar {
        padding: 12px;
        align-items: stretch;
    }

    .topbar-chip {
        align-self: center;
    }

    .compact-stats-row,
    .stats-row,
    .grid-2,
    .grid-main,
    .grid-3,
    .hero,
    .leaderboard-grid,
    .command-resource-grid {
        grid-template-columns: 1fr;
    }

    .menu-toggle,
    .drawer-close {
        width: 42px;
        height: 42px;
    }
}

body.drawer-open { overflow: hidden; }


@media (max-width: 760px) {
    .responsive-table,
    .responsive-table thead,
    .responsive-table tbody,
    .responsive-table th,
    .responsive-table td,
    .responsive-table tr {
        display: block;
        width: 100%;
    }

    .responsive-table {
        min-width: 100%;
        border-collapse: separate;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tbody {
        display: grid;
        gap: 12px;
    }

    .responsive-table tr {
        padding: 12px;
        border: 1px solid rgba(255,255,255,.06);
        border-radius: 16px;
        background: rgba(9, 14, 10, .5);
    }

    .responsive-table td {
        border: 0;
        padding: 8px 0;
    }

    .responsive-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: .78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .actions {
        width: 100%;
    }

    .actions .btn,
    .actions input,
    .actions select,
    .actions textarea {
        width: 100%;
    }

    .list-item .actions {
        flex-direction: column;
        align-items: stretch;
    }
}


.ad-slot-wrap {
    margin: 14px 0 18px;
}

.ad-slot-card {
    background: rgba(8, 20, 12, 0.78);
    border: 1px solid rgba(166, 187, 120, 0.22);
    border-radius: 18px;
    padding: 14px 12px;
    overflow: visible;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
    width: 100%;
    box-sizing: border-box;
}

.ad-slot-stage {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 8px;
}

.ad-slot-content {
    width: 100%;
    min-height: 110px;
    text-align: center;
    overflow: visible;
    position: relative;
}

.ad-slot-content > * {
    margin-left: auto !important;
    margin-right: auto !important;
}

.ad-slot-content iframe,
.ad-slot-content img,
.ad-slot-content ins,
.ad-slot-content div {
    max-width: 100% !important;
}

.ad-slot-content ins {
    display: block !important;
}

.ad-slot-wrap-footer {
    margin-top: 18px;
}

.menu-toggle {
    position: relative;
}
.menu-toggle-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: .78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(11, 16, 12, 0.95);
}
.notification-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.notification-card-actions {
    margin-top: 12px;
}
.notification-delete-form {
    margin: 0;
}
.notification-delete-btn {
    min-width: 120px;
}
.message-loader {
    margin-top: 14px;
    padding: 12px 14px;
    text-align: center;
    color: var(--muted);
    display: none;
}
.message-loader.is-visible {
    display: block;
}
.compact-inline-form {
    margin: 0;
}
.actions-stack {
    flex-direction: column;
}
@media (max-width: 720px) {
    .notification-card-top {
        flex-direction: column;
    }
    .notification-delete-btn {
        width: 100%;
    }
}


@media (max-width: 700px) {
    .settings-upload-grid {
        grid-template-columns: 1fr;
    }
    .settings-shortcuts {
        grid-template-columns: 1fr;
    }
    .brand-logo {
        width: 38px;
        height: 38px;
    }
}

.accordion-card {
    overflow: hidden;
}

.accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border: 0;
    border-radius: 18px;
    background: rgba(255,255,255,.04);
    color: #eef2e4;
    font-size: 1.08rem;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 14px;
}

.accordion-panel {
    display: none;
}

.accordion-panel.is-open {
    display: block;
}

.messages-layout {
    align-items: start;
}

.quick-dm-form {
    margin-bottom: 18px;
}

.thread-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.thread-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
}

.thread-item.is-active {
    border-color: rgba(211,178,97,.55);
    box-shadow: 0 0 0 1px rgba(211,178,97,.25) inset;
}

.thread-avatar,
.dm-bubble-avatar,
.profile-hero-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(211,178,97,.24), rgba(95,127,78,.34));
    border: 1px solid rgba(255,255,255,.12);
    flex-shrink: 0;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
}

.profile-hero-avatar.large {
    width: 110px;
    height: 110px;
    font-size: 2rem;
}

.thread-avatar img,
.dm-bubble-avatar img,
.profile-hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.thread-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.thread-content p {
    margin: 0;
    color: rgba(238,242,228,.78);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thread-badge {
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .86rem;
    background: linear-gradient(135deg,#d3b261,#8f7a35);
    color: #111;
    font-weight: 800;
}

.conversation-shell {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.direct-feed {
    display: grid;
    gap: 12px;
}

.dm-bubble {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.dm-bubble.is-own {
    flex-direction: row-reverse;
}

.dm-bubble-card {
    flex: 1;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 12px 14px;
}

.dm-bubble.is-own .dm-bubble-card {
    background: rgba(211,178,97,.12);
    border-color: rgba(211,178,97,.24);
}

.dm-bubble-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    font-size: .92rem;
}

.dm-bubble-card p {
    margin: 0;
    line-height: 1.55;
    color: #eef2e4;
    word-break: break-word;
}

.profile-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 18px;
}

.profile-hero-main {
    display: flex;
    gap: 18px;
    align-items: center;
}

.profile-hero-main-centered {
    justify-content: center;
    text-align: center;
}

.profile-hero-text-centered {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.centered-actions {
    justify-content: center;
}

@media (max-width: 920px) {
    .profile-hero-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .profile-hero-main {
        flex-direction: column;
        text-align: center;
    }

    .thread-item {
        padding: 10px 12px;
    }

    .thread-avatar,
    .dm-bubble-avatar {
        width: 44px;
        height: 44px;
    }

    .accordion-toggle {
        padding: 14px 16px;
        font-size: 1rem;
    }
}


.message-tabs-card {
    overflow: hidden;
}

.message-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.message-tab-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px;
    background: rgba(255,255,255,.03);
    color: #eef2e4;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.message-tab-button.is-active {
    background: rgba(211,178,97,.16);
    border-color: rgba(211,178,97,.45);
    box-shadow: 0 0 0 1px rgba(211,178,97,.16) inset;
}

.message-tab-panel {
    display: none;
}

.message-tab-panel.is-active {
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.messages-layout-whatsapp {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.thread-list-card,
.chat-pane-card {
    background: linear-gradient(180deg, rgba(15, 24, 17, 0.94), rgba(18, 33, 22, 0.92));
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    padding: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.chat-pane-card-conversation {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 74vh;
    max-height: 74vh;
    overflow: hidden;
}

.thread-list-whatsapp {
    margin-top: 14px;
}

.thread-item-whatsapp {
    min-height: 74px;
}

.thread-item-whatsapp strong,
.chat-pane-name,
.wa-message-name {
    color: #eef2e4;
    text-decoration: none;
}

.thread-item-whatsapp strong:hover,
.chat-pane-name:hover,
.wa-message-name:hover {
    color: #d3b261;
}

.thread-avatar,
.chat-pane-avatar,
.wa-avatar,
.dm-bubble-avatar,
.profile-hero-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(211,178,97,.14), rgba(95,127,78,.24));
    border: 1px solid rgba(255,255,255,.12);
    flex-shrink: 0;
    color: rgba(255,255,255,.82);
}

.wa-avatar {
    width: 44px;
    height: 44px;
}

.avatar-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
}

.avatar-icon svg {
    width: 100%;
    height: 100%;
}

.chat-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-wrap: nowrap;
}

.chat-pane-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-pane-subtitle {
    color: rgba(238,242,228,.64);
    font-size: .92rem;
    margin-top: 2px;
}

.whatsapp-shell {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    min-height: 0;
}

.chat-history-status {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 8px 12px;
    border-radius: 999px;
    justify-self: center;
    background: rgba(8, 15, 10, 0.92);
    border: 1px solid rgba(255,255,255,.08);
    color: rgba(238,242,228,.64);
    font-size: .8rem;
}

.chat-history-status.is-done {
    color: rgba(214,183,102,.86);
}

.whatsapp-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow-y: auto;
    padding: 2px 2px 8px 0;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

.wa-message {
    display: block;
    padding: 2px 0 10px;
}

.wa-message + .wa-message {
    border-top: 1px solid rgba(255,255,255,.04);
    padding-top: 14px;
}

.wa-message-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.wa-message-head-body {
    min-width: 0;
    flex: 1;
}

.wa-message-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.wa-message-name {
    font-weight: 800;
}

.wa-message-time {
    color: rgba(238,242,228,.62);
    font-size: .82rem;
    flex-shrink: 0;
}

.wa-message-bubble {
    display: block;
    max-width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.wa-message.is-own .wa-message-bubble {
    background: transparent;
    border: 0;
}

.wa-message-bubble p {
    margin: 0;
    line-height: 1.62;
    color: #eef2e4;
    word-break: break-word;
}

.wa-message-receipt {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: .78rem;
    color: rgba(238,242,228,.58);
}

.wa-message-receipt.is-read {
    color: #67b7ff;
}

.wa-message-ticks {
    font-weight: 800;
    letter-spacing: -.06em;
}

.chat-compose-form {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(8,18,10,.96);
    border: 1px solid rgba(255,255,255,.09);
    backdrop-filter: blur(10px);
    box-shadow: 0 -10px 30px rgba(0,0,0,.22);
}

.chat-compose-form textarea {
    min-height: 54px;
    max-height: 140px;
    resize: vertical;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(14, 24, 16, 0.96);
    color: var(--text);
}

.sticky-note-box {
    position: sticky;
    bottom: 0;
    margin: 0;
    z-index: 2;
}

.chat-pane-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

.chat-pane-tools form {
    margin: 0;
}

.chat-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    transition: .2s ease;
}

.chat-tool-btn:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.16);
}

.chat-tool-btn.is-active {
    background: rgba(214,183,102,.14);
    border-color: rgba(214,183,102,.36);
    color: #f6e7b7;
}

.chat-tool-btn.is-danger {
    color: #ffd7d7;
}

.chat-tool-btn.is-danger:hover {
    background: rgba(207,102,102,.14);
    border-color: rgba(207,102,102,.34);
}

.chat-tool-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-tool-icon svg {
    width: 100%;
    height: 100%;
}

.empty-chat-state {
    min-height: 340px;
    display: grid;
    align-content: center;
    gap: 12px;
}

@media (max-width: 980px) {
    .messages-layout-whatsapp {
        grid-template-columns: 1fr;
    }

    .chat-pane-card-conversation {
        min-height: 68vh;
        max-height: 68vh;
    }
}

@media (max-width: 640px) {
    .message-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .message-tab-button {
        padding: 14px 14px;
        font-size: .96rem;
    }

    .thread-list-card,
    .chat-pane-card {
        padding: 14px;
        border-radius: 20px;
    }

    .chat-pane-header {
        align-items: center;
        gap: 12px;
    }

    .thread-avatar,
    .chat-pane-avatar {
        width: 48px;
        height: 48px;
    }

    .wa-avatar {
        width: 40px;
        height: 40px;
    }

    .chat-tool-text {
        display: none;
    }

    .chat-tool-btn {
        width: 42px;
        min-width: 42px;
        padding: 10px;
        justify-content: center;
    }

    .chat-compose-form {
        grid-template-columns: 1fr auto;
    }

    .chat-compose-form .btn {
        align-self: stretch;
    }
}

.reward-ad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(214, 183, 102, 0.5);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(214, 183, 102, 0.18), rgba(121, 168, 107, 0.18));
    color: #f0f5df;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.reward-ad-btn:hover,
.reward-ad-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.reward-ad-btn:disabled,
.reward-ad-btn.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.reward-ad-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(214, 183, 102, 0.22);
    color: #d6b766;
    font-size: 14px;
    line-height: 1;
}

.reward-ad-text {
    white-space: nowrap;
    font-size: 0.92rem;
}

@media (max-width: 640px) {
    .reward-ad-btn {
        width: 100%;
    }
}
