/* TTR Office — brand styles */
:root {
    --ttr-navy: #010c2f;
    --ttr-navy-soft: #0a163f;
    --ttr-navy-muted: #1a274d;
    --ttr-accent: #ff5e14;
    --ttr-accent-hover: #e6520f;
    --ttr-accent-soft: rgba(255, 94, 20, 0.12);
    --ttr-white: #ffffff;
    --ttr-bg: #f4f6fa;
    --ttr-surface: #ffffff;
    --ttr-border: #d8dee9;
    --ttr-border-soft: #e8ecf3;
    --ttr-text: #1a2332;
    --ttr-text-muted: #5c6b82;
    --ttr-text-inverse: #ffffff;
    --ttr-success: #1f7a4d;
    --ttr-success-bg: #e8f6ee;
    --ttr-danger: #b42318;
    --ttr-danger-bg: #fdecea;
    --ttr-warning: #9a6700;
    --ttr-warning-bg: #fff6e0;
    --ttr-info: #175cd3;
    --ttr-info-bg: #ebf3ff;
    --ttr-secondary: #475467;
    --ttr-secondary-bg: #eef1f6;
    --ttr-muted: #667085;
    --ttr-muted-bg: #f2f4f7;
    --ttr-sidebar-width: 248px;
    --ttr-topbar-height: 56px;
    --ttr-radius: 8px;
    --ttr-radius-sm: 4px;
    --ttr-shadow: 0 1px 2px rgba(1, 12, 47, 0.06), 0 4px 12px rgba(1, 12, 47, 0.04);
    --ttr-font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
    --ttr-font-brand: "Libre Baskerville", Georgia, "Times New Roman", serif;
    --ttr-focus: 0 0 0 3px rgba(255, 94, 20, 0.28);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--ttr-font);
    color: var(--ttr-text);
    background: var(--ttr-bg);
    line-height: 1.5;
    min-height: 100vh;
}

a {
    color: var(--ttr-navy);
    text-decoration: none;
}

a:hover {
    color: var(--ttr-accent);
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 0.5rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ttr-navy);
}

h1 { font-size: 1.625rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

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

/* —— Layout shell —— */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--ttr-sidebar-width);
    background: linear-gradient(180deg, var(--ttr-navy) 0%, var(--ttr-navy-soft) 100%);
    color: var(--ttr-text-inverse);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand .brand-logo {
    display: block;
    max-height: 44px;
    max-width: 180px;
    width: auto;
    height: auto;
    margin: 0 0 0.55rem;
    background: #fff;
    border-radius: 6px;
    padding: 4px 6px;
}

.sidebar-brand .brand-mark {
    font-family: var(--ttr-font-brand);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ttr-white);
    letter-spacing: 0.01em;
    display: block;
}

.sidebar-brand .brand-sub {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-nav {
    padding: 0.75rem 0.75rem 1rem;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.15rem;
    border-radius: var(--ttr-radius-sm);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--ttr-white);
}

.sidebar-nav a.active {
    background: var(--ttr-accent);
    color: var(--ttr-white);
}

.sidebar-footer {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8125rem;
}

.sidebar-footer .user-name {
    color: var(--ttr-white);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sidebar-footer form {
    margin: 0;
}

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

.topbar {
    height: var(--ttr-topbar-height);
    background: var(--ttr-surface);
    border-bottom: 1px solid var(--ttr-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 0;
    z-index: 1;
}

.topbar-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ttr-navy);
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    min-width: 0;
    flex: 1 1 0;
    z-index: 1;
}

.topbar-clock {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
    font-size: clamp(1.15rem, 1.85vw, 1.55rem);
    font-weight: 700;
    font-style: normal;
    font-synthesis: none;
    color: #010c2f;
    letter-spacing: 0.02em;
    white-space: nowrap;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    text-align: center;
    pointer-events: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media (max-width: 900px) {
    .topbar-clock {
        font-size: 1.12rem;
        font-weight: 700;
    }
}

@media (max-width: 640px) {
    .topbar-clock {
        position: static;
        transform: none;
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        text-align: center;
        font-size: 1rem;
        font-weight: 700;
        pointer-events: auto;
        margin-top: 0.15rem;
    }

    .topbar {
        flex-wrap: wrap;
        height: auto;
        min-height: var(--ttr-topbar-height);
        padding: 0.55rem 1rem;
        gap: 0.15rem 0.5rem;
    }

    .topbar-left,
    .topbar-actions {
        flex: 1 1 auto;
    }
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--ttr-border);
    border-radius: var(--ttr-radius-sm);
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    color: var(--ttr-navy);
    font-family: inherit;
    font-size: 0.875rem;
}

