/*
   Shared look for every page, in the style the time sheet redesign set: rounded cards, soft pills,
   quiet tables, roomy touch targets on phones. It restyles the Bootstrap 3 / AdminLTE pieces the older
   pages are built from (box, table, form, button, label, alert, modal, DataTables, login box), so a page
   gets the look without its markup changing. Loaded after the theme variables in _Layout.cshtml.
   The invoice document itself (.invoice) is left alone: it is laid out for printing.
*/

/* ── Cards ── */
.box,
.card {
    border: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
    margin-bottom: 20px;
}
.box.box-primary, .box.box-info, .box.box-success, .box.box-warning, .box.box-danger, .box.box-default { border-top-color: var(--border); }
.box-header { padding: 14px 18px; background: transparent; border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; }
.box-header.with-border { border-bottom: 1px solid var(--border); }
.box-header .box-title, .box-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.box-body { padding: 16px 18px; background: transparent; border-radius: 0 0 12px 12px; }
.box-footer { padding: 12px 18px; background: transparent; border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; }
.box-header .btn-box-tool { color: var(--muted); }
.box-header .btn-box-tool:hover { color: var(--text); }

/* ── Buttons ── */
.btn { border-radius: 8px; font-weight: 600; transition: filter .15s ease, border-color .15s ease, background-color .15s ease; }
.btn-flat { border-radius: 8px; }
.btn-xs { border-radius: 6px; }
.btn-lg { border-radius: 10px; }
.btn:focus, .btn:active:focus { outline: 0; box-shadow: 0 0 0 .2rem rgba(139, 124, 246, .3); }
.btn-default { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-default:hover, .btn-default:focus, .btn-default:active { background: #262c3a; color: var(--text); border-color: var(--brand); }
.btn-primary, .btn-primary:focus, .btn-primary:active { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand); border-color: var(--brand); filter: brightness(1.1); }
.btn-success, .btn-success:focus, .btn-success:active { background: #2f9e6b; border-color: #2f9e6b; color: #fff; }
.btn-success:hover { background: #2f9e6b; border-color: #2f9e6b; filter: brightness(1.1); }
.btn-info, .btn-info:focus, .btn-info:active { background: #2b8fc9; border-color: #2b8fc9; color: #fff; }
.btn-info:hover { background: #2b8fc9; border-color: #2b8fc9; filter: brightness(1.1); }
.btn-warning, .btn-warning:focus, .btn-warning:active { background: #c98a1e; border-color: #c98a1e; color: #fff; }
.btn-warning:hover { background: #c98a1e; border-color: #c98a1e; filter: brightness(1.1); }
.btn-danger, .btn-danger:focus, .btn-danger:active { background: #d9534f; border-color: #d9534f; color: #fff; }
.btn-danger:hover { background: #d9534f; border-color: #d9534f; filter: brightness(1.1); }
.btn-link { color: var(--brand); }
.btn-link:hover { color: #b3a8ff; }
.btn[disabled], .btn.disabled { opacity: .5; }
/* Bootstrap 3 has no outline buttons; the pages use these names. */
.btn-outline-primary { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); color: #fff; }
.btn-outline-secondary { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-outline-secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--brand); }
.btn-outline-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #111; }
.btn-group > .btn:not(:first-child):not(:last-child) { border-radius: 0; }
.btn-group > .btn:first-child:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.btn-group > .btn:last-child:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* ── Forms ── */
.form-control { border-radius: 8px; background: var(--surface-2); color: var(--text); border-color: var(--border); box-shadow: none; }
.form-control:focus { background: var(--surface-2); color: var(--text); border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(139, 124, 246, .25); }
.form-control::placeholder { color: var(--muted); opacity: .6; }
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { background: var(--surface-2); color: var(--muted); opacity: 1; }
select.form-control option { background: var(--surface-2); color: var(--text); }
.form-group > label, label.control-label { color: var(--muted); font-weight: 600; }
.help-block { color: var(--muted); }
.input-group-addon { background: var(--surface-2); border-color: var(--border); color: var(--muted); border-radius: 8px; }
.input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; }
.input-group .form-control:first-child:not(:last-child), .input-group-addon:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .form-control:last-child:not(:first-child), .input-group-addon:last-child, .input-group-btn:last-child > .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.has-feedback .form-control-feedback { color: var(--muted); }
.checkbox label, .radio label { color: var(--text); font-weight: 400; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
hr { border-top-color: var(--border); }

/* ── Tables (inside cards and DataTables; the printable invoice keeps its own) ── */
.box .table, .card .table, table.dataTable { color: var(--text); margin-bottom: 0; border: 0; }
.box .table > thead > tr > th, .card .table > thead > tr > th, table.dataTable > thead > tr > th {
    border: 0; border-bottom: 1px solid var(--border); padding: 10px 12px;
    color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; background: transparent;
}
.box .table > tbody > tr > td, .card .table > tbody > tr > td, table.dataTable > tbody > tr > td,
.box .table > tbody > tr > th, .card .table > tbody > tr > th {
    border: 0; border-top: 1px solid var(--border); padding: 10px 12px; vertical-align: middle;
}
.box .table > tbody > tr:first-child > td, .card .table > tbody > tr:first-child > td { border-top: 0; }
.box .table > tfoot > tr > td, .box .table > tfoot > tr > th, .card .table > tfoot > tr > td, .card .table > tfoot > tr > th { border: 0; border-top: 1px solid var(--border); padding: 10px 12px; font-weight: 700; }
.box .table-striped > tbody > tr:nth-of-type(odd), .card .table-striped > tbody > tr:nth-of-type(odd), table.dataTable.table-striped > tbody > tr:nth-of-type(odd) { background-color: rgba(255, 255, 255, .02); }
.box .table-hover > tbody > tr:hover, .card .table-hover > tbody > tr:hover, table.dataTable > tbody > tr:hover { background-color: rgba(139, 124, 246, .08); }
.box .table a, table.dataTable a { color: #b3a8ff; }
.box .table a:hover, table.dataTable a:hover { color: #d3ccff; }

/* ── DataTables chrome ── */
.dataTables_wrapper { color: var(--muted); }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
    background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; margin-left: 6px; outline: 0;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--brand); }
.dataTables_wrapper .dataTables_info { color: var(--muted); padding-top: 12px; }
.dataTables_wrapper .dataTables_processing { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 8px; }
.pagination > li > a, .pagination > li > span { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.pagination > li > a:hover { background: #262c3a; border-color: var(--brand); color: var(--text); }
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > span { background: var(--surface); border-color: var(--border); color: var(--muted); opacity: .6; }
.pagination > li:first-child > a { border-radius: 8px 0 0 8px; }
.pagination > li:last-child > a { border-radius: 0 8px 8px 0; }
table.dataTable thead .sorting::after, table.dataTable thead .sorting_asc::after, table.dataTable thead .sorting_desc::after { color: var(--brand); opacity: .8; }

/* ── Pills: labels, badges, tabs ── */
.label, .badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4; text-shadow: none; }
.label-default, .badge { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.label-primary { background: rgba(139, 124, 246, .18); color: #d3ccff; }
.label-success { background: rgba(76, 195, 138, .18); color: #4cc38a; }
.label-info { background: rgba(47, 184, 255, .18); color: #7fd0ff; }
.label-warning { background: rgba(224, 178, 74, .18); color: #e0b24a; }
.label-danger { background: rgba(242, 119, 122, .18); color: #f2777a; }
/* Horizontal pills only. A stacked list (.nav-stacked) is a column of rows and must stay one: as a flex row its items shrink to nothing, which hid the client picker on the invoice page. */
.nav-pills:not(.nav-stacked) { display: flex; flex-wrap: wrap; gap: 6px; }
.nav-pills:not(.nav-stacked) > li { float: none; }
.nav-pills:not(.nav-stacked) > li + li { margin-left: 0; }
.nav-pills:not(.nav-stacked) > li > a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-weight: 600; }
.nav-pills:not(.nav-stacked) > li > a:hover, .nav-pills:not(.nav-stacked) > li > a:focus { background: #262c3a; color: var(--text); border-color: var(--brand); }
.nav-pills:not(.nav-stacked) > li.active > a, .nav-pills:not(.nav-stacked) > li.active > a:hover, .nav-pills:not(.nav-stacked) > li.active > a:focus { background: var(--brand); border-color: var(--brand); color: #fff; }
/* Stacked lists read line by line: one row each with a hairline between, and the "active" rows as section headings. */
.nav-stacked > li { float: none; display: block; margin: 0; border-top: 1px solid var(--border); }
.nav-stacked > li:first-child { border-top: 0; }
.nav-stacked > li + li { margin: 0; }
.nav-stacked > li > a { padding: 9px 16px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-weight: 400; }
.nav-stacked > li > a:hover, .nav-stacked > li > a:focus { background: rgba(255, 255, 255, .03); color: var(--text); }
.nav-stacked > li.active > a, .nav-stacked > li.active > a:hover, .nav-stacked > li.active > a:focus { background: rgba(139, 124, 246, .12); color: #d3ccff; border: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.nav-stacked > li.p-2 { padding: 12px 16px; }

/* ── Alerts ── */
.alert { border-radius: 12px; border-width: 1px; border-left-width: 4px; padding: 12px 16px; color: var(--text); }
.alert a { color: #d3ccff; text-decoration: underline; }
.alert-info { background: rgba(139, 124, 246, .12); border-color: var(--brand); }
.alert-success { background: rgba(76, 195, 138, .12); border-color: #4cc38a; }
.alert-warning { background: rgba(224, 178, 74, .12); border-color: #e0b24a; }
.alert-danger { background: rgba(242, 119, 122, .12); border-color: #f2777a; }
.alert .close { color: var(--text); opacity: .7; text-shadow: none; }

/* ── Modals ── */
.modal-content { border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
.modal-header, .modal-footer { border-color: var(--border); padding: 14px 18px; }
.modal-body { padding: 18px; }
.modal-title { font-weight: 700; }
.modal-header .close { color: var(--text); opacity: .8; text-shadow: none; }
.modal-backdrop.in { opacity: .65; }

/* ── Panels, wells, code ── */
.panel { border-radius: 12px; border-color: var(--border); background: var(--surface); color: var(--text); box-shadow: 0 10px 28px rgba(0, 0, 0, .22); }
.panel-default > .panel-heading { background: transparent; border-color: var(--border); color: var(--muted); font-weight: 700; border-radius: 12px 12px 0 0; }
.panel-footer { background: transparent; border-color: var(--border); }
.well { border-radius: 12px; }
code { background: var(--surface-2); color: #d3ccff; border-radius: 6px; padding: 2px 6px; }
pre { border-radius: 10px; background: var(--surface-2); color: var(--text); border-color: var(--border); }
a { color: #b3a8ff; }
a:hover, a:focus { color: #d3ccff; }

/* ── Sign in, register, password recovery ── */
.login-box, .register-box { width: 400px; max-width: calc(100% - 30px); margin: 6% auto; }
.login-logo, .register-logo { margin-bottom: 18px; }
.login-logo a, .register-logo a { color: var(--text); font-weight: 300; }
.login-logo a b, .register-logo a b { color: var(--brand); font-weight: 800; }
.login-box-body, .register-box-body {
    padding: 26px 26px 22px; border-radius: 16px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
}
.login-box-msg, .register-box-msg { color: var(--muted); padding-bottom: 18px; }
.login-box-body .form-control, .register-box-body .form-control { height: 44px; }
.login-box-body .form-control-feedback, .register-box-body .form-control-feedback { line-height: 44px; height: 44px; }
.login-box-body .btn, .register-box-body .btn { padding: 10px 14px; }

/* ── Phones ── */
@media (max-width: 767px) {
    .content { padding: 10px; }
    .box, .card, .panel { border-radius: 12px; margin-bottom: 14px; }
    .box-header, .box-body, .box-footer { padding-left: 12px; padding-right: 12px; }
    /* A wide table scrolls inside its card instead of stretching the page. */
    .box-body, .card-body, .dataTables_wrapper > .row > [class*="col-"] { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .form-control { height: 44px; font-size: 16px; }
    textarea.form-control { height: auto; }
    .form-control.input-sm { height: 38px; }
    .btn { padding: 10px 14px; }
    .btn-xs, .btn-sm { padding: 7px 11px; font-size: 13px; }
    .btn-box-tool { padding: 5px; }
    .form-inline .form-group { display: block; margin: 0 0 12px; }
    .form-inline .form-control { width: 100%; }
    .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate { text-align: left; float: none; }
    .dataTables_wrapper .dataTables_filter input { width: 100%; margin: 6px 0 0; height: 40px; }
    .modal-dialog { margin: 10px; }
    .nav-pills:not(.nav-stacked) > li > a { padding: 9px 14px; }
}

/* ── Page furniture ── */
.page-lead { color: var(--muted); margin: -2px 0 16px; }
.breadcrumb { background: transparent; color: var(--muted); padding-left: 0; }
.breadcrumb > li > a { color: var(--muted); }
.box-header > .box-tools { top: 9px; }
.table-responsive { border: 0; }

/* ── Phones: tables as cards ──
   freelas-ui.js marks a table .table-stack and gives every cell its column name in data-label.
   Each row then reads as a card: the name on the left, the value on the right. */
@media (max-width: 767px) {
    .table-stack, .table-stack > tbody, .table-stack > tfoot, .table-stack > tbody > tr, .table-stack > tfoot > tr,
    .table-stack > tbody > tr > td, .table-stack > tbody > tr > th, .table-stack > tfoot > tr > td, .table-stack > tfoot > tr > th { display: block; width: auto !important; min-width: 0 !important; max-width: none !important; }
    .table-stack > thead { display: none; }
    .table-stack > tbody > tr, .table-stack > tfoot > tr {
        margin: 0 0 10px; padding: 4px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
    }
    .table-stack > tbody > tr:hover { background: var(--surface-2); }
    .table-stack > tbody > tr > td, .table-stack > tbody > tr > th, .table-stack > tfoot > tr > td, .table-stack > tfoot > tr > th {
        position: relative; min-height: 38px; padding: 9px 0 9px 42% !important; border: 0 !important; border-top: 1px solid var(--border) !important;
        text-align: right !important; white-space: normal !important; overflow-wrap: anywhere; background: transparent !important;
    }
    .table-stack > tbody > tr > td:first-child, .table-stack > tbody > tr > th:first-child, .table-stack > tfoot > tr > td:first-child, .table-stack > tfoot > tr > th:first-child { border-top: 0 !important; }
    .table-stack > tbody > tr > td::before, .table-stack > tbody > tr > th::before, .table-stack > tfoot > tr > td::before, .table-stack > tfoot > tr > th::before {
        content: attr(data-label); position: absolute; left: 0; top: 9px; width: 40%;
        text-align: left; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; line-height: 1.5;
    }
    /* A column without a name (usually the buttons) uses the full width; a cell with nothing in it is dropped. */
    .table-stack > tbody > tr > td[data-label=""], .table-stack > tfoot > tr > td[data-label=""] { padding-left: 0 !important; text-align: left !important; }
    .table-stack > tbody > tr > td:empty, .table-stack > tfoot > tr > td:empty { display: none; }
    .table-stack > tbody > tr.stack-plain > td, .table-stack > tbody > tr.stack-plain > th, .table-stack > tfoot > tr.stack-plain > td { padding-left: 0 !important; text-align: left !important; }
    .table-stack > tbody > tr.stack-plain > td::before, .table-stack > tbody > tr.stack-plain > th::before, .table-stack > tfoot > tr.stack-plain > td::before { content: none; }
    .table-stack > tfoot > tr { border-color: var(--brand); }
    .table-stack .form-control { display: inline-block; width: 100%; }
    .table-stack td .btn { margin: 2px 0 2px 4px; }
    .table-stack .hidden-xs { display: none !important; }
    /* The card rows carry their own surface, so the cards that hold them lose their inner padding. */
    .box-body.no-padding > .table-stack, .box-body.table-responsive > .table-stack { margin: 10px; width: auto !important; }

    /* Headers with tools: the tools drop under the title instead of overlapping it. */
    .box-header > .box-tools { position: static; float: none !important; margin-top: 8px; }
    .box-header > .box-tools .btn { margin: 0 6px 6px 0; }
    .content-header { padding-left: 10px; padding-right: 10px; }
    .content-header-sub { font-size: 12px; }
    /* Side-by-side columns stack; keep a little air between them. */
    [class*="col-md-"], [class*="col-sm-"] { margin-bottom: 0; }
    .main-footer { font-size: 12px; padding: 12px 10px; }
}

/* ---------- Christmas theme (body.christmas-theme is set by _Layout while the theme is active) ---------- */
body.christmas-theme .content-wrapper {
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(120,170,255,.18), transparent 60%),
        radial-gradient(700px 360px at 0% 110%, rgba(46,158,79,.12), transparent 60%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0, rgba(255,255,255,.02) 1px, transparent 1px, transparent 24px),
        linear-gradient(180deg, #111c30 0%, #0f1115 70%);
}

/* String of lights hanging from the top bar. Decorative layers never take clicks. */
body.christmas-theme .main-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 16px;
    pointer-events: none;
    border-top: 2px solid #2f6b52;
    background-image: radial-gradient(circle at 12px 6px, #ff5a52 4px, transparent 5px), radial-gradient(circle at 36px 8px, #3ecf6b 4px, transparent 5px), radial-gradient(circle at 60px 6px, #ffe04a 4px, transparent 5px), radial-gradient(circle at 84px 8px, #4aa8ff 4px, transparent 5px);
    background-size: 96px 16px;
    background-repeat: repeat-x;
    filter: drop-shadow(0 0 4px rgba(255,255,255,.55));
    animation: christmas-lights 1.4s ease-in-out infinite alternate;
}
@keyframes christmas-lights { from { opacity: .55; } to { opacity: 1; } }

/* Candy cane edge under the logo, and a tree beside the name. */
body.christmas-theme .main-header .logo {
    background:
        repeating-linear-gradient(45deg, #d42426 0, #d42426 8px, #fff 8px, #fff 16px) bottom / 100% 4px no-repeat,
        linear-gradient(135deg, var(--surface-2), var(--surface));
}
body.christmas-theme .main-header .logo .logo-lg::after { content: " \1F384"; }

/* Snow drift sitting on top of the footer. */
body.christmas-theme .main-footer { position: relative; }
body.christmas-theme .main-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 20px;
    pointer-events: none;
    filter: drop-shadow(0 -2px 3px rgba(0,0,0,.45));
    background-image: radial-gradient(ellipse at 50% 100%, #eef4fa 68%, transparent 70%), radial-gradient(ellipse at 50% 100%, #eef4fa 68%, transparent 70%);
    background-size: 46px 20px, 70px 13px;
    background-position: 0 100%, 23px 100%;
    background-repeat: repeat-x;
}

body.christmas-theme .content-header > h1::before {
    content: "\2744";
    margin-right: 8px;
    color: #fff;
    text-shadow: 0 0 6px rgba(74,168,255,.9);
}

body.christmas-theme .initial-snow { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    body.christmas-theme .main-header::after { animation: none; }
    body.christmas-theme .initial-snow { display: none; }
}

@media print {
    body.christmas-theme .main-header::after,
    body.christmas-theme .main-footer::before,
    body.christmas-theme .initial-snow { display: none; }
}

/* ── Finance pages (Dashboard, Expenses, Expenses Grid): year bar, total tiles, card heads ── */
.fx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 16px; }
.fx-year { display: inline-flex; align-items: center; gap: 4px; }
.fx-year b { min-width: 52px; text-align: center; font-size: 16px; }
.fx-year a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); }
.fx-year a:hover { color: var(--text); border-color: var(--brand); }
.fx-months { display: flex; flex-wrap: wrap; gap: 4px; }
.fx-months a { padding: 6px 11px; border-radius: 999px; border: 1px solid transparent; color: var(--muted); font-weight: 600; font-size: 13px; }
.fx-months a:hover { color: var(--text); border-color: var(--border); background: var(--surface-2); }
.fx-months a.on { background: var(--brand); color: #fff; }
.fx-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.fx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.fx-tile { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.fx-tile small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.fx-tile b { display: block; margin-top: 4px; font-size: 20px; font-variant-numeric: tabular-nums; color: var(--text); }
.fx-tile span { font-size: 12px; color: var(--muted); }
.fx-tile.fx-main { border-color: var(--brand); background: rgba(139, 124, 246, .10); }
.fx-tile.fx-main b { font-size: 24px; }
.fx-tile.fx-plus b, .fx-tile b.fx-in, .fx-in { color: #4cc38a; }
.fx-tile b.fx-neg, .fx-neg { color: var(--danger); }
.fx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.fx-head h3 { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text); }
.fx-head small { color: var(--muted); }
.fx-head .fx-sum { margin-left: auto; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.fx-body { padding: 16px; }
@media (max-width: 767px) { .fx-links { margin-left: 0; } }
