/* ============================================
   Finanzas Clayton — Design System
   ============================================ */

:root {
    --accent:       #1e40af;
    --accent-hover: #1e3a8a;
    --accent-bg:    #eff6ff;
    --text:         #1c1917;
    --text-2:       #57534e;
    --text-3:       #9ca3af;
    --border:       #e7e5e4;
    --bg:           #f5f5f4;
    --surface:      #ffffff;
    --green:        #16a34a;
    --green-bg:     #f0fdf4;
    --red:          #dc2626;
    --red-bg:       #fef2f2;
    --orange:       #ea580c;
    --orange-bg:    #fff7ed;
    --radius:       8px;
    --radius-lg:    12px;
    --shadow:       0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg:    0 4px 12px rgba(0,0,0,0.1);
    --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sidebar-w:    220px;
}

/* ---- Reset ---- */

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

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

/* ---- Layout ---- */

.fc-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */

.fc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.25s ease;
}

.fc-sidebar-header {
    padding: 20px 16px 12px;
    border-bottom: 1px solid var(--border);
}

.fc-sidebar-logo {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.3px;
}

.fc-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.fc-nav-section {
    padding: 8px 0;
}

.fc-nav-label {
    display: block;
    padding: 4px 16px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
}

.fc-nav-link {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--text-2);
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.fc-nav-link:hover {
    background: var(--bg);
    color: var(--text);
}

.fc-nav-link.active {
    color: var(--accent);
    background: var(--accent-bg);
    border-left-color: var(--accent);
    font-weight: 600;
}

.fc-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fc-sidebar-user {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.fc-sidebar-logout {
    font-size: 12px;
    color: var(--text-3);
}
.fc-sidebar-logout:hover { color: var(--red); }

/* ---- Overlay ---- */

.fc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 90;
}

/* ---- Main ---- */

.fc-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
}

/* ---- Top bar (mobile) ---- */

.fc-topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.fc-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.fc-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

/* ---- Page bar ---- */

.fc-pagebar {
    padding: 10px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.fc-pagebar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.fc-pagebar-back {
    display: flex;
    align-items: center;
    color: var(--text-2);
    flex-shrink: 0;
}
.fc-pagebar-back:hover { color: var(--accent); }
.fc-pagebar-title {
    font-size: 18px;
    font-weight: 700;
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
}
.fc-pagebar-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.fc-pagebar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.fc-pagebar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
}
.fc-pagebar-icon-btn:hover {
    background: var(--accent);
    color: #fff;
}
.fc-pagebar-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
}

.fc-topbar-back {
    display: flex;
    align-items: center;
    color: var(--text);
    flex-shrink: 0;
}
.fc-topbar-title {
    font-size: 16px;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
}
.fc-topbar-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.fc-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ---- Content ---- */

.fc-content {
    padding: 20px 24px 24px;
    flex: 1;
    min-width: 0;
}

/* ---- Cards ---- */

.fc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.fc-card-link { transition: border-color 0.15s; }
.fc-card-link:hover { border-color: var(--accent); }

.fc-card-warning {
    border-color: var(--orange);
    background: var(--orange-bg);
}

.fc-card-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-3);
    margin-bottom: 4px;
}

.fc-card-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.fc-card-sub {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-3);
}

/* ---- Dashboard Grid ---- */

.fc-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* ---- Quick Actions ---- */

.fc-quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---- Buttons ---- */

.fc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-family: var(--font);
    line-height: 1;
}

.fc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fc-btn-primary:disabled {
    background: var(--border);
    color: var(--text-3);
    opacity: 1;
}

.fc-btn-primary {
    background: var(--accent);
    color: #fff;
}
.fc-btn-primary:hover:not(:disabled) { background: var(--accent-hover); color: #fff; }

.fc-btn-secondary {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border);
}
.fc-btn-secondary:hover:not(:disabled) { background: var(--border); color: var(--text); }

.fc-btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.fc-btn-outline:hover:not(:disabled) { background: var(--accent-bg); }

.fc-btn-outline-danger {
    background: transparent;
    color: var(--red);
    border-color: var(--red);
}
.fc-btn-outline-danger:hover:not(:disabled) { background: var(--red-bg); }

.fc-btn-outline-green {
    background: transparent;
    color: var(--green);
    border-color: var(--green);
}
.fc-btn-outline-green:hover:not(:disabled) { background: var(--green-bg); }

.fc-btn-outline-warning {
    background: transparent;
    color: var(--orange);
    border-color: var(--orange);
}
.fc-btn-outline-warning:hover:not(:disabled) { background: var(--orange-bg); }

.fc-btn-danger {
    background: var(--red);
    color: #fff;
}
.fc-btn-danger:hover:not(:disabled) { background: #b91c1c; color: #fff; }
.fc-btn-danger-text {
    background: none;
    border: none;
    color: var(--red);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius);
}
.fc-btn-danger-text:hover { background: var(--red-bg); }
.fc-btn-condonar {
    background: none;
    border: 1px solid #7c3aed;
    color: #7c3aed;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: var(--radius);
}
.fc-btn-condonar:hover { background: #f3e8ff; }
.fc-condonar-section {
    padding: 12px 0;
    border-top: 1px dashed var(--border);
}
.fc-btn-condonar-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.fc-btn-condonar-full:hover { background: #ede9fe; border-color: #c4b5fd; }

.fc-btn-warning {
    background: var(--orange);
    color: #fff;
}
.fc-btn-warning:hover:not(:disabled) { background: #c2410c; color: #fff; }

.fc-row-inactive { opacity: 0.5; }

.fc-fondo-actions {
    display: flex;
    gap: 8px;
}

.fc-text-accent { color: var(--accent); }

.fc-btn-sm {
    padding: 10px 20px;
    font-size: 13px;
}

.fc-btn-block {
    width: 100%;
}

/* ---- Forms ---- */

.fc-field {
    margin-bottom: 16px;
}

.fc-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 4px;
}

.fc-required { color: var(--red); font-weight: 400; }

.fc-input,
.fc-select,
.fc-textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: var(--font);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s;
}

.fc-input:focus,
.fc-select:focus,
.fc-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

.fc-textarea { resize: vertical; min-height: 80px; }

.fc-select { appearance: none; cursor: pointer; }

.fc-combobox-chevron {
    transition: transform 0.2s;
}

.fc-combobox.open .fc-combobox-chevron {
    transform: rotate(180deg);
}

.fc-combobox-select .fc-combobox-input {
    cursor: pointer;
}

.fc-checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.fc-checkbox-field input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* ---- Tables ---- */

.fc-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.fc-table {
    width: 100%;
    border-collapse: collapse;
}

.fc-table th,
.fc-table td {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.fc-table th {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    background: var(--bg);
    padding: 10px 16px;
}

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

.fc-table tbody tr:hover td { background: var(--bg); }

.fc-table .text-right { text-align: right; }
.fc-table .text-center { text-align: center; }

/* ---- Badges ---- */

.fc-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.fc-badge-green  { background: var(--green-bg); color: var(--green); }
.fc-badge-red    { background: var(--red-bg); color: var(--red); }
.fc-badge-orange { background: var(--orange-bg); color: var(--orange); }
.fc-badge-blue   { background: var(--accent-bg); color: var(--accent); }
.fc-badge-condonado { background: #f3e8ff; color: #7c3aed; }
.fc-badge-excedente { background: #fef3c7; color: #d97706; }
.fc-text-condonado { color: #7c3aed; }

/* ---- Alerts ---- */

.fc-alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 16px;
}
#flashMessage {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: fc-toast-in 0.3s ease-out;
    max-width: 360px;
}
@keyframes fc-toast-in {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fc-alert-success { background: var(--green-bg); color: var(--green); border: 1px solid #bbf7d0; }
.fc-alert-error   { background: var(--red-bg); color: var(--red); border: 1px solid #fecaca; }
.fc-alert-info    { background: var(--accent-bg); color: var(--accent); border: 1px solid #bfdbfe; }
.fc-alert-warning { background: var(--orange-bg); color: var(--orange); border: 1px solid #fed7aa; }

/* ---- Filters ---- */

.fc-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.fc-filter-pill {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.fc-filter-pill:hover { border-color: var(--accent); color: var(--accent); }

.fc-filter-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.fc-filter-pill-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.fc-mp-pills {
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

/* ---- Config tabs ---- */

.fc-config-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
}

.fc-config-tab {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    background: none;
    color: var(--text-3);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.15s;
}

.fc-config-tab:hover { color: var(--text); }

.fc-config-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.fc-config-panel {
    display: none;
}

.fc-config-panel.active {
    display: block;
}

.fc-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.fc-config-current {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ---- Form layouts ---- */

.fc-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.fc-form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.fc-form-row .fc-field { flex: 1; min-width: 140px; }

.fc-field-action {
    flex: 0 0 auto !important;
    min-width: auto !important;
}

.fc-input-sm {
    padding: 6px 8px;
    font-size: 13px;
}

.fc-checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.fc-checkbox-inline input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
}

/* ---- Section headers ---- */

.fc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 12px;
}

.fc-section-title {
    font-size: 18px;
    font-weight: 700;
}

/* ---- Tabs ---- */
.fc-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
}
.fc-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.fc-tab:hover {
    color: var(--text-2);
}
.fc-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.fc-tab-count {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    background: var(--accent-bg);
    color: var(--accent);
    border-radius: 9px;
    margin-left: 4px;
}

/* ---- Detail page ---- */

.fc-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.fc-detail-cards {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    flex: 1;
}

.fc-detail-cards .fc-card {
    flex: 1;
    min-width: 160px;
}

.fc-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}

.fc-form-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin-top: 4px;
}

/* ---- Title badge ---- */

.fc-title-badge {
    display: inline-block;
    background: var(--bg);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 10px;
    vertical-align: middle;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ---- Filter bar ---- */

.fc-filterbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.fc-filterbar-search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.fc-filterbar-search svg {
    position: absolute;
    left: 12px;
    color: var(--text-3);
    pointer-events: none;
}

.fc-filterbar-input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s;
}

.fc-filterbar-input:focus {
    border-color: var(--accent);
}

.fc-filterbar-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}

.fc-filterbar-clear {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.fc-filterbar-clear:hover {
    border-color: var(--red);
    color: var(--red);
}

.fc-filterbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
    position: relative;
}

.fc-filterbar-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.fc-filterbar-btn.has-filters {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-bg);
}

.fc-filterbar-chevron {
    transition: transform 0.2s;
}

.fc-filterbar-btn.open .fc-filterbar-chevron {
    transform: rotate(180deg);
}

/* ---- Filter panel (dropdown) ---- */

.fc-filter-panel {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-lg);
    animation: fc-panel-in 0.2s ease;
}

.fc-filter-panel.open {
    display: block;
}

@keyframes fc-panel-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fc-filter-section {
    margin-bottom: 18px;
}

.fc-filter-section:last-child {
    margin-bottom: 0;
}

.fc-filter-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    margin-bottom: 8px;
}

.fc-filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.fc-filter-range {
    display: flex;
    gap: 8px;
    align-items: center;
}

.fc-filter-range .fc-input {
    flex: 1;
}

.fc-filter-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fc-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text-2);
    background: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font);
    transition: background 0.1s;
    text-align: left;
}