.content {
    padding: 1.5rem;
    flex: 1;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-header .page-title {
    margin: 0;
}

.page-header .page-desc {
    margin: 0.25rem 0 0;
    color: var(--ttr-text-muted);
    font-size: 0.9375rem;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* —— Guest / auth —— */
.guest-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255, 94, 20, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 255, 255, 0.04) 0%, transparent 40%),
        linear-gradient(160deg, var(--ttr-navy) 0%, var(--ttr-navy-soft) 55%, #061338 100%);
}

.guest-card {
    width: 100%;
    max-width: 420px;
    background: var(--ttr-white);
    border-radius: var(--ttr-radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    padding: 2rem 1.75rem 1.75rem;
}

.guest-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.guest-brand .brand-logo {
    display: block;
    max-height: 56px;
    max-width: 220px;
    width: auto;
    height: auto;
    margin: 0 auto 0.75rem;
}

.guest-brand .brand-mark {
    font-family: var(--ttr-font-brand);
    font-size: 1.75rem;
    color: var(--ttr-navy);
    font-weight: 700;
}

.guest-brand .brand-sub {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: var(--ttr-text-muted);
}

.guest-card h1 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    text-align: center;
}

.guest-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--ttr-text-muted);
}

/* —— Cards (interactive widgets / forms only) —— */
.card {
    background: var(--ttr-surface);
    border: 1px solid var(--ttr-border-soft);
    border-radius: var(--ttr-radius);
    box-shadow: var(--ttr-shadow);
}

.card-header {
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid var(--ttr-border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 1rem;
}

.card-body {
    padding: 1.15rem;
}

.card-footer {
    padding: 0.85rem 1.15rem;
    border-top: 1px solid var(--ttr-border-soft);
    background: #fafbfd;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-widget {
    background: var(--ttr-surface);
    border: 1px solid var(--ttr-border-soft);
    border-radius: var(--ttr-radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--ttr-shadow);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

a.stat-widget:hover {
    border-color: var(--ttr-accent);
    transform: translateY(-1px);
    color: inherit;
    text-decoration: none;
}

.stat-widget .stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ttr-text-muted);
    margin-bottom: 0.35rem;
}

.stat-widget .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ttr-navy);
    line-height: 1.1;
}

.stat-widget .stat-value.accent {
    color: var(--ttr-accent);
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

/* —— Forms —— */
.form-group {
    margin-bottom: 1rem;
}

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

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

label,
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ttr-navy);
    margin-bottom: 0.35rem;
}

.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: var(--ttr-text-muted);
}

input[type="date"],
input[type="datetime-local"] {
    cursor: pointer;
}

.date-field {
    position: relative;
    cursor: pointer;
}
.date-field input[type="date"] {
    cursor: pointer;
    min-height: 2.5rem;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 0.5rem 0.7rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--ttr-text);
    background: var(--ttr-white);
    border: 1px solid var(--ttr-border);
    border-radius: var(--ttr-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--ttr-accent);
    box-shadow: var(--ttr-focus);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235c6b82' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    padding-right: 2rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: auto;
    margin: 0;
}

.form-check label {
    margin: 0;
    font-weight: 500;
}

.is-invalid {
    border-color: var(--ttr-danger) !important;
}

.invalid-feedback,
.error-text {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8125rem;
    color: var(--ttr-danger);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ttr-border-soft);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: flex-end;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--ttr-surface);
    border: 1px solid var(--ttr-border-soft);
    border-radius: var(--ttr-radius);
}

.filters .form-group {
    margin-bottom: 0;
    min-width: 140px;
    flex: 1;
}

.filters .form-group.grow {
    flex: 2;
    min-width: 200px;
}

