﻿/* ExpoTech Fixed Assets - Custom Styles */
/* Font size scale: all base sizes bumped up ~1-2 steps for better readability */
/* Mobile: tables scroll horizontally, KPI grids stack, page headers wrap    */

/* ================================================================
   GLOBAL TYPOGRAPHY BOOST
================================================================ */
.content-wrapper, .layout-page {
    font-size: 15px;
}

/* ================================================================
   SHARED PAGE HEADER
================================================================ */
.at-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .75rem;
}
.at-page-title { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; font-weight: 700; color: #212529; margin: 0; }
.at-page-title i { font-size: 1.6rem; color: #4f46e5; }
.at-page-subtitle { font-size: .9rem; color: #6c757d; margin: 3px 0 0 34px; }

@media (max-width: 576px) {
    .at-page-header { flex-direction: column; align-items: flex-start; }
    .at-page-title { font-size: 1.2rem; }
    .at-page-subtitle { margin-left: 0; font-size: .82rem; }
}

/* ================================================================
   DASHBOARD
================================================================ */
.db-kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media(max-width:992px) { .db-kpi-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:576px)  { .db-kpi-grid { grid-template-columns: 1fr 1fr; gap: .75rem; } }

.db-kpi-card { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 1.4rem 1.5rem; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.db-kpi-body { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.db-kpi-label { font-size: .9rem; color: #6c757d; margin: 0 0 6px 0; font-weight: 500; }
.db-kpi-val   { font-size: 2.2rem; font-weight: 700; color: #212529; margin: 0 0 6px 0; line-height: 1.1; }
.db-kpi-sub   { font-size: .85rem; margin: 0; display: flex; align-items: center; gap: 2px; }
.db-kpi-sub.green  { color: #198754; }
.db-kpi-sub.orange { color: #fd7e14; }
.db-kpi-sub.red    { color: #dc3545; }
.db-kpi-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; flex-shrink: 0; }

@media(max-width:576px) {
    .db-kpi-val { font-size: 1.7rem; }
    .db-kpi-icon { width: 44px; height: 44px; font-size: 1.3rem; }
    .db-kpi-label { font-size: .8rem; }
}

.db-main-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 1.25rem; margin-bottom: 1.25rem; }
@media(max-width:992px) { .db-main-grid { grid-template-columns: 1fr; } }

.db-card { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 1.4rem 1.5rem; }
.db-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.db-card-title  { font-size: 1.1rem; font-weight: 700; color: #212529; margin: 0; }
.db-card-footer { padding-top: 1rem; border-top: 1px solid #f1f3f5; margin-top: 1rem; text-align: center; }
.db-view-all      { font-size: .95rem; color: #4f46e5; text-decoration: none; font-weight: 500; cursor: pointer; }
.db-view-all:hover { text-decoration: underline; }
.db-view-all-link { font-size: .9rem; color: #4f46e5; text-decoration: none; cursor: pointer; white-space: nowrap; }
.db-view-all-link:hover { text-decoration: underline; }

.db-cat-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid #f1f3f5; }
.db-cat-row:last-child { border-bottom: none; }
.db-cat-name  { font-size: 1rem; font-weight: 500; color: #212529; }
.db-cat-count { font-size: 1rem; font-weight: 700; color: #212529; }

.db-asset-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f3f5; }
.db-asset-row:last-child { border-bottom: none; }
.db-asset-thumb { width: 52px; height: 52px; border-radius: 8px; border: 1px solid #e9ecef; flex-shrink: 0; background: #f1f3f5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.db-asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.db-asset-thumb i   { font-size: 1.4rem; color: #adb5bd; }
.db-asset-info  { flex: 1; min-width: 0; }
.db-asset-name  { font-size: .95rem; font-weight: 600; color: #212529; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-asset-id    { font-size: .78rem; color: #adb5bd; font-family: monospace; }
.db-asset-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.db-type-badge  { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: .78rem; font-weight: 500; background: #f1f3f5; color: #495057; white-space: nowrap; }
.db-stat-badge  { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.db-stat-badge.active              { background: #d1f5e0; color: #0a6b36; }
.db-stat-badge.under-maintenance   { background: #fff3e0; color: #b45309; }
.db-stat-badge.disposal            { background: #fde8e8; color: #dc3545; }
.db-stat-badge.inactive            { background: #f1f3f5; color: #6c757d; }
.db-asset-value { font-size: .9rem; font-weight: 600; color: #212529; white-space: nowrap; }

@media(max-width:576px) {
    .db-asset-right { display: none; }
    .db-asset-name { white-space: normal; }
}

/* Quick Actions */
.db-qa-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.25rem; }
@media(max-width:992px) { .db-qa-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:576px)  { .db-qa-grid { grid-template-columns: 1fr 1fr; gap: .75rem; } }
.db-qa-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 1.2rem 1.4rem; text-decoration: none; cursor: pointer; transition: box-shadow .18s, border-color .18s, transform .18s; }
.db-qa-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); border-color: #d0d5dd; transform: translateY(-2px); text-decoration: none; }
.db-qa-icon  { width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.db-qa-text  { display: flex; flex-direction: column; gap: 2px; }
.db-qa-title { font-size: .95rem; font-weight: 700; color: #212529; margin: 0; line-height: 1.3; }
.db-qa-sub   { font-size: .82rem; color: #6c757d; margin: 0; }

@media(max-width:576px) {
    .db-qa-card { padding: .9rem 1rem; gap: 10px; }
    .db-qa-icon { width: 40px; height: 40px; font-size: 1.2rem; }
    .db-qa-title { font-size: .85rem; }
    .db-qa-sub { display: none; }
}

/* ================================================================
   SETTINGS
================================================================ */
.settings-tabs { display: flex; gap: 4px; border-bottom: 1px solid #dee2e6; margin-bottom: 1.5rem; flex-wrap: wrap; }
.settings-tab-btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 20px; border: none; background: transparent; color: #6c757d; font-size: .95rem; font-weight: 500; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; border-radius: 0; }
.settings-tab-btn:hover  { color: #4f46e5; }
.settings-tab-btn.active { color: #4f46e5; border-bottom-color: #4f46e5; }
.settings-tab-btn i      { font-size: 1.05rem; }

.settings-pane        { display: none; }
.settings-pane.active { display: block; }
.settings-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (max-width: 768px) { .settings-grid-2 { grid-template-columns: 1fr; } }

.setting-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; }
.setting-card-title   { font-size: 1rem; font-weight: 600; color: #212529; margin-bottom: 2px; }
.setting-card-sub     { font-size: .875rem; color: #6c757d; margin-bottom: .75rem; }
.setting-card-current { font-size: .875rem; color: #495057; margin-bottom: .5rem; }
.setting-card-example { font-size: .84rem; color: #6c757d; margin-bottom: 1rem; }
.format-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.format-btn { padding: 10px 12px; border: 1px solid #dee2e6; border-radius: 6px; background: #f8f9fa; color: #495057; font-size: .9rem; cursor: pointer; text-align: center; transition: all .15s; font-weight: 500; }
.format-btn:hover  { border-color: #4f46e5; color: #4f46e5; background: #f0f0ff; }
.format-btn.active { border-color: #4f46e5; background: #4f46e5; color: #fff; }

.all-settings-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.all-settings-title  { font-size: 1rem; font-weight: 600; color: #212529; margin: 0; }
.all-settings-sub    { font-size: .875rem; color: #6c757d; margin: 2px 0 0 0; }
.setting-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #f1f3f5; }
.setting-row:last-child { border-bottom: none; }
.setting-key  { font-size: .95rem; font-weight: 500; color: #212529; margin-bottom: 2px; }
.setting-val  { font-size: .875rem; color: #6c757d; }
.setting-desc { font-size: .82rem; color: #adb5bd; margin-top: 1px; }
.setting-edit-btn { background: none; border: none; color: #6c757d; cursor: pointer; padding: 4px 6px; border-radius: 4px; transition: color .15s, background .15s; flex-shrink: 0; }
.setting-edit-btn:hover { color: #4f46e5; background: #f0f0ff; }
.settings-loading { display: flex; justify-content: center; align-items: center; min-height: 120px; }

/* ================================================================
   ASSET TYPE MANAGEMENT TREE
================================================================ */
.at-root-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: .78rem; font-weight: 600; background: #f1f3f5; color: #495057; border: 1px solid #dee2e6; margin-left: 8px; vertical-align: middle; }
.at-parent-row { display: flex; align-items: center; padding: 11px 0; border-bottom: 1px solid #f1f3f5; }
.at-parent-row:last-of-type { border-bottom: none; }
.at-expand-btn { width: 30px; height: 30px; border: none; background: none; color: #6c757d; font-size: 1.05rem; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: color .15s; padding: 0; }
.at-expand-btn:hover { color: #4f46e5; }
.at-parent-info { flex: 1; min-width: 0; }
.at-parent-name { font-size: .95rem; font-weight: 600; color: #212529; }
.at-parent-desc { font-size: .84rem; color: #6c757d; margin-top: 1px; }
.at-children      { display: none; padding-left: 28px; border-left: 2px solid #e9ecef; margin-left: 14px; margin-bottom: 6px; }
.at-children.open { display: block; }
.at-child-row { display: flex; align-items: center; padding: 9px 0 9px 12px; border-bottom: 1px solid #f8f9fa; }
.at-child-row:last-child { border-bottom: none; }
.at-child-name { font-size: .92rem; font-weight: 500; color: #343a40; flex: 1; }
.at-child-desc { font-size: .82rem; color: #6c757d; margin-top: 1px; }
.at-row-actions { display: flex; gap: 4px; flex-shrink: 0; opacity: 0; transition: opacity .15s; }
.at-parent-row:hover .at-row-actions,
.at-child-row:hover  .at-row-actions,
.loc-row:hover       .at-row-actions,
.dept-row:hover      .at-row-actions { opacity: 1; }
.at-action-btn { width: 30px; height: 30px; border: none; background: none; cursor: pointer; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: background .15s, color .15s; color: #6c757d; padding: 0; }
.at-action-btn.edit:hover   { background: #e8f4fd; color: #0d6efd; }
.at-action-btn.delete:hover { background: #fde8e8; color: #dc3545; }

/* ================================================================
   LOCATION MANAGEMENT
================================================================ */
.loc-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px solid #f1f3f5; border-radius: 8px; margin-bottom: 10px; background: #fff; transition: box-shadow .15s; }
.loc-row:hover  { box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.loc-info { flex: 1; min-width: 0; }
.loc-name { font-size: .95rem; font-weight: 600; color: #212529; margin-bottom: 2px; }
.loc-code { font-size: .85rem; color: #6c757d; margin-bottom: 2px; }
.loc-address { font-size: .83rem; color: #adb5bd; }

/* ================================================================
   DEPARTMENT MANAGEMENT
================================================================ */
.dept-location-header { display: flex; align-items: center; gap: 10px; padding: 18px 0 10px 0; margin-top: 8px; border-bottom: 2px solid #f1f3f5; }
.dept-location-header:first-of-type { margin-top: 0; }
.dept-loc-icon { color: #6c757d; font-size: 1.05rem; }
.dept-loc-name { font-size: 1.05rem; font-weight: 700; color: #212529; }
.dept-loc-count { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .78rem; font-weight: 600; background: #e8f4fd; color: #0d6efd; border: 1px solid #b8d9f5; }
.dept-loc-code  { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: .78rem; font-weight: 600; background: #f1f3f5; color: #6c757d; border: 1px solid #dee2e6; }
.dept-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; border: 1px solid #f1f3f5; border-radius: 8px; margin: 8px 0; background: #fff; transition: box-shadow .15s; }
.dept-row:hover { box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.dept-info { flex: 1; min-width: 0; }
.dept-name { font-size: .95rem; font-weight: 600; color: #212529; margin-bottom: 2px; }
.dept-code { font-size: .85rem; color: #6c757d; margin-bottom: 2px; }
.dept-desc { font-size: .82rem; color: #adb5bd; }
.dept-unassigned-header { display: flex; align-items: center; gap: 8px; padding: 18px 0 10px 0; margin-top: 8px; border-bottom: 2px solid #f1f3f5; color: #adb5bd; font-size: .92rem; font-style: italic; }

/* ================================================================
   USER MANAGEMENT + EMPLOYEE MANAGEMENT (shared)
================================================================ */
.um-page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.um-page-title  { font-size: 1.45rem; font-weight: 700; color: #212529; margin: 0 0 2px 0; }
.um-page-sub    { font-size: .9rem; color: #6c757d; margin: 0; }
.um-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.um-kpi-card { background: #fff; border: 1px solid #e9ecef; border-radius: 12px; padding: 1.2rem 1.4rem; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.um-kpi-body  { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.um-kpi-icon  { width: 54px; height: 54px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.7rem; flex-shrink: 0; }
.um-kpi-label { font-size: .88rem; color: #6c757d; margin: 0 0 4px 0; font-weight: 500; }
.um-kpi-value { font-size: 2.1rem; font-weight: 700; color: #212529; line-height: 1; margin: 0; }
.um-section-header { margin-bottom: 1rem; }
.um-section-title  { font-size: 1.1rem; font-weight: 700; color: #212529; margin: 0 0 2px 0; }
.um-section-sub    { font-size: .875rem; color: #6c757d; margin: 0; }
.um-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.um-table th { font-size: .78rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; padding: 11px 13px; border-bottom: 2px solid #f1f3f5; white-space: nowrap; }
.um-table td { padding: 15px 13px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
.um-table tr:last-child td { border-bottom: none; }
.um-table tr:hover td { background: #fafafa; }
.um-avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; color: #fff; flex-shrink: 0; text-transform: uppercase; }
.um-user-cell { display: flex; align-items: center; gap: 10px; }
.um-user-name { font-weight: 600; color: #212529; font-size: .92rem; line-height: 1.3; }
.um-user-id   { font-size: .78rem; color: #adb5bd; font-family: monospace; }
.um-role-badge { display: inline-block; padding: 4px 11px; border-radius: 4px; font-size: .78rem; font-weight: 600; text-transform: capitalize; }
.um-role-badge.admin { background: #fde8e8; color: #dc3545; }
.um-role-badge.dept  { background: #e8f4fd; color: #0d6efd; }
.um-role-badge.audit { background: #e6f9f0; color: #198754; }
.um-role-badge.other { background: #f1f3f5; color: #6c757d; }
.um-status-badge { display: inline-block; padding: 4px 13px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.um-status-badge.active      { background: #d1f5e0; color: #0a6b36; }
.um-status-badge.inactive    { background: #fff3e0; color: #b45309; }
.um-status-badge.blacklisted { background: #fde8e8; color: #dc3545; }
.um-table-actions { display: flex; gap: 4px; }
.um-table tr:hover .um-table-actions .at-action-btn { opacity: 1; }
.um-table .at-action-btn { opacity: 0; transition: opacity .15s; }

/* Mobile table scroll */
@media(max-width:768px) {
    .um-kpi-grid { grid-template-columns: 1fr 1fr; }
    .um-table-wrap, .dep-records-card, .am-records-section,
    .mn-records-card, .ad-records-card, .au-records-card,
    .rp-results-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ================================================================
   EMPLOYEE MANAGEMENT
================================================================ */
.emp-photo-preview { width: 76px; height: 76px; border-radius: 50%; background: #eef2ff; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; font-weight: 700; color: #4f46e5; flex-shrink: 0; overflow: hidden; border: 2px solid #e9ecef; }
.emp-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.emp-avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; color: #fff; flex-shrink: 0; text-transform: uppercase; overflow: hidden; }
.emp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.emp-salary { font-size: .88rem; color: #212529; font-weight: 500; white-space: nowrap; }
.emp-salary .emp-sal-icon { color: #198754; font-size: .95rem; margin-right: 2px; }
.emp-id-text { font-size: .78rem; color: #adb5bd; font-family: monospace; }
.emp-contact-cell { font-size: .88rem; color: #495057; line-height: 1.8; }
.emp-contact-cell i { font-size: .9rem; color: #6c757d; margin-right: 3px; }

/* ================================================================
   ASSET REGISTER
================================================================ */
.ar-filter-bar { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem; }
.ar-filter-bar .ar-filter-title { font-size: .88rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem; }
.ar-filter-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.ar-search-wrap { position: relative; flex: 0 0 220px; }
.ar-search-wrap .ar-search-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #adb5bd; font-size: 1rem; pointer-events: none; }
.ar-search-wrap input { padding-left: 2.2rem; height: 40px; font-size: .9rem; }
.ar-filter-select { height: 40px; font-size: .9rem; min-width: 150px; flex: 1; }
.ar-clear-btn { height: 40px; padding: 0 1.1rem; font-size: .9rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.ar-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: .5rem; }
.ar-asset-count { font-size: 1.15rem; font-weight: 700; color: #212529; }
.ar-view-toggle { display: flex; gap: 4px; }
.ar-view-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 15px; border: 1px solid #dee2e6; background: #fff; border-radius: 6px; font-size: .88rem; font-weight: 500; color: #6c757d; cursor: pointer; transition: all .15s; }
.ar-view-btn:hover  { border-color: #4f46e5; color: #4f46e5; }
.ar-view-btn.active { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.ar-view-btn i { font-size: 1.05rem; }
.ar-pagination { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.ar-page-btn { padding: 6px 15px; border: 1px solid #dee2e6; background: #fff; border-radius: 6px; font-size: .88rem; font-weight: 500; color: #495057; cursor: pointer; transition: all .15s; }
.ar-page-btn:hover:not(:disabled) { border-color: #4f46e5; color: #4f46e5; }
.ar-page-btn:disabled { opacity: .45; cursor: default; }
.ar-page-info { color: #6c757d; white-space: nowrap; }
.ar-asset-thumb { width: 50px; height: 50px; border-radius: 8px; background: #f1f3f5; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; border: 1px solid #e9ecef; }
.ar-asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ar-asset-thumb i   { font-size: 1.5rem; color: #adb5bd; }
.ar-asset-cell { display: flex; align-items: center; gap: 10px; }
.ar-asset-name { font-weight: 600; color: #212529; font-size: .92rem; line-height: 1.3; }
.ar-asset-id   { font-size: .78rem; color: #adb5bd; font-family: monospace; }
.ar-type-badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.ar-type-badge.t0 { background: #e8f4fd; color: #0d6efd; }
.ar-type-badge.t1 { background: #e6f9f0; color: #198754; }
.ar-type-badge.t2 { background: #fff3e0; color: #fd7e14; }
.ar-type-badge.t3 { background: #f3e8ff; color: #7c3aed; }
.ar-type-badge.t4 { background: #fde8e8; color: #dc3545; }
.ar-type-badge.t5 { background: #e0f5f5; color: #0d9488; }
.ar-type-badge.t6 { background: #fff3cd; color: #856404; }
.ar-type-badge.t7 { background: #f1f3f5; color: #495057; }
.ar-status-badge { display: inline-block; padding: 4px 13px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.ar-status-badge.active            { background: #d1f5e0; color: #0a6b36; }
.ar-status-badge.under-maintenance { background: #fff3e0; color: #b45309; }
.ar-status-badge.disposal          { background: #fde8e8; color: #dc3545; }
.ar-status-badge.inactive          { background: #f1f3f5; color: #6c757d; }
.ar-value { font-size: .9rem; font-weight: 600; color: #212529; white-space: nowrap; }
.ar-actions { display: flex; gap: 4px; }
.ar-action-btn { width: 32px; height: 32px; border: none; background: none; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: background .15s, color .15s; color: #6c757d; padding: 0; }
.ar-action-btn.view:hover   { background: #e8f4fd; color: #0d6efd; }
.ar-action-btn.edit:hover   { background: #eef2ff; color: #4f46e5; }
.ar-action-btn.qr:hover     { background: #e6f9f0; color: #198754; }
.ar-action-btn.delete:hover { background: #fde8e8; color: #dc3545; }

/* AR table responsive */
@media(max-width:768px) {
    .ar-filter-row { flex-direction: column; align-items: stretch; }
    .ar-search-wrap { flex: none; width: 100%; }
    .ar-filter-select { width: 100%; }
}

/* (keeping all other AR classes unchanged - file/tree/qr wrap) */
.ar-filelist { margin-top: .75rem; display: flex; flex-direction: column; gap: 6px; }
.ar-filelist-label { font-size: .85rem; font-weight: 600; color: #495057; margin-bottom: 4px; }
.ar-file-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #e9ecef; border-radius: 8px; background: #fff; transition: border-color .15s, background .15s; }
.ar-file-row.is-main { border-color: #4f46e5; background: #f0f4ff; }
.ar-file-thumb { width: 52px; height: 52px; border-radius: 6px; flex-shrink: 0; overflow: hidden; background: #f1f3f5; display: flex; align-items: center; justify-content: center; border: 1px solid #e9ecef; }
.ar-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ar-file-thumb i   { font-size: 1.4rem; color: #adb5bd; }
.ar-file-info { flex: 1; min-width: 0; }
.ar-file-name { font-size: .88rem; font-weight: 500; color: #212529; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-file-size { font-size: .78rem; color: #6c757d; margin-top: 1px; }
.ar-file-main-label { font-size: .78rem; font-weight: 600; color: #4f46e5; margin-top: 2px; }
.ar-file-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.ar-file-set-main { padding: 5px 13px; border: 1px solid #dee2e6; border-radius: 6px; background: #fff; color: #495057; font-size: .82rem; font-weight: 500; cursor: pointer; transition: all .15s; white-space: nowrap; }
.ar-file-set-main:hover { border-color: #4f46e5; color: #4f46e5; background: #f0f4ff; }
.ar-file-remove { padding: 5px 13px; border: 1px solid #dee2e6; border-radius: 6px; background: #fff; color: #495057; font-size: .82rem; font-weight: 500; cursor: pointer; transition: all .15s; white-space: nowrap; }
.ar-file-remove:hover { border-color: #dc3545; color: #dc3545; background: #fff5f5; }
.ar-saved-docs-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1rem; }
.ar-saved-doc-thumb { position: relative; width: 120px; cursor: pointer; }
.ar-saved-doc-thumb img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 2px solid #e9ecef; display: block; transition: border-color .15s; }
.ar-saved-doc-thumb:hover img { border-color: #4f46e5; }
.ar-saved-doc-thumb .ar-saved-main-badge { position: absolute; top: 4px; right: 4px; background: #4f46e5; color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 4px; pointer-events: none; }
.ar-saved-doc-fname { font-size: .74rem; color: #6c757d; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 120px; }
.ar-saved-doc-file { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid #e9ecef; border-radius: 6px; font-size: .82rem; color: #495057; background: #f8f9fa; text-decoration: none; }
.ar-saved-doc-file i { font-size: .95rem; color: #4f46e5; }
.ar-tree-l1 { display: flex; align-items: center; padding: 11px 14px; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; margin-bottom: 4px; cursor: pointer; user-select: none; transition: background .12s; }
.ar-tree-l1:hover { background: #f1f3f5; }
.ar-tree-chevron { font-size: 1rem; color: #6c757d; margin-right: 6px; flex-shrink: 0; transition: transform .18s; }
.ar-tree-chevron.open   { transform: rotate(0deg); }
.ar-tree-chevron.closed { transform: rotate(-90deg); }
.ar-tree-l1-badge  { flex-shrink: 0; }
.ar-tree-l1-count  { font-size: .82rem; color: #6c757d; margin-left: 4px; white-space: nowrap; }
.ar-tree-l1-spacer { flex: 1; }
.ar-tree-l1-total  { font-size: .95rem; font-weight: 700; color: #198754; white-space: nowrap; }
.ar-tree-l1-body { padding-left: 1.1rem; border-left: 2px solid #e9ecef; margin-left: .85rem; margin-bottom: .75rem; }
.ar-tree-l2 { display: flex; align-items: center; padding: 7px 10px; margin: 5px 0 2px 0; border-radius: 6px; cursor: pointer; user-select: none; transition: background .12s; }
.ar-tree-l2:hover { background: #f8f9fa; }
.ar-tree-l2-name  { font-size: .92rem; font-weight: 600; color: #495057; }
.ar-tree-l2-count { font-size: .78rem; color: #6c757d; margin-left: 6px; white-space: nowrap; }
.ar-tree-l2-spacer { flex: 1; }
.ar-tree-l2-total { font-size: .9rem; font-weight: 700; color: #198754; white-space: nowrap; }
.ar-tree-l2-body { padding-left: .9rem; border-left: 2px solid #f1f3f5; margin-left: .7rem; margin-bottom: 4px; }
.ar-tree-l3 { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid #f8f9fa; transition: background .1s; border-radius: 4px; }
.ar-tree-l3:last-child { border-bottom: none; }
.ar-tree-l3:hover { background: #fafafa; }
.ar-tree-l3-info    { flex: 1; min-width: 0; }
.ar-tree-l3-name    { font-size: .92rem; font-weight: 600; color: #212529; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-tree-l3-id      { font-size: .75rem; color: #adb5bd; font-family: monospace; }
.ar-tree-l3-value   { font-size: .95rem; font-weight: 700; color: #198754; white-space: nowrap; min-width: 130px; text-align: right; }
.ar-tree-l3-actions { display: flex; gap: 4px; flex-shrink: 0; }
.ar-qr-wrap { display: flex; flex-direction: column; align-items: center; padding: 1rem 0; gap: .75rem; }
.ar-qr-wrap img { width: 220px; height: 220px; border: 1px solid #e9ecef; border-radius: 8px; padding: 10px; background: #fff; }
.ar-qr-asset-name { font-size: 1rem; font-weight: 600; color: #212529; text-align: center; }
.ar-qr-asset-id   { font-size: .85rem; color: #6c757d; font-family: monospace; text-align: center; }




/* ================================================================
   DEPRECIATION MANAGEMENT
================================================================ */
.dep-calc-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; }
.dep-calc-title { display: flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 700; color: #212529; margin: 0 0 3px 0; }
.dep-calc-title i { font-size: 1.25rem; color: #4f46e5; }
.dep-calc-sub { font-size: .9rem; color: #6c757d; margin: 0 0 1.1rem 0; }
.dep-controls { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.dep-asset-select { flex: 1; min-width: 240px; height: 42px; font-size: .92rem; }
.dep-calc-btn     { height: 42px; padding: 0 1.4rem; font-size: .92rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.dep-schedule-btn { height: 42px; padding: 0 1.2rem; font-size: .92rem; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.dep-kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .9rem; margin-bottom: 0; }
@media (max-width: 992px) { .dep-kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 576px)  { .dep-kpi-grid { grid-template-columns: 1fr 1fr; } }
.dep-kpi-card  { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1rem 1.2rem; }
.dep-kpi-label { font-size: .85rem; color: #6c757d; margin: 0 0 6px 0; font-weight: 500; }
.dep-kpi-value { font-size: 1.35rem; font-weight: 700; color: #212529; margin: 0; line-height: 1.2; }
.dep-kpi-value.muted { font-size: 1.05rem; font-weight: 500; color: #495057 !important; }
.dep-records-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; overflow-x: auto; }
.dep-records-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; }
.dep-records-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; color: #212529; margin: 0; }
.dep-records-title i { font-size: 1.1rem; color: #6c757d; }
.dep-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dep-table th { font-size: .78rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; padding: 11px 13px; border-bottom: 2px solid #f1f3f5; white-space: nowrap; }
.dep-table th.red { color: #dc3545 !important; }
.dep-table td { padding: 15px 13px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
.dep-table tr:last-child td { border-bottom: none; }
.dep-table tr:hover td { background: #fafafa; }
.dep-amount  { font-weight: 600; color: #dc3545; white-space: nowrap; }
.dep-bookval { font-weight: 500; color: #212529; white-space: nowrap; }
.dep-del-btn { width: 32px; height: 32px; border: none; background: none; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #dc3545; transition: background .15s; padding: 0; }
.dep-del-btn:hover { background: #fde8e8; }
.dep-empty { text-align: center; padding: 2.5rem 1rem; color: #6c757d; }
.dep-empty i { font-size: 2.5rem; color: #dee2e6; margin-bottom: .75rem; display: block; }
.dep-empty p { font-size: .95rem; margin-bottom: 1rem; }
.dep-schedule-section { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; overflow-x: auto; }
.dep-schedule-title { font-size: 1.05rem; font-weight: 700; color: #212529; margin: 0 0 2px 0; }
.dep-schedule-sub   { font-size: .875rem; color: #6c757d; margin: 0 0 1rem 0; }
.dep-schedule-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dep-schedule-table th { font-size: .78rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; padding: 11px 13px; border-bottom: 2px solid #f1f3f5; white-space: nowrap; }
.dep-schedule-table th.red { color: #dc3545 !important; }
.dep-schedule-table td { padding: 13px 13px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
.dep-schedule-table tr:last-child td { border-bottom: none; }
.dep-schedule-table tr:hover td { background: #fafafa; }
.dep-sch-depr  { color: #dc3545; font-weight: 500; white-space: nowrap; }
.dep-sch-accum { color: #dc3545; font-weight: 500; white-space: nowrap; }
.dep-sch-book  { font-weight: 700; color: #212529; white-space: nowrap; }

/* ================================================================
   QR CODE MANAGEMENT
================================================================ */
.qr-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
@media (max-width: 768px) { .qr-layout { grid-template-columns: 1fr; } }
.qr-panel { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; }
.qr-panel-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; color: #212529; margin: 0 0 3px 0; }
.qr-panel-title i { font-size: 1.15rem; color: #4f46e5; }
.qr-panel-sub { font-size: .88rem; color: #6c757d; margin: 0 0 1rem 0; }
.qr-search-wrap { position: relative; margin-bottom: .75rem; }
.qr-search-wrap .qr-search-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #adb5bd; font-size: 1rem; pointer-events: none; }
.qr-search-wrap input { padding-left: 2.2rem; font-size: .92rem; }
.qr-asset-select { font-size: .92rem; margin-bottom: 1rem; }
.qr-display-area { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.qr-empty-state { text-align: center; color: #adb5bd; padding: 1rem; }
.qr-empty-state i { font-size: 4rem; display: block; margin-bottom: .75rem; }
.qr-empty-state p { font-size: .95rem; margin: 0; }
.qr-image-card { border: 2px solid #e9ecef; border-radius: 10px; padding: 1rem; background: #fff; margin-bottom: 1rem; display: inline-block; }
.qr-image-card img { width: 200px; height: 200px; display: block; }
.qr-actions { display: flex; gap: .6rem; justify-content: center; margin-bottom: .75rem; }
.qr-caption { font-size: .88rem; color: #6c757d; text-align: center; }
.qr-recent-list { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.qr-recent-list::-webkit-scrollbar { width: 4px; }
.qr-recent-list::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 4px; }
.qr-asset-row { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid #f1f3f5; border-radius: 8px; cursor: pointer; transition: background .12s, border-color .12s; }
.qr-asset-row:hover  { background: #f8f9fa; border-color: #dee2e6; }
.qr-asset-row.active { background: #f0f4ff; border-color: #4f46e5; }
.qr-asset-thumb { width: 46px; height: 46px; border-radius: 8px; flex-shrink: 0; overflow: hidden; background: #f1f3f5; display: flex; align-items: center; justify-content: center; border: 1px solid #e9ecef; }
.qr-asset-thumb img { width: 100%; height: 100%; object-fit: cover; }
.qr-asset-thumb i   { font-size: 1.15rem; color: #adb5bd; }
.qr-asset-info { flex: 1; min-width: 0; }
.qr-asset-name { font-size: .92rem; font-weight: 600; color: #212529; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-asset-id   { font-size: .78rem; color: #adb5bd; font-family: monospace; }
.qr-asset-btn { width: 32px; height: 32px; border: none; background: none; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; color: #6c757d; transition: background .15s, color .15s; padding: 0; flex-shrink: 0; }
.qr-asset-btn:hover { background: #eef2ff; color: #4f46e5; }
.qr-scanned-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; }
.qr-scanned-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; color: #212529; margin: 0 0 1rem 0; }
.qr-scanned-title i { font-size: 1.15rem; color: #198754; }
.qr-scanned-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 576px) { .qr-scanned-grid { grid-template-columns: 1fr; } }
.qr-scanned-label { font-size: .84rem; font-weight: 500; color: #6c757d; margin: 0 0 2px 0; }
.qr-scanned-value { font-size: .95rem; font-weight: 600; color: #212529; margin: 0; }
.qr-video-wrap { position: relative; overflow: hidden; border-radius: 0 0 8px 8px; background: #000; }
.qr-video-wrap video { width: 100%; display: block; max-height: 380px; object-fit: cover; }
.qr-scan-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 200px; height: 200px; border: 3px solid #4f46e5; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); pointer-events: none; }
.qr-scan-hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #fff; font-size: .88rem; pointer-events: none; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.qr-canvas { display: none; }

/* ── QR Scanner Modal Styles ───────────────────────────────── */
.qrs-inner {
    padding: 4px 0 0;
}

.qrs-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
}

.qrs-title-icon {
    font-size: 1.3rem;
    color: #212529;
    margin-top: 2px;
    flex-shrink: 0;
}

.qrs-title {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 2px 0;
}

.qrs-desc {
    font-size: .8rem;
    color: #6c757d;
    margin: 0;
}

.qrs-error {
    font-size: .85rem;
    border-radius: 8px;
    padding: .6rem .9rem;
}

/* Camera wrap */
.qrs-camera-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    background: #f3f4f6;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Idle placeholder — matches TSX "Camera not active" */
.qrs-idle {
    text-align: center;
}

.qrs-idle-icon {
    font-size: 3rem;
    color: #9ca3af;
    display: block;
    margin-bottom: 8px;
}

.qrs-idle-text {
    font-size: .85rem;
    color: #6b7280;
    margin: 0;
}

/* Live video fills the wrap */
.qrs-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Blue border overlay — matches TSX blue inset border when scanning */
.qrs-border-overlay {
    position: absolute;
    inset: 0;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* White inner crosshair box — matches TSX w-48 h-48 white border */
.qrs-crosshair {
    width: 180px;
    height: 180px;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 8px;
}

/* Hint text — matches TSX text-xs text-gray-500 text-center */
.qrs-hint {
    text-align: center;
    margin-top: .6rem;
}

    .qrs-hint p {
        font-size: .75rem;
        color: #9ca3af;
        margin: 0 0 2px 0;
    }

/* ================================================================
   ASSET MOVEMENT
================================================================ */
.am-filter-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; }
.am-filter-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; color: #212529; margin: 0 0 3px 0; }
.am-filter-title i { font-size: 1.15rem; color: #4f46e5; }
.am-filter-sub { font-size: .88rem; color: #6c757d; margin: 0 0 1.1rem 0; }
.am-filter-row { display: flex; gap: .75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: .85rem; }
.am-filter-row:last-child { margin-bottom: 0; }
.am-filter-col   { flex: 1; min-width: 150px; }
.am-filter-col-2 { flex: 2; min-width: 240px; }
.am-filter-label { font-size: .84rem; font-weight: 500; color: #495057; margin-bottom: 4px; display: block; }
.am-records-section { margin-bottom: 1.25rem; overflow-x: auto; }
.am-records-title { font-size: 1.15rem; font-weight: 700; color: #212529; margin: 0 0 1rem 0; }
.am-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.am-table th { font-size: .76rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; padding: 11px 11px; border-bottom: 2px solid #f1f3f5; white-space: nowrap; background: #fff; }
.am-table td { padding: 14px 11px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
.am-table tr:last-child td { border-bottom: none; }
.am-table tr:hover td { background: #fafafa; }
.am-asset-name { font-size: .92rem; font-weight: 600; color: #212529; line-height: 1.3; }
.am-asset-id   { font-size: .75rem; color: #adb5bd; font-family: monospace; }
.am-loc-cell  { font-size: .88rem; color: #495057; white-space: nowrap; }
.am-loc-icon  { color: #adb5bd; font-size: .9rem; margin-right: 3px; }
.am-dept-icon { color: #adb5bd; font-size: .9rem; margin-right: 3px; }
.am-na          { color: #adb5bd; font-size: .88rem; }
.am-remarks-cell { font-size: .88rem; color: #495057; max-width: 200px; }
.am-date-cell    { font-size: .88rem; color: #495057; white-space: nowrap; }
.am-actions { display: flex; gap: 4px; }
.am-action-btn { width: 30px; height: 30px; border: none; background: none; cursor: pointer; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #6c757d; transition: background .15s, color .15s; padding: 0; }
.am-action-btn.edit:hover   { background: #eef2ff; color: #4f46e5; }
.am-action-btn.delete:hover { background: #fde8e8; color: #dc3545; }
.am-empty { text-align: center; padding: 3rem 1rem; color: #6c757d; }
.am-empty i { font-size: 2.5rem; color: #dee2e6; margin-bottom: .75rem; display: block; }
.am-empty p { font-size: .95rem; margin: 0; }
.am-modal-row { display: flex; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.am-modal-col  { flex: 1; min-width: 0; }
.am-modal-col-full { width: 100%; margin-bottom: 1rem; }
.am-modal-label { font-size: .88rem; font-weight: 600; color: #495057; margin-bottom: 4px; display: block; }
.am-required { color: #dc3545; margin-left: 2px; }

@media(max-width:576px) {
    .am-filter-row { flex-direction: column; }
    .am-filter-col, .am-filter-col-2 { min-width: 100%; }
    .am-modal-row { flex-direction: column; }
}

/* ================================================================
   ASSET MAINTENANCE
================================================================ */
.mn-kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.25rem; }
@media(max-width:768px) { .mn-kpi-grid { grid-template-columns: 1fr 1fr; } }

.mn-kpi-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.2rem 1.4rem; }
.mn-kpi-body { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.mn-kpi-label { font-size: .88rem; color: #6c757d; margin: 0 0 4px 0; font-weight: 500; }
.mn-kpi-val   { font-size: 2rem; font-weight: 700; color: #212529; margin: 0; line-height: 1; }
.mn-kpi-icon  { width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }

.mn-filter-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; }
.mn-filter-title { font-size: 1.05rem; font-weight: 700; color: #212529; margin: 0 0 2px 0; }
.mn-filter-sub   { font-size: .88rem; color: #6c757d; margin: 0 0 .9rem 0; }

.mn-records-card  { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; overflow-x: auto; }
.mn-records-title { font-size: 1.15rem; font-weight: 700; color: #212529; margin: 0 0 1rem 0; }

.mn-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.mn-table th { font-size: .76rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; padding: 11px 13px; border-bottom: 2px solid #f1f3f5; white-space: nowrap; }
.mn-table td { padding: 15px 13px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
.mn-table tr:last-child td { border-bottom: none; }
.mn-table tr:hover td { background: #fafafa; }

.mn-asset-name { font-size: .92rem; font-weight: 600; color: #212529; }
.mn-asset-id   { font-size: .75rem; color: #adb5bd; font-family: monospace; }
.mn-type-badge, .mn-status-badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.mn-type-badge.scheduled   { background: #e8f4fd; color: #0d6efd; }
.mn-type-badge.unscheduled { background: #fff3e0; color: #fd7e14; }
.mn-type-badge.preventive  { background: #e6f9f0; color: #198754; }
.mn-type-badge.corrective  { background: #f3e8ff; color: #7c3aed; }
.mn-type-badge.emergency   { background: #fde8e8; color: #dc3545; }
.mn-status-badge.completed   { background: #d1f5e0; color: #0a6b36; }
.mn-status-badge.in-progress { background: #fff3e0; color: #b45309; }
.mn-status-badge.scheduled   { background: #e8f4fd; color: #0d6efd; }
.mn-status-badge.cancelled   { background: #f1f3f5; color: #6c757d; }
.mn-cost { font-size: .92rem; font-weight: 600; color: #212529; white-space: nowrap; }
.mn-actions { display: flex; gap: 4px; }
.mn-action-btn { width: 30px; height: 30px; border: none; background: none; cursor: pointer; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #6c757d; transition: background .15s,color .15s; padding: 0; }
.mn-action-btn.edit:hover   { background: #eef2ff; color: #4f46e5; }
.mn-action-btn.delete:hover { background: #fde8e8; color: #dc3545; }
.mn-empty { text-align: center; padding: 3rem 1rem; color: #6c757d; }
.mn-empty i { font-size: 2.5rem; color: #dee2e6; margin-bottom: .75rem; display: block; }
.mn-mlabel { font-size: .88rem; font-weight: 600; color: #495057; margin-bottom: 4px; display: block; }

/* ================================================================
   ASSET DISPOSAL
================================================================ */
.ad-kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.25rem; }
@media(max-width:768px) { .ad-kpi-grid { grid-template-columns: 1fr 1fr; } }

.ad-kpi-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.2rem 1.4rem; }
.ad-kpi-body { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.ad-kpi-label { font-size: .88rem; color: #6c757d; margin: 0 0 4px 0; font-weight: 500; }
.ad-kpi-val   { font-size: 2rem; font-weight: 700; color: #212529; margin: 0; line-height: 1; }
.ad-kpi-icon  { width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }

.ad-records-card  { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; overflow-x: auto; }
.ad-records-title { font-size: 1.15rem; font-weight: 700; color: #212529; margin: 0 0 2px 0; }
.ad-records-sub   { font-size: .88rem; color: #6c757d; margin: 0 0 1rem 0; }

.ad-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ad-table th { font-size: .76rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; padding: 11px 13px; border-bottom: 2px solid #f1f3f5; white-space: nowrap; }
.ad-table td { padding: 15px 13px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
.ad-table tr:last-child td { border-bottom: none; }
.ad-table tr:hover td { background: #fafafa; }
.ad-asset-name { font-size: .92rem; font-weight: 600; color: #212529; }
.ad-asset-id   { font-size: .75rem; color: #adb5bd; font-family: monospace; }
.ad-method-badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: .78rem; font-weight: 600; background: #fde8e8; color: #dc3545; }
.ad-value { font-size: .92rem; font-weight: 600; color: #198754; white-space: nowrap; }
.ad-actions { display: flex; gap: 4px; }
.ad-action-btn { width: 30px; height: 30px; border: none; background: none; cursor: pointer; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #6c757d; transition: background .15s,color .15s; padding: 0; }
.ad-action-btn.edit:hover   { background: #eef2ff; color: #4f46e5; }
.ad-action-btn.delete:hover { background: #fde8e8; color: #dc3545; }
.ad-empty { text-align: center; padding: 4rem 1rem; color: #6c757d; }
.ad-empty i { font-size: 3rem; color: #dee2e6; margin-bottom: .75rem; display: block; }
.ad-empty p { font-size: .95rem; margin: 4px 0 0 0; }
.ad-empty small { font-size: .85rem; color: #adb5bd; }
.ad-mlabel { font-size: .88rem; font-weight: 600; color: #495057; margin-bottom: 4px; display: block; }

/* ================================================================
   AUDIT & VERIFICATION
================================================================ */
.au-kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.25rem; }
@media(max-width:768px) { .au-kpi-grid { grid-template-columns: 1fr 1fr; } }

.au-kpi-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.2rem 1.4rem; }
.au-kpi-body { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.au-kpi-label { font-size: .88rem; color: #6c757d; margin: 0 0 4px 0; font-weight: 500; }
.au-kpi-val   { font-size: 2rem; font-weight: 700; color: #212529; margin: 0; line-height: 1; }
.au-kpi-icon  { width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }

.au-filter-card  { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; }
.au-filter-title { font-size: 1.05rem; font-weight: 700; color: #212529; margin: 0 0 2px 0; }
.au-filter-sub   { font-size: .88rem; color: #6c757d; margin: 0 0 .9rem 0; }

.au-records-card  { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; overflow-x: auto; }
.au-records-title { font-size: 1.15rem; font-weight: 700; color: #212529; margin: 0; }

.au-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.au-table th { font-size: .76rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; padding: 11px 13px; border-bottom: 2px solid #f1f3f5; white-space: nowrap; }
.au-table td { padding: 14px 13px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
.au-table tr:last-child td { border-bottom: none; }
.au-table tr:hover td { background: #fafafa; }
.au-asset-name { font-size: .92rem; font-weight: 600; color: #212529; }
.au-asset-id   { font-size: .75rem; color: #adb5bd; font-family: monospace; }
.au-status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.au-status-badge.verified     { background: #d1f5e0; color: #0a6b36; }
.au-status-badge.discrepancy  { background: #fde8e8; color: #dc3545; }
.au-status-badge.missing      { background: #fff3e0; color: #b45309; }
.au-status-badge.under-review { background: #e8f4fd; color: #0d6efd; }
.au-check-icon { font-size: 1.15rem; }
.au-check-icon.yes { color: #198754; }
.au-check-icon.no  { color: #dee2e6; }
.au-notes { font-size: .88rem; color: #495057; max-width: 200px; }
.au-actions { display: flex; gap: 4px; }
.au-action-btn { width: 30px; height: 30px; border: none; background: none; cursor: pointer; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 1rem; color: #6c757d; transition: background .15s,color .15s; padding: 0; }
.au-action-btn.edit:hover   { background: #eef2ff; color: #4f46e5; }
.au-action-btn.delete:hover { background: #fde8e8; color: #dc3545; }
.au-empty { text-align: center; padding: 3rem 1rem; color: #6c757d; }
.au-empty i { font-size: 2.5rem; color: #dee2e6; margin-bottom: .75rem; display: block; }
.au-empty p { font-size: .95rem; margin: 0; }
.au-mlabel { font-size: .88rem; font-weight: 600; color: #495057; margin-bottom: 4px; display: block; }

/* Shared QRS modal styles (same as QRCode view) */
.qrs-inner {
    padding: 4px 0 0;
}

.qrs-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
}

.qrs-title-icon {
    font-size: 1.3rem;
    color: #212529;
    margin-top: 2px;
    flex-shrink: 0;
}

.qrs-title {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
    margin: 0 0 2px 0;
}

.qrs-desc {
    font-size: .8rem;
    color: #6c757d;
    margin: 0;
}

.qrs-error {
    font-size: .85rem;
    border-radius: 8px;
    padding: .6rem .9rem;
}

.qrs-camera-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    background: #f3f4f6;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrs-idle {
    text-align: center;
}

.qrs-idle-icon {
    font-size: 3rem;
    color: #9ca3af;
    display: block;
    margin-bottom: 8px;
}

.qrs-idle-text {
    font-size: .85rem;
    color: #6b7280;
    margin: 0;
}

.qrs-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.qrs-border-overlay {
    position: absolute;
    inset: 0;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrs-crosshair {
    width: 180px;
    height: 180px;
    border: 2px solid rgba(255,255,255,.85);
    border-radius: 8px;
}

.qrs-hint {
    text-align: center;
    margin-top: .75rem;
}

    .qrs-hint p {
        font-size: .75rem;
        color: #9ca3af;
        margin: 0 0 2px 0;
    }

/* ================================================================
   REPORTS & ANALYTICS
================================================================ */
.rp-config-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; }
.rp-config-title { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; color: #212529; margin: 0 0 3px 0; }
.rp-config-title i { font-size: 1.15rem; color: #4f46e5; }
.rp-config-sub { font-size: .88rem; color: #6c757d; margin: 0 0 1.1rem 0; }
.rp-filter-row { display: grid; grid-template-columns: repeat(4,1fr); gap: .85rem; margin-bottom: .9rem; }
@media(max-width:992px) { .rp-filter-row { grid-template-columns: 1fr 1fr; } }
@media(max-width:576px)  { .rp-filter-row { grid-template-columns: 1fr; } }
.rp-filter-col select { font-size: .92rem; }
.rp-filter-actions { display: flex; gap: .6rem; }

.rp-results-card { background: #fff; border: 1px solid #e9ecef; border-radius: 10px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; overflow-x: auto; }
.rp-results-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; flex-wrap: wrap; gap: .5rem; }
.rp-results-title { font-size: 1.15rem; font-weight: 700; color: #212529; margin: 0; }
.rp-generated-date { font-size: .88rem; color: #adb5bd; }

.rp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rp-table th { font-size: .76rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .05em; padding: 11px 13px; border-bottom: 2px solid #f1f3f5; white-space: nowrap; }
.rp-table td { padding: 15px 13px; border-bottom: 1px solid #f8f9fa; vertical-align: middle; }
.rp-table tr:last-child td { border-bottom: none; }
.rp-table tr:hover td { background: #fafafa; }
.rp-asset-id  { font-weight: 700; font-family: monospace; font-size: .9rem; color: #212529; white-space: nowrap; }
.rp-type-badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: .78rem; font-weight: 500; background: #f1f3f5; color: #495057; }
.rp-status-badge { display: inline-block; padding: 4px 13px; border-radius: 20px; font-size: .78rem; font-weight: 600; }
.rp-status-badge.active            { background: #d1f5e0; color: #0a6b36; }
.rp-status-badge.under-maintenance { background: #fff3e0; color: #b45309; }
.rp-status-badge.disposal          { background: #fde8e8; color: #dc3545; }
.rp-status-badge.inactive          { background: #f1f3f5; color: #6c757d; }
.rp-status-badge.verified          { background: #d1f5e0; color: #0a6b36; }
.rp-status-badge.discrepancy       { background: #fde8e8; color: #dc3545; }
.rp-status-badge.missing           { background: #fff3e0; color: #b45309; }
.rp-status-badge.completed         { background: #d1f5e0; color: #0a6b36; }
.rp-status-badge.in-progress       { background: #fff3e0; color: #b45309; }
.rp-status-badge.scheduled         { background: #e8f4fd; color: #0d6efd; }
.rp-value { white-space: nowrap; font-size: .92rem; color: #212529; }
.rp-bool-icon { font-size: 1.15rem; }
.rp-bool-icon.yes { color: #198754; }
.rp-bool-icon.no  { color: #dee2e6; }
.rp-empty { text-align: center; padding: 3rem 1rem; color: #6c757d; }
.rp-empty i { font-size: 2.5rem; color: #dee2e6; margin-bottom: .75rem; display: block; }
.rp-empty p { font-size: .95rem; margin: 0; }

/* ================================================================
   TOAST NOTIFICATIONS
================================================================ */
.exo-toast { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 9999; min-width: 290px; max-width: 400px; border-radius: 10px; padding: .9rem 1.15rem; font-size: .92rem; font-weight: 500; display: flex; align-items: center; gap: .6rem; box-shadow: 0 8px 24px rgba(0,0,0,.18), 0 2px 6px rgba(0,0,0,.12); animation: exoToastIn .22s cubic-bezier(.4,0,.2,1); border: none !important; }
.exo-toast.success { background: #146c43 !important; color: #fff !important; }
.exo-toast.success .exo-toast-icon { color: #6de9a0; }
.exo-toast.danger  { background: #842029 !important; color: #fff !important; }
.exo-toast.danger  .exo-toast-icon { color: #f1aeb5; }
.exo-toast.warning { background: #664d03 !important; color: #fff !important; }
.exo-toast.warning .exo-toast-icon { color: #ffe69c; }
.exo-toast.info    { background: #084298 !important; color: #fff !important; }
.exo-toast.info    .exo-toast-icon { color: #9ec5fe; }
.exo-toast-icon  { font-size: 1.25rem; flex-shrink: 0; }
.exo-toast-msg   { flex: 1; line-height: 1.4; }
.exo-toast-close { background: none; border: none; color: rgba(255,255,255,.7); cursor: pointer; font-size: 1rem; padding: 0; line-height: 1; flex-shrink: 0; transition: color .15s; }
.exo-toast-close:hover { color: #fff; }
@keyframes exoToastIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media(max-width:576px) {
    .exo-toast { min-width: unset; width: calc(100vw - 2rem); bottom: .75rem; right: 1rem; font-size: .88rem; }
}

/* ================================================================
   GLOBAL MOBILE TABLE SCROLLING
================================================================ */
@media(max-width:768px) {
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .modal-dialog { margin: .5rem; }
    .modal-dialog.modal-lg { max-width: calc(100vw - 1rem); }
    .row.g-3 > .col-md-6 { width: 100%; }
}
