:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #182230;
    --muted: #667085;
    --line: #d9e1ec;
    --primary: #146c94;
    --primary-dark: #0f5576;
    --teal: #0f766e;
    --amber: #b7791f;
    --rose: #b42318;
    --green: #167647;
    --slate: #475467;
    --sidebar: #111827;
    --sidebar-muted: #a8b3c7;
    --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

a {
    text-decoration: none;
}

.auth-body,
.error-body {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: min(100%, 440px);
}

.auth-panel,
.error-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 32px;
}

.auth-brand,
.sidebar-brand,
.topbar,
.user-menu,
.dashboard-intro,
.panel-heading,
.phase-panel {
    display: flex;
    align-items: center;
}

.auth-brand {
    gap: 14px;
    margin-bottom: 28px;
}

.auth-brand h1,
.topbar h1,
.dashboard-intro h2,
.panel-heading h3,
.phase-panel h3,
.error-card h1 {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.auth-brand h1 {
    font-size: 1.55rem;
}

.brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 8px;
    background: #e6f4f1;
    color: var(--teal);
    font-size: 1.3rem;
}

.eyebrow {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
}

.login-form .form-control {
    min-height: 46px;
}

.login-help {
    margin-top: 18px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark);
    --bs-btn-active-border-color: var(--primary-dark);
}

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

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: 274px;
    display: flex;
    flex-direction: column;
    padding: 18px;
    background: var(--sidebar);
    color: #ffffff;
    transform: translateX(0);
    transition: transform 180ms ease;
}

.sidebar-brand {
    gap: 12px;
    color: #ffffff;
    margin-bottom: 24px;
}

.sidebar-brand:hover {
    color: #ffffff;
}