/* —— Buttons —— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.95rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: var(--ttr-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--ttr-accent);
    border-color: var(--ttr-accent);
    color: var(--ttr-white);
}

.btn-primary:hover {
    background: var(--ttr-accent-hover);
    border-color: var(--ttr-accent-hover);
    color: var(--ttr-white);
}

.btn-secondary {
    background: var(--ttr-navy);
    border-color: var(--ttr-navy);
    color: var(--ttr-white);
}

.btn-secondary:hover {
    background: var(--ttr-navy-muted);
    border-color: var(--ttr-navy-muted);
    color: var(--ttr-white);
}

.btn-outline {
    background: transparent;
    border-color: var(--ttr-border);
    color: var(--ttr-navy);
}

.btn-outline:hover {
    border-color: var(--ttr-navy);
    background: var(--ttr-secondary-bg);
    color: var(--ttr-navy);
}

.btn-danger {
    background: var(--ttr-danger);
    border-color: var(--ttr-danger);
    color: var(--ttr-white);
}

.btn-danger:hover {
    background: #912018;
    color: var(--ttr-white);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ttr-text-muted);
}

.btn-ghost:hover {
    background: var(--ttr-secondary-bg);
    color: var(--ttr-navy);
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8125rem;
}

.btn-block {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--ttr-accent);
    padding: 0;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

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

/* —— Tables —— */
.table-wrap {
    overflow-x: auto;
    background: var(--ttr-surface);
    border: 1px solid var(--ttr-border-soft);
    border-radius: var(--ttr-radius);
}

.table {
    width: 100%;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--ttr-border-soft);
}

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ttr-text-muted);
    font-weight: 700;
    background: #f8f9fc;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #fafbfd;
}

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

.table .actions {
    white-space: nowrap;
    text-align: right;
}

.table .actions form {
    display: inline;
}

.table-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--ttr-text-muted);
}

.table-totals {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    font-size: 0.875rem;
}

.table-totals td {
    padding: 0.35rem 0;
}

.table-totals td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.table-totals .grand-total td {
    padding-top: 0.65rem;
    border-top: 2px solid var(--ttr-navy);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ttr-navy);
}

/* Line items (quotations) */
.line-items-table {
    width: 100%;
    font-size: 0.875rem;
}

.line-items-table th,
.line-items-table td {
    padding: 0.45rem;
    vertical-align: top;
    border-bottom: 1px solid var(--ttr-border-soft);
}

.line-items-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ttr-text-muted);
    background: #f8f9fc;
}

.line-items-table input,
.line-items-table select {
    font-size: 0.8125rem;
    padding: 0.4rem 0.5rem;
}

.line-items-table .col-type { width: 110px; }
.line-items-table .col-qty { width: 80px; }
.line-items-table .col-unit { width: 80px; }
.line-items-table .col-price { width: 110px; }
.line-items-table .col-total { width: 100px; text-align: right; font-variant-numeric: tabular-nums; }
.line-items-table .col-actions { width: 44px; text-align: center; }

.line-items-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

/* —— Badges —— */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-secondary { background: var(--ttr-secondary-bg); color: var(--ttr-secondary); }
.badge-primary { background: var(--ttr-info-bg); color: var(--ttr-navy); }
.badge-info { background: var(--ttr-info-bg); color: var(--ttr-info); }
.badge-success { background: var(--ttr-success-bg); color: var(--ttr-success); }
.badge-danger { background: var(--ttr-danger-bg); color: var(--ttr-danger); }
.badge-warning { background: var(--ttr-warning-bg); color: var(--ttr-warning); }
.badge-muted { background: var(--ttr-muted-bg); color: var(--ttr-muted); }
.badge-accent { background: var(--ttr-accent-soft); color: var(--ttr-accent); }

/* —— Alerts / flash —— */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--ttr-radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid transparent;
}

.alert-success {
    background: var(--ttr-success-bg);
    border-color: #b7e4c7;
    color: var(--ttr-success);
}

.alert-error,
.alert-danger {
    background: var(--ttr-danger-bg);
    border-color: #f5c2c0;
    color: var(--ttr-danger);
}

.alert-warning {
    background: var(--ttr-warning-bg);
    border-color: #f5d78e;
    color: var(--ttr-warning);
}

.alert-info {
    background: var(--ttr-info-bg);
    border-color: #b6d0f7;
    color: var(--ttr-info);
}

.alert ul {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}

/* —— Pagination —— */
.pagination-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 0;
    font-size: 0.875rem;
    color: var(--ttr-text-muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination li a,
.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border: 1px solid var(--ttr-border);
    border-radius: var(--ttr-radius-sm);
    background: var(--ttr-white);
    color: var(--ttr-navy);
    font-size: 0.8125rem;
    font-weight: 600;
}

