/* ═══════════════════════════════════════════════
   HH-Water IoT — HydroCurator Design System
   Primary: #1a3c6e | Accent: #f97316 | Font: Inter
═══════════════════════════════════════════════ */

:root {
    /* HydroCurator tokens */
    --primary:     #1a3c6e;
    --accent:      #f97316;
    --text:        #0f172a;
    --text-2:      #64748b;
    --border:      #e2e8f0;
    --bg:          #f8fafc;

    /* Legacy aliases — mapped to HC tokens */
    --aw-primary:       #1a3c6e;
    --aw-primary-dark:  #0f2548;
    --aw-secondary:     #2563eb;
    --aw-accent:        #f97316;
    --aw-pale:          #dbeafe;
    --aw-teal:          #1d4ed8;

    --aw-sidebar:       #1a3c6e;
    --aw-sidebar-hover: #1a3c6e;
    --aw-sidebar-active:#2563eb;
    --aw-sidebar-text:  #cbd5e1;

    --aw-topbar-h:      60px;
    --aw-sidebar-w:     220px;

    --aw-success:  #0d9e6e;
    --aw-danger:   #e03131;
    --aw-warning:  #e07d31;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: #ffffff;
    color: var(--text);
}

/* ── Layout Wrapper ────────────────────────────── */
.aw-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ───────────────────────────────────── */
.aw-sidebar {
    width: var(--aw-sidebar-w);
    background: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1002;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid #e8f4fb;
}

.aw-sidebar-brand {
    background: #fff;
    border-bottom: 1px solid #e8f4fb;
    color: var(--aw-primary-dark);
    font-weight: 800;
    font-size: 1rem;
    padding: 0 18px;
    height: var(--aw-topbar-h);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: .8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.aw-sidebar-brand i {
    color: var(--aw-secondary);
    font-size: 1.2rem;
}

.aw-nav { flex: 1; padding: 10px 0; }

.aw-nav-section {
    padding: 14px 18px 4px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #b0cfe0;
    white-space: nowrap;
}

.aw-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 18px;
    color: #4a6f8a;
    text-decoration: none;
    font-size: .84rem;
    white-space: nowrap;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}
.aw-nav a:hover {
    background: #f0f8ff;
    color: var(--aw-primary);
    border-left-color: var(--aw-accent);
}
.aw-nav a.active {
    background: #e8f4fb;
    color: var(--aw-primary);
    font-weight: 600;
    border-left-color: var(--aw-primary);
}
.aw-nav a i { width: 18px; text-align: center; font-size: .88rem; }
.aw-nav a.active i { color: var(--aw-primary); }

.aw-nav .sub-link {
    padding-left: 42px;
    font-size: .8rem;
}


/* ── Top Bar ───────────────────────────────────── */
.aw-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--aw-topbar-h);
    background: #fff;
    border-bottom: 1px solid #e8f4fb;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 12px rgba(0,119,182,.08);
}

.aw-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.aw-topbar-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--aw-primary-dark);
    letter-spacing: .3px;
}

.aw-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Status dot */
.aw-status-dot {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    color: var(--aw-success);
    font-weight: 600;
}
.aw-status-dot::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--aw-success);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* ── Avatar button & dropdown ──────────────────── */
.aw-avatar-wrap {
    position: relative;
}

.aw-avatar-btn {
    width: 38px; height: 38px;
    background: var(--aw-primary);
    border: 2px solid #dde8f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    color: #fff;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, border-color .15s;
    flex-shrink: 0;
}
.aw-avatar-btn:hover {
    background: #153060;
    border-color: var(--aw-primary);
    box-shadow: 0 0 0 4px rgba(26,60,110,.12);
}