.fc-filter-option:hover {
    background: var(--bg);
}

.fc-filter-option.active {
    background: var(--bg);
    color: var(--text);
    font-weight: 500;
}

.fc-filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fc-filter-panel .fc-select {
    width: 100%;
}

.fc-filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.fc-filter-actions-clear {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.15s;
}

.fc-filter-actions-clear:hover {
    color: var(--red);
}

/* ---- More Options collapse ---- */

.fc-more-options {
    margin-top: 8px;
}

.fc-more-options-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 13px;
    font-family: var(--font);
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.15s;
}

.fc-more-options-btn:hover {
    color: var(--text);
}

.fc-more-options-arrow {
    transition: transform 0.2s;
}

.fc-more-options.open .fc-more-options-arrow {
    transform: rotate(180deg);
}

.fc-more-options-body {
    display: none;
    padding-top: 8px;
}

.fc-more-options.open .fc-more-options-body {
    display: block;
}

/* ---- Modal ---- */

.fc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
    transition: background 0.25s ease;
}

.fc-modal-backdrop.open {
    background: rgba(0,0,0,0.5);
    pointer-events: auto;
}

.fc-modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px) scale(0.6);
    transform-origin: bottom right;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fc-modal-backdrop.open .fc-modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px 0;
    flex-shrink: 0;
}

.fc-modal-title {
    font-size: 18px;
    font-weight: 700;
}
.fc-modal-meta {
    width: 100%;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
}

.fc-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    font-size: 24px;
    color: var(--text-3);
    cursor: pointer;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-modal-close:hover { background: var(--bg); color: var(--text); }

.fc-modal > form {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.fc-modal-md {
    max-width: 540px;
}
.fc-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1;
    min-height: 0;
}

/* Chart modal */
.fc-chart-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}
.fc-chart-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fc-chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}
.fc-chart-legend-item:last-child {
    border-bottom: none;
}
.fc-chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.fc-chart-legend-label {
    flex: 1;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-chart-legend-value {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.fc-chart-legend-pct {
    color: var(--text-3);
    font-size: 12px;
    min-width: 42px;
    text-align: right;
}

.fc-modal-flash {
    color: var(--green);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: auto;
    animation: flashFade 2.5s ease forwards;
}

@keyframes flashFade {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; }
}

.fc-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.fc-modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ---- Money input ---- */

.fc-money-field {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-bottom: 20px;
    transition: border-color 0.15s;
}

.fc-money-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

.fc-money-prefix {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-3);
    margin-right: 4px;
}

.fc-money-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font);
    color: var(--text);
    background: transparent;
    min-width: 0;
}

.fc-money-input::placeholder { color: var(--border); }

.fc-money-suffix {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-3);
    margin-left: 8px;
}

.fc-money-field-sm {
    padding: 8px 12px;
    margin-bottom: 0;
    border-width: 1px;
}

.fc-money-field-sm .fc-money-prefix {
    font-size: 16px;
}

.fc-money-field-sm .fc-money-input {
    font-size: 16px;
}

/* ---- Combobox ---- */

.fc-combobox {
    position: relative;
}

.fc-combobox-input {
    padding-right: 34px !important;
}

.fc-combobox-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    font-size: 14px;
    pointer-events: none;
    line-height: 1;
}

.fc-combobox-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 210;
    box-shadow: var(--shadow-lg);
}

.fc-combobox.open .fc-combobox-list {
    display: block;
}

.fc-combobox.open .fc-combobox-input {
    border-radius: var(--radius) var(--radius) 0 0;
}

.fc-combobox-group {
    padding: 6px 12px 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    background: var(--bg);
}

.fc-combobox-option {
    padding: 9px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.1s;
}

.fc-combobox-option:hover,
.fc-combobox-option.highlighted {
    background: var(--accent-bg);
    color: var(--accent);
}

.fc-combobox-option.hidden {
    display: none;
}

/* ---- Toggle switch ---- */

.fc-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.fc-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.fc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.fc-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 22px;
    cursor: pointer;
    transition: 0.2s;
}

.fc-toggle-slider::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.fc-toggle input:checked + .fc-toggle-slider {
    background: var(--accent);
}

.fc-toggle input:checked + .fc-toggle-slider::before {
    transform: translateX(18px);
}

.fc-toggle-label {
    font-size: 14px;
    color: var(--text-2);
}

/* ---- Details/collapsible ---- */

.fc-details {
    margin-bottom: 16px;
}

.fc-details summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-3);
    cursor: pointer;
    padding: 8px 0;
    list-style: none;
}

.fc-details summary::before {
    content: '+ ';
}

.fc-details[open] summary::before {
    content: '- ';
}