.pagination li a:hover {
    border-color: var(--ttr-accent);
    color: var(--ttr-accent);
}

.pagination li.active span,
.pagination .active > span,
.pagination .active > a {
    background: var(--ttr-navy);
    border-color: var(--ttr-navy);
    color: var(--ttr-white);
}

.pagination li.disabled span,
.pagination .disabled > span {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Laravel default paginator (Tailwind-ish) override helpers */
nav[role="navigation"] span,
nav[role="navigation"] a {
    font-size: 0.8125rem;
}

/* —— Detail / meta —— */
.meta-list {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.4rem 1rem;
    font-size: 0.875rem;
    margin: 0;
}

.meta-list dt {
    color: var(--ttr-text-muted);
    font-weight: 600;
}

.meta-list dd {
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
}

.stack-gap > * + * {
    margin-top: 1rem;
}

.muted { color: var(--ttr-text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-2 { margin-top: 1rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.prose-box {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--ttr-text);
}

.prose-box p:last-child { margin-bottom: 0; }

.email-body-preview {
    border: 1px solid var(--ttr-border-soft);
    border-radius: var(--ttr-radius-sm);
    padding: 1rem;
    background: #fafbfd;
    max-height: 480px;
    overflow: auto;
}

.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.public-quote {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.public-quote-header {
    background: var(--ttr-navy);
    color: var(--ttr-white);
    padding: 1.25rem 1.75rem 1.5rem;
    border-radius: var(--ttr-radius) var(--ttr-radius) 0 0;
}

.public-quote-header .brand-mark {
    font-family: var(--ttr-font-brand);
    font-size: 1.35rem;
    font-weight: 700;
}

.public-quote-body {
    background: var(--ttr-white);
    border: 1px solid var(--ttr-border-soft);
    border-top: none;
    border-radius: 0 0 var(--ttr-radius) var(--ttr-radius);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--ttr-shadow);
}

.status-banner {
    padding: 0.75rem 1rem;
    border-radius: var(--ttr-radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-banner.accepted,
.status-banner.agreement_sent,
.status-banner.deposit_received { background: var(--ttr-success-bg); color: var(--ttr-success); }
.status-banner.declined { background: var(--ttr-danger-bg); color: var(--ttr-danger); }
.status-banner.expired,
.status-banner.needs_detail,
.status-banner.explanation_requested { background: var(--ttr-warning-bg); color: var(--ttr-warning); }
.status-banner.viewed,
.status-banner.sent { background: var(--ttr-info-bg); color: var(--ttr-info); }
.status-banner.revised { background: var(--ttr-muted-bg); color: var(--ttr-muted); }

.client-response-panel {
    border: 1px solid var(--ttr-border-soft);
    background: #fff;
    padding: 1rem 1.1rem;
    border-radius: 10px;
}
.client-response-options {
    display: grid;
    gap: 0.55rem;
}
.client-response-option {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--ttr-border-soft);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}
.client-response-option:has(input:checked) {
    border-color: var(--ttr-accent, #ff5e14);
    background: rgba(255, 94, 20, 0.06);
}
.client-response-option input {
    margin-top: 0.2rem;
}
@media (max-width: 640px) {
    .client-response-option { font-size: 0.9375rem; }
}

/* Send quotation recipients + tracking UI (page also inlines critical CSS) */
.send-compose { max-width: 1100px; }
.send-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.send-card-body { padding: 1.15rem 1.25rem 1.35rem; }
.send-section-title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}
.send-add-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1rem;
    align-items: stretch;
}
@media (max-width: 860px) {
    .send-add-grid { grid-template-columns: 1fr; }
}
.send-results {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f4f6ff;
    min-height: 220px;
    max-height: 320px;
    overflow: auto;
}
.send-result-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #e4e8f5;
}
.send-result-name {
    display: block;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.9375rem;
}
.send-result-email {
    display: block;
    margin-top: 0.12rem;
    color: #64748b;
    font-size: 0.8125rem;
}
.send-add-btn {
    appearance: none;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
}
.send-track-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}
.send-track-table th {
    text-align: left;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.send-track-table td {
    padding: 0.7rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.875rem;
}
.track-status {
    display: inline-flex;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
}
.track-status.is-sent { background: #dcfce7; color: #166534; }
.track-follow {
    display: inline-flex;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    background: #e0e7ff;
    color: #312e81;
    font-size: 0.75rem;
    font-weight: 650;
}
.btn-remove {
    appearance: none;
    border: 1px solid #fb923c;
    background: #fff;
    color: #c2410c;
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.label-missing {
    color: #b42318 !important;
}
.missing-flag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: #fee4e2;
    color: #b42318;
    font-size: 0.75rem;
    font-weight: 700;
    vertical-align: middle;
}
.is-missing-answer,
.is-missing-section {
    border-color: #f04438 !important;
    box-shadow: inset 0 0 0 1px rgba(240, 68, 56, 0.15);
}
.is-missing-section {
    background: #fff5f5;
}

.sidebar-backdrop {
    display: none;
}

/* Detail-level modal (convert / adjust quotation) */
.detail-modal[hidden] { display: none !important; }
.detail-modal {
    position: fixed !important;
    inset: 0;
    z-index: 1200;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.detail-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 12, 47, 0.45);
}
.detail-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    max-height: min(90vh, 720px);
    overflow: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(1, 12, 47, 0.22);
}
.detail-modal-dialog--wide {
    width: min(560px, 100%);
}
.detail-modal-form { padding: 1.1rem 1.2rem 1.25rem; }
.detail-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}
.detail-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #010c2f;
    line-height: 1.3;
}
.detail-modal-x {
    appearance: none;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.15rem;
}
.detail-modal-help {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: #5c6b82;
    line-height: 1.4;
}
.detail-modal-body {
    max-height: 48vh;
    overflow: auto;
    padding-right: 0.25rem;
    margin-bottom: 1rem;
}
.detail-level-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.detail-level-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 500;
    color: #010c2f;
    cursor: pointer;
}
.detail-level-option.is-baseline {
    margin-top: 0.25rem;
    margin-bottom: 0.15rem;
}
.detail-level-option input {
    width: auto;
    margin: 0;
    accent-color: #2563eb;
}
.detail-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* —— Responsive —— */
@media (max-width: 960px) {
    .panel-grid,
    .detail-grid,
    .form-row,
    .form-row-3,
    .form-row-4 {
        grid-template-columns: 1fr;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

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

    .sidebar-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(1, 12, 47, 0.45);
        z-index: 35;
    }

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

    .sidebar-toggle {
        display: inline-flex;
    }

    .content {
        padding: 1rem;
    }

    .line-items-table .col-type,
    .line-items-table .col-unit {
        width: auto;
    }
}

