:root {
    --bg: #060607;
    --bg-soft: #0a0a0b;
    --sidebar: #080809;
    --panel: #101012;
    --panel-2: #131316;
    --panel-deep: #0c0c0e;
    --panel-hover: #17171a;
    --border: #252529;
    --border-soft: #1c1c20;
    --border-light: #38383e;
    --text: #f2f2f3;
    --text-soft: #cdced1;
    --muted: #85868c;
    --muted-dark: #5c5d63;
    --silver: #b9bac0;
    --silver-bright: #eeeeef;
    --green: #33d98b;
    --green-soft: rgba(51, 217, 139, 0.10);
    --red: #e56b6f;
    --red-soft: rgba(229, 107, 111, 0.10);
    --sidebar-width: 252px;
    --radius: 18px;
    --radius-small: 11px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 73% -10%, rgba(255, 255, 255, 0.045), transparent 26%),
        linear-gradient(180deg, #080808 0%, #060606 100%);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input,
textarea,
select,
a {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

input,
textarea,
select {
    width: 100%;
    color: #e5e5e7;
    background: #0c0c0e;
    border: 1px solid #2a2a2f;
    border-radius: 10px;
    outline: none;
    padding: 11px 12px;
    transition: border-color 150ms ease, background 150ms ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #55565d;
    background: #101012;
}

input::placeholder,
textarea::placeholder {
    color: #5e5f66;
}

textarea {
    resize: vertical;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 20px 17px 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 20%),
        var(--sidebar);
    border-right: 1px solid var(--border);
    z-index: 50;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 4px 21px;
    border-bottom: 1px solid var(--border);
}

.brand-logo {
    display: block;
    width: 214px;
    height: 164px;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
}

.brand-subtitle {
    margin-top: 3px;
    color: #77787e;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.21em;
}

.nav {
    flex: 1;
    padding-top: 19px;
    overflow-y: auto;
    scrollbar-width: none;
}

.nav::-webkit-scrollbar {
    display: none;
}

.nav-label {
    margin: 0 12px 8px;
    color: #505158;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.18em;
}

.nav-label-spaced {
    margin-top: 22px;
}

.nav-item {
    position: relative;
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 3px;
    padding: 0 12px;
    color: #9a9ba1;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 650;
    transition:
        background 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.nav-item:hover {
    color: #e3e3e5;
    background: rgba(255, 255, 255, 0.025);
    transform: translateX(2px);
}

.nav-item.active {
    color: #f5f5f6;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025));
    border-color: #303035;
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 9px;
    bottom: 9px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f0f0f1, #77787e);
}

.nav-icon {
    width: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 21px;
    color: #b1b2b7;
    font-size: 13px;
    font-weight: 900;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 10px 4px;
    border-top: 1px solid var(--border);
}

.sidebar-footer div {
    display: flex;
    flex-direction: column;
}

.sidebar-footer strong {
    color: var(--text-soft);
    font-size: 10px;
}

.sidebar-footer span:last-child {
    margin-top: 3px;
    color: #64656b;
    font-size: 8px;
}

.status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px rgba(51, 217, 139, 0.65);
}

.main {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    background: rgba(7, 7, 7, 0.91);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    z-index: 2;
}

.topbar-left {
    gap: 14px;
}

.topbar-right {
    gap: 18px;
}

.topbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.brand-center-wordmark {
    display: block;
    color: #e5e5e7;
    font-family: "Bodoni 72", "Bodoni MT", Didot, "Didot LT STD", "Times New Roman", serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.18),
        0 3px 10px rgba(0, 0, 0, 0.65);
}

