:root {
    --bg: #f5efe4;
    --panel: rgba(21, 52, 76, 0.9);
    --panel-soft: #fffaf1;
    --ink: #163042;
    --muted: #60707b;
    --accent: #c96f3b;
    --accent-dark: #8d4520;
    --line: rgba(22, 48, 66, 0.12);
    --glow: rgba(201, 111, 59, 0.24);
    --topbar-h: 60px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Source Sans 3", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(201, 111, 59, 0.18), transparent 30%),
        linear-gradient(135deg, #f7f1e6 0%, #e8f0f2 100%);
}

.page-shell {
    min-height: 100vh;
}

/* ── TOPBAR ─────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 2rem;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 8px rgba(22, 48, 66, 0.07);
    color: var(--ink);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── USER DROPDOWN ───────────────────────────────── */
.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(22, 48, 66, 0.04);
    color: var(--ink);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s;
}

.user-menu-btn:hover,
.user-menu-btn:focus {
    background: rgba(22, 48, 66, 0.09);
    color: var(--ink);
    border-color: rgba(22, 48, 66, 0.22);
}

.user-menu-btn::after {
    margin-left: 2px;
}

.user-avatar {
    font-size: 1.1rem;
    line-height: 1;
}

.user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown .dropdown-menu {
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(22, 48, 66, 0.12);
    padding: 0.4rem 0;
    min-width: 200px;
}

.user-dropdown .dropdown-item {
    font-size: 0.92rem;
    padding: 0.5rem 1rem;
}

.user-dropdown .dropdown-item:hover {
    background: rgba(22, 48, 66, 0.05);
}

.topbar-title {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    opacity: 0.72;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ink);
}

.topbar-logo {
    height: 36px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

/* ── LANGUAGE BUTTONS ────────────────────────────── */
.lang-group {
    display: flex;
    gap: 2px;
    background: rgba(22, 48, 66, 0.06);
    border-radius: 8px;
    padding: 2px;
}

.lang-btn {
    border: none;
    background: transparent;
    color: rgba(22, 48, 66, 0.5);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 3px 9px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.lang-btn:hover {
    background: rgba(22, 48, 66, 0.07);
    color: var(--ink);
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
}

/* ── EYEBROW ─────────────────────────────────────── */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.55;
    flex-shrink: 0;
    color: var(--ink);
}

.hero-title,
.section-title,
.modal-title,
.metric-value {
    font-family: "Space Grotesk", sans-serif;
}

/* ── BUTTONS ─────────────────────────────────────── */
.btn-accent {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #d9844e);
    box-shadow: 0 6px 18px var(--glow);
}

.btn-accent:hover,
.btn-accent:focus {
    color: #fff;
    background: linear-gradient(135deg, #b85e2e, #cf7a46);
}

/* ── STATS STRIP ─────────────────────────────────── */
.metric-card,
.surface-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 250, 241, 0.88);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(22, 48, 66, 0.07);
}

.metric-card {
    padding: 1rem 1.5rem;
}

.metric-label {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

/* ── SEARCH / TOOLBAR ────────────────────────────── */
.list-toolbar {
    max-width: 560px;
}

.search-wrap {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.45;
    pointer-events: none;
}

.search-wrap .form-control {
    padding-left: 2.4rem;
}

/* ── SURFACE CARD / TABLE ────────────────────────── */
.surface-card {
    padding: 0;
    overflow: hidden;
}

.surface-card .table-responsive {
    border-radius: 20px;
}

.form-control,
.form-select {
    border-radius: 12px;
    border-color: rgba(22, 48, 66, 0.15);
    padding: 0.65rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(201, 111, 59, 0.65);
    box-shadow: 0 0 0 0.25rem rgba(201, 111, 59, 0.15);
}

.notice-table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: rgba(22, 48, 66, 0.04);
}

.notice-table thead th {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    border-bottom-color: var(--line);
    padding: 0.85rem 1rem;
    background: rgba(22, 48, 66, 0.03);
}

.notice-table tbody tr {
    cursor: pointer;
    transition: background-color 0.14s ease;
}

.notice-table tbody td {
    padding: 0.85rem 1rem;
}

.notice-table tbody tr.active {
    background: rgba(201, 111, 59, 0.10);
}

.empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--muted);
}

/* ── DETAIL MODAL ────────────────────────────────── */
.detail-modal-content {
    border-radius: 24px;
    background: #fffdf8;
    border: 1px solid rgba(22, 48, 66, 0.08);
    box-shadow: 0 24px 60px rgba(22, 48, 66, 0.14);
}

.detail-modal-header {
    padding: 1rem 1.5rem;
    background: rgba(255, 250, 241, 0.97);
    border-bottom: 1px solid var(--line);
    border-radius: 24px 24px 0 0;
}

.detail-modal-body {
    background: #fffdf8;
    padding: 1.5rem;
    border-radius: 0 0 24px 24px;
}

/* ── TOKEN PANEL ─────────────────────────────────── */
.token-panel {
    padding: 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(22, 48, 66, 0.08);
}

.token-copy {
    color: var(--muted);
    font-size: 0.88rem;
}

.font-mono {
    font-family: monospace;
    font-size: 0.85rem;
}

/* ── QR PANEL ────────────────────────────────────── */
.qr-panel {
    padding: 1rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--line);
    display: inline-block;
}

/* ── DETAIL GRID ─────────────────────────────────── */
.detail-placeholder {
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed rgba(22, 48, 66, 0.16);
    border-radius: 16px;
    color: var(--muted);
    background: rgba(255,255,255,0.38);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 1.25rem;
    margin-bottom: 0;
}

.detail-grid div {
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(22, 48, 66, 0.07);
}

.detail-grid dt {
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.detail-grid dd {
    margin-bottom: 0;
    font-size: 0.97rem;
    line-height: 1.4;
}

/* ── MODAL ───────────────────────────────────────── */
.modal-content {
    border: 1px solid rgba(22, 48, 66, 0.08);
    border-radius: 24px;
    background: linear-gradient(180deg, #fffdf8, #fff6eb);
    box-shadow: 0 24px 60px rgba(22, 48, 66, 0.12);
}

.modal .form-label {
    font-weight: 700;
    color: var(--ink);
}

@media (max-width: 767.98px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 1rem;
    }

    .list-toolbar {
        max-width: 100%;
    }
}