.fc-details summary:hover { color: var(--accent); }

.fc-details-body {
    padding-top: 8px;
}

/* ---- List header ---- */

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

/* ---- Empty state ---- */

.fc-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-3);
}

.fc-empty-state p {
    margin-bottom: 16px;
    font-size: 15px;
}

/* ---- Table enhancements ---- */

.fc-table-clickable {
    cursor: pointer;
}

.fc-table-primary {
    font-weight: 600;
}

.fc-table-mono {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* ---- Abono section ---- */

.fc-abono-section {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 16px;
}

/* ---- Edit modal extras ---- */

.fc-modal-footer-split {
    justify-content: space-between;
}

.fc-modal-footer-right {
    display: flex;
    gap: 8px;
}

.fc-edit-status {
    margin-bottom: 16px;
}

.fc-status-bar {
    display: flex;
    gap: 24px;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius);
}

.fc-status-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fc-status-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-3);
}

.fc-status-value {
    font-size: 18px;
    font-weight: 700;
}

.fc-section-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.fc-subsection-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.fc-table-compact th,
.fc-table-compact td {
    padding: 6px 10px;
    font-size: 13px;
}

/* ---- Text utilities ---- */

.fc-text-green  { color: var(--green); }
.fc-text-red    { color: var(--red); }
.fc-text-orange { color: var(--orange); }
.fc-text-muted  { color: var(--text-3); }

/* ---- Login page ---- */

.fc-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}

.fc-login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
}

.fc-login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 24px;
    text-align: center;
}

/* ---- Abono Collapse (create modal) ---- */

.fc-abono-collapse {
    margin: -4px 0 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.fc-abono-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-2);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.fc-abono-collapse-btn:hover {
    cursor: pointer;
}

.fc-abono-collapse-arrow {
    font-size: 10px;
}

.fc-abono-collapse-body {
    padding: 0 14px 12px;
}

/* ---- Abonos Card ---- */

.fc-abonos-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 12px;
}

.fc-abonos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fc-abono-new {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.fc-abono-new .fc-money-field-sm {
    flex: 1 1 0;
    width: 0;
    min-width: 80px;
    height: 38px;
    box-sizing: border-box;
}

.fc-abono-new .fc-money-input {
    font-size: 13px;
}

.fc-abono-new .fc-money-prefix {
    font-size: 13px;
}

.fc-abono-new-wrap {
    flex-wrap: wrap;
}
.fc-abono-new-wrap .fc-money-field-sm {
    flex: 1 1 auto;
    min-width: 100px;
}
.fc-abono-new-wrap .fc-abono-date {
    flex: 1 1 auto;
    min-width: 130px;
}
.fc-abono-new-wrap .fc-abono-select-wrap {
    flex: 1 1 auto;
    min-width: 100px;
}
.fc-abono-date {
    flex: 1 1 0;
    width: 0;
    font-size: 13px;
    height: 38px;
    box-sizing: border-box;
    max-width: 160px;
}

.fc-abono-select-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    height: 100%;
}

.fc-abono-select {
    width: 100%;
    padding: 6px 24px 6px 8px;
    font-size: 13px;
    height: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.fc-abono-select-chevron {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
}

.fc-abonos-divider {
    border-top: 1px solid var(--border);
    margin: 10px 0;
}

.fc-abono-add-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    border: none;
    background: var(--border);
    color: var(--text-3);
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.fc-abono-add-btn.active {
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}

.fc-abono-add-btn.active:hover { background: var(--accent-hover); }

.fc-abono-extras {
    margin-top: 8px;
}

.fc-abonos-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.fc-abono-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 4px;
}

.fc-abono-view {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.fc-abono-item-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
    width: 72px;
}

.fc-abono-item-medio {
    font-size: 13px;
    color: var(--text-2);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fc-abono-item-date {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    flex-shrink: 0;
}
.fc-abono-viaje-tag {
    font-size: 10px;
    color: var(--accent);
    background: var(--accent-bg);
    padding: 1px 6px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-abono-item-action {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1;
    color: var(--text-3);
    transition: all 0.15s;
    flex-shrink: 0;
}

.fc-abono-item-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.fc-abono-item-action:hover { background: var(--bg); color: var(--text); }
.fc-abono-item-delete:hover { background: var(--red-bg); color: var(--red); }

/* Abono row in edit mode */
.fc-abono-item.editing {
    background: var(--accent-bg);
    border-color: var(--accent);
}

.fc-abono-item.editing .fc-abono-view { display: none; }
.fc-abono-item .fc-abono-edit { display: none; }
.fc-abono-item.editing .fc-abono-edit {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.fc-abono-edit-top {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fc-abono-edit-label {
    font-size: 12px;
    color: var(--text-3);
    flex: 1;
}

.fc-abono-edit-row-bottom {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fc-abono-edit-row-bottom .fc-select,
.fc-abono-edit-row-bottom input[type="date"] {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    font-size: 13px;
}

.fc-abono-item.locked,
.fc-abono-new.locked {
    opacity: 0.4;
    pointer-events: none;
}

.fc-abono-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    transition: all 0.15s;
}

.fc-abono-btn-save { color: var(--green); }
.fc-abono-btn-save:hover { background: var(--green-bg); }
.fc-abono-btn-delete { color: var(--red); }
.fc-abono-btn-delete:hover { background: var(--red-bg); }
.fc-abono-btn-cancel { color: var(--text-3); }
.fc-abono-btn-cancel:hover { background: var(--bg); }

.fc-text-sm { font-size: 13px; font-weight: 600; }

.fc-field-invalid {
    border-color: var(--red) !important;
}

.fc-field-invalid.fc-combobox .fc-combobox-input {
    border-color: var(--red) !important;
}

.fc-input.fc-field-invalid,
.fc-select.fc-field-invalid {
    border-color: var(--red) !important;
}

.fc-input-warn {
    border-color: var(--red) !important;
    animation: fc-shake 0.3s ease;
}

@keyframes fc-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.fc-money-field.fc-input-warn,
.fc-money-field-sm.fc-input-warn {
    border-color: var(--red) !important;
    animation: fc-shake 0.3s ease;
}

.fc-combobox.fc-input-warn .fc-combobox-input {
    border-color: var(--red) !important;
}

.fc-combobox.fc-input-warn {
    animation: fc-shake 0.3s ease;
}

/* ---- Progress bar ---- */

.fc-progress {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.fc-progress-bar {
    height: 100%;
    background: var(--green);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.fc-table-saldo {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

/* ---- Unified list ---- */

.fc-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.fc-list-item {
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--border);
}

.fc-list-item:last-child {
    border-bottom: none;
}

.fc-list-item:hover {
    background: var(--bg);
}

.fc-list-item:active {
    background: var(--border);
}

.fc-list-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.fc-list-item-concepto {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.fc-list-item-top .fc-table-mono {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.fc-list-item-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 12px;
}

.fc-badge-sm {
    font-size: 10px;
    padding: 1px 6px;
}

.fc-list-item .fc-progress {
    margin-top: 8px;
}
.fc-list-item-inactive {
    opacity: 0.5;
}

/* ---- Viaje show grid (desktop) ---- */

@media (min-width: 769px) {
    .fc-viaje-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .fc-viaje-grid > * {
        margin-bottom: 0 !important;
    }
    .fc-viaje-wide {
        grid-column: 1 / -1;
    }
}

/* ---- FAB ---- */

.fc-fab-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fc-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--text);
    color: var(--surface);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.2s;
    position: relative;
    z-index: 91;
}

.fc-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.fc-fab-secondary {
    width: 40px;
    height: 40px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 90;
}

.fc-fab-menu {
    position: absolute;
    bottom: 56px;
    right: 0;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    padding: 6px 0;
    min-width: 190px;
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.15s, transform 0.15s;
}

.fc-fab-menu-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.fc-fab-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
}

.fc-fab-option:hover {
    background: var(--accent-bg);
    color: var(--accent);
}

.fc-help-text {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

/* --- Créditos & shared components --- */

.fc-clickable-row { cursor: pointer; }
.fc-clickable-row:hover { background: var(--accent-bg); }

.fc-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-2);
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 16px;
}
.fc-back-link:hover { color: var(--accent); }

.fc-info-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s;
}
.fc-info-btn:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
}
.fc-credit-stats {
    display: flex;
    gap: 0;
    border-top: 1px solid var(--border);
    margin-top: 10px;
    padding-top: 10px;
}
.fc-credit-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.fc-credit-stat + .fc-credit-stat {
    border-left: 1px solid var(--border);
}
.fc-credit-stat-val {
    font-size: 18px;
    font-weight: 600;
}
.fc-credit-stat-lbl {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}
.fc-card-detail .fc-card-body {
    padding: 20px 24px;
}
.fc-card-early-pay {
    border-left: 3px solid var(--green);
}

/* Stacked bar */
.fc-stacked-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: var(--border);
}
.fc-stacked-seg { min-width: 2px; }
.fc-stacked-capital { background: var(--green); }
.fc-stacked-interes { background: var(--orange); }
.fc-stacked-seguro { background: var(--text-3); }
.fc-stacked-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-2);
}
.fc-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.fc-bg-green { background: var(--green); }
.fc-bg-orange { background: var(--orange); }
.fc-bg-gray { background: var(--text-3); }