.aw-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(26,60,110,.18);
    border: 1px solid #e4edf8;
    min-width: 220px;
    z-index: 300;
    overflow: hidden;
    animation: dropIn .15s ease;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.aw-user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 14px;
    background: #f7fafd;
}
.aw-user-dropdown-avatar {
    width: 40px; height: 40px;
    background: var(--aw-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}
.aw-user-dropdown-name {
    font-size: .87rem;
    font-weight: 700;
    color: #1a2a40;
    line-height: 1.2;
}
.aw-user-dropdown-role {
    font-size: .74rem;
    color: #7aa8c7;
    margin-top: 2px;
}
.aw-user-dropdown-divider {
    height: 1px;
    background: #eef3fb;
}
.aw-user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: #2c3e55;
    text-decoration: none;
    font-size: .86rem;
    transition: background .12s, color .12s;
}
.aw-user-dropdown-item i {
    width: 16px;
    color: var(--aw-primary);
    font-size: .88rem;
}
.aw-user-dropdown-item:hover {
    background: #f0f6ff;
    color: var(--aw-primary);
}
.aw-user-dropdown-logout { color: #c0392b; }
.aw-user-dropdown-logout i { color: #c0392b; }
.aw-user-dropdown-logout:hover { background: #fff5f5; color: #a93226; }

/* ── Main Content ──────────────────────────────── */
.aw-main {
    margin-left: 0;
    margin-top: var(--aw-topbar-h);
    padding: 26px;
    min-height: calc(100vh - var(--aw-topbar-h));
    background: #f4f8fb;
    width: 100%;
    box-sizing: border-box;
}

/* ── Page Header ───────────────────────────────── */
.aw-page-header {
    margin-bottom: 24px;
}
.aw-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--aw-primary-dark);
    margin: 0 0 4px;
}
.aw-breadcrumb {
    font-size: .78rem;
    color: #7aa8c7;
    margin-bottom: 4px;
}
.aw-breadcrumb a { color: var(--aw-teal); text-decoration: none; }
.aw-breadcrumb a:hover { text-decoration: underline; }

/* ── Stat Cards ────────────────────────────────── */
.aw-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.aw-stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 2px 12px rgba(0,119,182,.08);
    border: 1px solid #e8f4fb;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform .2s, box-shadow .2s;
}
.aw-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,119,182,.14);
}

.aw-stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.aw-stat-icon.blue    { background: #dbeafe; color: var(--aw-primary); }
.aw-stat-icon.teal    { background: #d0f5ee; color: #0d9e6e; }
.aw-stat-icon.red     { background: #fee2e2; color: #e03131; }
.aw-stat-icon.aqua    { background: #caf0f8; color: var(--aw-teal); }

.aw-stat-body {}
.aw-stat-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--aw-primary-dark);
    line-height: 1;
}
.aw-stat-label {
    font-size: .75rem;
    color: #7aa8c7;
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ── Old stat bar (kept for compat) ─────────────── */
.aw-stat-bar {
    background: #f0f8ff;
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: .9rem;
    color: #444;
    border: 1px solid #d0eaf8;
}
.aw-stat-bar .ok { color: var(--aw-success); }
.aw-stat-bar .err { color: var(--aw-danger); }

/* ── Card ──────────────────────────────────────── */
.aw-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,119,182,.07);
    border: 1px solid #e8f4fb;
    overflow: hidden;
    width: 100%;
}

.aw-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e8f4fb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.aw-card-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--aw-primary-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.aw-card-title i { color: var(--aw-secondary); }

.aw-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f8ff;
    flex-wrap: wrap;
    background: #fafeff;
}