.menu-button {
    display: none;
    width: 38px;
    height: 38px;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.topbar-company {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
}

.topbar-company-name {
    color: #dfdfe2;
}

.topbar-page {
    color: #85868c;
}

.topbar-divider {
    width: 1px;
    height: 13px;
    background: #303036;
}

.topbar-date {
    color: #a2a3a8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    letter-spacing: 0.04em;
}

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

.profile-avatar {
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    color: #111113;
    background: linear-gradient(145deg, #f3f3f4, #97989d);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 900;
}

.profile-copy {
    display: flex;
    flex-direction: column;
}

.profile-copy strong {
    color: #d9d9dc;
    font-size: 10px;
}

.profile-copy span {
    margin-top: 2px;
    color: #727379;
    font-size: 8px;
}

.page {
    width: min(1500px, 100%);
    margin: 0 auto;
    padding: 34px;
}

.flash-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.flash-message {
    padding: 11px 13px;
    color: #d8d8db;
    background: #111113;
    border: 1px solid #2c2c31;
    border-radius: 10px;
    font-size: 11px;
}

.flash-message.success {
    border-color: rgba(51, 217, 139, 0.22);
    background: rgba(51, 217, 139, 0.07);
}

.flash-message.error {
    border-color: rgba(229, 107, 111, 0.25);
    background: rgba(229, 107, 111, 0.07);
}

.page-heading,
.home-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.eyebrow,
.panel-kicker {
    color: #77787e;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.18em;
}

.page-heading h1,
.home-hero h1 {
    margin: 8px 0 7px;
    color: #f4f4f5;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1;
    letter-spacing: -0.045em;
}

.page-heading p,
.home-hero p {
    max-width: 720px;
    margin: 0;
    color: #96979d;
    font-size: 13px;
    line-height: 1.6;
}

.date-lockup {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-left: 30px;
}

.date-weekday {
    color: #77787e;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.2em;
}

.date-main {
    margin-top: 5px;
    color: #e3e3e5;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(24px, 2.5vw, 38px);
    line-height: 1;
    letter-spacing: 0.03em;
}

.market-clock-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.market-clock {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 15px 17px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.023), transparent 42%),
        #0e0e10;
}

.market-clock > span {
    color: #818288;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.market-time {
    margin-top: 6px;
    color: #ececef;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    letter-spacing: 0.04em;
}

.market-clock small {
    margin-top: 3px;
    color: #5f6066;
    font-size: 8px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.three-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.panel {
    border: 1px solid var(--border);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.022), transparent 38%),
        var(--panel);
    box-shadow: var(--shadow);
}

.metric-card {
    position: relative;
    min-height: 142px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    overflow: hidden;
    border-radius: var(--radius);
}

.metric-accent {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(238, 238, 239, 0.48), transparent);
}

.metric-top,
.metric-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.metric-label {
    color: #9a9ba1;
    font-size: 9px;
    font-weight: 760;
}