.fc-radiografia-costo {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border-radius: var(--radius);
}
.fc-badge-sobrecosto {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--orange);
    background: var(--orange-bg);
    border-radius: 10px;
}
.fc-ahorro-abonos {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--green);
    background: var(--green-bg);
    border-radius: var(--radius);
}

/* Collapse toggle */
.fc-collapse-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font);
    color: var(--text);
    text-align: left;
}
.fc-collapse-arrow {
    color: var(--text-3);
    transition: transform 0.2s;
}
.fc-collapsed .fc-collapse-arrow {
    transform: rotate(-90deg);
}
.fc-collapsed .fc-collapse-body {
    display: none;
}
.fc-collapse-body {
    margin-top: 12px;
}

.fc-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
@media (max-width: 600px) {
    .fc-summary-row { grid-template-columns: 1fr; }
}

.fc-summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.fc-summary-label {
    font-size: 12px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.fc-summary-value {
    font-size: 20px;
    font-weight: 600;
}

.fc-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .fc-detail-grid { grid-template-columns: 1fr; }
}

.fc-detail-label {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 2px;
}

.fc-detail-value {
    font-size: 14px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.fc-detail-item {
    min-width: 0;
}

.fc-pagos-list {
    padding: 0 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fc-pago-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius);
}

.fc-pago-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    min-width: 16px;
    text-align: center;
}

.fc-pago-info {
    flex: 1;
    min-width: 0;
}

.fc-pago-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
}

.fc-pago-fecha {
    font-size: 13px;
    color: var(--text-2);
    white-space: nowrap;
}

.fc-pago-desglose {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

.fc-pago-total {
    background: none;
    border-top: 2px solid var(--border);
    border-radius: 0;
    padding-top: 12px;
    margin-top: 4px;
}

.fc-pago-abono {
    background: var(--green-bg);
    border-left: 3px solid var(--green);
}
.fc-pago-num-abono {
    color: var(--green) !important;
    font-weight: 700 !important;
    font-size: 11px !important;
}

.fc-pago-tipo-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.fc-pago-tipo-tab {
    flex: 1;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    background: var(--bg);
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s;
    font-family: var(--font);
}
.fc-pago-tipo-tab + .fc-pago-tipo-tab {
    border-left: 1px solid var(--border);
}
.fc-pago-tipo-tab.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.fc-amort-abono-row td { color: var(--green); font-style: italic; }
.fc-amort-abono { border-left: 3px solid var(--green); }
.fc-amort-num-abono {
    background: var(--green) !important;
    color: #fff !important;
    font-size: 10px !important;
}

.fc-amort-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.fc-amort-item {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
}

.fc-amort-item:last-child {
    border-bottom: none;
}

.fc-amort-paid {
    opacity: 0.45;
    background: var(--bg);
}

.fc-amort-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.fc-amort-header strong {
    font-size: 16px;
}

.fc-amort-num {
    font-size: 11px;
    font-weight: 700;
    color: var(--surface);
    background: var(--text-3);
    border-radius: 10px;
    padding: 1px 8px;
}

.fc-amort-paid .fc-amort-num {
    background: var(--border);
    color: var(--text-2);
}

.fc-amort-details {
    display: flex;
    gap: 6px;
    font-size: 12px;
    color: var(--text-2);
}

.fc-amort-details span {
    background: var(--bg);
    padding: 2px 7px;
    border-radius: 4px;
}

.fc-amort-saldos {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
}

.fc-progress-lg {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.fc-progress-lg .fc-progress-bar {
    height: 100%;
    border-radius: 4px;
}

.fc-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.fc-btn-icon-danger {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}
.fc-btn-icon-danger:hover { color: var(--red); background: var(--red-bg); }

.fc-empty {
    text-align: center;
    padding: 48px 20px;
}
.fc-empty-text {
    color: var(--text-3);
    margin-bottom: 16px;
}

.fc-title-badge-red {
    background: var(--red-bg);
    color: var(--red);
}

.fc-title-badge-orange {
    background: var(--orange-bg);
    color: var(--orange);
}
.fc-title-badge-blue {
    background: var(--accent-bg);
    color: var(--accent);
}

.fc-fab:active {
    transform: scale(0.95);
}

/* ---- Responsive show/hide ---- */

.fc-hide-mobile { display: block; }
.fc-hide-desktop { display: none; }
table.fc-table { display: table; }
.fc-table-wrap.fc-hide-mobile { display: block; }

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .fc-hide-mobile, .fc-table-wrap.fc-hide-mobile { display: none !important; }
    .fc-hide-desktop { display: block !important; }
    .fc-sidebar {
        transform: translateX(-100%);
    }

    .fc-sidebar.open {
        transform: translateX(0);
    }

    .fc-overlay.open {
        display: block;
    }

    .fc-main {
        margin-left: 0;
    }

    .fc-topbar {
        display: flex;
    }

    .fc-pagebar {
        display: none;
    }

    .fc-content {
        padding: 16px;
    }

    .fc-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .fc-card-value {
        font-size: 20px;
    }

    .fc-card > div[style*="padding"] {
        padding: 12px 14px !important;
    }

    .fc-modal-backdrop {
        padding: 16px;
    }

    .fc-filter-pill {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .fc-filter-panel {
        padding: 16px;
    }

    .fc-table th,
    .fc-table td {
        padding: 8px 6px;
        font-size: 13px;
    }

    .fc-desglose {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 0;
    }

    .fc-desglose-sep {
        margin: 0 2px;
    }


    .fc-fab-container {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 600px) {
    .fc-card-detail .fc-card-body, .fc-pagos-list {
        padding: 0;
    }
    .fc-card-detail .fc-hide-mobile + .fc-amort-list {
        margin: 0;
    }
}
@media (max-width: 480px) {
    .fc-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .fc-credit-stat-val {
        font-size: 16px;
    }
    .fc-credit-stat-lbl {
        font-size: 10px;
    }
}

/* ---- Bolsillos ---- */

.fc-bolsillos-resumen {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.fc-bolsillo-resumen-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, border-color 0.15s;
    cursor: pointer;
}

a.fc-bolsillo-resumen-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--text-3);
}

.fc-bolsillo-resumen-compromiso {
    border-left: 4px solid var(--orange);
}

.fc-bolsillo-resumen-ahorro {
    border-left: 4px solid var(--green);
}

.fc-bolsillo-resumen-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-bolsillo-resumen-compromiso .fc-bolsillo-resumen-icon {
    background: var(--orange-bg);
    color: var(--orange);
}

.fc-bolsillo-resumen-ahorro .fc-bolsillo-resumen-icon {
    background: var(--green-bg);
    color: var(--green);
}

.fc-bolsillo-resumen-label {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-bolsillo-resumen-value {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.fc-bolsillo-group {
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    overflow: hidden;
}

.fc-bolsillo-group-header {
    padding: 14px 20px 10px;
    border-bottom: 1px solid var(--border);
}

.fc-bolsillo-group-compromiso .fc-bolsillo-group-header {
    border-left: 4px solid var(--orange);
}

.fc-bolsillo-group-ahorro .fc-bolsillo-group-header {
    border-left: 4px solid var(--green);
}

.fc-bolsillo-group-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.fc-bolsillo-group-sub {
    font-size: 12px;
    color: var(--text-3);
}

.fc-bolsillo-group .fc-table-wrap {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.fc-bolsillo-group .fc-table {
    border: none;
}

.fc-bolsillo-group .fc-list {
    border: none;
    border-radius: 0;
    background: transparent;
}

.fc-bolsillo-group .fc-list-item:last-child {
    border-bottom: none;
}

/* Pocket cards — ahorro bolsillos */
.fc-pocket-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.fc-pocket-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 20px 14px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s;
    cursor: pointer;
    min-height: 130px;
}
.fc-pocket-card:hover {
    border-color: var(--green);
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.10);
    transform: translateY(-2px);
}
.fc-pocket-card-inactive {
    opacity: 0.5;
}
.fc-pocket-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.fc-pocket-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}
.fc-pocket-amounts {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 10px;
}
.fc-pocket-saldo {
    font-size: 22px;
    font-weight: 700;
    color: var(--green);
}
.fc-pocket-meta {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-3);
}
.fc-pocket-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.fc-pocket-progress {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.fc-pocket-progress-bar {
    height: 100%;
    background: var(--green);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.fc-pocket-progress-full {
    background: var(--green);
}
.fc-pocket-pct {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
    min-width: 32px;
    text-align: right;
}
.fc-pocket-footer {
    margin-top: auto;
}

@media (max-width: 600px) {
    .fc-pocket-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 10px;
    }
    .fc-pocket-card {
        padding: 14px 16px 12px;
        min-height: 110px;
        border-radius: 12px;
    }
    .fc-pocket-saldo {
        font-size: 18px;
    }
    .fc-bolsillos-resumen {
        flex-direction: column;
        gap: 8px;
    }
    .fc-bolsillo-resumen-value {
        font-size: 18px;
    }
    .fc-bolsillo-group-header {
        padding: 12px 16px 8px;
    }
}

/* ========== NOTIFICATIONS ========== */

.fc-notif-bell {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    transition: background 0.15s;
    color: var(--text-2);
}
.fc-notif-bell:hover {
    background: var(--accent-bg);
    color: var(--accent);
}
.fc-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 99px;
    padding: 0 4px;
}