.sidebar-brand small,
.sidebar-note span {
    display: block;
    color: var(--sidebar-muted);
    font-size: 0.78rem;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
    overflow-y: auto;
    padding-right: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #d8dfec;
    font-weight: 600;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sidebar-note {
    margin-top: auto;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-note .note-title {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 4px;
}

.app-main {
    width: 100%;
    min-width: 0;
    margin-left: 274px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    gap: 16px;
    min-height: 78px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
}

.topbar h1 {
    font-size: 1.45rem;
}

.icon-button {
    display: inline-grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
}

.user-menu {
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 7px 10px;
    color: var(--text);
}

.avatar {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    background: #edf7fa;
    color: var(--primary);
    font-weight: 800;
}

.user-meta {
    display: grid;
    line-height: 1.15;
    text-align: left;
}

.user-meta small {
    color: var(--muted);
}

.content-area {
    padding: 28px;
}

.dashboard-intro {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-intro h2 {
    font-size: 1.75rem;
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

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

.kpi-card,
.panel-card,
.phase-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.05);
}

.kpi-card {
    display: flex;
    gap: 12px;
    align-items: center;
    min-height: 106px;
    padding: 16px;
}

.kpi-card span {
    display: block;
    color: var(--muted);
    font-size: 0.83rem;
    font-weight: 700;
}

.kpi-card strong {
    display: block;
    margin-top: 4px;
    font-size: clamp(1.15rem, 1.7vw, 1.55rem);
}

.kpi-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 8px;
    font-size: 1.2rem;
}

.tone-blue { background: #e8f3f8; color: var(--primary); }
.tone-teal { background: #e7f6f2; color: var(--teal); }
.tone-amber { background: #fff7df; color: var(--amber); }
.tone-rose { background: #fff0ee; color: var(--rose); }
.tone-violet { background: #f2edff; color: #6941c6; }
.tone-indigo { background: #eef4ff; color: #3538cd; }
.tone-green { background: #e9f8ef; color: var(--green); }
.tone-slate { background: #f2f4f7; color: var(--slate); }

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 16px;
}

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

.panel-card {
    padding: 18px;
}

.panel-heading {
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-heading h3,
.phase-panel h3 {
    font-size: 1.08rem;
}

.chart-wrap {
    position: relative;
    width: 100%;
    min-height: 260px;
}

.chart-wrap.small {
    min-height: 210px;
}

.phase-panel {
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
    padding: 18px;
}

.phase-list {
    display: grid;
    gap: 8px;
    max-width: 640px;
    margin: 0;
    padding: 0;
    color: var(--muted);
    list-style: none;
}

.phase-list li {
    display: flex;
    gap: 8px;
}

.phase-list i {
    color: var(--green);
    flex: 0 0 auto;
}

.sidebar-backdrop {
    display: none;
}

.error-card {
    width: min(100%, 480px);
    text-align: center;
}

.error-card h1 {
    font-size: 1.8rem;
}

.error-card p:not(.eyebrow) {
    color: var(--muted);
}

.toolbar-panel,
.report-actions,
.report-table-panel,
.form-section,
.detail-section,
.success-band {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 8px 20px rgba(16, 24, 40, 0.05);
}

.toolbar-panel {
    margin-bottom: 16px;
    padding: 16px;
}

.filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px auto;
    gap: 14px;
    align-items: end;
}

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

.advanced-filters {
    margin-top: 16px;
}

.advanced-filters summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 700;
}

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

.filter-grid.compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.data-form {
    display: grid;
    gap: 16px;
}

.form-section {
    padding: 18px;
}

/* Keep Product Information and Document / Status side-by-side on desktop. */
@media (min-width: 1200px) {
    .data-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .data-form > .form-section {
        grid-column: 1 / -1;
    }

    .data-form > .form-section-half {
        grid-column: span 1;
    }

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

.section-heading {
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.05rem;
}

.repeater-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-help {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.repeater-list,
.model-repeater {
    display: grid;
    gap: 10px;
}

.repeater-row,
.model-row {
    display: grid;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.repeater-row {
    grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.55fr) minmax(160px, 0.85fr) minmax(160px, 0.85fr) auto;
}

.model-row {
    grid-template-columns: minmax(180px, 1.3fr) minmax(110px, 0.7fr) minmax(110px, 0.6fr) auto;
}

.icon-button.danger {
    color: var(--rose);
}

.form-field.span-2 {
    grid-column: span 2;
}

.required {
    color: var(--rose);
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.success-band {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-color: #b7e4c7;
    background: #f0fdf4;
}

.success-band span {
    display: block;
    color: var(--muted);
}

.report-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px 16px;
}

.report-table-panel {
    overflow: hidden;
}

.report-table-wrap {
    overflow-x: auto;
    max-height: calc(100vh - 250px);
}

.report-table {
    min-width: 1600px;
    margin-bottom: 0;
}

.report-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    color: var(--text);
    font-size: 0.78rem;
    white-space: nowrap;
}

.report-table th a {
    color: var(--text);
}

.report-table .col-serial_no { min-width: 130px; }

.report-table .is-frozen {
    position: sticky;
    left: var(--frozen-left, 0px);
    z-index: 3;
    background: #ffffff;
    box-shadow: 1px 0 0 var(--line);
}

.report-table thead .is-frozen {
    z-index: 4;
    background: #f8fafc;
}

.report-table .col-model_no { min-width: 220px; }
.report-table .col-container_no,
.report-table .col-hbl_no { min-width: 170px; }
.report-table .col-container_no,
.report-table .col-container_size,
.report-table .col-shipper,
.report-table .col-consigned_notify,
.report-table .col-model_no,
.report-table .col-category {
    white-space: pre-line;
}
.report-table .col-documents,
.report-table .col-shipment_status { min-width: 220px; white-space: normal; }
.report-table .col-port_of_loading,
.report-table .col-port_of_discharge,
.report-table .col-shipping_line_name { min-width: 210px; }
.report-table .actions-column { min-width: 130px; white-space: nowrap; }

.pagination-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.columns-list {
    display: grid;
    gap: 8px;
}

.column-setting {
    display: grid;
    grid-template-columns: 2ch minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.column-freeze { white-space: nowrap; }

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

.detail-header h2 {
    margin: 0;
}

.detail-section {
    padding: 18px;
    margin-bottom: 16px;
}

.detail-section h3 {
    margin: 0 0 14px;
    font-size: 1.08rem;
}

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

.detail-item {
    min-height: 76px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.detail-item span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-item strong {
    display: block;
    margin-top: 6px;
    word-break: break-word;
}

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

.detail-list-item {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.detail-list-item span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-list-item strong {
    display: block;
    margin-top: 6px;
}

.alert-panel {
    margin-top: 16px;
    padding: 18px;
}

.compact-table {
    font-size: 0.86rem;
}

.pre-line {
    white-space: pre-line;
}

.demurrage-callout {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.demurrage-callout strong {
    font-size: 1.05rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: start;
}

.admin-form,
.settings-form {
    padding: 18px;
}

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

.permission-table th:not(:first-child),
.permission-table td:not(:first-child) {
    text-align: center;
}

.import-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.import-stats span {
    display: inline-flex;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.section-subtitle {
    font-size: 1rem;
    margin: 14px 0 10px;
}

.import-errors {
    margin-bottom: 0;
    color: var(--rose);
}

.print-body {
    background: #ffffff;
    padding: 18px;
}

.print-header {
    margin-bottom: 18px;
    text-align: center;
}

.print-header p,
.print-header h1 {
    margin: 0;
}

.print-header h1 {
    font-size: 1.4rem;
}

.print-table {
    font-size: 0.76rem;
}


/* ===== Compact Professional Banking-Style UI ===== */
/* Visual-only refinements: smaller typography, tighter forms, cleaner tables and panels. */
html {
    font-size: 14px;
}

body {
    font-size: 0.88rem;
    line-height: 1.35;
}

.app-sidebar {
    width: 248px;
    padding: 14px;
}

.app-main {
    margin-left: 248px;
}

.sidebar-brand {
    gap: 10px;
    margin-bottom: 16px;
}

.sidebar-brand strong {
    font-size: 0.92rem;
}

.sidebar-brand small,
.sidebar-note span {
    font-size: 0.72rem;
}

.brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 6px;
    font-size: 1.05rem;
}

.sidebar-nav {
    gap: 3px;
}

.sidebar-nav a {
    min-height: 36px;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
}

.sidebar-note {
    padding: 10px;
    border-radius: 6px;
    font-size: 0.76rem;
}

.topbar {
    min-height: 62px;
    gap: 12px;
    padding: 9px 20px;
}

.topbar h1 {
    font-size: 1.18rem;
}

.eyebrow {
    font-size: 0.67rem;
    letter-spacing: 0.035em;
}

.icon-button {
    width: 34px;
    height: 34px;
    border-radius: 6px;
}

.user-menu {
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.user-meta small {
    font-size: 0.68rem;
}

.content-area {
    padding: 20px;
}

.dashboard-intro {
    gap: 12px;
    margin-bottom: 12px;
}

.dashboard-intro h2 {
    font-size: 1.35rem;
}

.status-pill {
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

.kpi-grid {
    gap: 10px;
}

.kpi-card,
.panel-card,
.phase-panel,
.toolbar-panel,
.report-actions,
.report-table-panel,
.form-section,
.detail-section,
.success-band {
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(16, 24, 40, 0.045);
}

.kpi-card {
    min-height: 82px;
    gap: 10px;
    padding: 12px;
}

.kpi-card span {
    font-size: 0.73rem;
}

.kpi-card strong {
    margin-top: 2px;
    font-size: clamp(1.05rem, 1.35vw, 1.3rem);
}

.kpi-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-radius: 6px;
    font-size: 1rem;
}

.dashboard-grid {
    gap: 12px;
    margin-top: 12px;
}

.panel-card,
.phase-panel,
.form-section,
.detail-section,
.admin-form,
.settings-form {
    padding: 13px;
}

.panel-heading {
    margin-bottom: 10px;
}

.panel-heading h3,
.phase-panel h3,
.detail-section h3 {
    font-size: 0.96rem;
}

.toolbar-panel {
    margin-bottom: 12px;
    padding: 12px;
}

.filter-row {
    gap: 10px;
}

.advanced-filters {
    margin-top: 10px;
}

.filter-grid,
.form-grid {
    gap: 9px 10px;
}

.data-form {
    gap: 11px;
}

.form-section {
    padding: 13px 14px;
}

.section-heading {
    margin-bottom: 10px;
    padding-bottom: 7px;
}

.section-heading h2 {
    font-size: 0.92rem;
    font-weight: 700;
}

.section-help {
    margin-top: 3px;
    font-size: 0.74rem;
}

.form-label {
    margin-bottom: 3px;
    color: #344054;
    font-size: 0.74rem;
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 34px;
    padding: 0.34rem 0.52rem;
    border-color: #cfd8e3;
    border-radius: 5px;
    background-color: #ffffff;
    font-size: 0.8rem;
    line-height: 1.25;
}

textarea.form-control {
    min-height: 62px;
}

.form-control:focus,
.form-select:focus {
    border-color: #7aa8bd;
    box-shadow: 0 0 0 0.14rem rgba(20, 108, 148, 0.10);
}

.input-group-text {
    min-height: 34px;
    padding: 0.34rem 0.52rem;
    border-color: #cfd8e3;
    font-size: 0.78rem;
}

.form-check-label,
.form-text {
    font-size: 0.75rem;
}

.btn {
    padding: 0.36rem 0.62rem;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.3;
}

.btn-sm,
.btn-group-sm > .btn {
    padding: 0.26rem 0.48rem;
    font-size: 0.72rem;
}

.form-actions {
    gap: 7px;
    margin-top: 12px;
}

.repeater-list,
.model-repeater {
    gap: 7px;
}

.repeater-row,
.model-row {
    gap: 8px;
    padding: 9px;
    border-radius: 6px;
}

.success-band {
    margin-bottom: 12px;
    padding: 10px 12px;
}

.report-actions {
    gap: 9px;
    margin-bottom: 9px;
    padding: 10px 12px;
    font-size: 0.8rem;
}

.report-table-wrap {
    max-height: calc(100vh - 205px);
}

.report-table {
    font-size: 0.74rem;
}

.report-table thead th {
    padding: 0.48rem 0.5rem;
    background: #eef2f6;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.report-table > :not(caption) > * > * {
    padding: 0.42rem 0.5rem;
    border-color: #e1e6ed;
    line-height: 1.25;
}

.table {
    font-size: 0.78rem;
}

.table > :not(caption) > * > * {
    padding: 0.44rem 0.52rem;
    border-color: #e1e6ed;
}

.table thead th {
    color: #344054;
    font-size: 0.72rem;
    font-weight: 800;
    vertical-align: middle;
}

.pagination {
    --bs-pagination-padding-x: 0.62rem;
    --bs-pagination-padding-y: 0.3rem;
    --bs-pagination-font-size: 0.76rem;
}

.pagination-wrap {
    margin-top: 10px;
}

.detail-header {
    gap: 12px;
    margin-bottom: 12px;
}

.detail-header h2 {
    font-size: 1.15rem;
}

.detail-section {
    margin-bottom: 12px;
}

.detail-grid,
.detail-list {
    gap: 8px;
}

.detail-item {
    min-height: 62px;
    padding: 9px;
    border-radius: 6px;
}

.detail-list-item {
    padding: 9px;
    border-radius: 6px;
}

.detail-item span,
.detail-list-item span {
    font-size: 0.66rem;
}

.detail-item strong,
.detail-list-item strong {
    margin-top: 4px;
    font-size: 0.8rem;
}

.demurrage-callout {
    min-height: 46px;
    gap: 9px;
    padding: 10px;
    border-radius: 6px;
}

.demurrage-callout strong {
    font-size: 0.92rem;
}

.admin-grid {
    gap: 12px;
}

.flag-grid {
    gap: 6px;
}

.import-stats {
    gap: 7px;
    margin: 11px 0;
}

.import-stats span {
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 0.76rem;
}

.section-subtitle {
    margin: 10px 0 7px;
    font-size: 0.9rem;
}

.modal-content,
.dropdown-menu,
.alert {
    font-size: 0.8rem;
}

.modal-header,
.modal-footer {
    padding: 0.75rem 0.9rem;
}

.modal-body {
    padding: 0.9rem;
}

.auth-panel,
.error-card {
    padding: 24px;
    border-radius: 6px;
}

.auth-brand {
    margin-bottom: 20px;
}

.auth-brand h1 {
    font-size: 1.25rem;
}

.login-form .form-control {
    min-height: 38px;
}

.login-help {
    margin-top: 12px;
    padding: 9px;
    border-radius: 6px;
    font-size: 0.78rem;
}

.print-body {
    font-size: 0.74rem;
}

.print-table {
    font-size: 0.68rem;
}

.print-table th,
.print-table td {
    text-align: center;
    vertical-align: middle;
}

@media (max-width: 991.98px) {
    .app-main {
        margin-left: 0;
    }
}

@media print {
    @page {
        size: landscape;
        margin: 9mm;
    }

    .print-body {
        padding: 0;
    }

    .print-table thead {
        display: table-header-group;
    }
}

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

    .dashboard-grid,
    .dashboard-grid.triple,
    .phase-panel {
        grid-template-columns: 1fr;
    }

    .phase-panel {
        display: grid;
    }

    .filter-grid,
    .filter-grid.compact,
    .form-grid,
    .detail-grid,
    .detail-list,
    .admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

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

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

    .sidebar-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1030;
        background: rgba(15, 23, 42, 0.44);
    }
}

@media (max-width: 767.98px) {
    .content-area,
    .topbar {
        padding-left: 16px;
        padding-right: 16px;
    }

    .topbar {
        align-items: flex-start;
    }

    .user-meta {
        display: none;
    }

    .dashboard-intro {
        display: grid;
    }

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

    .filter-row,
    .filter-grid,
    .filter-grid.compact,
    .form-grid,
    .detail-grid,
    .detail-list,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .repeater-heading,
    .repeater-row,
    .model-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .form-field.span-2 {
        grid-column: span 1;
    }

    .report-actions,
    .detail-header,
    .success-band {
        display: grid;
    }

    .auth-panel,
    .error-card {
        padding: 24px;
    }
}