/* AI estimate confidence + measurement warnings */
.badge-confidence-high { background: var(--ttr-success-bg); color: var(--ttr-success); }
.badge-confidence-medium { background: var(--ttr-warning-bg); color: var(--ttr-warning); }
.badge-confidence-needs { background: var(--ttr-danger-bg); color: var(--ttr-danger); }
.measurement-required {
    border-left: 3px solid var(--ttr-accent);
    background: var(--ttr-accent-soft);
    padding: .75rem 1rem;
    margin: .5rem 0 1rem;
    border-radius: var(--ttr-radius-sm);
    color: var(--ttr-navy);
    font-size: .92rem;
}
.estimate-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .75rem;
}
.estimate-photo-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--ttr-radius-sm);
    border: 1px solid var(--ttr-border);
}
.price-changed { background: #fff6e0; }

/* Quotation status stages */
.status-stages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.status-stages-intro {
    margin: 0 0 0.15rem;
    font-size: 0.84rem;
    color: var(--ttr-text-muted);
    line-height: 1.45;
}
.status-stage {
    padding: 0.95rem 1rem 1rem;
    border: 1px solid var(--ttr-border-soft);
    border-radius: 10px;
    background: #fbfcfe;
}
.status-stage-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}
.status-stage-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 4.5rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.status-stage-badge--2 {
    background: #fff7ed;
    color: #c2410c;
}
.status-stage-badge--3 {
    background: #ecfdf3;
    color: #15803d;
}
.status-stage-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ttr-navy);
}
.status-stage-desc {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: var(--ttr-text-muted);
    line-height: 1.4;
}
.status-stage-tip {
    margin: 0 0 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: #fff;
    border: 1px dashed var(--ttr-border);
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.4;
}
.status-stage-empty {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--ttr-text-muted);
}
.status-action-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.status-action-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid #e8edf5;
    border-radius: 10px;
    background: #fff;
}
.status-action-copy {
    min-width: 0;
    flex: 1 1 auto;
}
.status-action-step {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.15rem;
}
.status-action-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ttr-navy);
    line-height: 1.25;
}
.status-action-help {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: var(--ttr-text-muted);
    line-height: 1.4;
}
.status-action-cta {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
@media (max-width: 720px) {
    .status-action-row {
        flex-direction: column;
    }
    .status-action-cta {
        width: 100%;
    }
    .status-action-cta .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
    }

    .guest-card {
        padding: 1.5rem 1.25rem;
    }

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

/* —— Professional dashboard —— */
.dash {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.dash-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1.1rem 1.25rem;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(255, 94, 20, 0.08) 0%, transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--ttr-border-soft);
    border-radius: 14px;
    box-shadow: var(--ttr-shadow);
}