/* Dropdown */
.fc-notif-dropdown {
    display: none;
    position: fixed;
    top: 56px;
    right: 12px;
    width: 360px;
    max-height: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 1100;
    overflow: hidden;
    flex-direction: column;
}
.fc-notif-dropdown.open {
    display: flex;
}
.fc-notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.fc-notif-mark-all {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    font-weight: 500;
}
.fc-notif-mark-all:hover {
    text-decoration: underline;
}
.fc-notif-list {
    overflow-y: auto;
    max-height: 360px;
    flex: 1;
}
.fc-notif-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}
.fc-notif-item-form {
    margin: 0;
}
.fc-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}
.fc-notif-item:hover {
    background: var(--bg);
}
.fc-notif-item.fc-notif-read {
    opacity: 0.55;
}
.fc-notif-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent);
}
.fc-notif-content {
    flex: 1;
    min-width: 0;
}
.fc-notif-titulo {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}
.fc-notif-mensaje {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fc-notif-time {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 3px;
}
.fc-notif-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 6px;
}
.fc-notif-footer {
    display: block;
    text-align: center;
    padding: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}
.fc-notif-footer:hover {
    background: var(--bg);
}

/* Full notifications page */
.fc-notif-full-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.fc-notif-full-item {
    margin: 0;
}
.fc-notif-full-item.fc-notif-full-unread .fc-notif-full-btn {
    background: var(--accent-bg);
    border-left: 3px solid var(--accent);
}
.fc-notif-full-btn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    text-align: left;
    cursor: pointer;
    font: inherit;
    border-left: 3px solid transparent;
    transition: background 0.1s;
}
.fc-notif-full-btn:hover {
    background: var(--bg);
}
.fc-notif-full-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent);
}
.fc-notif-full-content {
    flex: 1;
    min-width: 0;
}
.fc-notif-full-titulo {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.fc-notif-full-mensaje {
    font-size: 13px;
    color: var(--text-2);
    margin-top: 3px;
}
.fc-notif-full-meta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fc-notif-full-fecha {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
}
.fc-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
}

@media (max-width: 768px) {
    .fc-notif-dropdown {
        top: 48px;
        right: 8px;
        left: 8px;
        width: auto;
    }
    .fc-notif-full-btn {
        padding: 12px;
    }
    .fc-notif-full-meta {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
    }
}

/* ========================================
   DASHBOARD
   ======================================== */

.fc-dash-filters {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.fc-dash-filters-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.fc-dash-period-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fc-dash-period-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-bg);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-dash-period-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.fc-dash-period-range {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.2;
}

.fc-dash-filters-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fc-dash-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    background: var(--bg);
    border-radius: 8px;
    padding: 3px;
}

.fc-dash-pills .fc-filter-pill {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.fc-dash-pills .fc-filter-pill:hover {
    background: var(--surface);
    color: var(--text);
}

.fc-dash-pills .fc-filter-pill.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.3);
}

.fc-dash-date-range {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.fc-dash-date-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fc-dash-date-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fc-dash-date-range .fc-input-sm {
    width: 150px;
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.fc-dash-compare-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}

.fc-dash-compare-toggle:hover {
    background: var(--bg);
}

.fc-dash-compare-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.fc-dash-compare-label {
    display: flex;
    align-items: center;
    gap: 4px;
}

.fc-select.fc-input-sm {
    padding: 5px 10px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
}

/* Dashboard section titles */
.fc-dash-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.fc-dash-section-title:first-of-type {
    margin-top: 0;
}

/* Dashboard grids */
.fc-dash-grid {
    display: grid;
    gap: 12px;
}

.fc-dash-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.fc-dash-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.fc-dash-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Dashboard cards */
.fc-dash-card {
    padding: 16px;
    position: relative;
}

.fc-dash-card-sm {
    padding: 12px 16px;
}

.fc-dash-card-label {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 4px;
    font-weight: 500;
}

.fc-dash-card-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.fc-dash-card-sm .fc-dash-card-value {
    font-size: 18px;
}

.fc-dash-card-sub {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 400;
    margin-top: 2px;
}

.fc-dash-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 12px;
}

/* Delta badges */
.fc-delta {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 4px;
}

.fc-delta-up {
    background: var(--green-bg);
    color: var(--green);
}

.fc-delta-down {
    background: var(--red-bg);
    color: var(--red);
}

.fc-delta-neutral {
    background: var(--bg);
    color: var(--text-3);
}

/* Progress bar */
.fc-progress {
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.fc-progress-sm {
    height: 6px;
}

.fc-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.fc-progress-green {
    background: var(--green);
}

.fc-progress-orange {
    background: var(--orange);
}

/* Category bars */
.fc-dash-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
}

.fc-dash-bar-label {
    font-size: 13px;
    color: var(--text);
}

.fc-dash-bar-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.fc-dash-bar {
    height: 6px;
    background: var(--bg);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.fc-dash-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.fc-dash-bar-red {
    background: var(--red);
    opacity: 0.7;
}

.fc-dash-bar-blue {
    background: var(--accent);
    opacity: 0.7;
}

/* Fondos detail */
.fc-dash-fondos-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fc-dash-fondo-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--bg);
}

.fc-dash-fondo-row:last-child {
    border-bottom: none;
}

.fc-dash-fondo-name {
    flex: 1;
    font-size: 13px;
    color: var(--text);
}

