/* ==========================================================================
   CrediFácil - Premium Design System & Dark Fintech Aesthetics
   ========================================================================== */

:root {
    /* Palette Tokens (HSL Curated) */
    --bg-base: hsl(222, 47%, 7%);
    --bg-surface: hsl(222, 40%, 11%);
    --bg-card: hsl(222, 38%, 14%);
    --bg-card-hover: hsl(222, 36%, 17%);
    --bg-glass: rgba(18, 24, 38, 0.75);
    
    --border-subtle: hsl(222, 28%, 20%);
    --border-bright: hsl(222, 35%, 32%);

    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 20%, 72%);
    --text-muted: hsl(215, 16%, 50%);

    /* Vibrant Accents */
    --emerald-base: hsl(152, 76%, 42%);
    --emerald-glow: rgba(16, 185, 129, 0.22);
    --emerald-light: hsl(152, 76%, 55%);

    --indigo-base: hsl(243, 75%, 59%);
    --indigo-glow: rgba(99, 102, 241, 0.22);

    --cyan-base: hsl(188, 86%, 46%);
    --cyan-glow: rgba(6, 182, 212, 0.20);

    --amber-base: hsl(38, 92%, 50%);
    --amber-glow: rgba(245, 158, 11, 0.20);

    --danger-base: hsl(350, 89%, 60%);
    --danger-glow: rgba(244, 63, 94, 0.20);

    /* Spacing & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --shadow-glow-emerald: 0 0 20px -3px var(--emerald-glow);
    --shadow-glow-indigo: 0 0 20px -3px var(--indigo-glow);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

p, span, td, th {
    letter-spacing: -0.01em;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.app-header {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 24px;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--emerald-base), hsl(170, 80%, 40%));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    box-shadow: 0 4px 15px var(--emerald-glow);
}

.brand-text h1 {
    font-size: 18px;
    margin-bottom: 2px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber-base);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(244, 63, 94, 0.15);
    color: var(--danger-base);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

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

/* ==========================================================================
   Buttons & Micro-interactions
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13.5px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald-base), hsl(160, 84%, 38%));
    color: #ffffff;
    box-shadow: 0 4px 14px var(--emerald-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-bright);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-bright);
}

.btn-whatsapp {
    background: #25d366;
    color: #ffffff;
    border: none;
}

.btn-whatsapp:hover {
    background: #1eb956;
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn-micro {
    background: transparent;
    border: none;
    color: var(--emerald-light);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
}

.btn-micro:hover {
    text-decoration: underline;
}

.btn-chip {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-chip:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--cyan-base);
}

.btn-chip.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald-light);
    border-color: var(--emerald-base);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   Layout (Sidebar + Main Content)
   ========================================================================== */
.app-layout {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    min-height: calc(100vh - 69px);
}

.app-sidebar {
    width: 250px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-subtle);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
    width: 100%;
}

.nav-item i {
    font-size: 20px;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.16), transparent);
    color: var(--emerald-light);
    border-color: rgba(16, 185, 129, 0.25);
}

.nav-item.active i {
    color: var(--emerald-light);
}

.nav-badge {
    margin-left: auto;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.badge-warning-color {
    background: rgba(245, 158, 11, 0.18);
    color: var(--amber-base);
    border-color: rgba(245, 158, 11, 0.3);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.bot-status-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 12px;
}

.bot-status-pill i {
    font-size: 22px;
    color: var(--cyan-base);
}

.bot-status-info {
    display: flex;
    flex-direction: column;
}

.bot-label {
    font-weight: 600;
    color: var(--text-primary);
}

.bot-state {
    font-size: 11px;
    color: var(--text-muted);
}

.bot-state.connected {
    color: var(--emerald-light);
}

/* ==========================================================================
   Main Content Area & Tab Panels
   ========================================================================== */
.app-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    min-width: 0;
}

.tab-panel {
    display: none;
    animation: fadeInTab 0.3s ease-out;
}

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

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

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.panel-header h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 13.5px;
}

.date-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 12.5px;
    color: var(--text-secondary);
}

.panel-filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================================================
   KPI Cards Grid (Dashboard)
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
}

.kpi-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-bright);
}