.dash-greeting {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--ttr-navy);
    letter-spacing: -0.02em;
}

.dash-hero-sub {
    margin: 0.25rem 0 0;
    color: var(--ttr-text-muted);
    font-size: 0.9375rem;
}

.dash-search {
    position: relative;
    width: 100%;
    max-width: 420px;
    justify-self: center;
}

.dash-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    display: inline-flex;
    pointer-events: none;
}

.dash-search input {
    width: 100%;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 999px;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    font: inherit;
    color: var(--ttr-text);
    box-shadow: inset 0 1px 1px rgba(1, 12, 47, 0.02);
}

.dash-search input:focus {
    outline: none;
    border-color: rgba(255, 94, 20, 0.55);
    box-shadow: var(--ttr-focus);
    background: #fff;
}

.dash-hero-aside {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    justify-self: end;
}

.dash-bell {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--ttr-navy);
}

.dash-bell:hover {
    color: var(--ttr-accent);
    border-color: rgba(255, 94, 20, 0.35);
}

.dash-bell-badge {
    position: absolute;
    top: -0.2rem;
    right: -0.2rem;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.dash-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.dash-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: var(--ttr-navy);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.dash-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.dash-user-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ttr-navy);
}

.dash-user-role {
    font-size: 0.75rem;
    color: var(--ttr-text-muted);
}

.dash-overview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dash-section-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ttr-navy);
}

.dash-btn-customer {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dash-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 0.75rem;
}

.dash-stat {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.95rem 0.95rem 1.05rem;
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(1, 12, 47, 0.04), 0 8px 20px rgba(1, 12, 47, 0.04);
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dash-stat::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--dash-accent, var(--ttr-accent));
}

.dash-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(1, 12, 47, 0.08);
    box-shadow: 0 4px 16px rgba(1, 12, 47, 0.08);
    color: inherit;
}

.dash-stat-icon {
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--dash-soft, #eef2ff);
    color: var(--dash-accent, var(--ttr-navy));
}

.dash-stat-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}

.dash-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.dash-stat-value {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.05;
    color: var(--ttr-navy);
}

.dash-stat-unit {
    font-size: 0.72rem;
    color: #94a3b8;
}