.fc-dash-fondo-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.fc-badge-orange {
    background: var(--orange-bg);
    color: var(--orange);
}

.fc-badge-blue {
    background: var(--accent-bg);
    color: var(--accent);
}

.fc-dash-fondo-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    min-width: 90px;
    text-align: right;
}

/* Transactions */
.fc-dash-tx-list {
    display: flex;
    flex-direction: column;
}

.fc-dash-tx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg);
}

.fc-dash-tx-item:last-child {
    border-bottom: none;
}

.fc-dash-tx-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.fc-dash-tx-ingreso {
    background: var(--green-bg);
    color: var(--green);
}

.fc-dash-tx-gasto {
    background: var(--red-bg);
    color: var(--red);
}

.fc-dash-tx-info {
    flex: 1;
    min-width: 0;
}

.fc-dash-tx-concepto {
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-dash-tx-detail {
    font-size: 11px;
    color: var(--text-3);
}

.fc-dash-tx-amount {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* FAB */
.fc-fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fc-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s, opacity 0.2s;
}

.fc-fab:hover {
    transform: scale(1.05);
}

.fc-fab-multi.open .fc-fab {
    transform: rotate(45deg);
}

.fc-fab-options {
    position: absolute;
    bottom: 62px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s;
}

.fc-fab-multi.open .fc-fab-options {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.fc-fab-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.fc-fab-option-green {
    background: var(--green);
    color: #fff;
}

.fc-fab-option-red {
    background: var(--red);
    color: #fff;
}

/* Chart container */
#dashChart {
    max-height: 250px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .fc-dash-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .fc-dash-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    .fc-dash-grid-3 > :last-child {
        grid-column: 1 / -1;
    }
    .fc-dash-grid-2 {
        grid-template-columns: 1fr;
    }
    .fc-dash-card-value {
        font-size: 18px;
    }
    .fc-dash-card-sm .fc-dash-card-value {
        font-size: 16px;
    }
    .fc-dash-filters {
        padding: 12px;
    }
    .fc-dash-filters-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 10px;
    }
    .fc-dash-filters-actions {
        width: 100%;
        justify-content: space-between;
    }
    .fc-dash-period-icon {
        width: 34px;
        height: 34px;
    }
    .fc-dash-period-title {
        font-size: 15px;
    }
    .fc-dash-pills {
        padding: 2px;
        gap: 2px;
    }
    .fc-dash-pills .fc-filter-pill {
        padding: 5px 10px;
        font-size: 12px;
    }
    .fc-dash-date-range {
        flex-wrap: wrap;
        gap: 8px;
    }
    .fc-dash-date-range .fc-input-sm {
        width: 100%;
    }
    .fc-dash-date-field {
        flex: 1;
        min-width: 120px;
    }
    .fc-fab-container {
        bottom: 16px;
        right: 16px;
    }
    .fc-dash-fondo-badge {
        display: none;
    }
    .fc-dash-fondo-amount {
        font-size: 13px;
        min-width: 70px;
    }
}

/* ========================================
   RANKING CARD (me-deben, yo-debo)
   ======================================== */

.fc-ranking-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.fc-ranking-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 14px;
}

.fc-ranking-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fc-ranking-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fc-ranking-pos {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fc-ranking-row:first-child .fc-ranking-pos {
    background: var(--accent-bg);
    color: var(--accent);
}

.fc-ranking-info {
    flex: 1;
    min-width: 0;
}

.fc-ranking-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.fc-ranking-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-ranking-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    margin-left: 8px;
}

.fc-ranking-bar {
    height: 6px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
}

.fc-ranking-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.fc-ranking-bar-orange {
    background: var(--orange);
    opacity: 0.7;
}

.fc-ranking-bar-red {
    background: var(--red);
    opacity: 0.7;
}

.fc-ranking-meta {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}
.fc-ranking-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.fc-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s;
}

.fc-icon-btn:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
}

.fc-modal-sm .fc-modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* ============================================
   Viajes
   ============================================ */

.fc-viaje-info-card {
    border-left: 3px solid var(--accent);
}

.fc-viaje-info-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.fc-viaje-info-arrow {
    font-size: 12px;
    color: var(--text-3);
    transition: transform .2s;
}

.fc-viaje-formula-block {
    background: var(--bg);
    border-radius: 8px;
    padding: 12px 16px;
}

