:root {
    --navy: #1e3a5f;
    --navy-dark: #152a46;
    --accent: #c9a227;
    --bg: #eef1f5;
    --card: #ffffff;
    --text: #1f2933;
    --muted: #5c6b7a;
    --line: #d5dde5;
    --danger: #b42318;
}

@font-face {
    font-family: 'Sans';
    src: url('../../font/Sans.eot');
    src: local('Sans'), url('../../font/Sans.eot?#iefix') format('embedded-opentype'),
         url('../../font/Sans.woff') format('woff'),
         url('../../font/Sans.ttf') format('truetype'),
         url('../../font/Sans.svg#Sans') format('svg');
    font-style: normal;
    font-weight: normal;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: Sans, Tahoma, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    direction: rtl;
    overflow-x: hidden;
}

a { color: var(--navy); }

.app-shell { padding-top: 60px; }

.has-sidenav {
    padding-right: 250px;
}

.nav-mask { display: none; }

.sidenav {
    height: calc(100% - 60px);
    width: 250px;
    position: fixed;
    z-index: 30;
    top: 60px;
    right: 0;
    background: #111;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px 0 24px;
}

.sidenav-home {
    display: block;
    color: #d4b45a;
    text-decoration: none;
    padding: 10px 16px;
    font-size: 13px;
    margin: 0 8px 10px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
}

.sidenav-home:hover,
.sidenav-home.active {
    background: #c9a227;
    color: #111;
}

.sidenav-kicker {
    color: #c9a227;
    font-size: 11px;
    padding: 0 16px 10px;
}

.sidenav-panel[hidden] { display: none !important; }

.sidenav-title {
    color: #888;
    font-size: 11px;
    padding: 12px 14px 4px;
}