.aw-search {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
    padding: 8px 14px 8px 36px;
    border: 1.5px solid #d0eaf8;
    border-radius: 8px;
    font-size: .85rem;
    outline: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230077B6' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 12px center;
    transition: border-color .15s, box-shadow .15s;
}
.aw-search:focus {
    border-color: var(--aw-secondary);
    box-shadow: 0 0 0 3px rgba(0,180,216,.12);
}
.aw-search::placeholder { color: #b0cfe0; }

.aw-select {
    padding: 8px 12px;
    border: 1.5px solid #d0eaf8;
    border-radius: 8px;
    font-size: .84rem;
    outline: none;
    cursor: pointer;
    background: #fff;
    color: #334;
    transition: border-color .15s;
}
.aw-select:focus { border-color: var(--aw-secondary); }

/* ── Data Table ────────────────────────────────── */
.aw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
}
.aw-table thead th {
    background: #f0f8ff;
    color: var(--aw-primary-dark);
    font-weight: 700;
    font-size: .73rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 11px 16px;
    border-bottom: 2px solid #d0eaf8;
    white-space: nowrap;
}
.aw-table tbody tr { border-bottom: 1px solid #f0f8ff; transition: background .12s; }
.aw-table tbody tr:nth-child(even) { background: #fafeff; }
.aw-table tbody tr:hover { background: #e8f4fb; }
.aw-table td { padding: 10px 16px; vertical-align: middle; color: #334; }
.aw-table td.serial {
    color: var(--aw-primary);
    font-weight: 600;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: .82rem;
}
.aw-table td.serial:hover { text-decoration: underline; color: var(--aw-teal); }

/* ── Buttons ───────────────────────────────────── */
.btn-aw-edit {
    background: #e8f4fb;
    color: var(--aw-primary);
    border: 1px solid #c8e6f7;
    border-radius: 7px;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.btn-aw-edit:hover { background: var(--aw-primary); color: #fff; border-color: var(--aw-primary); }

.btn-aw-delete {
    background: #fee2e2;
    color: var(--aw-danger);
    border: 1px solid #fca5a5;
    border-radius: 7px;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.btn-aw-delete:hover { background: var(--aw-danger); color: #fff; border-color: var(--aw-danger); }

.btn-aw-view {
    background: #d0f5ee;
    color: var(--aw-success);
    border: 1px solid #6ee7c7;
    border-radius: 7px;
    padding: 5px 12px;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
}
.btn-aw-view:hover { background: var(--aw-success); color: #fff; }

.btn-aw-add {
    background: var(--aw-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, transform .15s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 3px 10px rgba(0,119,182,.3);
}
.btn-aw-add:hover { opacity: .9; transform: translateY(-1px); }

/* ── Status Badges ─────────────────────────────── */
.badge-active {
    background: #d0f5ee;
    color: #0d9e6e;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .3px;
}
.badge-inactive {
    background: #fee2e2;
    color: #e03131;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .3px;
}

/* ── Toggle Switch ─────────────────────────────── */
.aw-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}
.aw-toggle input { opacity: 0; width: 0; height: 0; }
.aw-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #c8d8e8;
    transition: .3s;
    border-radius: 24px;
}
.aw-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.aw-toggle input:checked + .aw-toggle-slider { background: var(--aw-secondary); }
.aw-toggle input:checked + .aw-toggle-slider:before { transform: translateX(22px); }

/* ── Form ──────────────────────────────────────── */
.aw-form-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,119,182,.08);
    border: 1px solid #e8f4fb;
    padding: 28px;
    max-width: 700px;
}
.aw-form-group { margin-bottom: 18px; }
.aw-form-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #4a6f8a;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.aw-form-input {
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid #d0eaf8;
    border-radius: 8px;
    font-size: .9rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    background: #fff;
}
.aw-form-input:focus {
    border-color: var(--aw-secondary);
    box-shadow: 0 0 0 3px rgba(0,180,216,.12);
}
.btn-aw-save {
    background: var(--aw-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 28px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: opacity .15s;
    box-shadow: 0 3px 10px rgba(0,119,182,.3);
}
.btn-aw-save:hover { opacity: .9; }

/* ── Modal ─────────────────────────────────────── */
.aw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3,4,94,.35);
    backdrop-filter: blur(2px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aw-modal {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    width: 500px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,119,182,.2);
    border: 1px solid #e8f4fb;
}
.aw-modal-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}
.aw-modal-icon {
    width: 42px; height: 42px;
    background: #dbeafe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--aw-primary);
    flex-shrink: 0;
}
.aw-modal h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--aw-primary-dark);
}
.aw-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f8ff;
}
.btn-cancel {
    background: #f0f8ff;
    border: 1.5px solid #d0eaf8;
    color: #4a6f8a;
    border-radius: 8px;
    padding: 9px 20px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    transition: background .15s;
}
.btn-cancel:hover { background: #d0eaf8; }
.btn-save {
    background: var(--aw-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 22px;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0,119,182,.3);
    transition: opacity .15s;
}
.btn-save:hover { opacity: .9; }

/* ── Pagination ────────────────────────────────── */
.aw-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    border-top: 1px solid #f0f8ff;
}
.aw-pagination button {
    width: 34px; height: 34px;
    border: 1.5px solid #d0eaf8;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: .84rem;
    color: var(--aw-primary);
    transition: all .15s;
    font-weight: 600;
}
.aw-pagination button:hover {
    background: var(--aw-primary);
    color: #fff;
    border-color: var(--aw-primary);
}
.aw-pagination button.active {
    background: var(--aw-primary);
    color: #fff;
    border-color: var(--aw-primary);
}

/* ── Map container ─────────────────────────────── */
.aw-map-container {
    width: 100%;
    height: 440px;
    background: #e8f4fb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aw-teal);
    font-size: 1rem;
    margin-bottom: 22px;
    border: 2px dashed #90e0ef;
    overflow: hidden;
}

/* ── Water wave divider ────────────────────────── */
.aw-wave-divider {
    height: 4px;
    background: var(--aw-primary);
    border-radius: 2px;
    margin-bottom: 24px;
}

/* ── Section header ────────────────────────────── */
.aw-section-title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--aw-primary-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.aw-section-title::before {
    content: '';
    width: 4px; height: 18px;
    background: var(--aw-primary);
    border-radius: 2px;
}

/* ── Language Dropdown ─────────────────────────── */
.aw-lang-dropdown {
    position: relative;
}
.aw-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f8ff;
    border: 1.5px solid #d0eaf8;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--aw-primary);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.aw-lang-btn:hover {
    background: #d0eaf8;
    border-color: var(--aw-secondary);
}
.aw-lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,119,182,.18);
    border: 1px solid #e8f4fb;
    overflow: hidden;
    min-width: 160px;
    z-index: 200;
}
.aw-lang-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: none;
    border: none;
    font-size: .85rem;
    color: #334;
    cursor: pointer;
    transition: background .15s, color .15s;
    text-align: left;
}
.aw-lang-menu button:hover { background: #f0f8ff; color: var(--aw-primary); }
.aw-lang-menu button.active {
    background: #e8f4fb;
    color: var(--aw-primary);
    font-weight: 700;
}
.lang-flag { font-size: 1rem; }

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f0f8ff; }
::-webkit-scrollbar-thumb { background: #90e0ef; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--aw-teal); }

/* ── Utility ───────────────────────────────────── */
.text-primary { color: var(--aw-primary) !important; }
.text-muted   { color: #7aa8c7 !important; }
.fw-bold      { font-weight: 700 !important; }

/* ══════════════════════════════════════════════════
   HydroCurator Design System
   Primary #1a3c6e | Accent #f97316 | Font: Inter
══════════════════════════════════════════════════ */

/* HC Overlay */
.hc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* HC Modal box */
.hc-modal {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    position: relative;
    font-family: 'Inter', system-ui, sans-serif;
}

/* HC Close button */
.hc-modal-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: var(--text-2);
    transition: background .15s, color .15s;
    line-height: 1;
}
.hc-modal-close:hover { background: #e2e8f0; color: var(--text); }

/* HC Modal title */
.hc-modal-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 22px;
    padding-right: 36px;
    font-family: 'Inter', system-ui, sans-serif;
}

/* HC Label */
.hc-label {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 6px;
    font-family: 'Inter', system-ui, sans-serif;
}

/* HC Input & Select */
.hc-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: #fafafa;
    font-size: .88rem;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
}
.hc-input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,60,110,.1);
}
.hc-input[readonly], .hc-input:disabled {
    background: #f0f4f8;
    color: var(--text-2);
    cursor: not-allowed;
}

