:root {
    --bg: #f4f6f5;
    --surface: #ffffff;
    --surface-soft: #f8faf9;
    --sidebar: #202a2d;
    --sidebar-hover: #2d3a3d;
    --primary: #365f61;
    --primary-dark: #294b4d;
    --secondary: #5d7375;
    --text: #20292d;
    --text-muted: #68777c;
    --border: #d8dfdd;
    --success: #3f6f55;
    --success-soft: #e8f2ec;
    --warning: #9a6a20;
    --warning-soft: #faf1df;
    --danger: #a54848;
    --danger-soft: #f8e8e8;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(31, 45, 48, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.topbar {
    min-height: 70px;
    padding: 14px 30px;
    background: var(--sidebar);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 5px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.topbar h1 {
    margin: 0;
    font-size: 19px;
    font-weight: 650;
}

.topbar p {
    margin: 2px 0 0;
    color: #b8c4c6;
    font-size: 12px;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-name {
    font-size: 13px;
    color: #e4e9e8;
}

.role-badge {
    padding: 3px 8px;
    border: 1px solid #617174;
    border-radius: 4px;
    color: #dce4e3;
    font-size: 11px;
    text-transform: uppercase;
}

.main-nav {
    min-height: 48px;
    padding: 0 30px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
}

.nav-links,
.nav-actions {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
}

.main-nav a {
    display: flex;
    align-items: center;
    padding: 0 13px;
    color: #536267;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    font-size: 13px;
}

.main-nav a:hover {
    color: var(--primary-dark);
    background: var(--surface-soft);
}

.main-nav a.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.main-nav .logout-link {
    color: var(--danger);
}

.container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px 30px 40px;
}

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

.card {
    margin-bottom: 16px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card h2 {
    margin: 0 0 14px;
    color: #263438;
    font-size: 17px;
    font-weight: 650;
}

.card h3 {
    margin-top: 0;
}

.narrow {
    max-width: 620px;
}

.metric {
    margin-top: 8px;
    color: var(--primary-dark);
    font-size: 30px;
    font-weight: 700;
}

.actions,
.action-cell,
.filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter {
    margin-bottom: 16px;
}

.top-gap {
    margin-top: 16px;
}

button,
.button,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

button,
.button {
    background: var(--primary);
    color: #ffffff;
}

button:hover,
.button:hover {
    background: var(--primary-dark);
}

.button-secondary {
    background: #ffffff;
    border-color: var(--border);
    color: #3c4b50;
}

.button-secondary:hover {
    background: var(--surface-soft);
}

.danger {
    background: var(--danger) !important;
    color: #ffffff !important;
}

label,
.form-label,
.field-title {
    display: block;
    margin: 14px 0 6px;
    color: #344348;
    font-size: 13px;
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    min-width: 180px;
    padding: 9px 11px;
    background: #ffffff;
    color: var(--text);
    border: 1px solid #c9d2d0;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(54, 95, 97, 0.12);
}

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

form input,
form select,
form textarea {
    margin-bottom: 8px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox input {
    width: auto;
    min-width: 0;
}

.table-wrap {
    max-height: 540px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 10px 11px;
    border-bottom: 1px solid #e4e9e7;
    text-align: left;
    vertical-align: top;
    font-size: 13px;
}

th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eef2f1;
    color: #3c4b50;
    font-weight: 650;
}

tbody tr:hover {
    background: #f8faf9;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    background: #e7eeee;
    color: #385658;
    font-size: 11px;
    font-weight: 650;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.detail-header > div:first-child {
    flex: 1;
}

.detail-header .actions {
    margin-left: auto;
    justify-content: flex-end;
}

.detail-header form,
.action-cell form {
    margin: 0;
}

.detail-header input {
    max-width: 240px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.detail-item {
    padding: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.detail-item .label {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 650;
}

.detail-item .value {
    white-space: pre-wrap;
}

.alert-error,
.alert-warning,
.success {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-weight: 600;
}

.alert-error {
    background: var(--danger-soft);
    color: #853838;
    border: 1px solid #e7c3c3;
}

.alert-warning {
    background: var(--warning-soft);
    color: #805718;
    border: 1px solid #ead7ad;
}

.success {
    background: var(--success-soft);
    color: #315c45;
    border: 1px solid #c8ded1;
}

.hint {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.login-body {
    min-height: 100vh;
    padding: 20px;
    background: var(--sidebar);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 380px;
    padding: 26px;
    background: #ffffff;
    border: 1px solid #475458;
    border-radius: var(--radius);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
}

.login-card h1 {
    margin-top: 0;
    color: #263438;
    font-size: 22px;
}

.login-card button {
    width: 100%;
    margin-top: 16px;
}

.alert {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--danger-soft);
    color: #853838;
    border-radius: var(--radius);
}

@media (max-width: 1050px) {
    .main-nav {
        padding: 0 18px;
        flex-direction: column;
        gap: 0;
    }

    .nav-links,
    .nav-actions {
        min-height: 44px;
    }

    .container {
        padding: 20px 18px 35px;
    }

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

@media (max-width: 650px) {
    .topbar {
        padding: 12px 16px;
        align-items: flex-start;
    }

    .user-area {
        flex-direction: column;
        align-items: flex-end;
    }

    .main-nav {
        padding: 0 8px;
    }

    .main-nav a {
        padding: 0 10px;
    }

    .container {
        padding: 16px 12px 30px;
    }

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

    .card {
        padding: 14px;
    }

    .detail-header {
        flex-direction: column;
    }

    .detail-header .actions {
        margin-left: 0;
    }
}

/* Dashboard V3 */
.dashboard-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.dashboard-heading h2 {
    margin: 2px 0 3px;
    color: #263438;
    font-size: 24px;
    font-weight: 680;
}

.page-description {
    margin: 0;
    color: var(--text-muted);
}

.eyebrow {
    margin: 0 0 3px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

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

.metric-card {
    min-height: 170px;
    padding: 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.metric-card-warning {
    border-color: #dfc994;
    background: #fffdf8;
}

.metric-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.metric-label {
    color: #526166;
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.metric-neutral {
    background: #77888c;
}

.metric-teal {
    background: var(--primary);
}

.metric-success {
    background: var(--success);
}

.metric-warning {
    background: var(--warning);
}

.metric-value {
    margin-top: 13px;
    color: #253337;
    font-size: 33px;
    line-height: 1;
    font-weight: 720;
}

.metric-note {
    margin: 9px 0 13px;
    color: var(--text-muted);
    font-size: 12px;
}

.metric-link {
    margin-top: auto;
    color: var(--primary);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

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

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(280px, 0.8fr);
    gap: 16px;
    align-items: start;
}

.dashboard-main,
.dashboard-side {
    min-width: 0;
}

.section-header {
    margin-bottom: 13px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.section-header h2 {
    margin: 0;
}

.section-link {
    color: var(--primary);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

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

.dashboard-table {
    max-height: 430px;
}

.due-badge {
    display: inline-block;
    min-width: 47px;
    padding: 3px 7px;
    background: #eef2f1;
    border-radius: 4px;
    color: #526166;
    font-size: 11px;
    font-weight: 650;
    text-align: center;
}

.due-today {
    background: var(--danger-soft);
    color: var(--danger);
}

.due-soon {
    background: var(--warning-soft);
    color: var(--warning);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.table-actions a {
    color: var(--primary);
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
}

.table-actions a:hover {
    text-decoration: underline;
}

.empty-state {
    padding: 30px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-align: center;
}

.empty-state strong {
    margin-bottom: 3px;
    color: #3c4b50;
}

.quick-list {
    display: flex;
    flex-direction: column;
}

.quick-list a {
    padding: 12px 2px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quick-list a:first-child {
    padding-top: 2px;
}

.quick-list a:last-child {
    padding-bottom: 2px;
    border-bottom: 0;
}

.quick-list a:hover strong,
.quick-list a:hover .quick-arrow {
    color: var(--primary);
}

.quick-list span:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.quick-list strong {
    color: #344348;
    font-size: 13px;
}

.quick-list small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
}

.quick-arrow {
    color: #829093;
    font-size: 16px;
}

.summary-card h2 {
    margin-bottom: 18px;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.summary-row strong {
    color: #344348;
    font-size: 14px;
}

.summary-row-border {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.progress-track {
    width: 100%;
    height: 6px;
    margin-top: 9px;
    background: #e5ebe9;
    border-radius: 3px;
    overflow: hidden;
}

.progress-value {
    height: 100%;
    background: var(--success);
    border-radius: 3px;
}

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

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

    .dashboard-side {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 650px) {
    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid,
    .dashboard-side {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 150px;
    }
}

/* Recent Activity */
.recent-activity-card {
    margin-top: 16px;
}

.recent-list {
    display: flex;
    flex-direction: column;
}

.recent-item {
    padding: 13px 2px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.recent-item:first-child {
    padding-top: 2px;
}

.recent-item:last-child {
    padding-bottom: 2px;
    border-bottom: 0;
}

.recent-item:hover .recent-title-row strong,
.recent-item:hover .quick-arrow {
    color: var(--primary);
}

.recent-main {
    min-width: 0;
    flex: 1;
}

.recent-title-row {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.recent-title-row strong {
    color: #344348;
    font-size: 13px;
}

.recent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    color: var(--text-muted);
    font-size: 11px;
}

.status-badge {
    padding: 3px 7px;
    border-radius: 4px;
    background: #e7eeee;
    color: #385658;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.status-completed,
.status-done,
.status-solved {
    background: var(--success-soft);
    color: var(--success);
}

.status-pending,
.status-need-follow-up,
.status-follow-up {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-failed,
.status-cancelled,
.status-overdue {
    background: var(--danger-soft);
    color: var(--danger);
}

@media (max-width: 650px) {
    .recent-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Navbar V5 */
.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nav-dropdown summary {
    min-height: 48px;
    padding: 0 13px;
    color: #536267;
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    white-space: nowrap;
}

.nav-dropdown summary::-webkit-details-marker {
    display: none;
}

.nav-dropdown summary::after {
    content: "▾";
    margin-left: 7px;
    color: #829093;
    font-size: 10px;
}

.nav-dropdown summary:hover {
    color: var(--primary-dark);
    background: var(--surface-soft);
}

.nav-dropdown summary.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.nav-dropdown[open] summary {
    color: var(--primary-dark);
    background: var(--surface-soft);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 50;
    min-width: 190px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 24px rgba(31, 45, 48, 0.14);
}

.nav-dropdown-menu a {
    min-height: 36px;
    padding: 8px 10px;
    border: 0;
    border-radius: 4px;
    color: #435257;
    display: flex;
    align-items: center;
}

.nav-dropdown-menu a:hover {
    background: #eef3f1;
    color: var(--primary-dark);
}

@media (max-width: 1050px) {
    .nav-dropdown summary {
        min-height: 44px;
    }
}

@media (max-width: 650px) {
    .nav-dropdown-menu {
        position: fixed;
        top: auto;
        left: 12px;
        right: 12px;
        min-width: 0;
    }
}

/* Fix navbar dropdown visibility */
.main-nav {
    overflow: visible;
}

.nav-links {
    overflow: visible;
}

.nav-dropdown {
    overflow: visible;
}

.nav-dropdown-menu {
    display: none;
}

.nav-dropdown[open] .nav-dropdown-menu {
    display: block;
}

/* Activity UI V7 */
.page-heading {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.page-heading h2 {
    margin: 2px 0 3px;
    color: #263438;
    font-size: 24px;
    font-weight: 680;
}

.activity-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
}

.filter-field label {
    margin: 0 0 5px;
    color: #526166;
    font-size: 12px;
}

.filter-field input {
    margin: 0;
    min-width: 0;
}

.filter-keyword {
    grid-column: span 2;
}

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

.filter-active-label,
.record-count {
    padding: 4px 8px;
    background: #e7eeee;
    border-radius: 4px;
    color: #385658;
    font-size: 11px;
    font-weight: 650;
}

.activity-table-wrap {
    max-height: 620px;
}

.activity-table {
    min-width: 1100px;
}

.report-id-link {
    color: var(--primary);
    font-weight: 650;
    text-decoration: none;
}

.report-id-link:hover {
    text-decoration: underline;
}

.work-title {
    color: #344348;
    font-weight: 600;
}

.work-type {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 11px;
}

.row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.row-actions form {
    margin: 0;
}

.action-link {
    padding: 4px 7px;
    background: #eef3f1;
    border-radius: 4px;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
}

.action-link:hover {
    background: #dfe9e6;
}

.action-delete {
    min-height: 0;
    padding: 4px 7px;
    background: transparent;
    border: 1px solid #dfbcbc;
    border-radius: 4px;
    color: var(--danger);
    font-size: 11px;
}

.action-delete:hover {
    background: var(--danger-soft);
}

@media (max-width: 1050px) {
    .activity-filter {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-keyword {
        grid-column: span 1;
    }
}

@media (max-width: 650px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .activity-filter {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        width: 100%;
    }

    .filter-actions button,
    .filter-actions .button-secondary {
        flex: 1;
    }
}

/* Maintenance UI V8 */
.maintenance-filter {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
}

.maintenance-table-wrap {
    max-height: 650px;
}

.maintenance-table {
    min-width: 1500px;
}

.pm-badge {
    display: inline-block;
    padding: 3px 7px;
    background: #e7eeee;
    border-radius: 4px;
    color: #385658;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.text-column {
    min-width: 180px;
    max-width: 280px;
    color: #526166;
    line-height: 1.45;
}

.status-pending {
    background: var(--warning-soft);
    color: var(--warning);
}

.status-done,
.status-completed {
    background: var(--success-soft);
    color: var(--success);
}

.status-need-follow-up,
.status-follow-up,
.status-followup {
    background: #f7ead7;
    color: #93621d;
}

.status-rescheduled {
    background: #e8edf5;
    color: #49627f;
}

.status-cancelled,
.status-overdue,
.status-failed {
    background: var(--danger-soft);
    color: var(--danger);
}

@media (max-width: 1050px) {
    .maintenance-filter {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .maintenance-filter {
        grid-template-columns: 1fr;
    }
}

/* Maintenance Advanced Filter */
.filter-keyword {
    grid-column: span 2;
}

.advanced-filter {
    grid-column: 1 / -1;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.advanced-filter summary {
    width: fit-content;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.advanced-filter-grid {
    margin-top: 14px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

@media (max-width: 1050px) {
    .filter-keyword {
        grid-column: span 1;
    }

    .advanced-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .advanced-filter-grid {
        grid-template-columns: 1fr;
    }
}

/* Activity Form UI V10 */
.activity-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-section {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-section-heading {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form-section-heading h3 {
    margin: 0;
    color: #344348;
    font-size: 16px;
}

.form-section-heading p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.form-section-number {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    background: #e7eeee;
    border-radius: 4px;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.form-field {
    min-width: 0;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field label {
    margin: 0 0 6px;
}

.form-field input,
.form-field select,
.form-field textarea {
    margin: 0;
    min-width: 0;
}

.form-field textarea {
    min-height: 110px;
}

.required-mark {
    color: var(--danger);
}

.existing-file {
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.existing-file span {
    color: var(--text-muted);
    font-size: 11px;
}

.existing-file strong {
    color: #344348;
    font-size: 12px;
    word-break: break-word;
}

.form-submit-bar {
    padding: 15px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.form-submit-note {
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 750px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-wide {
        grid-column: auto;
    }

    .form-submit-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .form-submit-bar .actions {
        width: 100%;
    }

    .form-submit-bar .button-secondary,
    .form-submit-bar button {
        flex: 1;
    }
}

/* Maintenance Form UI V12 */
.maintenance-entry-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.readonly-field {
    min-height: 42px;
    padding: 10px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: #526166;
    display: flex;
    align-items: center;
}

.field-help {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}

.recurring-panel {
    margin-top: 16px;
    padding: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.maintenance-pm-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
}

.maintenance-pm-summary > div {
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.maintenance-pm-summary span {
    color: var(--text-muted);
    font-size: 11px;
}

.maintenance-pm-summary strong {
    color: #344348;
    font-size: 13px;
}

@media (max-width: 650px) {
    .maintenance-pm-summary {
        grid-template-columns: 1fr;
    }
}

/* Maintenance Detail UI V15 */
.maintenance-detail-hero {
    margin-bottom: 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.maintenance-detail-title h3 {
    margin: 4px 0;
    color: #334247;
    font-size: 21px;
}

.maintenance-detail-title p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.maintenance-id {
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.maintenance-detail-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-section {
    margin-bottom: 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.detail-section-heading {
    margin-bottom: 16px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.detail-section-heading h3 {
    margin: 2px 0 0;
    color: #344348;
    font-size: 16px;
}

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

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

.detail-card {
    min-width: 0;
    padding: 13px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.detail-label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.detail-value {
    display: block;
    color: #35454a;
    font-size: 13px;
    line-height: 1.45;
}

.detail-break {
    overflow-wrap: anywhere;
}

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

.detail-text-card {
    min-height: 120px;
    padding: 15px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.detail-text-wide {
    grid-column: 1 / -1;
    min-height: auto;
}

.detail-long-value {
    color: #45565b;
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.empty-value {
    color: var(--text-muted);
    font-style: italic;
}

.detail-footer-actions {
    padding: 15px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

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

@media (max-width: 700px) {
    .maintenance-detail-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-grid,
    .detail-grid-four,
    .detail-text-grid {
        grid-template-columns: 1fr;
    }

    .detail-text-wide {
        grid-column: auto;
    }

    .detail-footer-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-footer-actions .button,
    .detail-footer-actions .button-secondary {
        text-align: center;
    }
}

/* Activity Detail UI V16 */
.activity-detail-hero {
    margin-bottom: 16px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.activity-detail-title h3 {
    margin: 4px 0;
    color: #334247;
    font-size: 21px;
}

.activity-detail-title p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.activity-report-id {
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.activity-detail-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.activity-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    background: #e7eeee;
    border-radius: 4px;
    color: #385658;
    font-size: 11px;
    font-weight: 700;
}

.status-completed-with-finding {
    background: #f7ead7;
    color: #93621d;
}

.activity-evidence-card {
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.activity-evidence-card strong {
    display: block;
    max-width: 700px;
    color: #35454a;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.activity-empty-evidence {
    padding: 18px;
    background: var(--surface-soft);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 700px) {
    .activity-detail-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .activity-evidence-card {
        align-items: stretch;
        flex-direction: column;
    }

    .activity-evidence-card .button-secondary {
        text-align: center;
    }
}

/* Master Data UI V17 */
.master-summary-grid {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.master-summary-card {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.master-summary-card span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.master-summary-card strong {
    display: block;
    margin: 7px 0 3px;
    color: #334247;
    font-size: 25px;
}

.master-summary-card small {
    color: var(--text-muted);
    font-size: 11px;
}

.master-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.master-panel {
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.master-panel-header {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.master-panel-header h3 {
    margin: 2px 0 4px;
    color: #344348;
    font-size: 17px;
}

.master-panel-header p:last-child {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.master-add-form {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.master-add-form button {
    min-height: 42px;
}

.master-toolbar {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px;
    gap: 12px;
    align-items: end;
}

.master-toolbar label {
    display: block;
    margin-bottom: 6px;
}

.master-toolbar input,
.master-toolbar select {
    margin: 0;
}

.master-table-wrap {
    max-height: 520px;
}

.master-table {
    min-width: 850px;
}

.master-name {
    color: #35454a;
    font-size: 13px;
}

.status-active {
    background: var(--success-soft);
    color: var(--success);
}

.status-inactive {
    background: #edf0f1;
    color: #68767a;
}

.action-deactivate,
.action-activate {
    min-height: auto;
    padding: 6px 9px;
    border-radius: 4px;
    font-size: 11px;
}

.action-deactivate {
    background: var(--danger-soft);
    color: var(--danger);
}

.action-activate {
    background: var(--success-soft);
    color: var(--success);
}

.master-no-result[hidden] {
    display: none;
}

@media (max-width: 950px) {
    .master-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .master-summary-grid {
        grid-template-columns: 1fr;
    }

    .master-add-form,
    .master-toolbar {
        grid-template-columns: 1fr;
    }

    .master-add-form button {
        width: 100%;
    }
}

/* User Management UI V18 */
.user-summary-grid {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.user-summary-card {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.user-summary-card span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.user-summary-card strong {
    display: block;
    margin: 7px 0 3px;
    color: #334247;
    font-size: 25px;
}

.user-summary-card small {
    color: var(--text-muted);
    font-size: 11px;
}

.user-toolbar {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 12px;
    align-items: end;
}

.user-table-wrap {
    max-height: 620px;
}

.user-table {
    min-width: 900px;
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 9px;
}

.user-identity > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.user-identity strong {
    color: #35454a;
    font-size: 13px;
}

.user-identity small {
    color: var(--primary);
    font-size: 10px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    background: #e7eeee;
    border-radius: 50%;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-large {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 15px;
}

.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.role-admin {
    background: #ece8f4;
    color: #665181;
}

.role-engineer {
    background: #e7eeee;
    color: #385658;
}

.role-viewer {
    background: #edf0f1;
    color: #68767a;
}

.user-form-card {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.user-entry-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.user-access-heading {
    margin-top: 4px;
}

.user-edit-identity {
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-edit-identity > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-edit-identity span {
    color: var(--text-muted);
    font-size: 11px;
}

.user-edit-identity strong {
    color: #35454a;
    font-size: 15px;
}

.user-active-toggle {
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-active-toggle input {
    width: auto;
    margin: 0;
}

.user-active-toggle span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-active-toggle strong {
    color: #35454a;
    font-size: 12px;
}

.user-active-toggle small {
    color: var(--text-muted);
    font-size: 10px;
}

.password-warning {
    padding: 11px 13px;
    background: #f7ead7;
    border: 1px solid #ead6b8;
    border-radius: var(--radius);
    color: #80591e;
    font-size: 11px;
    line-height: 1.5;
}

#user_no_result[hidden] {
    display: none;
}

@media (max-width: 950px) {
    .user-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .user-toolbar .filter-field:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .user-summary-grid,
    .user-toolbar {
        grid-template-columns: 1fr;
    }

    .user-toolbar .filter-field:first-child {
        grid-column: auto;
    }
}

/* User Management UI V18 */
.user-summary-grid {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.user-summary-card {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.user-summary-card span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.user-summary-card strong {
    display: block;
    margin: 7px 0 3px;
    color: #334247;
    font-size: 25px;
}

.user-summary-card small {
    color: var(--text-muted);
    font-size: 11px;
}

.user-toolbar {
    margin-bottom: 14px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 12px;
    align-items: end;
}

.user-table-wrap {
    max-height: 620px;
}

.user-table {
    min-width: 900px;
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 9px;
}

.user-identity > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.user-identity strong {
    color: #35454a;
    font-size: 13px;
}

.user-identity small {
    color: var(--primary);
    font-size: 10px;
}

.user-avatar {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    background: #e7eeee;
    border-radius: 50%;
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-large {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 15px;
}

.role-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.role-admin {
    background: #ece8f4;
    color: #665181;
}

.role-engineer {
    background: #e7eeee;
    color: #385658;
}

.role-viewer {
    background: #edf0f1;
    color: #68767a;
}

.user-form-card {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.user-entry-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.user-access-heading {
    margin-top: 4px;
}

.user-edit-identity {
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-edit-identity > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-edit-identity span {
    color: var(--text-muted);
    font-size: 11px;
}

.user-edit-identity strong {
    color: #35454a;
    font-size: 15px;
}

.user-active-toggle {
    min-height: 46px;
    margin: 0;
    padding: 10px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-active-toggle input {
    width: auto;
    margin: 0;
}

.user-active-toggle span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-active-toggle strong {
    color: #35454a;
    font-size: 12px;
}

.user-active-toggle small {
    color: var(--text-muted);
    font-size: 10px;
}

.password-warning {
    padding: 11px 13px;
    background: #f7ead7;
    border: 1px solid #ead6b8;
    border-radius: var(--radius);
    color: #80591e;
    font-size: 11px;
    line-height: 1.5;
}

#user_no_result[hidden] {
    display: none;
}

@media (max-width: 950px) {
    .user-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .user-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .user-toolbar .filter-field:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .user-summary-grid,
    .user-toolbar {
        grid-template-columns: 1fr;
    }

    .user-toolbar .filter-field:first-child {
        grid-column: auto;
    }
}

/* Audit Log UI V19 */
.audit-summary-grid {
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.audit-summary-card {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.audit-summary-card span {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.audit-summary-card strong {
    display: block;
    margin: 7px 0 3px;
    color: #334247;
    font-size: 25px;
}

.audit-summary-card small {
    color: var(--text-muted);
    font-size: 11px;
}

.audit-toolbar {
    display: grid;
    grid-template-columns:
        minmax(260px, 2fr)
        minmax(150px, 1fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr);
    gap: 12px;
    align-items: end;
}

.audit-keyword-filter {
    grid-column: span 2;
}

.audit-toolbar .filter-actions {
    grid-column: span 2;
}

.audit-table-wrap {
    max-height: 680px;
}

.audit-table {
    min-width: 1450px;
}

.audit-time {
    min-width: 150px;
    white-space: nowrap;
}

.audit-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.audit-user strong {
    color: #35454a;
    font-size: 12px;
}

.audit-module-badge,
.audit-record-id {
    display: inline-block;
    padding: 4px 7px;
    background: #edf0f1;
    border-radius: 4px;
    color: #59686c;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.audit-record-id {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audit-action-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.audit-action-create,
.audit-action-create-single,
.audit-action-create-recurring,
.audit-action-activate {
    background: var(--success-soft);
    color: var(--success);
}

.audit-action-update {
    background: #e8edf5;
    color: #49627f;
}

.audit-action-deactivate {
    background: #f7ead7;
    color: #93621d;
}

.audit-action-delete {
    background: var(--danger-soft);
    color: var(--danger);
}

.audit-value {
    min-width: 190px;
    max-width: 300px;
    padding: 7px 9px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.audit-old-value {
    background: #f4eeee;
    color: #755b5b;
}

.audit-new-value {
    background: #edf3f0;
    color: #48665a;
}

#audit_no_result[hidden] {
    display: none;
}

@media (max-width: 1050px) {
    .audit-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .audit-toolbar {
        grid-template-columns: repeat(2, 1fr);
    }

    .audit-keyword-filter {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .audit-summary-grid,
    .audit-toolbar {
        grid-template-columns: 1fr;
    }

    .audit-keyword-filter,
    .audit-toolbar .filter-actions {
        grid-column: auto;
    }
}

/* Login UI Mobile V21 */
.login-body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    padding: 0;
    overflow-x: hidden;
    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(57, 111, 115, 0.30),
            transparent 36%
        ),
        linear-gradient(
            160deg,
            #13272d 0%,
            #182d33 48%,
            #102229 100%
        );
    color: #26383d;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.login-page {
    min-height: 100vh;
    min-height: 100svh;
    box-sizing: border-box;
    padding:
        max(32px, env(safe-area-inset-top))
        18px
        max(20px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: min(100%, 420px);
    box-sizing: border-box;
    padding: 32px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 22px;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.24),
        0 4px 16px rgba(0, 0, 0, 0.08);
}

.login-brand {
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.login-logo {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 14px;
    background: linear-gradient(145deg, #31656a, #204b50);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(42, 91, 96, 0.25);
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.login-brand-text span {
    color: #20363b;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-brand-text small {
    margin-top: 4px;
    color: #6e8084;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-heading {
    margin-bottom: 25px;
}

.login-heading h1 {
    margin: 0 0 8px;
    color: #24373c;
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.login-heading p {
    max-width: 330px;
    margin: 0;
    color: #758589;
    font-size: 13px;
    line-height: 1.55;
}

.login-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #efcccc;
    border-radius: 11px;
    background: #fff1f1;
    color: #a64040;
    font-size: 12px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.login-field label {
    margin: 0;
    color: #3c5055;
    font-size: 12px;
    font-weight: 700;
}

.login-input-wrap {
    position: relative;
    width: 100%;
}

.login-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 2;
    color: #829296;
    display: flex;
    transform: translateY(-50%);
    pointer-events: none;
}

.login-input-wrap input {
    width: 100%;
    height: 52px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 46px;
    border: 1px solid #d4dddf;
    border-radius: 12px;
    outline: none;
    background: #f9fbfb;
    color: #26393e;
    font-size: 15px;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.login-input-wrap input::placeholder {
    color: #a2afb2;
}

.login-input-wrap input:focus {
    border-color: #43787c;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(67, 120, 124, 0.13);
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #78898d;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #edf3f3;
    color: #345f63;
}

.login-submit {
    width: 100%;
    height: 52px;
    margin-top: 3px;
    padding: 0 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #376d72, #285b60);
    color: #ffffff;
    font-size: 14px;
    font-weight: 750;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 10px 22px rgba(45, 101, 106, 0.22);
    cursor: pointer;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.login-submit:hover {
    background: linear-gradient(135deg, #31666b, #224f54);
    box-shadow: 0 12px 26px rgba(45, 101, 106, 0.28);
    transform: translateY(-1px);
}

.login-submit:active {
    transform: translateY(0);
}

.login-security-note {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e7ecec;
    color: #849397;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-footer {
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 10px;
    text-align: center;
}

/* Mobile login */
@media (max-width: 600px) {
    .login-page {
        justify-content: flex-start;
        padding:
            max(52px, calc(env(safe-area-inset-top) + 32px))
            16px
            max(24px, env(safe-area-inset-bottom));
    }

    .login-card {
        width: 100%;
        max-width: 440px;
        padding: 27px 21px;
        border-radius: 20px;
    }

    .login-brand {
        margin-bottom: 25px;
    }

    .login-logo {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 13px;
    }

    .login-heading h1 {
        font-size: 24px;
    }

    .login-heading p {
        font-size: 12px;
    }

    .login-input-wrap input,
    .login-submit {
        height: 54px;
    }
}

/* Very small mobile */
@media (max-width: 360px) {
    .login-page {
        padding-left: 12px;
        padding-right: 12px;
        padding-top: 32px;
    }

    .login-card {
        padding: 23px 17px;
        border-radius: 17px;
    }

    .login-brand-text span {
        font-size: 15px;
    }

    .login-heading h1 {
        font-size: 22px;
    }
}

/* Landscape mobile */
@media (max-height: 620px) and (orientation: landscape) {
    .login-page {
        justify-content: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .login-card {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .login-brand {
        margin-bottom: 17px;
    }

    .login-heading {
        margin-bottom: 18px;
    }

    .login-security-note {
        margin-top: 17px;
        padding-top: 14px;
    }

    .login-footer {
        margin-top: 14px;
    }
}

/* Fix Password Toggle Mobile V22 */
.login-input-wrap {
    position: relative;
    display: block;
}

.login-input-wrap input[type="password"],
.login-input-wrap input[type="text"] {
    padding-left: 46px;
    padding-right: 56px;
}

.login-card .password-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 9px !important;
    left: auto !important;

    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    box-shadow: none !important;

    color: #657b80 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    transform: translateY(-50%) !important;
    cursor: pointer;
    z-index: 4;
}

.login-card .password-toggle:hover,
.login-card .password-toggle:focus,
.login-card .password-toggle:focus-visible,
.login-card .password-toggle:active {
    width: 38px !important;
    background: #edf3f3 !important;
    color: #315f64 !important;
    box-shadow: none !important;
    outline: none !important;
    transform: translateY(-50%) !important;
}

.login-card .password-toggle svg {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    pointer-events: none;
}

@media (max-width: 600px) {
    .login-card .password-toggle {
        right: 10px !important;
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
    }
}

/* Account Password Link V23 */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.account-password-link {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 7px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
}

.account-password-link:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
}

@media (max-width: 760px) {
    .nav-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .account-password-link {
        font-size: 10px;
    }
}

.login-success {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #c9ded2;
    border-radius: 11px;
    background: #edf7f1;
    color: #3e6b52;
    font-size: 12px;
    line-height: 1.5;
}

/* User Account Dropdown V24 */
.topbar {
    position: relative;
    z-index: 100;
}

.user-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.user-menu-dropdown {
    position: relative;
}

.user-menu-dropdown > summary {
    list-style: none;
}

.user-menu-dropdown > summary::-webkit-details-marker {
    display: none;
}

.user-menu-trigger {
    min-height: 42px;
    margin: 0;
    padding: 5px 8px 5px 5px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    transition:
        background 0.18s ease,
        border-color 0.18s ease;
}

.user-menu-trigger:hover,
.user-menu-dropdown[open] .user-menu-trigger {
    border-color: rgba(255, 255, 255, 0.30);
    background: rgba(255, 255, 255, 0.13);
}

.user-menu-avatar {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-menu-name {
    max-width: 160px;
    overflow: hidden;
    color: #ffffff;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-chevron {
    width: 7px;
    height: 7px;
    margin: 0 3px 3px 2px;
    border-right: 1.5px solid rgba(255, 255, 255, 0.75);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.75);
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.user-menu-dropdown[open] .user-menu-chevron {
    margin-bottom: -3px;
    transform: rotate(225deg);
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 300;
    width: 245px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #dfe6e7;
    border-radius: 13px;
    box-shadow:
        0 18px 45px rgba(15, 35, 41, 0.20),
        0 3px 10px rgba(15, 35, 41, 0.08);
}

.user-menu-panel::before {
    content: "";
    position: absolute;
    top: -5px;
    right: 20px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-top: 1px solid #dfe6e7;
    border-left: 1px solid #dfe6e7;
    transform: rotate(45deg);
}

.user-menu-identity {
    position: relative;
    z-index: 1;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-menu-avatar-large {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    background: #e6eeee;
    color: #315f64;
    font-size: 13px;
}

.user-menu-identity > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-menu-identity strong {
    overflow: hidden;
    color: #2d4146;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-identity small {
    color: #7c8d91;
    font-size: 10px;
}

.user-menu-divider {
    height: 1px;
    margin: 5px 4px;
    background: #e7ecec;
}

.user-menu-item {
    min-height: 41px;
    padding: 0 10px;
    border-radius: 8px;
    color: #40575c;
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    transition:
        color 0.16s ease,
        background 0.16s ease;
}

.user-menu-item:hover {
    background: #edf3f3;
    color: #285a5f;
}

.user-menu-item-icon {
    width: 20px;
    flex: 0 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-menu-logout {
    color: #a34c4c;
}

.user-menu-logout:hover {
    background: #fff0f0;
    color: #8d3535;
}

/* Navigation sekarang tidak memiliki action kanan */
.main-nav {
    justify-content: flex-start;
}

.nav-links {
    width: 100%;
}

/* Mobile user dropdown */
@media (max-width: 760px) {
    .topbar {
        align-items: center;
    }

    .user-menu-trigger {
        min-height: 38px;
        padding: 4px 7px 4px 4px;
        border-radius: 10px;
    }

    .user-menu-avatar {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
    }

    .user-menu-name {
        max-width: 105px;
        font-size: 10px;
    }

    .user-menu-panel {
        position: fixed;
        top: 67px;
        right: 12px;
        width: min(245px, calc(100vw - 24px));
    }

    .user-menu-panel::before {
        right: 24px;
    }
}

@media (max-width: 420px) {
    .user-menu-name {
        max-width: 80px;
    }

    .user-menu-panel {
        top: 64px;
    }
}

/* UI Efficiency V25 */

/* Compact filter */
.compact-filter-form {
    display: grid;
    grid-template-columns:
        minmax(230px, 2fr)
        repeat(2, minmax(150px, 1fr))
        auto;
    gap: 12px;
    align-items: end;
}

.compact-filter-form .filter-field {
    margin: 0;
}

.compact-filter-form .filter-keyword {
    grid-column: auto;
}

.compact-filter-form .filter-actions {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.compact-filter-form .filter-actions button,
.compact-filter-form .filter-actions .button-secondary {
    min-height: 42px;
    margin: 0;
    padding: 0 15px;
    white-space: nowrap;
}

/* Advanced filter */
.advanced-filter {
    grid-column: 1 / -1;
    margin-top: 2px;
    border-top: 1px solid var(--border);
}

.advanced-filter > summary {
    min-height: 42px;
    padding: 10px 2px 2px;
    color: var(--primary-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 9px;
}

.advanced-filter > summary::-webkit-details-marker {
    display: none;
}

.advanced-filter > summary::before {
    content: "+";
    width: 21px;
    height: 21px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.advanced-filter[open] > summary::before {
    content: "−";
}

.advanced-filter > summary span {
    font-size: 11px;
    font-weight: 750;
}

.advanced-filter > summary small {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 400;
}

.advanced-filter-grid,
.advanced-filter > .filter-grid {
    padding-top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

/* Ringkas tabel Maintenance tanpa membuang datanya */
.maintenance-table th:nth-child(4),
.maintenance-table td:nth-child(4),
.maintenance-table th:nth-child(8),
.maintenance-table td:nth-child(8),
.maintenance-table th:nth-child(10),
.maintenance-table td:nth-child(10),
.maintenance-table th:nth-child(11),
.maintenance-table td:nth-child(11),
.maintenance-table th:nth-child(12),
.maintenance-table td:nth-child(12) {
    display: none;
}

.maintenance-table {
    min-width: 900px;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.2;
    text-transform: capitalize;
    white-space: nowrap;
}

.status-completed,
.status-done {
    background: #e6f3eb;
    color: #36704e;
}

.status-pending,
.status-need-follow-up {
    background: #fff1d8;
    color: #8a621f;
}

.status-in-progress,
.status-rescheduled {
    background: #e8eef7;
    color: #48647e;
}

.status-cancelled,
.status-failed {
    background: #fae7e7;
    color: #9a4444;
}

.status-planned,
.status-unknown {
    background: #edf0f1;
    color: #657478;
}

/* Consistent table actions */
.row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.row-actions form {
    margin: 0;
}

.action-link,
.action-delete {
    min-height: 29px;
    box-sizing: border-box;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-link {
    border: 1px solid #d6e0e1;
    background: #f8fafa;
    color: #3f666a;
}

.action-link:hover {
    background: #eaf1f1;
    color: #28585d;
}

.action-delete {
    width: auto !important;
    min-width: auto !important;
    margin: 0 !important;
    border: 1px solid #efd0d0 !important;
    background: #fff4f4 !important;
    color: #a04848 !important;
    box-shadow: none !important;
}

.action-delete:hover {
    background: #fbe5e5 !important;
}

/* Empty state */
.empty-state {
    min-height: 190px;
    padding: 28px 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.empty-state-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 5px;
    border-radius: 13px;
    background: #e8efef;
    color: #3e676b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state strong {
    color: #3a4e53;
    font-size: 13px;
}

.empty-state span {
    color: var(--text-muted);
    font-size: 11px;
}

.empty-state-action {
    min-height: 36px;
    margin-top: 8px;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.empty-state-action:hover {
    background: var(--primary-dark);
    color: #ffffff;
}

/* Tablet */
@media (max-width: 1050px) {
    .compact-filter-form {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .compact-filter-form .filter-actions {
        grid-column: 1 / -1;
    }

    .advanced-filter-grid,
    .advanced-filter > .filter-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

/* Smartphone */
@media (max-width: 650px) {
    .compact-filter-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .compact-filter-form .filter-actions {
        grid-column: auto;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .compact-filter-form .filter-actions button,
    .compact-filter-form .filter-actions .button-secondary {
        width: 100%;
    }

    .advanced-filter-grid,
    .advanced-filter > .filter-grid {
        grid-template-columns: 1fr;
    }

    .advanced-filter > summary {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .advanced-filter > summary small {
        width: calc(100% - 32px);
        margin-left: 30px;
    }

    .maintenance-table {
        min-width: 760px;
    }

    .maintenance-table th:nth-child(5),
    .maintenance-table td:nth-child(5) {
        display: none;
    }

    .empty-state {
        min-height: 160px;
    }
}

/* Mobile Navigation & Dashboard V26A */
.mobile-nav-toggle {
    display: none;
}

/* Dashboard desktop normalization */
.dashboard-main,
.dashboard-side {
    min-width: 0;
}

.dashboard-side {
    align-self: start;
}

@media (max-width: 900px) {
    .dashboard-layout,
    .dashboard-content,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .dashboard-side {
        width: 100%;
    }

    .dashboard-stats,
    .stats-grid,
    .metric-grid,
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .quick-card,
    .summary-card {
        height: auto;
    }
}

@media (max-width: 760px) {
    .topbar {
        min-height: 62px;
        padding: 9px 14px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
        align-items: center;
    }

    .brand-area {
        min-width: 0;
    }

    .brand-area h1 {
        overflow: hidden;
        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-area p {
        display: none;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        font-size: 10px;
    }

    .mobile-nav-toggle {
        width: 39px !important;
        min-width: 39px !important;
        max-width: 39px !important;
        height: 39px !important;
        min-height: 39px !important;
        margin: 0 !important;
        padding: 9px !important;
        border: 1px solid rgba(255,255,255,.18) !important;
        border-radius: 10px !important;
        background: rgba(255,255,255,.08) !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        order: 2;
    }

    .mobile-nav-toggle span {
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: #ffffff;
        transition:
            transform .18s ease,
            opacity .18s ease;
    }

    .mobile-nav-toggle.is-open span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-nav-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-toggle.is-open span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .user-area {
        order: 3;
    }

    .main-nav {
        position: fixed;
        top: 62px;
        left: 10px;
        right: 10px;
        z-index: 250;
        max-height: calc(100svh - 76px);
        padding: 9px;
        border: 1px solid #dce5e6;
        border-radius: 13px;
        background: #ffffff;
        box-shadow:
            0 20px 50px rgba(14, 34, 40, .22),
            0 4px 12px rgba(14, 34, 40, .08);
        overflow-y: auto;
        display: none;
    }

    .main-nav.mobile-nav-open {
        display: block;
    }

    .main-nav .nav-links {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
    }

    .main-nav .nav-links > a,
    .main-nav .nav-dropdown > summary {
        min-height: 43px;
        box-sizing: border-box;
        padding: 0 12px;
        border-radius: 8px;
        color: #42585d;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .main-nav .nav-links > a:hover,
    .main-nav .nav-links > a.active,
    .main-nav .nav-dropdown > summary:hover,
    .main-nav .nav-dropdown > summary.active {
        background: #eaf1f1;
        color: #28585d;
    }

    .main-nav .nav-dropdown {
        width: 100%;
    }

    .main-nav .nav-dropdown-menu {
        position: static;
        width: auto;
        margin: 3px 0 5px 12px;
        padding: 4px;
        border: 0;
        border-left: 2px solid #dce7e7;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .main-nav .nav-dropdown-menu a {
        min-height: 38px;
        padding: 0 11px;
        border-radius: 7px;
        display: flex;
        align-items: center;
    }

    body.mobile-menu-active {
        overflow: hidden;
    }

    /* Dashboard mobile */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-heading {
        margin-bottom: 12px;
        align-items: flex-start;
        gap: 10px;
    }

    .page-heading h2 {
        font-size: 19px;
    }

    .page-description {
        font-size: 11px;
        line-height: 1.5;
    }

    .dashboard-stats,
    .stats-grid,
    .metric-grid,
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .dashboard-stats .card,
    .stats-grid .card,
    .metric-card,
    .stat-card {
        min-height: 105px !important;
        padding: 13px !important;
    }

    .metric-card strong,
    .stat-card strong,
    .dashboard-stats strong {
        font-size: 22px !important;
    }

    .dashboard-main,
    .dashboard-side {
        gap: 10px;
    }

    .dashboard-side .card,
    .dashboard-main .card {
        padding: 14px;
    }

    .quick-list a {
        min-height: 51px;
        padding: 10px 3px;
    }

    .quick-list strong {
        font-size: 11px;
    }

    .quick-list small {
        font-size: 9px;
    }

    .summary-row {
        padding: 9px 0;
    }
}

@media (max-width: 390px) {
    .topbar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .brand-area h1 {
        max-width: 115px;
        font-size: 12px;
    }

    .dashboard-stats,
    .stats-grid,
    .metric-grid,
    .summary-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .dashboard-stats .card,
    .stats-grid .card,
    .metric-card,
    .stat-card {
        padding: 11px !important;
    }
}


/* Pagination V27 */
.pagination-bar {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pagination-summary {
    color: var(--text-muted);
    font-size: 11px;
}

.pagination-summary strong {
    color: #40555a;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.per-page-form {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.per-page-form label {
    margin: 0;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 650;
}

.per-page-form select {
    width: 68px;
    min-height: 34px;
    margin: 0;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 11px;
}

.page-navigation {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-button,
.pagination-number {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #d6e0e1;
    border-radius: 7px;
    background: #f8fafa;
    color: #3c6267;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-button:hover,
.pagination-number:hover {
    background: #eaf1f1;
    color: #28585d;
}

.pagination-number.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.pagination-button.disabled {
    opacity: .4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    width: 24px;
    color: var(--text-muted);
    text-align: center;
    font-size: 11px;
}

@media (max-width: 800px) {
    .pagination-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination-controls {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 560px) {
    .pagination-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .per-page-form {
        justify-content: space-between;
    }

    .page-navigation {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination-summary {
        width: 100%;
    }
}


/* Operational UX V28 */
.global-loading[hidden] {
    display: none !important;
}

.global-loading {
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 20px;
    background: rgba(20, 38, 43, .36);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-loading-card {
    min-width: 230px;
    padding: 17px 19px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 20px 55px rgba(20,38,43,.25);
    display: flex;
    align-items: center;
    gap: 13px;
}

.global-loading-card strong {
    color: #344e53;
    font-size: 12px;
    display: block;
}

.global-loading-card small {
    margin-top: 3px;
    color: #728489;
    font-size: 10px;
    display: block;
}

.loading-spinner {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    border: 3px solid #dde8e8;
    border-top-color: #44777b;
    border-radius: 50%;
    animation: operational-spin .72s linear infinite;
}

@keyframes operational-spin {
    to {
        transform: rotate(360deg);
    }
}

body.global-loading-active {
    overflow: hidden;
}

button.is-processing {
    opacity: .68;
    cursor: wait;
}

.flash-message {
    position: relative;
    padding-right: 42px !important;
    transition:
        opacity .25s ease,
        transform .25s ease;
}

.flash-message.flash-leaving {
    opacity: 0;
    transform: translateY(-7px);
}

.flash-close {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 25px !important;
    min-width: 25px !important;
    height: 25px !important;
    min-height: 25px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: rgba(0,0,0,.06) !important;
    color: inherit !important;
    box-shadow: none !important;
    font-size: 17px !important;
    line-height: 1 !important;
    transform: translateY(-50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.flash-close:hover {
    background: rgba(0,0,0,.11) !important;
}

@media (max-width: 560px) {
    .global-loading-card {
        width: min(100%, 300px);
        min-width: 0;
    }
}

/* Session & Audit V29 */
.session-detail-grid,
.audit-detail-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.session-detail-item,
.audit-detail-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

.session-detail-item span,
.audit-detail-item span {
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
}

.session-detail-item strong,
.audit-detail-item strong {
    color: #3c5358;
    font-size: 11px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    display: block;
}

.session-user-agent {
    grid-column: 1 / -1;
}

.session-status {
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    display: inline-flex;
    align-items: center;
}

.session-status.recorded {
    background: #e6f3eb;
    color: #36704e;
}

.session-status.never {
    background: #edf0f1;
    color: #657478;
}

.audit-explorer-table {
    min-width: 850px;
}

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

@media (max-width: 680px) {
    .session-detail-grid,
    .audit-detail-grid {
        grid-template-columns: 1fr;
    }

    .session-user-agent {
        grid-column: auto;
    }

    .session-table {
        min-width: 760px;
    }
}


/* Native Calendar V31 */
.native-date-picker {
    min-height: 42px;
    cursor: pointer;
}

.native-date-picker::-webkit-calendar-picker-indicator {
    width: 18px;
    height: 18px;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
}

.native-date-picker::-webkit-calendar-picker-indicator:hover {
    background: rgba(67, 112, 116, .10);
}

.native-date-picker:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 112, 116, .12);
}

@media (max-width: 650px) {
    .native-date-picker {
        width: 100%;
        font-size: 16px;
    }
}

/* Monthly Operational Calendar V32 */
.calendar-page-heading {
    align-items: center;
}

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

.calendar-summary-card {
    min-height: 105px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calendar-summary-card span {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.calendar-summary-card strong {
    margin: 4px 0;
    color: #38575c;
    font-size: 26px;
    line-height: 1;
}

.calendar-summary-card small {
    color: var(--text-muted);
    font-size: 10px;
}

.operational-calendar-card {
    padding: 17px;
}

.calendar-toolbar {
    margin-bottom: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.calendar-month-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-navigation-button {
    width: 37px;
    height: 37px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
    color: #3e676b;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-navigation-button:hover {
    background: #e7efef;
    color: #28585d;
}

.calendar-month-title {
    min-width: 175px;
    text-align: center;
}

.calendar-month-title strong {
    color: #354f54;
    font-size: 14px;
    display: block;
}

.calendar-month-title small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 9px;
    display: block;
}

.calendar-category-filter {
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-soft);
    display: flex;
    align-items: center;
    gap: 2px;
}

.calendar-category-filter a {
    min-height: 31px;
    padding: 0 11px;
    border-radius: 7px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.calendar-category-filter a:hover,
.calendar-category-filter a.active {
    background: #ffffff;
    color: #315f64;
    box-shadow: 0 2px 7px rgba(30, 60, 65, .08);
}

.calendar-legend {
    margin-bottom: 11px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.calendar-legend span {
    color: var(--text-muted);
    font-size: 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.calendar-legend-dot.activity {
    background: #527d83;
}

.calendar-legend-dot.maintenance {
    background: #ba8541;
}

.calendar-legend-dot.today {
    border: 2px solid #4f7c80;
    background: #ffffff;
}

.calendar-scroll {
    overflow-x: auto;
}

.calendar-grid {
    min-width: 940px;
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
}

.calendar-weekdays {
    border: 1px solid var(--border);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: var(--surface-soft);
}

.calendar-weekdays > div {
    min-height: 38px;
    padding: 0 10px;
    border-right: 1px solid var(--border);
    color: #597075;
    font-size: 9px;
    font-weight: 750;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-weekdays > div:last-child {
    border-right: 0;
}

.calendar-days {
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.calendar-day {
    min-height: 145px;
    padding: 8px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #ffffff;
}

.calendar-day.outside-month {
    background: #f7f9f9;
    opacity: .52;
}

.calendar-day.today {
    position: relative;
    background: #f4f9f9;
    box-shadow: inset 0 0 0 2px #5b8589;
}

.calendar-day-header {
    min-height: 26px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calendar-day-header > span {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #52676c;
    font-size: 10px;
    font-weight: 750;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.today .calendar-day-header > span {
    background: #527d83;
    color: #ffffff;
}

.calendar-day-header small {
    color: var(--text-muted);
    font-size: 8px;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-event,
.calendar-agenda-event {
    min-width: 0;
    padding: 6px;
    border: 1px solid transparent;
    border-radius: 7px;
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.calendar-event.activity,
.calendar-agenda-event.activity {
    border-color: #d4e3e4;
    background: #edf5f5;
    color: #315f64;
}

.calendar-event.maintenance,
.calendar-agenda-event.maintenance {
    border-color: #eadcc8;
    background: #faf4e9;
    color: #805d2d;
}

.calendar-event:hover,
.calendar-agenda-event:hover {
    filter: brightness(.97);
}

.calendar-event-type {
    min-width: 27px;
    height: 20px;
    padding: 0 4px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .75);
    font-size: 7px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-event-content {
    min-width: 0;
    flex: 1;
}

.calendar-event-content strong {
    overflow: hidden;
    font-size: 9px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.calendar-event-content small {
    margin-top: 2px;
    overflow: hidden;
    color: inherit;
    font-size: 8px;
    line-height: 1.25;
    opacity: .78;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.calendar-event-content em {
    margin-top: 4px;
    font-size: 8px;
    font-style: normal;
    opacity: .7;
    display: block;
}

.calendar-more-events {
    padding-left: 4px;
    color: var(--text-muted);
    font-size: 8px;
}

.calendar-mobile-view {
    display: none;
}

.calendar-agenda-day {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
}

.calendar-agenda-date {
    text-align: center;
}

.calendar-agenda-date strong {
    color: #3c6267;
    font-size: 24px;
    line-height: 1;
    display: block;
}

.calendar-agenda-date span {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 8px;
    line-height: 1.3;
    display: block;
}

.calendar-agenda-events {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calendar-agenda-event {
    padding: 9px;
}

.calendar-agenda-event .calendar-event-content strong {
    font-size: 10px;
}

.calendar-agenda-event .calendar-event-content small {
    font-size: 9px;
}

@media (max-width: 800px) {
    .calendar-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .calendar-summary-card {
        min-height: 92px;
        padding: 12px;
    }

    .calendar-summary-card strong {
        font-size: 22px;
    }

    .calendar-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .calendar-month-navigation {
        justify-content: space-between;
    }

    .calendar-category-filter {
        justify-content: center;
    }

    .calendar-category-filter a {
        flex: 1;
        justify-content: center;
    }

    .calendar-desktop-view {
        display: none;
    }

    .calendar-mobile-view {
        display: block;
    }
}

@media (max-width: 500px) {
    .calendar-summary-grid {
        grid-template-columns: 1fr;
    }

    .calendar-summary-card {
        min-height: 78px;
    }

    .calendar-agenda-day {
        grid-template-columns: 51px minmax(0, 1fr);
    }
}


/* Password Hotfix V32.3 */
.password-field-v323 {
    position: relative;
    width: 100%;
}

.password-field-v323 input {
    width: 100%;
    padding-right: 48px !important;
}

.password-confirm-v323 {
    margin-top: 14px;
}

.password-eye-v323 {
    position: absolute !important;
    top: 50% !important;
    right: 7px !important;
    width: 35px !important;
    min-width: 35px !important;
    max-width: 35px !important;
    height: 35px !important;
    min-height: 35px !important;
    margin: 0 !important;
    padding: 7px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: #637b80 !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.password-eye-v323:hover {
    background: #edf3f3 !important;
    color: #315f64 !important;
}

.password-eye-v323 svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.eye-closed-v323 {
    display: none;
}

.password-eye-v323.is-visible
.eye-open-v323 {
    display: none;
}

.password-eye-v323.is-visible
.eye-closed-v323 {
    display: block;
}


/* PROJECTS V33 */
.project-filter {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px auto auto;
    gap: 10px;
    align-items: end;
    margin: 18px 0;
}

.project-progress {
    width: 100%;
    min-width: 120px;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe9e9;
}

.project-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #347e84,
        #55adb0
    );
    transition: width 0.3s ease;
}

.project-progress-cell {
    min-width: 150px;
}

.project-progress-cell strong {
    display: inline-block;
    margin-top: 5px;
}

.project-progress-summary {
    padding: 18px;
    margin: 18px 0;
    border: 1px solid #d9e5e5;
    border-radius: 14px;
    background: #f7fafa;
}

.project-progress-summary > div:first-child {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.project-progress-large {
    height: 16px;
}

.project-code-box {
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: #edf5f5;
}

.project-engineer-section {
    margin-top: 18px;
}

.project-engineer-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(190px, 1fr)
    );
    gap: 10px;
    margin-top: 8px;
}

.project-engineer-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid #d9e5e5;
    border-radius: 9px;
    background: #fafcfc;
}

.project-engineer-option input {
    width: auto;
    margin: 0;
}

.project-milestone-form {
    display: grid;
    grid-template-columns: 75px 145px auto;
    gap: 7px;
    align-items: center;
}

.project-milestone-form input,
.project-milestone-form select,
.project-milestone-form button {
    margin: 0;
}

@media (max-width: 820px) {
    .project-filter {
        grid-template-columns: 1fr;
    }

    .project-milestone-form {
        grid-template-columns: 1fr;
        min-width: 160px;
    }
}

/* PROJECT DOCUMENTS V33.1 */
.project-document-form {
    padding: 16px;
    margin: 12px 0 18px;
    border: 1px solid #d9e5e5;
    border-radius: 12px;
    background: #f8fbfb;
}

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

.inline-form {
    display: inline;
    margin-left: 10px;
}

.button-link {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.button-link.danger {
    color: #b33a3a;
}

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

/* ACTIVITY PROJECT V33.2 */
.activity-related-project {
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid #d9e5e5;
    border-radius: 10px;
    background: #f7fafa;
}

.activity-related-project .muted {
    margin: 7px 0 0;
}

/* PROJECT CLOSING V33.3 */
.project-closing-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 16px;
    margin-top: 24px;
}

.project-closing-header h3 {
    margin-bottom: 4px;
}

.project-closing-summary {
    padding: 8px 13px;
    border-radius: 999px;
    background: #edf5f5;
    font-weight: 700;
    white-space: nowrap;
}

.project-closing-list {
    display: grid;
    gap: 10px;
    margin: 12px 0 24px;
}

.project-closing-item {
    padding: 13px;
    border: 1px solid #d9e5e5;
    border-radius: 10px;
    background: #fafcfc;
}

.project-closing-main {
    display: grid;
    grid-template-columns:
        minmax(230px, 1fr)
        minmax(180px, 1fr)
        auto;
    gap: 12px;
    align-items: center;
}

.project-closing-checkbox {
    display: flex;
    gap: 9px;
    align-items: center;
    margin: 0;
}

.project-closing-checkbox input {
    width: auto;
    margin: 0;
}

.project-closing-status {
    font-size: 20px;
    font-weight: 700;
}

.project-closing-meta {
    margin-top: 7px;
    padding-left: 28px;
}

.required-mark {
    color: #b33a3a;
}

@media (max-width: 820px) {
    .project-closing-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-closing-main {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   PROJECT MANAGEMENT UI REFINEMENT V33.4
   ========================================================= */

.pm-page {
    width: min(1440px, calc(100% - 40px));
    margin: 24px auto 48px;
    color: #183235;
}

.pm-page h1,
.pm-page h2,
.pm-page h3,
.pm-page p {
    margin-top: 0;
}

.pm-page-header,
.pm-project-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

.pm-page-header h1,
.pm-project-hero h1 {
    margin: 4px 0 7px;
    font-size: 26px;
    line-height: 1.2;
    color: #153236;
}

.pm-page-header p,
.pm-project-hero p {
    margin: 0;
    color: #687b7e;
}

.pm-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    color: #43898e;
}

.pm-panel,
.pm-progress-card,
.pm-form-section {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid #d7e2e3;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(22, 50, 54, 0.05);
}

.pm-btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.pm-btn-primary {
    border-color: #326b70;
    background: #326b70;
    color: #ffffff;
}

.pm-btn-primary:hover {
    background: #285c61;
    color: #ffffff;
}

.pm-btn-secondary {
    border-color: #cedadb;
    background: #ffffff;
    color: #29484c;
}

.pm-btn-secondary:hover {
    background: #f3f7f7;
    color: #183235;
}

.pm-btn-small {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 12px;
}

.pm-filter-panel {
    padding: 17px 20px;
}

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

.pm-filter-grid label,
.pm-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #345256;
}

.pm-filter-grid input,
.pm-filter-grid select,
.pm-field input,
.pm-field select,
.pm-field textarea,
.pm-closing-controls input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd8d9;
    border-radius: 8px;
    background: #ffffff;
}

.pm-filter-grid input,
.pm-filter-grid select,
.pm-field input,
.pm-field select,
.pm-closing-controls input {
    min-height: 40px;
    padding: 8px 11px;
}

.pm-field textarea {
    padding: 11px;
    resize: vertical;
}

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

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

.pm-section-heading h2 {
    margin-bottom: 4px;
    font-size: 17px;
    color: #183235;
}

.pm-section-heading p {
    margin: 0;
    font-size: 13px;
    color: #738487;
}

.pm-count-badge,
.pm-closing-count {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 5px 11px;
    border-radius: 999px;
    background: #edf5f5;
    color: #24575c;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.pm-project-table-wrap {
    overflow-x: auto;
}

.pm-project-table {
    min-width: 1080px;
}

.pm-project-table th,
.pm-document-table th,
.pm-activity-table th {
    padding: 12px;
    background: #edf2f2;
    color: #28484c;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.pm-project-table td,
.pm-document-table td,
.pm-activity-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e2e9e9;
    vertical-align: middle;
}

.pm-project-table tbody tr:hover,
.pm-document-table tbody tr:hover,
.pm-activity-table tbody tr:hover {
    background: #f8fbfb;
}

.pm-project-name {
    color: #193c41;
    font-weight: 800;
    text-decoration: none;
}

.pm-project-name:hover {
    color: #347d82;
    text-decoration: underline;
}

.pm-project-code {
    margin-top: 4px;
    color: #738487;
    font-family: monospace;
    font-size: 12px;
}

.pm-muted {
    margin-top: 4px;
    color: #78898b;
    font-size: 12px;
}

.pm-person {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pm-avatar {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #dceced;
    color: #285f64;
    font-weight: 800;
}

.pm-avatar-small {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 8px;
    font-size: 12px;
}

.pm-engineer-list {
    max-width: 220px;
    line-height: 1.55;
    color: #415d61;
}

.pm-status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e9eff0;
    color: #476064;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.pm-status-draft,
.pm-status-planned {
    background: #e9eff0;
    color: #52666a;
}

.pm-status-planning,
.pm-status-kickoff {
    background: #e5f0fb;
    color: #35658a;
}

.pm-status-implementation,
.pm-status-in-progress {
    background: #fff2d8;
    color: #8a631d;
}

.pm-status-testing---uat,
.pm-status-testing--uat,
.pm-status-review {
    background: #eee8ff;
    color: #65489b;
}

.pm-status-documentation {
    background: #e5f4f3;
    color: #34736f;
}

.pm-status-pending-bast {
    background: #ffe9d9;
    color: #92562a;
}

.pm-status-completed,
.pm-status-approved,
.pm-status-signed {
    background: #dff3e8;
    color: #2e7852;
}

.pm-status-on-hold,
.pm-status-delayed {
    background: #fff0d8;
    color: #8c5d18;
}

.pm-status-cancelled {
    background: #f8dddd;
    color: #9b3c3c;
}

.pm-progress-block {
    min-width: 150px;
}

.pm-progress-meta {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 5px;
    font-size: 12px;
}

.pm-progress-track {
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #dfe9e9;
}

.pm-progress-track-large {
    height: 15px;
}

.pm-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #347f84,
        #55adb0
    );
    transition: width 0.3s ease;
}

.pm-date {
    white-space: nowrap;
}

.pm-icon-button {
    color: #2c7278;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.pm-icon-button:hover {
    text-decoration: underline;
}

.pm-empty-state {
    display: flex;
    min-height: 90px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #77898b;
    text-align: center;
}

.pm-empty-state strong {
    color: #3e5d60;
}

.pm-project-code-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #d7e5e6;
    border-radius: 10px;
    background: #eef6f6;
}

.pm-project-code-banner div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pm-project-code-banner span {
    font-size: 12px;
    color: #667d80;
}

.pm-project-code-banner strong {
    font-family: monospace;
    color: #214e53;
}

.pm-project-form {
    margin: 0;
}

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

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

.pm-field {
    min-width: 0;
}

.pm-required {
    color: #b14b4b;
    font-weight: 800;
}

.pm-engineer-choice-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));
    gap: 11px;
}

.pm-engineer-choice {
    position: relative;
    display: grid;
    min-width: 0;
    grid-template-columns: 20px 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border: 1px solid #d6e1e2;
    border-radius: 10px;
    background: #fbfdfd;
    cursor: pointer;
}

.pm-engineer-choice:hover {
    border-color: #8ab9bc;
    background: #f3f9f9;
}

.pm-engineer-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pm-engineer-check {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid #b9c9ca;
    border-radius: 5px;
    background: #ffffff;
    color: transparent;
    font-size: 12px;
}

.pm-engineer-avatar {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e5efef;
    color: #36686d;
    font-weight: 800;
}

.pm-engineer-name {
    min-width: 0;
    overflow: hidden;
    color: #294b4f;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-engineer-choice input:checked + .pm-engineer-check {
    border-color: #34787d;
    background: #34787d;
    color: #ffffff;
}

.pm-engineer-choice:has(input:checked) {
    border-color: #66a5a8;
    background: #edf7f7;
}

.pm-form-action-bar {
    position: sticky;
    z-index: 5;
    bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 13px 16px;
    border: 1px solid #d2dfdf;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 22px rgba(22, 50, 54, 0.12);
    backdrop-filter: blur(8px);
}

.pm-form-actions {
    display: flex;
    gap: 9px;
}

.pm-project-hero {
    padding: 20px 22px;
    border: 1px solid #d7e2e3;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(22, 50, 54, 0.05);
}

.pm-project-hero-main h1 {
    margin-bottom: 8px;
}

.pm-project-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #61787b;
    font-size: 13px;
}

.pm-project-hero-actions {
    display: flex;
    gap: 9px;
}

.pm-progress-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 13px;
}

.pm-progress-card-head span {
    font-weight: 800;
    color: #254d51;
}

.pm-progress-card-head p {
    margin: 4px 0 0;
    color: #728588;
    font-size: 12px;
}

.pm-progress-card-head strong {
    font-size: 28px;
    color: #286c72;
}

.pm-info-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 13px;
    margin-bottom: 18px;
}

.pm-info-card {
    display: flex;
    min-height: 86px;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border: 1px solid #d8e3e4;
    border-radius: 12px;
    background: #ffffff;
}

.pm-info-card > span:first-child {
    color: #748689;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.pm-info-card strong {
    color: #1f4145;
}

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

.pm-overview-grid > div {
    padding: 16px;
    border-radius: 10px;
    background: #f7fafa;
}

.pm-overview-grid h3 {
    margin-bottom: 8px;
    font-size: 13px;
    color: #31565a;
}

.pm-overview-grid p {
    margin: 0;
    color: #4e676a;
    line-height: 1.7;
}

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

.pm-team-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.pm-team-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d9e4e5;
    border-radius: 11px;
    background: #f9fbfb;
}

.pm-team-card div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.pm-team-card strong {
    color: #25494d;
}

.pm-team-card span {
    color: #5f777a;
    font-size: 12px;
}

.pm-team-card small {
    color: #899799;
    font-size: 11px;
}

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

.pm-milestone-card {
    padding: 16px;
    border: 1px solid #d9e4e5;
    border-radius: 11px;
    background: #fbfdfd;
}

.pm-milestone-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.pm-milestone-head h3 {
    margin-bottom: 4px;
    font-size: 14px;
    color: #25494d;
}

.pm-milestone-head div > span {
    color: #788b8d;
    font-size: 11px;
}

.pm-milestone-progress-row {
    display: grid;
    grid-template-columns: 1fr 42px;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.pm-milestone-progress-row strong {
    text-align: right;
    color: #2d666b;
    font-size: 12px;
}

.pm-milestone-update {
    display: grid;
    grid-template-columns: 110px minmax(150px, 1fr) auto;
    align-items: end;
    gap: 9px;
    padding-top: 13px;
    border-top: 1px solid #e1e9e9;
}

.pm-field-compact label {
    margin-bottom: 5px;
    font-size: 10px;
}

.pm-field-compact input,
.pm-field-compact select {
    min-height: 34px;
}

.pm-input-suffix {
    display: grid;
    grid-template-columns: 1fr 30px;
}

.pm-input-suffix input {
    border-radius: 7px 0 0 7px;
}

.pm-input-suffix span {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd8d9;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: #eef3f3;
    font-size: 12px;
}

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

.pm-closing-card {
    padding: 14px;
    border: 1px solid #d9e4e5;
    border-radius: 11px;
    background: #fbfdfd;
}

.pm-closing-card.is-completed {
    border-color: #b9ddca;
    background: #f2faf6;
}

.pm-closing-title label,
.pm-closing-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #294b4f;
    font-weight: 700;
}

.pm-closing-title input {
    position: absolute;
    opacity: 0;
}

.pm-closing-check,
.pm-closing-view-icon {
    display: inline-flex;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    align-items: center;
    justify-content: center;
    border: 1px solid #bacbcc;
    border-radius: 6px;
    background: #ffffff;
    color: transparent;
    cursor: pointer;
}

.pm-closing-title input:checked + .pm-closing-check,
.pm-closing-card.is-completed .pm-closing-view-icon {
    border-color: #3d8a67;
    background: #3d8a67;
    color: #ffffff;
}

.pm-closing-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 12px;
}

.pm-closing-controls input {
    min-height: 34px;
}

.pm-closing-meta {
    margin-top: 9px;
    color: #718486;
    font-size: 10px;
}

.pm-upload-panel {
    margin-bottom: 18px;
    border: 1px solid #d9e4e5;
    border-radius: 11px;
    background: #f8fbfb;
}

.pm-upload-panel summary {
    padding: 14px 16px;
    color: #2c6267;
    font-weight: 800;
    cursor: pointer;
}

.pm-upload-panel form {
    padding: 2px 16px 16px;
}

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

.pm-upload-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.pm-document-table,
.pm-activity-table {
    width: 100%;
    min-width: 850px;
}

.pm-document-category {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eef4f4;
    color: #3f686c;
    font-size: 11px;
    font-weight: 700;
}

.pm-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-row-actions form {
    margin: 0;
}

.pm-link-danger {
    padding: 0;
    border: 0;
    background: transparent;
    color: #a74343;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

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

    .pm-milestone-grid,
    .pm-closing-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 760px) {
    .pm-page {
        width: min(100% - 20px, 1440px);
        margin-top: 14px;
    }

    .pm-page-header,
    .pm-project-hero,
    .pm-section-heading,
    .pm-progress-card-head,
    .pm-form-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .pm-page-header .pm-btn,
    .pm-project-hero-actions .pm-btn {
        width: 100%;
    }

    .pm-project-hero-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pm-filter-grid,
    .pm-form-grid,
    .pm-info-grid,
    .pm-overview-grid,
    .pm-document-form-grid {
        grid-template-columns: 1fr;
    }

    .pm-filter-actions,
    .pm-form-actions,
    .pm-upload-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .pm-filter-actions .pm-btn,
    .pm-form-actions .pm-btn,
    .pm-upload-footer .pm-btn {
        width: 100%;
    }

    .pm-milestone-update {
        grid-template-columns: 1fr;
    }

    .pm-engineer-choice-grid {
        grid-template-columns: 1fr;
    }

    .pm-closing-controls {
        grid-template-columns: 1fr;
    }

    .pm-project-meta-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}
