/* =========================================================
   NabMyLinks - Hoja de estilos principal
   Tema: dark mode azul oscuro + dorado
   ========================================================= */

:root {
    /* Paleta */
    --bg-base: #0a1128;
    --bg-surface: #1c2541;
    --bg-surface-2: #16203a;
    --bg-elevated: #233056;
    --border: #3a506b;
    --border-soft: #2a3b5e;

    --gold: #d4af37;
    --gold-soft: #f0d98c;
    --gold-dark: #b8941f;

    --text: #f5f5f5;
    --text-soft: #b8c2d9;
    --text-muted: #8e9ab7;

    --red: #e63946;
    --green: #06d6a0;
    --blue: #4361ee;
    --amber: #ffb703;

    /* Tamaños */
    --sidebar-w: 260px;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --transition: 0.18s ease;
}

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

html, body {
    background: var(--bg-base);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold); }

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

img { max-width: 100%; }

/* ===== Botones ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-base);
}
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-1px); }
.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--border); }
.btn-danger {
    background: var(--red);
    color: #fff;
}
.btn-danger:hover { background: #c1121f; }
.btn-ghost {
    background: transparent;
    color: var(--text-soft);
    border-color: var(--border-soft);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Formularios ===== */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.88rem;
    color: var(--text-soft);
    font-weight: 500;
}
.form-label .req { color: var(--red); }
.form-label .opt { color: var(--text-muted); font-weight: 400; font-size: 0.78rem; }

.form-control,
.form-select,
.form-file {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.92rem;
    font-family: inherit;
    transition: var(--transition);
}
.form-control:focus,
.form-select:focus,
.form-file:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.82rem; color: var(--red); margin-top: 4px; }

textarea.form-control { min-height: 80px; resize: vertical; }
input[type="file"].form-file { padding: 8px; cursor: pointer; }

/* password wrapper with eye button */
.pass-wrapper { position: relative; }
.pass-wrapper .form-control { padding-right: 44px; }
.pass-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; cursor: pointer; color: var(--text-muted);
    font-size: 1.1rem; padding: 4px 8px; border-radius: 4px;
}
.pass-toggle:hover { color: var(--gold); }

/* checkbox styled */
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.form-check input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer;
}
.form-check label { cursor: pointer; color: var(--text-soft); font-size: 0.9rem; }

/* ===== Cards ===== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft);
}
.card-title { font-size: 1.15rem; font-weight: 600; color: var(--gold); }

/* ===== Login page ===== */
.auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 30% 20%, rgba(212,175,55,0.08), transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(67,97,238,0.1), transparent 60%),
                var(--bg-base);
}
.auth-card {
    width: 100%; max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: var(--shadow);
}
.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}
.auth-logo .brand {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}
.auth-logo .subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 0.88rem;
}
.alert-error { background: rgba(230,57,70,0.12); border: 1px solid var(--red); color: #ffb3b9; }
.alert-success { background: rgba(6,214,160,0.12); border: 1px solid var(--green); color: #a8f3df; }
.alert-info { background: rgba(67,97,238,0.12); border: 1px solid var(--blue); color: #b8caff; }

/* ===== Dashboard layout ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-soft);
    display: flex; flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 100;
    transition: transform 0.25s ease;
}
.sidebar-brand {
    padding: 22px 20px;
    border-bottom: 1px solid var(--border-soft);
}
.sidebar-brand .brand {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sidebar-brand .brand-sub { color: var(--text-muted); font-size: 0.72rem; }

.sidebar-nav {
    flex: 1; padding: 16px 12px; overflow-y: auto;
}
.sidebar-nav .nav-section {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); margin: 16px 12px 8px;
}
.sidebar-nav a.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    color: var(--text-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
}
.sidebar-nav a.nav-item:hover {
    background: var(--bg-elevated); color: var(--text);
}
.nav-logout-form { margin: 0; }
.sidebar-nav button.nav-item {
    width: 100%;
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    color: var(--red);
    border: 0;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    font: inherit;
    font-size: .92rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    background: transparent;
}
.sidebar-nav button.nav-item:hover { background: var(--bg-elevated); }
.sidebar-nav a.nav-item.active {
    background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.05));
    color: var(--gold);
    border-left: 3px solid var(--gold);
    padding-left: 11px;
}
.sidebar-nav .nav-icon { width: 20px; text-align: center; font-size: 1.1rem; }

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-soft);
    font-size: 0.78rem; color: var(--text-muted);
}

/* Mobile sidebar toggle */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}
.sidebar-toggle {
    display: none;
    position: fixed; top: 12px; left: 12px; z-index: 110;
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--gold); width: 40px; height: 40px;
    border-radius: var(--radius-sm); cursor: pointer; font-size: 1.2rem;
}

/* Main content */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex; flex-direction: column;
    min-width: 0;
}
.topbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-soft);
    padding: 14px 28px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
}
.topbar h1 { font-size: 1.15rem; font-weight: 600; color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px;
    background: var(--bg-elevated);
    border-radius: 30px;
    font-size: 0.85rem;
}
.topbar-user .avatar-circle {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex; align-items: center; justify-content: center;
    color: var(--bg-base); font-weight: 700; font-size: 0.85rem;
}
.lang-pill {
    padding: 4px 10px; border-radius: 20px;
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-soft); font-size: 0.8rem; cursor: pointer;
}