/* HC Form group spacing */
.hc-field { margin-bottom: 18px; }

/* HC Modal footer */
.hc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* HC Buttons */
.hc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: .84rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, sans-serif;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all .15s;
    white-space: nowrap;
}

/* Accent — orange */
.hc-btn-accent {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.hc-btn-accent:hover { background: #ea6c05; border-color: #ea6c05; }

/* Primary — dark blue */
.hc-btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.hc-btn-primary:hover { background: #0f2548; border-color: #0f2548; }

/* Ghost — transparent */
.hc-btn-ghost {
    background: transparent;
    color: var(--text-2);
    border-color: var(--border);
}
.hc-btn-ghost:hover { background: #f1f5f9; color: var(--text); }

/* Outline — primary border */
.hc-btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.hc-btn-outline:hover { background: var(--primary); color: #fff; }

/* HC Form card (full-width inline edit) */
.hc-form-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

/* ── Pagination ──────────────────────────────── */
.aw-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 0;
    flex-wrap: wrap;
}
.aw-pager-btn {
    min-width: 34px; height: 34px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 500;
    color: var(--text);
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.aw-pager-btn:hover:not(:disabled):not(.active) { background: #f0f8ff; border-color: var(--primary); color: var(--primary); }
.aw-pager-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.aw-pager-btn:disabled { opacity: .4; cursor: default; }
.aw-pager-dots { color: var(--text-2); padding: 0 4px; }
.aw-pager-info { font-size: .78rem; color: var(--text-2); margin-left: 8px; }

/* ── Hamburger Button ─────────────────────────── */
.aw-hamburger {
    display: block;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s;
}
.aw-hamburger:hover { background: #f0f8ff; }

/* ── Sidebar Close Button ─────────────────────── */
.aw-sidebar-close {
    display: block;
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 1.1rem;
    cursor: pointer;
    margin-left: auto;
    padding: 4px 8px;
    border-radius: 6px;
}
.aw-sidebar-close:hover { background: #f0f8ff; color: var(--primary); }

/* ── Sidebar Overlay ──────────────────────────── */
.aw-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1001;
}

/* ══════════════════════════════════════════════════
   DESKTOP — sidebar doim ko'rinadi
   ══════════════════════════════════════════════════ */
.aw-topbar { left: var(--aw-sidebar-w); }
.aw-main { margin-left: var(--aw-sidebar-w); width: calc(100% - var(--aw-sidebar-w)); }

/* ══════════════════════════════════════════════════
   RESPONSIVE — Tablet & Mobile (< 1024px)
   ══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    /* Sidebar yashirinadi */
    .aw-sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: none;
    }
    .sidebar-open .aw-sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,.15);
    }
    .sidebar-open .aw-sidebar-overlay { display: block; }
    .aw-hamburger { display: block; }
    .aw-sidebar-close { display: block; }
    .aw-topbar { left: 0; }
    .aw-main { margin-left: 0; width: 100%; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — Mobile (< 768px)
   ══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    :root { --aw-topbar-h: 54px; }
    .aw-topbar { padding: 0 12px; }
    .aw-main { padding: calc(var(--aw-topbar-h) + 12px) 10px 20px; }
    .aw-stat-cards { grid-template-columns: 1fr 1fr !important; gap: 8px; }
    .aw-card { overflow-x: auto; }
    .aw-table { min-width: 600px; }
    .hc-modal, .aw-modal { width: 95vw !important; max-width: 95vw !important; margin: 10px; }
    .aw-card-header { flex-direction: column; gap: 8px; align-items: flex-start !important; }
    .aw-toolbar { flex-direction: column; gap: 8px; }
    .aw-search { width: 100%; }
    .aw-leaflet-map { height: 300px !important; }
    .aw-lang-btn span:not(.lang-flag) { display: none; }
    .aw-lang-btn .fa-chevron-down { display: none; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — Small phones (< 480px)
   ══════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .aw-stat-cards { grid-template-columns: 1fr !important; }
    .aw-page-title { font-size: 1.1rem; }
    .hc-modal, .aw-modal { padding: 16px !important; }
}