.sidenav-link {
    display: block;
    color: #c8c8c8;
    text-decoration: none;
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

.sidenav-link:hover,
.sidenav-link.active {
    background: #eaeaea;
    color: #111;
    border-radius: 5px;
    margin: 0 6px;
}

.head-menu {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 40;
    min-height: 60px;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background: #111;
    color: #fff;
    padding: 6px 16px;
    gap: 8px;
}

.head-right,
.head-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.head-brand {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    margin-left: 12px;
    white-space: nowrap;
}

.head-brand-short { display: none; }

.head-btn {
    background: none;
    border: none;
    color: #b6b6b6;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    padding: 8px 12px;
}

.head-btn:hover,
.head-btn.is-on {
    color: #fff;
}

.head-btn.is-on {
    box-shadow: inset 0 -2px 0 #c9a227;
}

.head-btn.head-exit { color: #ff6b6b; }
.head-btn.head-exit:hover { color: #ff9b9b; }

.head-account {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #d4b45a;
    text-decoration: none;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
}

.head-account:hover,
.head-account.is-on {
    background: #c9a227;
    color: #111;
}

.head-lock-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex: 0 0 16px;
}

.head-user,
.head-date {
    color: #cfcfcf;
    font-size: 12px;
    margin-left: 8px;
}

.head-user {
    max-width: min(280px, 32vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.head-left form { margin: 0; }

.app-main { padding: 18px; min-width: 0; }
.app-page {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px 18px 24px;
    min-height: 480px;
    overflow-x: auto;
}

.app-page.page-wide {
    max-width: none;
}

.app-page.page-dash {
    background: transparent;
    border: 0;
    padding: 0;
    min-height: 0;
}

.app-page.page-dash .app-title { display: none; }

.dash-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: stretch;
    background: linear-gradient(135deg, #152a46 0%, #1e3a5f 55%, #24486f 100%);
    color: #fff;
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 16px;
    border: 1px solid #2c4a70;
}

.dash-kicker {
    margin: 0 0 6px;
    color: #d4b45a;
    font-size: 12px;
}

.dash-hero h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.dash-hero p { margin: 0; color: #d5deea; }

.dash-hero-meta {
    min-width: 160px;
    background: rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
}

.dash-hero-meta span { color: #c9d4e3; font-size: 12px; }
.dash-hero-meta strong { display: block; font-size: 28px; margin: 6px 0 2px; }
.dash-hero-meta small { color: #d4b45a; }

.dash-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.dash-kpi {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 12px;
    box-shadow: 0 8px 18px rgba(21, 42, 70, .05);
}

.dash-kpi span, .dash-kpi small { display: block; color: var(--muted); font-size: 12px; }
.dash-kpi strong { display: block; margin: 8px 0 4px; font-size: 26px; color: var(--navy); }
.dash-kpi.tone-gold strong { color: #9a7a1b; }
.dash-kpi.tone-ok strong { color: #1f6b4a; }
.dash-kpi.tone-danger strong { color: var(--danger); }
.dash-kpi.tone-gold { border-top: 3px solid var(--accent); }
.dash-kpi.tone-navy { border-top: 3px solid var(--navy); }
.dash-kpi.tone-ok { border-top: 3px solid #2f6f5e; }
.dash-kpi.tone-danger { border-top: 3px solid var(--danger); }

.dash-charts,
.dash-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.dash-card-wide { grid-column: 1 / -1; }

.dash-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px 18px;
}

.dash-card h3 {
    margin: 0 0 12px;
    color: var(--navy);
    font-size: 15px;
}

.dash-card canvas { width: 100%; display: block; }

.dash-links { display: grid; gap: 8px; }
.dash-links a {
    display: block;
    background: #f4f7fb;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--navy);
}
.dash-links a:hover { background: var(--navy); color: #fff; }
.dash-note { color: var(--muted); margin: 12px 0 0; }

.dash-card .report-wrap { overflow-x: auto; }
.dash-card .report-table { width: 100%; }

.account-hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: stretch;
    background: linear-gradient(135deg, #152a46 0%, #1e3a5f 55%, #24486f 100%);
    color: #fff;
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 16px;
    border: 1px solid #2c4a70;
}

.account-hero h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

.account-hero p { margin: 0; color: #d5deea; }

.account-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px 22px;
}

.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

.account-card .filter-group label {
    display: block;
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
}

.account-card input[type=text],
.account-card input[type=password] {
    width: 100%;
    min-height: 42px;
}

.account-card .login-pass { width: 100%; }

.account-save {
    margin-top: 16px;
    min-height: 44px;
    padding: 10px 22px;
}

@media (max-width: 800px) {
    .account-grid { grid-template-columns: 1fr; }
    .account-hero { flex-direction: column; }
}

@media print {
    .sidenav { display: none !important; }
    .has-sidenav { padding-right: 0; }
}

.app-title {
    margin: 0 0 16px;
    font-size: 18px;
    color: var(--navy);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
}

.app-footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    padding: 12px;
}

.form {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: #fbfcfe;
    margin: 10px 0;
    overflow: visible;
}

.form > h2:first-child {
    margin: -16px -16px 16px;
    background: #f3f6fa;
    color: var(--navy);
    font-size: 15px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    border-radius: 8px 8px 0 0;
}

.form h2 {
    margin: 0;
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
    background: transparent;
    border: 0;
    padding: 0;
}

.form-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.form-toolbar h2,
.form-heading {
    margin: 0;
    flex: 1 1 200px;
    text-align: right;
    padding-bottom: 6px;
}

.field-search {
    flex: 1 1 280px;
    max-width: 460px;
}

.field-search label {
    display: block;
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
}

.field-search-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.field-search-row input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
}

.field-search-row button {
    flex: 0 0 auto;
    width: auto !important;
}

.form table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 10px 12px;
    margin: 0;
    table-layout: fixed;
}

.form table td,
.form table th {
    border: 0;
    background: transparent;
    padding: 4px 6px;
    vertical-align: top;
    overflow: visible;
}

.form table tr,
.form table tr:nth-child(odd),
.form table tr:nth-child(even) {
    background: transparent;
}

.form label {
    display: block;
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}

.form h5,
.form h6 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--navy);
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    line-height: 1.5;
    white-space: normal;
}

.form h5 input,
.form h6 input,
.form td input:not([type=hidden]):not([type=radio]):not([type=checkbox]),
.form td select,
.form td textarea {
    width: 100% !important;
    max-width: 100%;
    min-height: 40px;
    height: auto !important;
    display: block;
}

.form button,
.form input[type=submit] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 16px;
    white-space: nowrap;
    width: auto;
    max-width: 100%;
}

.form td:has(> button),
.form td:has(h2 button) {
    vertical-align: bottom;
}

.login-body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background:
        radial-gradient(900px 420px at 100% 0%, rgba(201, 162, 39, .22), transparent 55%),
        linear-gradient(165deg, #12314f 0%, #1e3a5f 42%, #0e1b2c 100%);
}

.login-screen {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 28px 64px rgba(0, 0, 0, .32);
}

.login-brand {
    background: linear-gradient(185deg, #24486f 0%, #152a46 100%);
    color: #fff;
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-mark {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--accent);
    color: #152a46;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 22px;
}

.login-kicker {
    margin: 0 0 6px;
    color: #d4b45a;
    font-size: 12px;
    letter-spacing: .4px;
}

.login-brand h1 {
    margin: 0 0 8px;
    font-size: 32px;
    color: #fff;
}

.login-company {
    margin: 0 0 18px;
    font-size: 16px;
    color: #e8eef5;
}

.login-note {
    margin: 0;
    color: #b7c4d4;
    line-height: 1.7;
    max-width: 280px;
}

.login-panel {
    padding: 44px 36px;
}

.login-panel h2 {
    margin: 0 0 6px;
    color: var(--navy);
    font-size: 22px;
}

.login-lead {
    margin: 0 0 20px;
    color: var(--muted);
}

.login-panel label {
    display: block;
    margin: 14px 0 6px;
    color: var(--navy);
    font-size: 13px;
}

.login-panel input[type=text],
.login-panel input[type=password] {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 16px;
}

.login-panel input:focus {
    outline: 2px solid #c9a227;
    outline-offset: 1px;
    border-color: var(--navy);
}

.login-pass {
    position: relative;
}

.login-pass input {
    padding-left: 72px;
}

.login-pass-toggle {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: var(--navy);
    border: 0;
    padding: 8px 10px;
    font-size: 12px;
}

.login-submit {
    width: 100%;
    margin-top: 22px;
    min-height: 48px;
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
}

.login-submit:hover {
    background: var(--navy-dark);
}

.login-wrap {
    max-width: 420px;
    margin: 60px auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.login-wrap h1 {
    margin: 0 0 8px;
    color: var(--navy);
    font-size: 20px;
}

.login-wrap label {
    display: block;
    margin: 12px 0 4px;
}

.login-wrap input[type=text],
.login-wrap input[type=password] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #fff;
}

.login-wrap button,
button, input[type=submit] {
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.3;
    white-space: nowrap;
    max-width: 100%;
}

.login-pass-toggle {
    background: transparent;
    color: var(--navy);
    box-shadow: none;
}

.login-submit {
    width: 100%;
    border-radius: 8px;
    min-height: 48px;
}

.alert {
    padding: 10px 12px;
    border-radius: 4px;
    margin: 10px 0;
}
.alert-error { background: #fde8e6; color: var(--danger); }
.alert-ok { background: #e6f4ea; color: #137333; }

.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 13px;
}

table td, table th {
    border: 1px solid var(--line);
    padding: 7px 8px;
    font-size: 13px;
    vertical-align: middle;
}

table th, table td h5 {
    background: var(--navy);
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

table td h5 {
    background: transparent;
    color: inherit;
    font-size: 13px;
}

.form table td h5,
.form table td h6 {
    background: transparent;
    color: var(--navy);
    text-align: right;
}

.app-page table th,
.report-table thead th {
    background: var(--navy);
    color: #fff;
}

table tr:nth-child(odd) { background: #f7f9fc; }
table tr:nth-child(even) { background: #fff; }

.report-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.report-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 18px;
    -webkit-overflow-scrolling: touch;
}

.report-table .col-spec {
    max-width: 14em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
    margin: 0;
}

.report-table th,
.report-table td {
    white-space: nowrap;
    word-break: normal;
    vertical-align: middle;
}

.report-kv {
    min-width: 0;
    max-width: 720px;
}

.report-kv th,
.report-kv td {
    white-space: normal;
    word-break: break-word;
}

.report-kv td.col-spec {
    white-space: nowrap;
}

.report-kv th {
    width: 32%;
    text-align: right;
}

.report-section {
    margin: 22px 0 10px;
    font-size: 15px;
    color: var(--navy);
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin: 12px 0 18px;
}

.report-stat {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 8px;
    text-align: center;
    background: #f7f9fc;
}

.report-stat-label,
.report-stat-hint {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.report-stat-value {
    display: block;
    margin-top: 6px;
    color: var(--navy);
    font-size: 20px;
    font-weight: 600;
}

.score-bar {
    height: 18px;
    line-height: 18px;
    color: #fff;
    font-size: 11px;
    text-align: center;
    border-radius: 3px;
    min-width: 28px;
}

.score-low { background: #b42318; }
.score-mid { background: #c9a227; }
.score-high { background: #1e3a5f; }

.report-card {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
    background: #fff;
}

.report-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
}

.report-gallery img {
    width: 160px;
    height: 120px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.report-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 14px;
    align-items: end;
    margin-bottom: 16px;
    padding: 14px;
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.report-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.report-filters label {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.report-filters input,
.report-filters select,
.report-filters button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.report-filters .filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.report-filters .filter-actions button {
    width: auto;
    flex: 1 1 auto;
}

.report-filters .radio-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--navy);
    white-space: nowrap;
    font-size: 13px;
}

.report-filters .radio-inline input {
    width: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
}

.btn-print {
    background: var(--navy);
    color: #fff;
}

.btn-excel {
    background: #1f6b4a;
    color: #fff;
}

a.btn-print {
    display: inline-block;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 4px;
}

.report-bar-actions {
    display: flex;
    gap: 8px;
    margin-right: auto;
}

.report-bar {
    gap: 10px;
    flex-wrap: wrap;
}

.report-scroll {
    max-height: calc(100vh - 280px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.report-dense {
    width: max-content;
    min-width: 100%;
    font-size: 12px;
    border-collapse: separate;
    border-spacing: 0;
}

.report-dense th,
.report-dense td {
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 5px 8px;
}

.report-dense thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

.report-dense th:nth-child(1),
.report-dense td:nth-child(1) {
    position: sticky;
    right: 0;
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    z-index: 2;
    background: #fff;
}

.report-dense th:nth-child(2),
.report-dense td:nth-child(2) {
    position: sticky;
    right: 52px;
    min-width: 140px;
    max-width: 200px;
    z-index: 2;
    background: #fff;
    box-shadow: -6px 0 8px rgba(0, 0, 0, .06);
}

.report-dense thead th:nth-child(1),
.report-dense thead th:nth-child(2) {
    z-index: 4;
    background: var(--navy);
    color: #fff;
}

.report-dense tbody tr:nth-child(odd) td:nth-child(1),
.report-dense tbody tr:nth-child(odd) td:nth-child(2) {
    background: #f7f9fc;
}

.report-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 10px;
}

.report-pager a,
.report-pager span {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    text-decoration: none;
    color: var(--navy);
    background: #fff;
    font-size: 12px;
}

.report-pager .is-current {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

@media print {
    .head-menu, .sidenav, .nav-mask, .app-footer, .report-bar, .report-filters, .report-pager { display: none !important; }
    .app-shell { padding-top: 0; }
    .has-sidenav { padding-right: 0; padding-top: 0; }
    .app-page { border: 0; overflow: visible; }
    .report-table { min-width: 0; }
    .report-scroll { max-height: none; overflow: visible; border: 0; }
    .report-dense th,
    .report-dense td {
        max-width: none;
        white-space: normal;
        position: static;
        box-shadow: none;
    }
}

input[type=text], input[type=password], input[type=email], textarea, select {
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    border-radius: 6px;
    max-width: 100%;
    min-height: 40px;
    box-sizing: border-box;
}

.hp_button {
    background: var(--navy);
    color: #fff;
    border: 0;
    width: 95%;
    min-height: 42px;
    cursor: pointer;
}

@media print {
    .head-menu, .sidenav, .nav-mask, .app-footer { display: none; }
    .app-shell { padding-top: 0; }
    .app-page { border: 0; }
}

@media (max-width: 900px) {
    .login-screen {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .login-brand {
        padding: 28px 24px 22px;
        text-align: center;
        align-items: center;
    }

    .login-note { max-width: none; }
    .login-panel { padding: 28px 22px 32px; }
    .login-brand h1 { font-size: 26px; }
}

@media (max-width: 800px) {
    .head-menu {
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        padding: 6px 10px;
        gap: 4px;
    }

    .head-right,
    .head-left {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 4px;
    }

    .head-left {
        justify-content: space-between;
    }

    .head-brand-full { display: none; }
    .head-brand-short { display: inline; }
    .head-user,
    .head-date {
        font-size: 11px;
        margin: 0;
    }

    .head-date { display: none; }
    .head-account-label { display: none; }
    .head-account { padding: 8px; min-height: 40px; min-width: 40px; justify-content: center; }
    .head-btn {
        padding: 10px 10px;
        min-height: 40px;
        font-size: 13px;
    }

    .app-shell { padding-top: 96px; }
    .app-main { padding: 10px; }
    .app-page {
        padding: 12px;
        min-height: 0;
        border-radius: 6px;
    }

    .app-title { font-size: 16px; }
    .has-sidenav { padding-right: 0; padding-top: 96px; }
    .sidenav {
        width: 100%;
        height: auto;
        max-height: 38vh;
        position: relative;
        top: auto;
        padding: 8px 0 12px;
        border-top: 1px solid #333;
        border-left: 0;
    }

    .form table,
    .form tbody,
    .form tr {
        display: block;
        width: 100%;
    }

    .form td {
        display: block;
        width: 100% !important;
        padding: 6px 0;
    }

    .form input,
    .form select,
    .form textarea,
    .form button,
    .hp_button {
        width: 100% !important;
        max-width: 100%;
        min-height: 42px;
    }

    .field-search-row {
        flex-wrap: wrap;
    }

    .report-filters {
        grid-template-columns: 1fr;
    }

    .report-filters input,
    .report-filters select {
        min-width: 0;
        width: 100%;
        font-size: 16px;
    }

    .report-filters .filter-group { width: 100%; }
    .report-bar { flex-direction: column; align-items: stretch; }
    .report-bar-actions { margin: 0; }
    .report-scroll { max-height: calc(100vh - 220px); }
    .report-dense th:nth-child(2),
    .report-dense td:nth-child(2) {
        position: static;
        box-shadow: none;
        max-width: 140px;
    }

    .dash-kpis,
    .dash-charts,
    .dash-bottom { grid-template-columns: 1fr; }
    .dash-hero { flex-direction: column; }
    .report-gallery img { width: calc(50% - 6px); height: 100px; }
}

@media (max-width: 480px) {
    .head-user { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    html, body { font-size: 13px; }
    .login-mark { width: 50px; height: 50px; font-size: 24px; }
}

@media (max-width: 1200px) {
    .has-sidenav .form table,
    .has-sidenav .form tbody,
    .has-sidenav .form tr {
        display: block;
        width: 100%;
    }

    .has-sidenav .form td {
        display: block;
        width: 100% !important;
    }

    .dash-kpis { grid-template-columns: repeat(3, 1fr); }
    .dash-hero { flex-wrap: wrap; }
}