/* Viaje index cards */
.fc-viaje-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.fc-viaje-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color .15s, box-shadow .15s;
}
.fc-viaje-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.fc-viaje-card-activo {
    border-left: 4px solid var(--accent);
}
.fc-viaje-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.fc-viaje-card-nombre {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.fc-viaje-card-meta {
    font-size: 12px;
    color: var(--text-2);
}
.fc-viaje-card-dates {
    font-size: 13px;
    color: var(--text-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fc-viaje-card-days {
    font-size: 12px;
    color: var(--text-3);
}
.fc-viaje-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.fc-viaje-card-stat {
    text-align: center;
}
.fc-viaje-card-stat-val {
    display: block;
    font-size: 14px;
    font-weight: 700;
}
.fc-viaje-card-stat-lbl {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}
.fc-viaje-info-btn {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    transition: color .15s;
}
.fc-viaje-info-btn:hover {
    color: var(--accent);
}

.fc-viaje-activo-card {
    border: 2px solid var(--accent);
}

.fc-viaje-activo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.fc-viaje-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.fc-viaje-stat {
    text-align: center;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
}

.fc-viaje-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.fc-viaje-stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

.fc-viaje-dates {
    margin-top: 16px;
    text-align: center;
}

.fc-viaje-progress-wrap {
    margin-top: 16px;
}

.fc-viaje-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    justify-content: center;
}

.fc-viaje-show-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.fc-viaje-modules {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.fc-page-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fc-inline-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.fc-inline-form .fc-input {
    min-width: 0;
}

.fc-btn-xs {
    padding: 2px 8px;
    font-size: 12px;
}

.fc-table-sm td, .fc-table-sm th {
    padding: 6px 10px;
    font-size: 13px;
}

.fc-field-hint {
    display: block;
    font-size: 12px;
    color: var(--text-3);
    margin-top: 4px;
}

.fc-badge-blue {
    background: var(--accent-bg);
    color: var(--accent);
}

.fc-viaje-module-link {
    text-decoration: none;
    color: inherit;
    display: block;
    text-align: center;
    padding: 40px 24px;
    transition: border-color .15s, box-shadow .15s;
}

.fc-viaje-module-link:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

/* Viaje show — quick nav strip */
.fc-viaje-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px 6px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
a.fc-viaje-stat-box:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    filter: brightness(0.98);
}
.fc-viaje-stat-box-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    margin-bottom: 2px;
}
.fc-viaje-stat-box-val {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}
.fc-viaje-stat-box-sub {
    font-size: 10px;
    color: var(--text-3);
    line-height: 1.3;
}
.fc-viaje-link-card {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 16px;
    cursor: pointer;
    transition: border-color .15s;
}
.fc-viaje-link-card:hover {
    border-color: var(--accent);
}
.fc-viaje-link-card:hover .fc-link-chevron {
    transform: translateX(2px);
    color: var(--accent);
}
.fc-link-chevron {
    color: var(--text-3);
    transition: transform .15s, color .15s;
}
@media (max-width: 768px) {
    .fc-viaje-stat-box-val { font-size: 13px; }
}

.fc-viaje-tipo-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fc-viaje-tipo-chip {
    background: var(--bg);
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fc-viaje-tipo-nombre {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
}

.fc-viaje-tipo-stats {
    font-size: 12px;
    color: var(--text-2);
}

.fc-form-grid-compact {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.fc-row-muted {
    opacity: 0.5;
}

.fc-badge-orange {
    background: var(--orange-bg);
    color: var(--orange);
}

.fc-abono-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}
.fc-abono-row:last-child { border-bottom: none; }

.fc-pres-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.fc-pres-check-row:last-child { border-bottom: none; }
.fc-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}
.fc-check-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.fc-pres-check-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Sobres */
.fc-sobres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.fc-sobre-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    cursor: pointer;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.fc-sobre-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.fc-sobre-card-meta { border-left: 3px solid var(--green); }
.fc-sobre-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.fc-sobre-nombre {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.fc-sobre-badge {
    background: var(--accent-bg);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.fc-sobre-cats {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.fc-sobre-bars { margin-bottom: 8px; }
.fc-sobre-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.fc-sobre-bar-label {
    font-size: 12px;
    color: var(--text-2);
    width: 60px;
    flex-shrink: 0;
}
.fc-sobre-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}
.fc-sobre-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}
.fc-sobre-bar-asignado { background: var(--accent); }
.fc-sobre-bar-gastado { background: var(--red); }
.fc-sobre-bar-meta { background: var(--green); }
.fc-sobre-bar-value {
    font-size: 12px;
    color: var(--text-2);
    width: 80px;
    text-align: right;
    flex-shrink: 0;
}
.fc-sobre-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fc-dist-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg);
}
.fc-dist-row:last-child { border-bottom: none; }
.fc-dist-row-info { flex: 1; min-width: 0; }
.fc-dist-row-name { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.fc-dist-row-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.fc-dist-row-input { flex-shrink: 0; width: 130px; }
@media (max-width: 600px) {
    .fc-dist-row { flex-direction: column; align-items: stretch; gap: 6px; }
    .fc-dist-row-input { width: 100%; }
}
.fc-check-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.fc-check-group { min-width: 140px; }
.fc-check-group-label {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    font-weight: 600;
    margin-bottom: 4px;
}
.fc-check-taken { opacity: 0.5; cursor: not-allowed; }
.fc-check-taken input { cursor: not-allowed; }
.fc-check-taken-hint { font-size: 11px; color: var(--text-3); font-style: italic; }
.fc-check-pres { font-size: 11px; color: var(--text-3); margin-left: 4px; }
.fc-check-pres::before { content: '·'; margin-right: 4px; }

/* Sobre cards */
.fc-sobre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}
.fc-sobre-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-3);
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
}
.fc-sobre-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.fc-sobre-good { border-left-color: var(--green); }
.fc-sobre-full { border-left-color: var(--green); }
.fc-sobre-danger { border-left-color: var(--red); background: #fef8f8; }
.fc-sobre-body { padding: 10px 14px 8px; }
.fc-sobre-row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.fc-sobre-nombre {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.fc-badge-xs {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.fc-sobre-bars { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.fc-sobre-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.fc-sobre-bar-label {
    font-size: 11px;
    color: var(--text-3);
    width: 38px;
    flex-shrink: 0;
}
.fc-sobre-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--bg);
    overflow: hidden;
}
.fc-sobre-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}
.fc-sobre-bar-ideal { background: var(--accent); opacity: 0.25; }
.fc-sobre-bar-guard { background: #78716c; }
.fc-sobre-bar-full { background: var(--green); }
.fc-sobre-bar-gast { background: #a8a29e; }
.fc-sobre-bar-val {
    font-size: 11px;
    color: var(--text-3);
    width: 44px;
    text-align: right;
    flex-shrink: 0;
}
.fc-sobre-msg {
    font-size: 12px;
    text-align: center;
    padding-top: 6px;
    border-top: 1px solid var(--bg);
    font-weight: 400;
}
.fc-sobre-msg strong { font-weight: 700; }
.fc-sobre-msg-ok { color: var(--text-2); }
.fc-sobre-msg-danger { color: var(--red); }
.fc-sobre-danger .fc-sobre-bar-gast { background: var(--red); }
.fc-sobre-aviso {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--red);
    font-weight: 500;
    margin-top: 6px;
    padding: 6px 10px;
    background: var(--red-bg);
    border-radius: 6px;
}
.fc-sobre-disp-info {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
    text-align: center;
}
.fc-sobre-disp-info strong { color: var(--text-2); }

/* Envíos */
/* Envío modal */
.fc-modal-lg { max-width: 640px; }

.em-hero {
    background: var(--accent-bg);
    padding: 20px 24px 14px;
    text-align: center;
    border-bottom: 1px solid #bfdbfe;
}
.em-hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}
.em-hero-block { flex: 1; max-width: 200px; }
.em-hero-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-3);
    margin-bottom: 2px;
}
.em-hero-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}
.em-hero-cop { color: var(--green); }
.em-hero-arrow { color: var(--text-3); flex-shrink: 0; }
.em-hero-tasa {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 8px;
}

.em-section {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}
.em-section:last-child { border-bottom: none; }
.em-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.em-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.em-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* Fuente items */
.em-fuentes-list { display: flex; flex-direction: column; gap: 6px; }
.em-fuente-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .15s;
    background: var(--surface);
}
.em-fuente-item:hover { border-color: var(--accent); }
.em-fuente-item.active {
    border-color: var(--accent);
    background: var(--accent-bg);
}
.em-fuente-item input[type="checkbox"] { flex-shrink: 0; }
.em-fuente-info { flex: 1; min-width: 0; }
.em-fuente-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.em-fuente-disp {
    display: block;
    font-size: 12px;
    color: var(--text-3);
}
.em-fuente-monto {
    width: 100px;
    flex-shrink: 0;
    text-align: right;
}

/* Sugerencia de envío */
.em-sugerido {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
}
.em-sugerido-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
}
.em-sugerido-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.em-sugerido-pill strong {
    color: var(--text);
    font-weight: 600;
}
.em-sugerido-chevron {
    transition: transform 0.2s;
    opacity: 0.5;
}
.em-sugerido.open .em-sugerido-chevron {
    transform: rotate(180deg);
}
.em-sugerido-detalle {
    display: none;
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius);
}
.em-sugerido.open .em-sugerido-detalle {
    display: block;
}
.em-sugerido-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-size: 12px;
}
.em-sugerido-row-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.em-dot-recurrente { background: var(--accent); }
.em-dot-credito { background: var(--orange); }
.em-sugerido-row-name {
    flex: 1;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.em-sugerido-row-monto {
    font-weight: 500;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.em-sugerido-total {
    display: flex;
    justify-content: space-between;
    padding-top: 6px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

/* Currency toggle pill */
.fc-currency-toggle {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.fc-currency-toggle-track {
    position: relative;
    display: flex;
    background: var(--bg);
    border-radius: 8px;
    padding: 2px;
    width: 80px;
}
.fc-currency-toggle-opt {
    flex: 1;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    position: relative;
    z-index: 1;
    line-height: 20px;
    transition: color 0.2s;
}
.fc-currency-toggle-opt[data-active="1"] {
    color: var(--accent);
}
.fc-currency-toggle-pill {
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
    background: var(--surface);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: left 0.2s ease;
}

/* Config grid */
.em-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .em-config-grid { grid-template-columns: 1fr; }
    .em-hero-value { font-size: 20px; }
    .em-section { padding: 14px 16px; }
    .em-hero { padding: 16px 16px 12px; }
    .em-fuente-monto { width: 80px; }
}

/* Distribution */
.fc-envio-group {
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
}
.fc-envio-group-title {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.fc-envio-dist-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--bg);
}
.fc-envio-dist-row:last-child { border-bottom: none; }
.em-dist-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.em-dist-saldo {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
    flex-shrink: 0;
}
.em-dist-monto {
    width: 110px;
    flex-shrink: 0;
}
.fc-envio-dist-rec {
    padding: 8px 0;
    border-bottom: 1px solid var(--bg);
}
.fc-envio-dist-rec:last-child { border-bottom: none; }

.em-dist-summary {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius);
}
.em-dist-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 2px 0;
}

.em-footer-libre {
    font-size: 13px;
    color: var(--text-2);
}