.metric-symbol {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: #c4c5c9;
    border: 1px solid #303035;
    border-radius: 8px;
    background: linear-gradient(145deg, #18181b, #101012);
    font-size: 10px;
    font-weight: 900;
}

.metric-value {
    color: #f5f5f6;
    font-size: 27px;
    letter-spacing: -0.04em;
}

.metric-bottom {
    color: #73747a;
    font-size: 8px;
}

.dashboard-grid {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

.dashboard-grid-main {
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.82fr);
}

.two-col-grid,
.customer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-top-grid {
    grid-template-columns: 1.25fr 0.75fr;
}

.panel {
    border-radius: var(--radius);
    padding: 22px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-heading h2 {
    margin: 6px 0 0;
    color: #eeeeef;
    font-size: 17px;
    letter-spacing: -0.02em;
}

.small-link {
    color: #c7c7cb;
    font-size: 9px;
    font-weight: 800;
}

.small-link:hover {
    color: #fff;
}

.count-pill,
.connection-pill {
    padding: 6px 8px;
    border: 1px solid #303035;
    border-radius: 999px;
    color: #9d9ea4;
    background: #0d0d0f;
    font-size: 7px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.connection-pill.connected {
    color: var(--green);
    border-color: rgba(51,217,139,0.22);
    background: var(--green-soft);
}

.alert-count {
    color: #efb0b2;
    border-color: rgba(229,107,111,0.22);
    background: var(--red-soft);
}

.primary-button,
.secondary-button {
    min-height: 40px;
    padding: 0 15px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
    transition: transform 150ms ease, border-color 150ms ease;
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-1px);
}

.primary-button {
    color: #111113;
    border: 1px solid #d2d2d5;
    background: linear-gradient(145deg, #f2f2f3, #9b9ca1);
}

.secondary-button {
    color: #b7b8bd;
    border: 1px solid #2c2c31;
    background: #0e0e10;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.full-button {
    width: 100%;
    margin-top: 14px;
}

.chart-panel {
    position: relative;
    overflow: hidden;
}

.chart-summary {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 7px;
}

.chart-summary > div:first-child {
    display: flex;
    flex-direction: column;
}

.chart-summary span {
    color: #808187;
    font-size: 8px;
}

.chart-summary strong {
    margin-top: 5px;
    color: #ececef;
    font-size: 22px;
}

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

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #77787e;
}

.legend-dot {
    width: 6px;
    height: 6px;
    display: inline-block;
    border-radius: 50%;
}

.revenue-dot {
    background: #d6d6d9;
}

.expense-dot {
    background: #606168;
}

.chart-wrap {
    height: 235px;
    padding: 12px 0 0;
}

.large-chart {
    height: 290px;
}

#revenueChart,
#financeBarChart,
#financePieChart {
    width: 100%;
    height: 100%;
}

.performance-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid #222227;
    border-radius: 11px;
    background: #222227;
}

.performance-strip div {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #0d0d0f;
}

.performance-strip span {
    color: #6d6e74;
    font-size: 8px;
}

.performance-strip strong {
    margin-top: 5px;
    color: #d9d9dc;
    font-size: 13px;
}

.email-panel {
    background:
        radial-gradient(circle at 88% 12%, rgba(255,255,255,0.035), transparent 28%),
        linear-gradient(145deg, rgba(255,255,255,0.02), transparent 42%),
        #101012;
}

.email-count {
    display: flex;
    align-items: baseline;
    gap: 9px;
}

.email-count strong {
    color: #f2f2f3;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 46px;
    line-height: 1;
}

.email-count span {
    color: #97989e;
    font-size: 11px;
}

.email-preview {
    display: flex;
    flex-direction: column;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #27272c;
    border-radius: 11px;
    background: #0c0c0e;
}

.email-preview > span {
    color: #696a70;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.email-preview strong {
    margin-top: 7px;
    color: #d6d6d9;
    font-size: 11px;
    line-height: 1.5;
}

.email-preview small {
    margin-top: 4px;
    color: #77787e;
    font-size: 8px;
}

.inline-form,
.review-form,
.form-row {
    display: grid;
    gap: 9px;
}

.inline-form {
    grid-template-columns: minmax(0, 1fr) 155px auto;
    margin-bottom: 14px;
}

.problem-form {
    grid-template-columns: minmax(0, 1fr) 120px auto;
}

.review-form {
    grid-template-columns: 100px minmax(0, 1fr) auto;
    margin-bottom: 16px;
}

.stack-form {
    display: grid;
    gap: 10px;
}

.form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-entry-form {
    display: grid;
    gap: 10px;
}

.finance-entry-form .form-row:first-child {
    grid-template-columns: 0.8fr 1fr 1fr;
}

.finance-entry-form .form-row:last-child {
    grid-template-columns: 1fr 1.5fr auto;
}

.item-list {
    display: grid;
}

.list-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 11px;
    min-height: 53px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-soft);
}

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

.list-item.done {
    opacity: 0.52;
}

.list-item.done .list-item-copy strong {
    text-decoration: line-through;
}

.list-item-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.list-item-copy strong {
    color: #d4d5d8;
    font-size: 10px;
    line-height: 1.45;
}