.dash-stat--draft { --dash-accent: #3b82f6; --dash-soft: #eff6ff; }
.dash-stat--sent { --dash-accent: #22c55e; --dash-soft: #ecfdf3; }
.dash-stat--viewed { --dash-accent: #0ea5e9; --dash-soft: #e0f2fe; }
.dash-stat--warning { --dash-accent: #f59e0b; --dash-soft: #fffbeb; }
.dash-stat--amber { --dash-accent: #d97706; --dash-soft: #fff7ed; }
.dash-stat--success { --dash-accent: #16a34a; --dash-soft: #e8f8ee; }
.dash-stat--teal { --dash-accent: #0d9488; --dash-soft: #ecfdf8; }
.dash-stat--emerald { --dash-accent: #059669; --dash-soft: #ecfdf5; }
.dash-stat--danger { --dash-accent: #ef4444; --dash-soft: #fef2f2; }
.dash-stat--slate { --dash-accent: #64748b; --dash-soft: #f1f5f9; }
.dash-stat--muted { --dash-accent: #78839a; --dash-soft: #f3f4f6; }
.dash-stat--info { --dash-accent: #2563eb; --dash-soft: #eff6ff; }

.dash-panels {
    display: grid;
    grid-template-columns: 1.15fr 1.15fr 0.95fr;
    gap: 1rem;
    align-items: start;
}

.dash-panel {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(1, 12, 47, 0.04), 0 8px 20px rgba(1, 12, 47, 0.04);
    min-width: 0;
}

.dash-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem 0.75rem;
}

.dash-panel-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.dash-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ttr-accent);
}

.dash-link:hover {
    color: var(--ttr-accent-hover);
}

.dash-panel-body {
    padding: 0.35rem 1.15rem 1.15rem;
}

.dash-chart-wrap {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.dash-donut {
    position: relative;
    width: 168px;
    height: 168px;
    border-radius: 999px;
    background: var(--donut-gradient, #e2e8f0);
    box-shadow: inset 0 0 0 1px rgba(1, 12, 47, 0.04);
    flex-shrink: 0;
}

.dash-donut-hole {
    position: absolute;
    inset: 18px;
    border-radius: 999px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(1, 12, 47, 0.06);
}

.dash-donut-hole strong {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--ttr-navy);
    line-height: 1;
}

.dash-donut-hole span {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
}

.dash-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.dash-legend li {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.45rem;
    align-items: center;
    font-size: 0.8125rem;
}

.dash-legend-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
}

.dash-legend-label {
    color: #475569;
    font-weight: 600;
}

.dash-legend-count {
    color: var(--ttr-navy);
    font-weight: 700;
    min-width: 1.25rem;
    text-align: right;
}

.dash-legend-pct {
    color: #94a3b8;
    min-width: 3.25rem;
    text-align: right;
}

.dash-activity {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dash-activity-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.7rem;
    align-items: start;
    padding: 0.65rem 0.35rem;
    border-radius: 10px;
    color: inherit;
}

.dash-activity-item:hover {
    background: #f8fafc;
    color: inherit;
}

.dash-activity-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
}

.dash-activity-icon--sent,
.dash-activity-icon--success { background: #ecfdf3; color: #16a34a; }
.dash-activity-icon--warning { background: #fffbeb; color: #d97706; }
.dash-activity-icon--danger { background: #fef2f2; color: #ef4444; }
.dash-activity-icon--viewed,
.dash-activity-icon--info { background: #e0f2fe; color: #0284c7; }
.dash-activity-icon--draft,
.dash-activity-icon--muted { background: #f1f5f9; color: #64748b; }

.dash-activity-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.dash-activity-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ttr-navy);
    line-height: 1.3;
}

.dash-activity-meta {
    font-size: 0.75rem;
    color: #94a3b8;
}

.dash-activity-time {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    padding-top: 0.15rem;
}

.dash-reminders {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.dash-reminder-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.8rem;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.dash-reminder-date {
    width: 3.1rem;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.25rem;
    flex-shrink: 0;
}

.dash-reminder-date span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dash-reminder-date strong {
    font-size: 1.15rem;
    line-height: 1;
    margin-top: 0.1rem;
}

.dash-reminder-copy h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
}

.dash-reminder-copy p {
    margin: 0.2rem 0;
    font-size: 0.78rem;
    color: #64748b;
}

.dash-reminder-copy time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.dash-add-reminder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
    padding: 0.65rem;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: var(--ttr-accent);
    font-weight: 700;
    font-size: 0.875rem;
}

.dash-add-reminder:hover {
    background: #fff7f2;
    border-color: rgba(255, 94, 20, 0.45);
    color: var(--ttr-accent-hover);
}

.dash-empty {
    margin: 0.5rem 0;
    color: var(--ttr-text-muted);
    font-size: 0.875rem;
}

@media (max-width: 1180px) {
    .dash-panels {
        grid-template-columns: 1fr 1fr;
    }

    .dash-panels .dash-panel:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .dash-hero {
        grid-template-columns: 1fr;
    }

    .dash-search {
        max-width: none;
        justify-self: stretch;
    }

    .dash-hero-aside {
        justify-self: start;
        width: 100%;
        justify-content: space-between;
    }

    .dash-chart-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .dash-legend {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .dash-panels {
        grid-template-columns: 1fr;
    }

    .dash-panels .dash-panel:last-child {
        grid-column: auto;
    }

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

    .dash-user-meta {
        display: none;
    }
}