.card-glow-emerald:hover { box-shadow: var(--shadow-glow-emerald); }
.card-glow-indigo:hover { box-shadow: var(--shadow-glow-indigo); }

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

.kpi-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--emerald-light); }
.icon-indigo { background: rgba(99, 102, 241, 0.15); color: hsl(243, 75%, 68%); }
.icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--cyan-base); }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber-base); }

.kpi-value {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.text-emerald { color: var(--emerald-light); }
.text-indigo { color: hsl(243, 80%, 72%); }
.text-cyan { color: var(--cyan-base); }
.text-amber { color: var(--amber-base); }
.text-danger { color: var(--danger-base); }

.kpi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   Surface Cards & Tables
   ========================================================================== */
.surface-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.surface-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.surface-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.surface-title i {
    font-size: 20px;
}

.surface-title h3 {
    font-size: 16px;
    font-weight: 700;
}

.surface-body {
    padding: 0;
}

.dashboard-split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
    gap: 24px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.data-table th {
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

.text-right {
    text-align: right;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 10px;
    color: var(--border-bright);
}

.hidden {
    display: none !important;
}

/* Barra de progreso de préstamos en tabla */
.table-progress-wrap {
    width: 90px;
    background: var(--bg-card);
    height: 6px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 4px;
}

.table-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--emerald-base), var(--cyan-base));
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Cash Stat Banner
   ========================================================================== */
.cash-stat-banner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.cash-banner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cash-banner-item .label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cash-banner-item .amount {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
}

.cash-banner-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13.5px;
    transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--cyan-base);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-input-lg {
    font-size: 18px;
    font-weight: 700;
    padding: 12px 16px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-prefix-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-weight: 700;
}

.input-prefix-wrap .form-input {
    padding-left: 28px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

.search-input-wrap input {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 12px 8px 34px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.search-input-wrap input:focus {
    border-color: var(--cyan-base);
}

.select-with-btn {
    display: flex;
    gap: 8px;
}

.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 7, 15, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-bright);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card-wide {
    max-width: 820px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title i {
    font-size: 22px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

/* Box preview préstamo */
.loan-preview-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
}

.preview-item span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.preview-item strong {
    font-size: 15px;
    font-family: var(--font-heading);
}

/* Modal Abono */
.payment-loan-info-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 18px;
}

.payment-loan-info-box .client-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.quick-amounts-bar {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* Modal Detalle Préstamo */
.detail-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.detail-client-info h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.detail-client-info p {
    color: var(--text-secondary);
    font-size: 12.5px;
}

.detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.d-kpi {
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    text-align: center;
}

.d-kpi .label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.d-kpi .val {
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-heading);
}

.subtabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 14px;
}

.subtab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
}

.subtab-btn.active {
    color: var(--cyan-base);
    border-bottom-color: var(--cyan-base);
}

.subtab-content {
    display: none;
}

.subtab-content.active {
    display: block;
}

.modal-table-scroll {
    max-height: 280px;
    overflow-y: auto;
}

/* Control segmentado (Radio button buttons) */
.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
}

.seg-option input {
    display: none;
}

.seg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.seg-option input:checked + .seg-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Simulador & Settings Layout
   ========================================================================== */
.simulator-layout, .settings-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 24px;
}

.sim-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    text-align: center;
}

.sim-stat .label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.sim-stat .value {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-heading);
}

.telegram-guide-box {
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.telegram-guide-box h4 {
    color: var(--cyan-base);
    margin-bottom: 8px;
    font-size: 14px;
}

.telegram-guide-box ol {
    padding-left: 20px;
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.form-actions-inline {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

/* ==========================================================================
   Toasts
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-bright);
    color: var(--text-primary);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success i { color: var(--emerald-light); font-size: 20px; }
.toast-error i { color: var(--danger-base); font-size: 20px; }

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

/* Responsive adjustments */
@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: 12px;
    }
    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }
    .nav-item {
        white-space: nowrap;
        padding: 8px 12px;
    }
    .sidebar-footer {
        display: none;
    }
    .app-content {
        padding: 16px;
    }
    .dashboard-split-grid {
        grid-template-columns: 1fr;
    }
}