.list-item-copy span {
    margin-top: 3px;
    color: #78797f;
    font-size: 8px;
}

.check-button,
.delete-button,
.list-symbol {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    border: 1px solid #303035;
    border-radius: 8px;
    color: #c1c2c7;
    background: #111113;
    font-size: 10px;
}

.delete-button {
    color: #7b7c82;
}

.delete-button:hover {
    color: #f0f0f1;
    border-color: #48484e;
}

.delete-link {
    padding: 0;
    color: #77787e;
    background: transparent;
    border: 0;
    font-size: 8px;
}

.delete-link:hover {
    color: #e8e8ea;
}

.empty-state {
    padding: 17px 0;
    color: #66676d;
    font-size: 9px;
}

.note-grid,
.review-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.note-card,
.review-card {
    padding: 13px;
    border: 1px solid #25252a;
    border-radius: 11px;
    background: #0d0d0f;
}

.note-card p,
.review-card p {
    margin: 0;
    color: #c9c9cd;
    font-size: 10px;
    line-height: 1.55;
}

.note-card > div,
.review-card > div:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 11px;
}

.note-card > div span,
.review-card > div:last-child span {
    color: #62636a;
    font-size: 8px;
}

.stars {
    display: flex;
    gap: 2px;
    margin-bottom: 8px;
}

.stars span {
    color: #3d3e43;
    font-size: 11px;
}

.stars .filled {
    color: #d4d4d7;
}

.review-average {
    color: #dfdfe2;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
}

.pie-layout {
    min-height: 290px;
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

#financePieChart {
    height: 240px;
}

.pie-legend {
    display: grid;
    gap: 9px;
}

.pie-legend > div {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    color: #8f9096;
    font-size: 9px;
}

.pie-legend strong {
    color: #c8c8cc;
    font-size: 9px;
}

.legend-square {
    width: 8px;
    height: 8px;
    border: 1px solid #86878d;
    background: #4f5056;
}

.upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    margin-bottom: 14px;
}

.document-mini-list {
    display: grid;
}

.document-mini-list > a {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
}

.document-mini-list > a:last-child {
    border-bottom: 0;
}

.file-icon,
.document-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #303035;
    border-radius: 8px;
    color: #b9bac0;
    background: #111113;
}

.document-mini-list div {
    display: flex;
    flex-direction: column;
}

.document-mini-list strong {
    color: #d0d1d4;
    font-size: 9px;
}

.document-mini-list small {
    margin-top: 2px;
    color: #66676d;
    font-size: 7px;
}

.document-mini-list > a > span:last-child {
    color: #8e8f95;
    font-size: 8px;
}

.report-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.report-card {
    padding: 16px;
    border: 1px solid #29292e;
    border-radius: 12px;
    background: #0d0d0f;
}

.report-card > span {
    color: #77787e;
    font-size: 9px;
    font-weight: 850;
}

.report-card > strong {
    display: block;
    margin-top: 10px;
    color: #ebebed;
    font-size: 22px;
}

.report-card > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 12px;
    color: #707177;
    font-size: 8px;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.data-table th,
.data-table td {
    padding: 11px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    font-size: 9px;
}