.content {
    padding: 28px;
    max-width: 1400px; width: 100%;
    margin: 0 auto;
    flex: 1;
}

/* ===== Tables ===== */
.table-wrap {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
}
.table-toolbar {
    padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    border-bottom: 1px solid var(--border-soft);
}
.table-search {
    position: relative; min-width: 240px; flex: 1; max-width: 360px;
}
.table-search input {
    width: 100%; padding: 8px 12px 8px 36px;
    background: var(--bg-surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
}
.table-search .icon {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
}
.table {
    width: 100%; border-collapse: collapse;
}
.table th, .table td {
    padding: 12px 16px; text-align: left;
    border-bottom: 1px solid var(--border-soft);
}
.table th {
    background: var(--bg-surface-2); font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); font-weight: 600;
}
.table tr:hover td { background: var(--bg-elevated); }
.table tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 20px; font-size: 0.74rem; font-weight: 600;
}
.badge-gold { background: rgba(212,175,55,0.15); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); }
.badge-red { background: rgba(230,57,70,0.15); color: #ff8a93; border: 1px solid rgba(230,57,70,0.3); }
.badge-blue { background: rgba(67,97,238,0.15); color: #a3b8ff; border: 1px solid rgba(67,97,238,0.3); }
.badge-green { background: rgba(6,214,160,0.15); color: #6ee7c5; border: 1px solid rgba(6,214,160,0.3); }
.badge-gray { background: var(--bg-elevated); color: var(--text-soft); border: 1px solid var(--border); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions .btn { padding: 5px 10px; font-size: 0.8rem; }

/* ===== Pagination ===== */
.pagination {
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    border-top: 1px solid var(--border-soft);
}
.pagination .pages { display: flex; gap: 4px; }
.pagination .pages a, .pagination .pages span {
    padding: 6px 11px; border-radius: var(--radius-sm);
    background: var(--bg-elevated); color: var(--text-soft);
    font-size: 0.85rem; cursor: pointer; border: 1px solid var(--border-soft);
}
.pagination .pages a:hover { background: var(--border); color: var(--text); }
.pagination .pages .current {
    background: var(--gold); color: var(--bg-base); font-weight: 700; border-color: var(--gold);
}
.pagination select {
    padding: 5px 10px; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); font-size: 0.85rem;
}

/* ===== Grids ===== */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Country picker ===== */
.country-picker {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--bg-surface-2);
    padding: 14px;
    max-height: 320px;
    overflow-y: auto;
}
.country-picker .macros {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 12px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
}
.country-picker .macro-btn {
    padding: 6px 12px; border-radius: 20px; cursor: pointer;
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-soft); font-size: 0.8rem; font-weight: 500;
    transition: var(--transition);
}
.country-picker .macro-btn:hover { border-color: var(--gold); color: var(--gold); }
.country-picker .macro-btn.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-base); border-color: var(--gold);
}
.country-picker .cp-search {
    width: 100%; padding: 8px 12px;
    background: var(--bg-base); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    margin-bottom: 10px; font-size: 0.88rem;
}
.country-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.country-pill {
    padding: 5px 12px; border-radius: 20px; cursor: pointer;
    background: var(--bg-elevated); border: 1px solid var(--border-soft);
    color: var(--text-soft); font-size: 0.8rem; transition: var(--transition);
    user-select: none;
}
.country-pill:hover { border-color: var(--gold); }
.country-pill.selected {
    background: rgba(212,175,55,0.15); color: var(--gold);
    border-color: var(--gold);
}
/* Variantes de color por lista */
.country-picker.variant-blacklist .country-pill.selected { background: rgba(230,57,70,0.15); color: #ff8a93; border-color: var(--red); }
.country-picker.variant-trial .country-pill.selected { background: rgba(67,97,238,0.15); color: #a3b8ff; border-color: var(--blue); }
.country-picker.variant-nofree .country-pill.selected { background: rgba(255,183,3,0.15); color: #ffd166; border-color: var(--amber); }

/* ===== +18 block ===== */
.block-18 {
    border-left: 3px solid var(--red);
    padding-left: 18px; margin-top: 8px;
}

/* ===== Discount tag preview ===== */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}
.discount-tag {
    display: inline-block;
    font-size: 0.72rem; color: var(--red);
    text-transform: uppercase; font-weight: 800;
    letter-spacing: 0.5px;
    animation: blink 1s ease-in-out infinite;
}

/* ===== Modal / popup ===== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
    backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    max-width: 480px; width: 100%;
    box-shadow: var(--shadow);
    animation: modalIn 0.25s ease;
    text-align: center;
}
@keyframes modalIn {
    from { transform: translateY(-20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-icon {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; margin: 0 auto 16px;
}
.modal-icon.success { background: rgba(6,214,160,0.15); color: var(--green); }
.modal-icon.error { background: rgba(230,57,70,0.15); color: var(--red); }
.modal h3 { font-size: 1.3rem; margin-bottom: 8px; }
.modal p { color: var(--text-soft); margin-bottom: 22px; font-size: 0.95rem; }
.modal-buttons { display: flex; gap: 10px; justify-content: center; }

/* ===== Toast ===== */
.toast-wrap {
    position: fixed; bottom: 24px; right: 24px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 2000;
}
.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    min-width: 260px; max-width: 360px;
    animation: toastIn 0.3s ease;
}
@keyframes toastIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }

/* ===== Metrics ===== */
.metric-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card {
    background: var(--bg-surface); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 18px;
}
.metric-card .label { color: var(--text-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; }
.metric-card .value { color: var(--gold); font-size: 2rem; font-weight: 700; margin-top: 6px; }
.metric-card .value.value-small { font-size: 1.35rem; color: var(--text); }
.chart-card {
    background: var(--bg-surface); border: 1px solid var(--border-soft);
    border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.chart-card h3 { color: var(--gold); font-size: 1rem; margin-bottom: 14px; }
.chart-container { position: relative; height: 280px; }

/* ===== Empty states ===== */
.empty-state {
    text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { color: var(--text-soft); margin-bottom: 6px; }
.empty-state.compact { padding: 26px 12px; }

/* ===== Dashboard ===== */
.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background:
        radial-gradient(circle at 85% 20%, rgba(212,175,55,.16), transparent 34%),
        linear-gradient(135deg, var(--bg-surface), var(--bg-surface-2));
}
.dashboard-welcome h2 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); margin-bottom: 6px; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; margin-bottom: 6px; }
.recent-list, .quick-list { display: flex; flex-direction: column; }
.recent-list a, .quick-list a {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 13px 4px; border-bottom: 1px solid var(--border-soft); color: var(--text);
}
.recent-list a:last-child, .quick-list a:last-child { border-bottom: 0; }
.recent-list a:hover, .quick-list a:hover { color: var(--gold); }
.recent-list small, .quick-list small { display: block; color: var(--text-muted); font-size: .76rem; margin-top: 2px; }
.quick-list a { justify-content: flex-start; }
.quick-list a > span { font-size: 1.35rem; width: 34px; text-align: center; }
.metrics-toolbar { gap: 16px; }
.responsive-table-wrap { overflow-x: auto; }

/* ===== Utility ===== */
.text-gold { color: var(--gold); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.mono { font-family: 'SF Mono', Monaco, Consolas, monospace; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.show { display: block; }
    .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
    .main { margin-left: 0; }
    .content { padding: 70px 16px 28px; }
    .topbar { padding: 14px 16px; }
    .topbar h1 { font-size: 1rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .table-wrap { overflow-x: auto; }
    .table { min-width: 600px; }
    .card { padding: 18px; }
    .auth-card { padding: 28px 20px; }
    .metric-card .value { font-size: 1.6rem; }
    .topbar-user span { display: none; }
    .dashboard-welcome { align-items: flex-start; flex-direction: column; }
    .dashboard-actions { width: 100%; }
    .dashboard-actions .btn { flex: 1; }
    .metrics-toolbar, .metric-detail-heading { align-items: flex-start; flex-direction: column; }
    .range-buttons { flex-wrap: wrap; }
}
@media (max-width: 480px) {
    body { font-size: 14px; }
    .btn { padding: 9px 14px; font-size: 0.88rem; }
    .modal { padding: 24px 20px; }
    .table-toolbar { flex-direction: column; align-items: stretch; }
    .table-search { max-width: 100%; }
    .auth-wrap { align-items: flex-start; padding-top: 44px; }
}

@media (max-width: 640px) {
    .responsive-table { min-width: 0; }
    .responsive-table thead { display: none; }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }
    .responsive-table tr { padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
    .responsive-table td {
        display: flex; align-items: center; justify-content: space-between; gap: 16px;
        border: 0; padding: 7px 12px; text-align: right;
    }
    .responsive-table td::before {
        content: attr(data-label); color: var(--text-muted); font-size: .75rem;
        text-transform: uppercase; letter-spacing: .04em; text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* drag and drop file upload */
.dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-surface-2);
}
.dropzone:hover, .dropzone.drag {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212,175,55,0.05);
}
.dropzone .icon { font-size: 1.8rem; margin-bottom: 8px; }
.dropzone small { display: block; margin-top: 6px; }

/* preview thumbnail */
.preview-thumb {
    width: 64px; height: 64px; object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* language chooser cards */
.lang-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 500px; }
.lang-card {
    background: var(--bg-surface); border: 2px solid var(--border-soft);
    border-radius: var(--radius); padding: 32px 20px;
    text-align: center; cursor: pointer; transition: var(--transition); color: inherit;
}
.lang-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.lang-card.active { border-color: var(--gold); background: rgba(212,175,55,0.05); }
.lang-card .flag { font-size: 3rem; }
.lang-card .name { font-size: 1.1rem; font-weight: 600; margin-top: 10px; color: var(--text); }
.lang-card .desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