/* Pills */
.fc-pill-mes {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--surface);
}
.fc-pill-pagado {
    background: var(--green-bg);
    color: var(--green);
    border-color: var(--green);
    opacity: .7;
}
.fc-pill-pendiente {
    color: var(--text-2);
    cursor: pointer;
    transition: all .15s;
}
.fc-pill-pendiente:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.fc-pill-pendiente.fc-pill-selected {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Dashboard viaje */
.fc-dash-hero {
    text-align: center;
    padding: 24px;
    background: var(--accent-bg);
    border: 1px solid #bfdbfe;
}
.fc-dash-hero-label {
    display: block;
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 4px;
}
.fc-dash-hero-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}
.fc-dash-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.fc-dash-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}
.fc-dash-card-title {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--text-2);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.fc-dash-card-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}
.fc-formula-table { font-size: 14px; }
.fc-formula-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
}
.fc-formula-sub { padding-left: 16px; color: var(--text-2); }
.fc-formula-result {
    font-weight: 600;
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 4px;
}
.fc-formula-val {
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}
.fc-card-q {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-2);
    margin: 0;
}
.fc-sobres-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}
.fc-sobre-mini {
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius);
}

/* Viaje show — timeline card */
.fc-viaje-timeline {
    margin-bottom: 16px;
}
.fc-viaje-timeline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.fc-viaje-timeline-meta {
    font-size: 13px;
    color: var(--text-2);
}
.fc-viaje-timeline-pct {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    margin-left: auto;
}
.fc-viaje-weeks {
    display: flex;
    gap: 3px;
}
.fc-viaje-week {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}
.fc-viaje-week::before {
    content: '';
    display: block;
    width: 100%;
    height: 10px;
    background: var(--bg);
    border-radius: 3px;
    overflow: hidden;
}
.fc-viaje-week-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 10px;
    background: var(--accent);
    border-radius: 3px;
    transition: width .3s;
}
.fc-viaje-week-current .fc-viaje-week-fill {
    border-top-right-radius: 1px;
    border-bottom-right-radius: 1px;
}
.fc-viaje-week-num {
    font-size: 9px;
    color: var(--text-3);
    margin-top: 3px;
    line-height: 1;
}
.fc-viaje-timeline-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-3);
}
@media (max-width: 768px) {
    .fc-viaje-timeline-pct {
        font-size: 16px;
    }
}

/* Viaje show — hero */
.fc-viaje-hero {
    text-align: center;
    padding: 20px 16px;
    margin-bottom: 16px;
    background: var(--accent-bg);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
}
.fc-viaje-hero-label {
    display: block;
    font-size: 12px;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}
.fc-viaje-hero-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}
.fc-viaje-hero-sub {
    display: block;
    font-size: 11px;
    color: var(--text-3);
    margin-top: 4px;
}

.fc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.fc-card-footer {
    display: flex;
    border-top: 1px solid var(--border);
    font-size: 12px;
}
.fc-card-footer > a,
.fc-card-footer > span {
    flex: 1;
    text-align: center;
    padding: 8px;
    color: var(--text-3);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
.fc-card-footer > a:hover,
.fc-card-footer > span:hover {
    color: var(--text-2);
    background: var(--bg);
}
.fc-card-footer > *:not(:first-child) {
    border-left: 1px solid var(--border);
}

.fc-hero-icon-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    color: var(--text-2);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.fc-hero-icon-btn:hover {
    background: var(--text-3);
    color: var(--surface);
}

/* Viaje show — stats row */
.fc-viaje-dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.fc-viaje-dash-stat {
    display: flex;
    flex-direction: column;
    padding: 14px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color 0.15s;
}
a.fc-viaje-dash-stat:hover {
    border-color: var(--accent);
}
.fc-viaje-dash-stat-val {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.fc-viaje-dash-stat-lbl {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}
.fc-viaje-dash-stat-extra {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

@media (max-width: 768px) {
    .fc-viaje-dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .fc-viaje-hero-value {
        font-size: 26px;
    }
    .fc-dash-grid {
        grid-template-columns: 1fr;
    }
    .fc-dash-grid-2 {
        grid-template-columns: 1fr;
    }
    .fc-dash-hero-value {
        font-size: 26px;
    }
    .fc-sobres-mini-grid {
        grid-template-columns: 1fr;
    }
    .fc-viaje-banner > div:first-child {
        flex-direction: column;
    }
    .fc-viaje-banner > div:first-child > div:last-child {
        text-align: left;
    }
    .fc-formula-row {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .fc-viaje-cards-grid {
        grid-template-columns: 1fr;
    }
    .fc-viaje-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .fc-viaje-stat {
        padding: 10px 8px;
    }

    .fc-viaje-stat-value {
        font-size: 18px;
    }

    .fc-viaje-modules {
        grid-template-columns: repeat(3, 1fr);
    }

    .fc-inline-form {
        flex-direction: column;
    }

    .fc-inline-form .fc-input {
        max-width: 100% !important;
    }

    .fc-page-bar-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Compromisos (apartar) */
.fc-compromisos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.fc-compromiso-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: var(--radius);
}
.fc-compromiso-label {
    font-size: 12px;
    color: var(--text-2);
}
.fc-compromiso-pct {
    font-size: 10px;
    color: var(--text-3);
}
.fc-compromiso-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
@media (max-width: 480px) {
    .fc-compromisos-grid {
        grid-template-columns: 1fr;
    }
}

/* Escenarios */
.fc-escenarios {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.fc-escenario-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg);
}
.fc-escenario-row:last-child { border-bottom: none; }
.fc-escenario-row.fc-escenario-done { opacity: 0.6; }
.fc-escenario-check {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.fc-escenario-done .fc-escenario-check {
    background: var(--green-bg);
    color: var(--green);
}
.fc-escenario-row:not(.fc-escenario-done) .fc-escenario-check {
    color: var(--text-3);
    font-size: 14px;
}
.fc-escenario-info {
    flex: 1;
    min-width: 0;
}
.fc-escenario-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.fc-escenario-meta {
    font-size: 11px;
    color: var(--text-3);
}
.fc-escenario-right {
    text-align: right;
    flex-shrink: 0;
}
.fc-escenario-falta {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.fc-escenario-ses {
    display: block;
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}
.fc-escenario-logrado {
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
}

/* Gastos Colombia items */
.fc-gcol-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg);
    gap: 8px;
}
.fc-gcol-item:last-of-type { border-bottom: none; }
.fc-gcol-info {
    min-width: 0;
    flex: 1;
}
.fc-gcol-top {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.fc-gcol-concepto {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-gcol-cat {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}
.fc-gcol-cat-op { background: var(--orange-bg); color: var(--orange); }
.fc-gcol-cat-per { background: var(--accent-bg); color: var(--accent); }
.fc-gcol-meta {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.fc-gcol-meta .sep::before { content: '·'; color: var(--border); }
.fc-gcol-monto {
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 1px;
}
.fc-gcol-monto-val {
    font-size: 13px;
    font-weight: 600;
}
.fc-gcol-monto-total {
    font-size: 10px;
    color: var(--text-3);
    font-weight: 400;
}
.fc-help-visible { display: block !important; }

@media (min-width: 769px) {
    .fc-charts-row { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 768px) {
    .fc-input,
    .fc-select,
    .fc-textarea,
    .fc-money-input,
    .fc-abono-select,
    input[type="date"],
    input[type="text"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* ---- Color tags (etiquetas de gasto) ---- */

.fc-color-tags {
    display: flex;
    gap: 10px;
}
.fc-color-tag {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid var(--border);
    cursor: pointer;
    transition: border-color .15s, transform .15s, box-shadow .15s;
    padding: 0;
    background: none;
}
.fc-color-tag:hover {
    transform: scale(1.15);
}
.fc-color-tag.active {
    border-width: 3px;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor;
    transform: scale(1.1);
}
.fc-color-tag-verde  { background: var(--green); color: var(--green); }
.fc-color-tag-naranja { background: var(--orange); color: var(--orange); }
.fc-color-tag-rojo   { background: var(--red); color: var(--red); }

.fc-color-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}
.fc-color-dot-verde  { background: var(--green); }
.fc-color-dot-naranja { background: var(--orange); }
.fc-color-dot-rojo   { background: var(--red); }