.data-table th {
    color: #66676d;
    font-size: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-table td {
    color: #b7b8bd;
}

.table-status {
    display: inline-flex;
    padding: 4px 7px;
    border: 1px solid #323237;
    border-radius: 999px;
    color: #a4a5aa;
    background: #111113;
    font-size: 7px;
}

.table-status.active {
    color: var(--green);
    border-color: rgba(51,217,139,0.2);
    background: var(--green-soft);
}

.brand-tabs {
    display: flex;
    gap: 9px;
    margin-bottom: 14px;
}

.brand-tab {
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid #2e2e33;
    border-radius: 10px;
    color: #a3a4aa;
    background: #0d0d0f;
    font-size: 10px;
    font-weight: 850;
}

.brand-tab.active {
    color: #111113;
    border-color: #d0d0d3;
    background: linear-gradient(145deg, #f0f0f1, #9b9ca1);
}

.brand-tab.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.customer-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    overflow: hidden;
    border: 1px solid #25252a;
    border-radius: 12px;
    background: #25252a;
}

.customer-summary > div {
    display: flex;
    flex-direction: column;
    padding: 18px;
    background: #0d0d0f;
}

.customer-summary span {
    color: #717278;
    font-size: 8px;
}

.customer-summary strong {
    margin-top: 7px;
    color: #e3e3e5;
    font-size: 24px;
}

.storage-panel {
    min-height: 220px;
}

.storage-path {
    padding: 12px;
    overflow-wrap: anywhere;
    border: 1px solid #2c2c31;
    border-radius: 10px;
    color: #c3c4c8;
    background: #0b0b0d;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
}

.storage-note,
.section-copy {
    margin-top: 12px;
    color: #88898f;
    font-size: 10px;
    line-height: 1.6;
}

.storage-note.good {
    color: #91d8b5;
}

.storage-note.warning {
    color: #d8bf91;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.document-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 11px;
    padding: 14px;
    border: 1px solid #27272c;
    border-radius: 12px;
    background: #0d0d0f;
}

.document-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.document-copy strong {
    overflow: hidden;
    color: #d3d4d7;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-copy span {
    margin-top: 4px;
    color: #6a6b71;
    font-size: 8px;
}

.document-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    margin-top: 7px;
    padding-top: 9px;
    border-top: 1px solid #1f1f23;
}

.document-actions a,
.document-actions button {
    color: #96979d;
    font-size: 8px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.settings-card {
    min-height: 220px;
}

.settings-card h2 {
    margin: 8px 0 15px;
    font-size: 19px;
}

.settings-card > strong {
    color: #e4e4e6;
    font-size: 16px;
}

.settings-card p {
    margin: 12px 0 0;
    color: #85868c;
    font-size: 10px;
    line-height: 1.7;
}

.settings-card code {
    color: #c9c9cd;
}

.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-shell {
    width: min(460px, 100%);
}

.login-brand {
    margin-bottom: 18px;
    text-align: center;
    color: #e5e5e7;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 36px;
    letter-spacing: 0.12em;
}

.login-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.login-card h1 {
    margin: 8px 0 7px;
    font-size: 30px;
}

.login-card p {
    margin: 0 0 20px;
    color: #85868c;
    font-size: 11px;
}

@media (max-width: 1180px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid-main,
    .finance-top-grid {
        grid-template-columns: 1fr;
    }

    .report-card-grid,
    .document-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .topbar-center {
        display: none;
    }

    .market-clock-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 180ms ease;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.45);
    }

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

    .main {
        margin-left: 0;
    }

    .menu-button {
        display: grid;
        place-items: center;
    }

    .topbar {
        padding: 0 18px;
    }

    .topbar-company {
        display: none;
    }

    .profile-copy {
        display: none;
    }

    .page {
        padding: 24px 18px;
    }

    .home-hero,
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .date-lockup {
        align-items: flex-start;
        padding-left: 0;
    }

    .two-col-grid,
    .customer-grid {
        grid-template-columns: 1fr;
    }

    .note-grid,
    .review-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .metric-grid,
    .three-metric-grid,
    .market-clock-grid,
    .report-card-grid,
    .document-grid {
        grid-template-columns: 1fr;
    }

    .inline-form,
    .problem-form,
    .review-form,
    .form-row,
    .finance-entry-form .form-row:first-child,
    .finance-entry-form .form-row:last-child,
    .upload-form {
        grid-template-columns: 1fr;
    }

    .performance-strip,
    .customer-summary {
        grid-template-columns: 1fr;
    }

    .pie-layout {
        grid-template-columns: 1fr;
    }

    .topbar-date {
        display: none;
    }
}
