html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    min-width: 320px;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   Khung điều hướng ngang hiện đại (Modern Top Navigation) — FIX-05
   ========================================================================== */
.web-navbar {
    background-color: var(--bg-sidebar);
    color: var(--sidebar-text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    width: 100%;
}

.web-navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
}

.web-navbar-brand-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.web-brand {
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.2px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.web-brand:hover {
    color: #ffffff;
    text-decoration: none;
}

.web-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.web-nav a {
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 13.5px;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

.web-nav a:hover {
    color: var(--sidebar-text-hover);
    background-color: rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.web-nav a.active {
    color: #ffffff;
    background-color: var(--sidebar-active-bg);
    font-weight: 600;
    box-shadow: inset 0 -2px var(--primary);
}

.web-navbar-user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-width: 0;
}

.web-chip-org {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 12.5px;
    max-width: 300px;
    transition: all 0.15s ease-in-out;
}

.web-chip-org.active {
    background-color: rgba(99, 102, 241, 0.25);
    border-color: rgba(129, 140, 248, 0.6);
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.3);
}

.web-chip-org-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    cursor: pointer;
    transition: opacity 0.15s;
}

.web-chip-org-link:hover .web-chip-org-name {
    color: #ffffff;
    text-decoration: underline;
}

.web-chip-org-name {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f1f5f9;
    font-weight: 500;
}

.web-chip-org-role {
    color: #94a3b8;
    font-size: 11.5px;
    flex-shrink: 0;
}

.web-link-change-org {
    color: #818cf8;
    text-decoration: underline;
    font-size: 11.5px;
    margin-left: 4px;
    flex-shrink: 0;
}

.web-link-change-org:hover {
    color: #a5b4fc;
}

.web-user-name {
    color: #f1f5f9;
    font-weight: 500;
    font-size: 13.5px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.btn-logout {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    color: #cbd5e1;
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 11px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   Vùng nội dung chính — căn giữa, thoáng đãng, bắt đầu đúng vị trí
   ========================================================================== */
.web-container {
    width: 100%;
    max-width: 1200px;
    margin: 28px auto;
    padding: 0 20px;
    box-sizing: border-box;
    flex: 1;
}

.web-public-header {
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.web-public-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
}

.web-public-container {
    width: min(100% - 32px, 500px);
    margin: 48px auto;
    flex: 1;
}

.card.narrow {
    max-width: 440px;
    margin: 24px auto;
}

/* ==========================================================================
   Typography & Thẻ nội dung
   ========================================================================== */
h1 {
    margin: 0 0 16px;
    color: var(--text-main);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

h2 {
    margin: 22px 0 12px;
    color: var(--text-main);
    font-size: 17px;
    font-weight: 600;
}

h3 {
    margin: 16px 0 10px;
    font-size: 15px;
    font-weight: 600;
}

p {
    line-height: 1.6;
    margin-bottom: 12px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.muted {
    color: var(--text-muted);
    font-size: 13px;
}

.card .muted:first-child {
    margin-bottom: 16px;
}

/* ==========================================================================
   Biểu mẫu (Forms)
   ========================================================================== */
.card form > label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 500;
}

.card form > label input,
.card form > label select,
.card form > label textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
}

.web-container label:has(:required)::before,
.web-container label:has(+ :required)::before,
.web-public-container label:has(:required)::before,
.web-public-container label:has(+ :required)::before {
    color: var(--danger);
    content: "* ";
    font-weight: 700;
}

.card input[type="checkbox"],
.card input[type="radio"] {
    width: auto;
    accent-color: var(--primary);
}

.btn {
    min-height: 36px;
    margin-top: 8px;
}

.btn:focus-visible,
.btn-logout:focus-visible,
.web-nav a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.28);
    outline-offset: 2px;
}

.btn-danger {
    border-color: transparent;
}

.inline {
    display: inline;
}

/* ==========================================================================
   Phân trang & danh sách tổ chức / menu
   ========================================================================== */
.server-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.server-pagination .muted {
    margin-right: auto;
}

.server-pagination .btn {
    margin: 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 16px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}

.orglist,
.menu {
    display: grid;
    gap: 12px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.orglist li,
.menu li {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    list-style: none;
    transition: all 0.15s ease-in-out;
}

.orglist li:hover,
.menu li:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.orglist a,
.menu a {
    display: block;
    padding: 16px 18px;
    color: var(--text-main);
    text-decoration: none;
}

.orglist a:hover,
.menu a:hover {
    background: #f8fafc;
    text-decoration: none;
}

.orgname {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
}

.orgmeta {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 13px;
}

.tag {
    float: right;
    color: var(--text-muted);
    font-size: 12px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tabs a {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.tabs a.active,
.tabs a:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f5f3ff;
    text-decoration: none;
}

.footer {
    padding: 24px 0 32px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

/* ==========================================================================
   Responsive trên điện thoại (~390px) & máy tính bảng
   ========================================================================== */
@media (max-width: 992px) {
    .web-navbar-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        min-height: auto;
        gap: 10px;
    }

    .web-navbar-brand-nav {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .web-nav {
        overflow-x: auto;
        padding-bottom: 4px;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .web-nav a {
        flex-shrink: 0;
        padding: 6px 11px;
        font-size: 13px;
    }

    .web-navbar-user-box {
        justify-content: space-between;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 8px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .web-user-name {
        max-width: 200px;
    }

    .web-chip-org {
        max-width: 100%;
    }

    .web-container {
        padding: 0 16px;
        margin: 18px auto;
    }
}

@media (max-width: 600px) {
    .web-navbar-inner {
        padding: 10px 14px;
    }

    .web-brand {
        font-size: 16.5px;
    }

    .web-chip-org {
        font-size: 12px;
        padding: 3px 8px;
    }

    .web-user-name {
        font-size: 12.5px;
        max-width: 150px;
    }

    .card {
        padding: 16px 14px;
        margin-bottom: 16px;
        overflow-x: auto;
    }

    .grid {
        min-width: 580px;
    }

    h1 {
        font-size: 19px;
    }
}

/* --------------------------------------------------------------------------
   7. DANH SÁCH TỔ CHỨC — WEB-16
   -------------------------------------------------------------------------- */
.orgs-page {
    max-width: 1180px;
    margin: 0 auto;
}

.orgs-tabs {
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.orgs-tabs .orgs-invitations-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.orgs-invitation-count {
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
}

.orgs-tabs .orgs-create-button {
    margin-left: auto;
    padding: 9px 16px;
    text-decoration: none;
    font-weight: 650;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.18);
}

.orgs-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.orgs-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    padding: 20px 22px;
    border: 1px solid #d8e7fb;
    border-radius: 18px;
    background: linear-gradient(110deg, #f1f7ff 0%, #f8fbff 72%, #eef6ff 100%);
    box-shadow: 0 5px 16px rgba(37, 99, 235, 0.055);
}

.orgs-heading-icon {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7e8ff;
    border-radius: 17px;
    background: #fff;
    color: #3478e5;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.08);
}

.orgs-heading-copy {
    flex: 1;
    min-width: 0;
}

.orgs-eyebrow {
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.orgs-heading-row h1 {
    margin: 3px 0 3px;
    color: #0f172a;
    font-size: 23px;
    line-height: 1.25;
}

.orgs-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.orgs-total {
    min-width: 72px;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 6px 12px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.orgs-total strong { font-size: 18px; line-height: 1.1; letter-spacing: 0; }

.orgs-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(190px, 270px);
    gap: 16px;
    align-items: end;
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid #e1e9f4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.025);
}

.orgs-search-field,
.orgs-status-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.orgs-field-label {
    color: #334155;
    font-size: 12px;
    font-weight: 650;
}

.orgs-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    color: #64748b;
}

.orgs-input-wrap svg {
    position: absolute;
    left: 12px;
    pointer-events: none;
}

.orgs-input-wrap input,
.orgs-status-field select {
    width: 100%;
    height: 42px;
    border: 1px solid #d7e0ec;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 13px;
}

.orgs-input-wrap input {
    padding: 0 12px 0 48px !important;
}

.orgs-status-field select {
    padding: 0 12px;
}

.orgs-input-wrap input:focus,
.orgs-status-field select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

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

.org-list-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 17px 18px 15px;
    border: 1px solid #e1e8f1;
    border-radius: 15px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.035);
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.org-list-card:hover,
.org-list-card:focus-visible {
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.11);
    transform: translateY(-2px);
    text-decoration: none;
}

.org-list-card.is-selected {
    border: 2px solid #4f46e5;
    padding: 16px 17px 14px;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.09), 0 8px 20px rgba(37, 99, 235, 0.08);
}

.org-list-card.is-pending {
    border-color: #f1dfbd;
    background: #fffdfa;
}

.org-list-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.org-list-building {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eff6ff;
    color: #2563eb;
}

.is-pending .org-list-building {
    background: #fff7ed;
    color: #c2410c;
}

.org-list-state {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.org-list-state.state-active { color: #15803d; background: #dcfce7; border-color: #bbf7d0; }
.org-list-state.state-pending { color: #b45309; background: #fef3c7; border-color: #fde68a; }
.org-list-state.state-suspended { color: #b91c1c; background: #fee2e2; border-color: #fecaca; }

.org-list-name {
    margin: 10px 0 0;
    color: #0f172a;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.org-list-selected-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    align-self: flex-start;
    margin-top: 8px;
    color: #4338ca;
    font-size: 11px;
    font-weight: 700;
}

.org-list-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
    border: 1px solid #e7edf5;
    border-radius: 12px;
    overflow: hidden;
}

.org-list-fact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 58px;
    padding: 9px 11px;
    background: #fbfdff;
}

.org-list-fact + .org-list-fact { border-left: 1px solid #e7edf5; }
.org-list-fact > span { color: #64748b; font-size: 11px; }
.org-list-fact > strong { color: #1e293b; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }

.org-list-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #edf1f6;
    color: #4338ca;
    font-size: 13px;
    font-weight: 700;
}

.org-list-arrow { font-size: 19px; line-height: 1; transition: transform 150ms ease; }
.org-list-card:hover .org-list-arrow { transform: translateX(3px); }

.orgs-no-results,
.orgs-empty-memberships {
    padding: 38px 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    text-align: center;
}

.orgs-no-results { margin: 0; color: #64748b; }
.orgs-empty-icon { color: #2563eb; font-size: 38px; }
.orgs-empty-memberships h2 { margin: 8px 0; color: #0f172a; font-size: 19px; }
.orgs-empty-memberships p { max-width: 560px; margin: 0 auto 18px; color: #64748b; }
.orgs-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

.org-list-card[hidden],
.orgs-no-results[hidden] { display: none !important; }

.tabs .orgs-create-button {
    border-color: #4f46e5 !important;
    background: #4f46e5 !important;
    color: #ffffff !important;
}

.tabs .orgs-create-button:hover {
    border-color: #4338ca !important;
    background: #4338ca !important;
    color: #ffffff !important;
}

@media (max-width: 700px) {
    .orgs-page { padding: 0 2px; }
    .orgs-tabs { flex-wrap: wrap; gap: 7px; }
    .orgs-tabs > a:not(.orgs-create-button) { padding: 8px 9px; font-size: 12px; }
    .orgs-tabs .orgs-create-button { margin: 4px 0 0; width: 100%; justify-content: center; }
    .orgs-heading-row { align-items: flex-start; gap: 11px; margin-bottom: 13px; padding: 15px 13px; border-radius: 15px; }
    .orgs-heading-icon { width: 48px; height: 48px; flex-basis: 48px; border-radius: 14px; }
    .orgs-heading-icon svg { width: 34px; height: 34px; }
    .orgs-heading-row h1 { font-size: 20px; }
    .orgs-subtitle { font-size: 12px; line-height: 1.45; }
    .orgs-total { min-width: 54px; min-height: 46px; padding: 5px 7px; border-radius: 12px; font-size: 9px; }
    .orgs-total strong { font-size: 16px; }
    .orgs-toolbar { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 13px; }
    .orgs-card-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .org-list-card { padding: 15px 15px 13px; }
    .org-list-card.is-selected { padding: 14px 14px 12px; }
}

/* ==========================================================================
   Khung Hồ sơ cá nhân & Bộ chọn Avatar tương tác hiện đại
   ========================================================================== */
.profile-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-top: 20px;
}

.profile-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 170px;
    padding-top: 4px;
}

.profile-form-col {
    flex: 1;
    min-width: 0;
}

.avatar-uploader-frame {
    position: relative;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    cursor: pointer;
    display: block;
    user-select: none;
    outline: none;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}

.avatar-uploader-frame:hover {
    transform: translateY(-2px);
}

.avatar-uploader-frame:active {
    transform: scale(0.98);
}

.avatar-uploader-frame:focus-visible {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35);
}

.avatar-img-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    background: #f1f5f9;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 700;
    color: #475569;
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
}

.avatar-uploader-frame:hover .avatar-overlay,
.avatar-uploader-frame:focus-within .avatar-overlay {
    opacity: 1;
}

.avatar-overlay-text {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.avatar-camera-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary, #4f46e5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.avatar-uploader-frame:hover .avatar-camera-badge {
    background: #4338ca;
    transform: scale(1.08);
}

.avatar-spinner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    z-index: 3;
}

.avatar-spinner-ring {
    width: 26px;
    height: 26px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: avatar-spin 0.75s linear infinite;
}

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

.avatar-hint-box {
    margin-top: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.avatar-hint-action {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main, #1e293b);
}

.avatar-hint-meta {
    font-size: 11.5px;
    color: var(--text-muted, #64748b);
}

@media (max-width: 640px) {
    .profile-layout {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .profile-form-col {
        width: 100%;
    }
}

/* ==========================================================================
   Giao diện Bảo mật tài khoản hiện đại (Security Dashboard)
   ========================================================================== */
.security-card {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sec-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.sec-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--primary, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sec-card-title-box h2 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main, #1e293b);
}

.sec-card-title-box p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted, #64748b);
    line-height: 1.5;
}

.sec-grid {
    display: flex;
    gap: 36px;
    align-items: flex-start;
}

.sec-form-col {
    flex: 1.2;
    min-width: 0;
    max-width: 480px;
}

.sec-tips-col {
    flex: 0.9;
    min-width: 260px;
}

.sec-form-group {
    margin-bottom: 16px;
}

.sec-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main, #334155);
}

.input-password-wrap,
.sec-input-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

body.web-authenticated .input-password-wrap input,
body.web-public .input-password-wrap input,
.input-password-wrap input {
    width: 100%;
    padding-right: 44px !important;
    box-sizing: border-box;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #cbd5e1);
    font-size: 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input-password-wrap input:focus,
.sec-input-icon-wrap input:focus {
    border-color: var(--primary, #4f46e5);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.btn-toggle-pw {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s;
}

.btn-toggle-pw:hover {
    color: var(--text-main, #334155);
}

/* Thanh đo độ mạnh mật khẩu */
.pw-strength-wrapper {
    margin-top: 8px;
}

.pw-strength-track {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.pw-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.pw-strength-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted, #64748b);
}

.pw-strength-text {
    font-weight: 600;
}

/* Khớp mật khẩu */
.pw-match-text {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pw-match-text.valid {
    color: #16a34a;
}

.pw-match-text.invalid {
    color: #dc2626;
}

/* Hộp gợi ý bảo mật */
.sec-tips-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
}

.sec-tips-card h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sec-rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sec-rule-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.sec-rule-item.valid {
    color: #16a34a;
    font-weight: 500;
}

.sec-rule-item svg {
    flex-shrink: 0;
}

.sec-tips-note {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
    line-height: 1.5;
}

/* Segmented tabs đổi liên hệ */
.sec-segmented-tabs {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    gap: 4px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.sec-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    padding: 8px 18px;
    border-radius: 7px;
    font-size: 13.5px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sec-tab-btn:hover {
    color: #1e293b;
}

.sec-tab-btn.active {
    background: #ffffff;
    color: var(--primary, #4f46e5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sec-current-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: #475569;
    margin-bottom: 18px;
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
}

.sec-current-badge strong {
    color: #0f172a;
    font-weight: 600;
}

.sec-input-icon-wrap {
    position: relative;
    max-width: 480px;
    display: flex;
    align-items: center;
    width: 100%;
}

.sec-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

body.web-authenticated .sec-input-icon-wrap input,
body.web-public .sec-input-icon-wrap input,
.sec-input-icon-wrap input {
    width: 100%;
    padding-left: 44px !important;
    padding-right: 14px !important;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--border-color, #cbd5e1);
    font-size: 14px;
    box-sizing: border-box;
}

.sec-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    background: var(--primary, #4f46e5);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(79, 70, 229, 0.2);
    transition: background 0.15s, transform 0.1s;
}

.sec-btn-submit:hover {
    background: #4338ca;
}

.sec-btn-submit:active {
    transform: scale(0.98);
}

/* OTP Box bước 2 */
.sec-otp-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 24px;
    max-width: 480px;
    text-align: center;
    margin-bottom: 12px;
}

.sec-otp-card h3 {
    margin: 0 0 8px 0;
    font-size: 17px;
    font-weight: 700;
    color: #166534;
}

.sec-otp-card p {
    font-size: 13.5px;
    color: #374151;
    margin: 0 0 16px 0;
}

.sec-otp-target {
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    padding: 3px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 4px;
}

.sec-otp-input {
    width: 220px !important;
    text-align: center;
    font-size: 26px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 8px;
    font-weight: 700;
    padding: 8px 12px !important;
    border-radius: 8px;
    border: 2px solid #86efac !important;
    background: #ffffff;
    color: #166534;
    margin: 0 auto 16px auto;
    display: block;
}

.sec-otp-input:focus {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2) !important;
}

@media (max-width: 768px) {
    .sec-grid {
        flex-direction: column;
        gap: 24px;
    }
    .sec-form-col,
    .sec-tips-col {
        max-width: 100%;
        width: 100%;
    }
    .security-card {
        padding: 20px 16px;
    }
}

/* ==========================================================================
   Thành phần chọn Phường/Xã dạng hộp thoại (Ward Dialog Selector — WEB-08)
   ========================================================================== */
.ward-selector-component {
    position: relative;
    width: 100%;
}

.ward-hidden-input {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    clip: rect(0, 0, 0, 0);
}

.ward-trigger-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border-color, #cbd5e1);
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
}

.ward-trigger-box:hover:not(.is-disabled) {
    border-color: #94a3b8;
}

.ward-trigger-box:focus {
    outline: none;
    border-color: var(--primary, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.ward-trigger-box.is-disabled {
    background: #f8fafc;
    cursor: pointer;
    opacity: 0.85;
}

.ward-trigger-box.is-error {
    border-color: var(--danger, #ef4444);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.ward-trigger-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.ward-trigger-icon {
    color: #94a3b8;
    flex-shrink: 0;
}

.ward-trigger-text {
    font-size: 14px;
    color: var(--text-main, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ward-trigger-text.placeholder {
    color: var(--text-muted, #64748b);
    font-weight: normal;
}

.ward-trigger-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    flex-shrink: 0;
}

.ward-clear-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
}

.ward-clear-btn:hover {
    color: var(--danger, #ef4444);
    background: #fee2e2;
}

.ward-caret-icon {
    color: #94a3b8;
}

/* Thông báo cảnh báo / hướng dẫn */
.ward-notice-alert {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 6px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 12.5px;
    color: #1e40af;
    animation: wardFadeIn 0.2s ease-in-out;
}

/* Modal Dialog */
.ward-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: wardFadeIn 0.15s ease-out;
}

.ward-dialog-modal {
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    max-height: min(85vh, 580px);
    overflow: hidden;
    animation: wardScaleIn 0.2s ease-out;
}

.ward-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.ward-dialog-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main, #1e293b);
}

.ward-dialog-title svg {
    color: var(--primary, #4f46e5);
}

.ward-dialog-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s, color 0.15s;
}

.ward-dialog-close:hover {
    color: var(--text-main, #1e293b);
    background: #f1f5f9;
}

.ward-dialog-search-area {
    padding: 14px 18px 8px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafafa;
}

.ward-dialog-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.ward-search-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.ward-search-input {
    width: 100% !important;
    padding-left: 38px !important;
    padding-right: 32px !important;
    height: 40px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 14px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

.ward-search-input:focus {
    border-color: var(--primary, #4f46e5) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
    outline: none !important;
}

.ward-search-clear-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ward-search-clear-btn:hover {
    color: var(--text-main, #334155);
}

.ward-dialog-meta {
    margin-top: 8px;
    font-size: 12.5px;
    color: var(--text-muted, #64748b);
    line-height: 1.4;
}

.ward-dialog-meta strong {
    color: var(--text-main, #1e293b);
}

.ward-meta-hint {
    color: #94a3b8;
}

.ward-count-zero {
    color: var(--danger, #ef4444);
}

.ward-dialog-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    min-height: 200px;
}

.ward-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-main, #334155);
    transition: background-color 0.12s, color 0.12s;
    margin-bottom: 2px;
}

.ward-result-row:hover {
    background: #f1f5f9;
}

.ward-result-row.is-selected {
    background: #eef2ff;
    color: var(--primary, #4f46e5);
    font-weight: 600;
}

.ward-row-name {
    flex: 1;
}

.ward-row-check {
    color: var(--primary, #4f46e5);
    margin-left: 8px;
    flex-shrink: 0;
}

.ward-empty-list {
    padding: 32px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 13.5px;
}

.ward-dialog-footer {
    display: flex;
    justify-content: flex-end;
    padding: 10px 18px;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

/* Responsive điện thoại ~390px */
@media (max-width: 480px) {
    .ward-dialog-backdrop {
        padding: 8px;
    }
    .ward-dialog-modal {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 12px;
    }
    .ward-dialog-header {
        padding: 12px 14px;
    }
    .ward-dialog-search-area {
        padding: 10px 14px 6px;
    }
    .ward-dialog-results {
        padding: 6px 8px;
    }
    .ward-result-row {
        padding: 11px 12px;
        font-size: 14.5px;
    }
}

@keyframes wardFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes wardScaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Giao diện Biểu mẫu Khởi tạo Tổ chức mới (Chuyên nghiệp & Cân đối)
   ========================================================================== */

/* Chặn tuyệt đối dấu hoa thị kép (::before tự sinh) trên form */
.org-create-card label::before,
.org-form-label::before {
    display: none !important;
    content: none !important;
}

.org-create-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.org-form-group {
    margin-bottom: 18px;
}

.org-form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main, #334155);
    line-height: 1.4;
}

.req-star {
    color: var(--danger, #ef4444);
    font-weight: 700;
    margin-left: 2px;
}

.org-form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted, #64748b);
    margin-top: 5px;
    line-height: 1.4;
}

/* Hàng 2 cột cân đối chính xác */
.org-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.org-form-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Đồng bộ chiều cao, border-radius và viền cho input, select và ô chọn Phường/Xã */
body.web-authenticated .org-form-input,
body.web-public .org-form-input,
body.web-authenticated .org-form-select,
body.web-public .org-form-select,
.org-form-input,
.org-form-select,
.ward-trigger-box {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    border: 1px solid var(--border-color, #cbd5e1) !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    color: var(--text-main, #1e293b) !important;
    font-size: 14px !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

body.web-authenticated .org-form-select,
body.web-public .org-form-select,
select.org-form-select,
.org-form-select {
    cursor: pointer;
    background-color: #ffffff !important;
}

.org-form-input:focus,
.org-form-select:focus,
.ward-trigger-box:focus {
    border-color: var(--primary, #4f46e5) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

/* Placeholder mờ bớt, tinh tế */
::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

.org-form-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

.ward-trigger-text.placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

/* Khối chọn vai trò chuyên nghiệp */
.org-role-box {
    margin: 24px 0 26px;
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.org-role-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.org-role-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.org-role-card:hover {
    border-color: #cbd5e1;
    background: #fafafa;
}

.org-role-card:has(input:checked) {
    border-color: var(--primary, #4f46e5);
    background: #f5f3ff;
    box-shadow: 0 0 0 1px var(--primary, #4f46e5);
}

.org-role-radio {
    margin-top: 3px;
    width: 17px !important;
    height: 17px !important;
    accent-color: var(--primary, #4f46e5);
    flex-shrink: 0;
    cursor: pointer;
}

.org-role-body {
    flex: 1;
}

.org-role-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main, #1e293b);
    line-height: 1.4;
}

.org-role-desc {
    font-size: 13px;
    color: var(--text-muted, #64748b);
    margin-top: 3px;
    line-height: 1.45;
}

.org-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

@media (max-width: 640px) {
    .org-create-card {
        padding: 20px 16px;
    }
    .org-form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ==========================================================================
   CHUẨN HÓA CÂN ĐỐI CÁC HÀNG BỘ LỌC / HÀNG ĐA CỘT (THẺ WEB-10)
   Áp dụng đồng nhất cho .filters, .table-tools, .plat-filters trên toàn hệ thống
   ========================================================================== */

/* 1. Container bộ lọc */
body.web-authenticated .filters,
body.web-public .filters,
.filters,
.plat-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 12px 14px !important;
    margin-top: 14px !important;
    margin-bottom: 20px !important;
}

/* 2. Cột nhãn + ô nhập */
body.web-authenticated .filters label,
body.web-public .filters label,
.filters label,
.plat-form-group {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-main, #334155) !important;
    line-height: 1.3 !important;
    flex: 0 0 auto;
}

/* Tắt triệt để dấu sao đỏ required tự sinh trên nhãn hàng lọc */
body.web-authenticated .filters label::before,
body.web-public .filters label::before,
.filters label::before,
.filters label:has(:required)::before,
.filters label:has(+ :required)::before,
.plat-filters label::before,
.plat-filters label:has(:required)::before,
.table-tools label::before,
.table-tools label:has(:required)::before {
    content: none !important;
    display: none !important;
}

.plat-form-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-main, #334155) !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}

/* 3. Chiều cao & kiểu dáng đồng nhất cho mọi ô nhập trong hàng lọc */
.card form.filters > label input,
.card form.filters > label select,
.card .filters label input,
.card .filters label select,
body.web-authenticated .filters input,
body.web-public .filters input,
.filters input,
.plat-form-control,
body.web-authenticated .table-tools input,
body.web-public .table-tools input,
.table-tools input {
    display: inline-block !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    line-height: 38px !important;
    padding: 0 12px !important;
    font-size: 13.5px !important;
    font-family: inherit !important;
    color: var(--text-main, #1e293b) !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #cbd5e1) !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    outline: none !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

body.web-authenticated .filters select,
body.web-public .filters select,
.filters select,
select.plat-form-control,
body.web-authenticated .table-tools select,
body.web-public .table-tools select,
.table-tools select {
    display: inline-block !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 12px !important;
    font-size: 13.5px !important;
    font-family: inherit !important;
    color: var(--text-main, #1e293b) !important;
    background-color: #ffffff !important;
    border: 1px solid var(--border-color, #cbd5e1) !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    outline: none !important;
    vertical-align: middle !important;
    cursor: pointer !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

body.web-authenticated .filters input:focus,
body.web-authenticated .filters select:focus,
body.web-public .filters input:focus,
body.web-public .filters select:focus,
.filters input:focus,
.filters select:focus,
.plat-form-control:focus,
.table-tools input:focus,
.table-tools select:focus {
    border-color: var(--primary, #4f46e5) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

/* 4. Nút bấm trong hàng lọc: Căn thẳng hàng đáy với ô nhập, cùng chiều cao 40px */
body.web-authenticated .filters .btn,
body.web-public .filters .btn,
.filters .btn,
.filters button,
.filters a.btn,
.plat-filters .plat-btn {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 16px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    vertical-align: bottom !important;
    flex: 0 0 auto !important;
}

/* 5. Phân loại độ rộng cột theo vai trò */
/* 5.1. Ô tìm kiếm từ khóa (rộng nhất, co giãn) */
body.web-authenticated .filters input[type="search"],
body.web-public .filters input[type="search"],
.filters input[type="search"],
.filters input[name="q"],
.filters input[name="search_query"],
.plat-filters input[name="q"],
.table-tools input[type="search"] {
    width: 280px !important;
    min-width: 220px !important;
    max-width: 380px !important;
    flex: 1 1 240px !important;
}

.filters label:has(input[type="search"]),
.filters label:has(input[name="q"]),
.filters label:has(input[name="search_query"]),
.table-tools label:first-child {
    flex: 1 1 240px !important;
    max-width: 380px !important;
}

/* 5.2. Ô chọn trạng thái / loại / tháng / ngày (độ rộng vừa thống nhất) */
.filters select[name="status"],
.filters select[name="type"],
.filters select[name="claim_status"],
.plat-filters select[name="status"],
.plat-filters select[name="claim_status"],
.table-tools select {
    width: 200px !important;
    min-width: 175px !important;
    flex: 0 0 auto !important;
}

.filters input[type="month"],
.filters input[type="date"] {
    width: 170px !important;
    min-width: 155px !important;
    flex: 0 0 auto !important;
}

/* 5.3. Ô chọn tổ chức / địa điểm / tỉnh thành */
.filters select[name="location_id"],
.filters select[name="province_id"] {
    width: 225px !important;
    min-width: 190px !important;
    max-width: 270px !important;
    flex: 0 1 auto !important;
}

.filters select[name="org"] {
    width: 275px !important;
    min-width: 220px !important;
    max-width: 360px !important;
    flex: 0 1 auto !important;
}

/* 5.4. Ô mã đơn vị / mã số thuế */
.filters input[name="tax_code"] {
    width: 175px !important;
    min-width: 155px !important;
    flex: 0 0 auto !important;
}

/* Chữ nối 'HOẶC' giữa 2 phương thức tìm kiếm */
.filters .filter-separator {
    align-self: flex-end !important;
    height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    margin: 0 4px !important;
    flex: 0 0 auto !important;
}

/* 6. Chuẩn hóa table-tools & Hàng phân trang (FIX-11) */
body.web-authenticated .table-tools,
body.web-public .table-tools,
.table-tools {
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px 14px !important;
    margin: 14px 0 !important;
}

body.web-authenticated .table-tools label:not(.page-size-label),
body.web-public .table-tools label:not(.page-size-label),
.table-tools label:not(.page-size-label) {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    margin: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-main, #334155) !important;
    line-height: 1.3 !important;
}

/* Hàng phân trang table-pagination: MỌI phần tử nằm trên CÙNG MỘT ĐƯỜNG NGANG */
body.web-authenticated .table-pagination,
body.web-public .table-pagination,
.table-pagination {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    margin-left: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    flex-wrap: nowrap !important;
    vertical-align: middle !important;
}

body.web-authenticated .table-pagination .muted,
body.web-public .table-pagination .muted,
.table-pagination .muted {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 13px !important;
    color: var(--text-muted, #64748b) !important;
    height: 36px !important;
    line-height: 36px !important;
    white-space: nowrap !important;
    margin: 0 !important;
}

/* Nhãn 'Số dòng' nằm CÙNG HÀNG NGANG (bên trái) với ô chọn số dòng */
body.web-authenticated .table-tools label.page-size-label,
body.web-public .table-tools label.page-size-label,
body.web-authenticated .table-pagination label,
body.web-public .table-pagination label,
.table-tools label.page-size-label,
.table-pagination label,
.table-pagination .page-size-label {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-main, #334155) !important;
    white-space: nowrap !important;
    height: 36px !important;
    line-height: 36px !important;
}

body.web-authenticated .table-tools label.page-size-label select,
body.web-public .table-tools label.page-size-label select,
body.web-authenticated .table-pagination select,
body.web-public .table-pagination select,
.table-pagination select,
.table-pagination .page-size-label select {
    width: auto !important;
    min-width: 65px !important;
    max-width: 80px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    line-height: normal !important;
    padding: 0 8px !important;
    margin: 0 !important;
    font-size: 13px !important;
    font-family: inherit !important;
    border: 1px solid var(--border-color, #cbd5e1) !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    cursor: pointer !important;
}

/* Nút Trước / Sau trong phân trang */
body.web-authenticated .table-pagination .btn,
body.web-public .table-pagination .btn,
.table-pagination .btn {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

/* Hàng phân trang phía máy chủ: .server-pagination */
body.web-authenticated .server-pagination,
body.web-public .server-pagination,
.server-pagination {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-top: 16px !important;
    margin-bottom: 8px !important;
    min-height: 36px !important;
}

.server-pagination .muted {
    margin-right: auto !important;
    font-size: 13px !important;
    color: var(--text-muted, #64748b) !important;
    height: 36px !important;
    line-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
}

body.web-authenticated .server-pagination .btn,
body.web-public .server-pagination .btn,
.server-pagination .btn {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
}

/* Chuẩn hóa các hàng ngang mở rộng: .summary-box, hàng link phụ */
body.web-authenticated .summary-box,
body.web-public .summary-box,
.summary-box {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px 18px !important;
    padding: 10px 14px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    margin-top: 14px !important;
    margin-bottom: 16px !important;
}

.summary-box span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* 7. Responsive trên điện thoại di động (~390px) */
@media (max-width: 640px) {
    body.web-authenticated .filters,
    body.web-public .filters,
    .filters,
    .plat-filters,
    body.web-authenticated .table-tools,
    body.web-public .table-tools,
    .table-tools {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
    }

    body.web-authenticated .filters label,
    body.web-public .filters label,
    .filters label,
    .plat-form-group,
    body.web-authenticated .filters label:has(input),
    body.web-authenticated .filters label:has(select),
    .filters label:has(input[type="search"]),
    .filters label:has(input[name="q"]),
    .filters label:has(input[name="search_query"]),
    body.web-authenticated .table-tools label:not(.page-size-label),
    body.web-public .table-tools label:not(.page-size-label),
    .table-tools label:not(.page-size-label),
    .table-tools label:first-child {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: none !important;
    }

    body.web-authenticated .filters input,
    body.web-authenticated .filters select,
    body.web-public .filters input,
    body.web-public .filters select,
    .filters input,
    .filters select,
    .plat-form-control,
    body.web-authenticated .table-tools input,
    body.web-authenticated .table-tools select,
    body.web-public .table-tools input,
    body.web-public .table-tools select,
    .table-tools input,
    .table-tools select,
    body.web-authenticated .filters input[type="search"],
    body.web-public .filters input[type="search"],
    body.web-authenticated .filters input[name="q"],
    body.web-public .filters input[name="q"],
    .filters input[type="search"],
    .filters input[name="q"],
    .filters input[name="search_query"],
    .plat-filters input[name="q"],
    .table-tools input[type="search"],
    .filters select[name="status"],
    .filters select[name="type"],
    .filters select[name="claim_status"],
    .plat-filters select[name="status"],
    .plat-filters select[name="claim_status"],
    .filters input[type="month"],
    .filters input[type="date"],
    .filters select[name="location_id"],
    .filters select[name="org"],
    .filters select[name="province_id"],
    .filters input[name="tax_code"] {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body.web-authenticated .filters .btn,
    body.web-public .filters .btn,
    .filters .btn,
    .filters button,
    .filters a.btn,
    .plat-filters .plat-btn {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .filters .filter-separator {
        width: 100% !important;
        height: auto !important;
        padding: 4px 0 !important;
        text-align: center !important;
        align-self: center !important;
    }

    body.web-authenticated .table-pagination,
    body.web-public .table-pagination,
    .table-pagination {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 10px 12px !important;
        height: auto !important;
        min-height: 36px !important;
        max-height: none !important;
        margin-top: 10px !important;
    }

    body.web-authenticated .table-tools label.page-size-label,
    body.web-public .table-tools label.page-size-label,
    .table-pagination .page-size-label {
        display: inline-flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    body.web-authenticated .table-pagination .btn,
    body.web-public .table-pagination .btn,
    .table-pagination .btn {
        width: auto !important;
        min-width: 65px !important;
        max-width: none !important;
    }

    .server-pagination {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .server-pagination .muted {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .server-pagination .btn {
        width: 100% !important;
        min-width: 0 !important;
    }

    .card {
        overflow-x: auto;
    }
}

/* ==========================================================================
   Trang Đăng Nhập & Xác Thực (Auth Pages)
   ========================================================================== */
body.web-public {
    background-color: #f8fafc;
}

body.web-public .web-public-container {
    width: 100%;
    max-width: 480px;
    margin: 40px auto 60px;
    padding: 0 16px;
    box-sizing: border-box;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    padding: 36px 32px;
    box-sizing: border-box;
    transition: box-shadow 0.2s ease;
}

.auth-card:hover {
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

/* Tắt dấu hoa thị đỏ tự sinh từ rule:has(:required) */
.auth-card label::before,
.auth-form label::before,
.auth-field label::before,
.auth-card label:has(:required)::before,
.auth-card label:has(+ :required)::before,
.auth-form label:has(:required)::before,
.auth-form label:has(+ :required)::before {
    content: none !important;
    display: none !important;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-badge {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #ffffff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 16px -2px rgba(79, 70, 229, 0.35);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.25;
}

.auth-subtitle {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.auth-form {
    width: 100%;
}

.auth-field {
    margin-bottom: 18px;
    text-align: left;
}

.auth-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.auth-link-forgot {
    font-size: 13px;
    font-weight: 500;
    color: #4f46e5;
    text-decoration: none;
    transition: color 0.15s;
}

.auth-link-forgot:hover {
    color: #3730a3;
    text-decoration: underline;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.auth-input {
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 42px 0 42px !important;
    box-sizing: border-box !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    font-size: 14px !important;
    color: #0f172a !important;
    outline: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.auth-input:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.auth-input-wrap:focus-within .auth-input-icon {
    color: #4f46e5;
}

.auth-input::placeholder {
    color: #94a3b8 !important;
    opacity: 0.8 !important;
    font-size: 13.5px !important;
}

.auth-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s, background-color 0.15s;
}

.auth-pw-toggle:hover {
    color: #334155;
    background-color: #f1f5f9;
}

.auth-pw-toggle:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 1px;
}

.auth-btn-submit {
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    margin-top: 24px !important;
    background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%) !important;
    color: #ffffff !important;
    border: 1px solid #4338ca !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
    transition: all 0.15s ease-in-out !important;
}

.auth-btn-submit:hover {
    background: linear-gradient(180deg, #4338ca 0%, #3730a3 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35) !important;
}

.auth-btn-submit:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2) !important;
}

/* Flash message trang auth */
body.web-public .flash {
    width: 100%;
    max-width: 440px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 13.5px;
    line-height: 1.4;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    box-shadow: 0 2px 6px rgba(153, 27, 27, 0.06);
}

@media (max-width: 480px) {
    .auth-card {
        padding: 26px 20px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    }
    .auth-title {
        font-size: 21px;
    }
    .auth-logo-badge {
        width: 46px;
        height: 46px;
        margin-bottom: 12px;
    }
}

/* ==========================================================================
   Bảng công Tổ chức & Chi tiết ngày (Timesheet Details)
   ========================================================================== */
#org-timesheet-table {
    table-layout: auto;
    width: 100%;
}

#org-timesheet-table > thead > tr > th:nth-child(1),
#org-timesheet-table > tbody > tr > td:nth-child(1) {
    width: 75px;
    white-space: nowrap;
}

#org-timesheet-table > thead > tr > th:nth-child(2),
#org-timesheet-table > tbody > tr > td:nth-child(2) {
    min-width: 140px;
    white-space: nowrap;
}

#org-timesheet-table > thead > tr > th:nth-child(3),
#org-timesheet-table > tbody > tr > td:nth-child(3) {
    width: 85px;
    white-space: nowrap;
}

#org-timesheet-table > thead > tr > th:nth-child(4),
#org-timesheet-table > tbody > tr > td:nth-child(4) {
    width: 120px;
    white-space: nowrap;
}

#org-timesheet-table > thead > tr > th:nth-child(5),
#org-timesheet-table > tbody > tr > td:nth-child(5),
#org-timesheet-table > thead > tr > th:nth-child(6),
#org-timesheet-table > tbody > tr > td:nth-child(6) {
    width: 90px;
    white-space: nowrap;
}

#org-timesheet-table > thead > tr > th:nth-child(7),
#org-timesheet-table > tbody > tr > td:nth-child(7) {
    min-width: 260px;
}

#org-timesheet-table > tbody > tr > td {
    vertical-align: top !important;
    padding-top: 14px !important;
}

.ts-days-details {
    position: relative;
    width: 100%;
}

.ts-days-summary {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 5px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #4338ca !important;
    background-color: #eef2ff !important;
    border: 1px solid #c7d2fe !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    user-select: none !important;
    width: auto !important;
    outline: none !important;
    list-style: none !important;
    transition: all 0.15s ease !important;
}

.ts-days-summary::-webkit-details-marker {
    display: none !important;
}

.ts-days-summary:hover {
    background-color: #e0e7ff !important;
    border-color: #a5b4fc !important;
}

.ts-days-summary:focus-visible {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.ts-days-summary-empty {
    color: #475569 !important;
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.ts-days-summary-empty:hover {
    background-color: #f1f5f9 !important;
    border-color: #94a3b8 !important;
}

.ts-days-summary .ts-chevron {
    transition: transform 0.2s ease;
    color: #6366f1;
}

.ts-days-summary-empty .ts-chevron {
    color: #94a3b8;
}

details[open] > .ts-days-summary .ts-chevron {
    transform: rotate(90deg);
}

.ts-days-panel {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}

.ts-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
}

.ts-subtable {
    width: 100% !important;
    min-width: 620px !important;
    border-collapse: collapse !important;
    font-size: 13px !important;
    margin: 0 !important;
}

.ts-subtable th {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid #cbd5e1 !important;
    white-space: nowrap !important;
}

.ts-subtable td {
    padding: 8px 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

.ts-subtable tr:last-child td {
    border-bottom: none !important;
}

.ts-empty-days {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    padding: 10px 14px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px dashed #cbd5e1;
}

.ts-empty-days svg {
    color: #94a3b8;
    flex-shrink: 0;
}

.ts-adjust-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.ts-adjust-form select {
    width: 65px !important;
    height: 30px !important;
    padding: 2px 4px !important;
    font-size: 12.5px !important;
    border-radius: 4px !important;
    border: 1px solid #cbd5e1 !important;
}

.ts-adjust-form input[type="text"] {
    width: 90px !important;
    height: 30px !important;
    padding: 2px 8px !important;
    font-size: 12.5px !important;
    border-radius: 4px !important;
    border: 1px solid #cbd5e1 !important;
}

.ts-adjust-form button {
    height: 30px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    border-radius: 4px !important;
    margin: 0 !important;
}

.ts-day-options[hidden],
.ts-dialog-adjust[hidden] { display: none !important; }

.ts-day-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(900px, calc(100vw - 40px));
    max-width: none;
    max-height: calc(100vh - 40px);
    padding: 0;
    border: 1px solid #dbe5f1;
    border-radius: 18px;
    color: #0f172a;
    background: #fff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.ts-day-dialog::backdrop { background: rgba(15, 23, 42, 0.54); backdrop-filter: blur(2px); }

.ts-day-dialog-shell {
    display: flex;
    max-height: calc(100vh - 40px);
    flex-direction: column;
}

.ts-day-dialog-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px 17px;
    border-bottom: 1px solid #e6edf5;
    background: linear-gradient(110deg, #f2f7ff, #fff 75%);
}

.ts-day-dialog-eyebrow { color: #2563eb; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.ts-day-dialog-header h2 { margin: 4px 0 3px; color: #0f172a; font-size: 21px; }
.ts-day-dialog-header p { margin: 0; color: #64748b; font-size: 13px; }

.ts-day-dialog-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid #dbe5f1;
    border-radius: 11px;
    color: #475569;
    background: #fff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.ts-day-dialog-close:hover { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }

.ts-day-dialog-content {
    display: grid;
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
    gap: 18px;
    padding: 18px 24px;
    overflow: auto;
}

.ts-day-list {
    display: flex;
    max-height: 52vh;
    flex-direction: column;
    gap: 7px;
    padding-right: 4px;
    overflow-y: auto;
}

.ts-day-choice {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    color: #334155;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.ts-day-choice:hover { border-color: #bfdbfe; background: #f8fbff; }
.ts-day-choice.is-active { border-color: #4f46e5; color: #3730a3; background: #eef2ff; box-shadow: 0 0 0 2px rgba(79, 70, 229, .1); }
.ts-day-choice-date { font-size: 12px; }
.ts-day-choice-work { flex: 0 0 auto; font-size: 12px; }

.ts-day-detail {
    min-width: 0;
    padding: 17px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fbfdff;
    overflow-wrap: anywhere;
}

.ts-day-detail-date { margin: 0 0 14px; color: #0f172a; font-size: 18px; }
.ts-day-detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ts-day-detail-field { display: flex; min-width: 0; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid #e5ebf3; border-radius: 10px; background: #fff; }
.ts-day-detail-label { color: #64748b; font-size: 11px; }
.ts-day-detail-value { color: #1e293b; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.ts-day-session-list { margin-top: 12px; }
.ts-day-session-list h4 { margin: 0 0 7px; font-size: 13px; }
.ts-day-session { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-top: 1px solid #e5ebf3; color: #475569; font-size: 12px; }
.ts-day-session p { margin: 0; overflow-wrap: anywhere; }
.ts-day-empty { margin: 0; padding: 14px; color: #64748b; font-size: 13px; }

.ts-dialog-adjust {
    display: grid;
    grid-template-columns: minmax(120px, 160px) minmax(180px, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 14px 24px 18px;
    border-top: 1px solid #e6edf5;
    background: #f8fafc;
}

.ts-dialog-adjust label { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: #475569; font-size: 12px; font-weight: 600; }
.ts-dialog-adjust select,
.ts-dialog-adjust input { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #0f172a; box-sizing: border-box; }
.ts-dialog-adjust .btn { min-height: 38px; white-space: nowrap; }

@media (max-width: 600px) {
    .ts-day-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); border-radius: 15px; }
    .ts-day-dialog-shell { max-height: calc(100vh - 24px); }
    .ts-day-dialog-header { padding: 15px 15px 13px; gap: 10px; }
    .ts-day-dialog-header h2 { max-width: 250px; font-size: 18px; }
    .ts-day-dialog-content { display: flex; min-height: 0; flex-direction: column; gap: 12px; padding: 13px 14px; overflow: auto; }
    .ts-day-list { max-height: 160px; flex: 0 0 auto; }
    .ts-day-detail { padding: 13px; }
    .ts-day-detail-facts { gap: 7px; }
    .ts-day-detail-field { padding: 9px 10px; }
    .ts-dialog-adjust { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 12px 14px 14px; }
    .ts-dialog-adjust .btn { width: 100%; }
}

/* ==========================================================================
   Form sửa thành viên (Member Edit Form)
   ========================================================================== */
.member-edit-form label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 500;
    font-size: 13.5px;
    color: var(--text-color, #1e293b);
}

.member-edit-form input[type="text"],
.member-edit-form select {
    display: block !important;
    width: 100% !important;
    max-width: 480px !important;
    height: 40px !important;
    margin-top: 6px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

.member-edit-form select {
    cursor: pointer !important;
    padding-right: 32px !important;
    -webkit-appearance: menulist !important;
    appearance: menulist !important;
    line-height: normal !important;
}

.member-edit-form input[type="text"]:focus,
.member-edit-form select:focus {
    outline: none !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

.member-edit-form input:disabled {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #e2e8f0 !important;
    cursor: not-allowed !important;
}

.member-edit-form .btn {
    height: 38px !important;
    padding: 0 18px !important;
    margin-top: 18px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}









/* ==========================================================================
   GIAO DIỆN KHU VỰC TỔ CHỨC THEO MẪU MỚI — THẺ WEB-11 (18/11/2026)
   ========================================================================== */

/* Nền trang chung cho khu vực tổ chức và người dùng đã xác thực */
body.web-authenticated {
    background: linear-gradient(180deg, #edf4fe 0%, #f1f6fd 260px, #f8fafc 100%) !important;
    min-height: 100vh;
}

body.web-authenticated .card {
    border-radius: 18px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02) !important;
    background: #ffffff !important;
}

/* --------------------------------------------------------------------------
   1. THANH ĐIỀU HƯỚNG TRÊN CÙNG (TOP NAVIGATION)
   -------------------------------------------------------------------------- */
.web-navbar {
    background-color: #0b1329 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.web-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
}

.web-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.web-brand-text {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.2px;
}

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

.web-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out;
}

.web-nav-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.web-nav-btn.active {
    color: #ffffff !important;
    background-color: #1d4ed8 !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
}

.web-nav-btn .nav-icon {
    flex-shrink: 0;
}

.web-nav-btn .nav-icon-back {
    transition: transform 0.15s ease-in-out;
}

.web-nav-btn:hover .nav-icon-back {
    transform: translateX(-3px);
}

/* Dropdown containers trong Navbar */
.web-navbar-user-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.web-dropdown-container {
    position: relative;
}

.web-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    border: none;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    line-height: 1.4;
}

.org-select-btn {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    max-width: 260px;
}

.org-select-btn:hover,
.org-select-btn[aria-expanded="true"] {
    background-color: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
}

.org-current-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.user-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 5px 8px;
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
}

.user-profile-link:hover,
.user-profile-link:focus-visible {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

.account-notification-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
}

.account-notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid #0f172a;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    box-sizing: border-box;
}

.account-notification-link:hover,
.account-notification-link:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    text-decoration: none;
}

.user-avatar-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.user-display-name {
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-chevron {
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.web-dropdown-toggle[aria-expanded="true"] .dropdown-chevron {
    transform: rotate(180deg);
}

.web-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    max-width: 320px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    padding: 6px;
    z-index: 1000;
    box-sizing: border-box;
}

.web-dropdown-menu.show {
    display: block;
    animation: dsDropdownIn 0.15s ease-out;
}

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

.dropdown-header {
    padding: 8px 12px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #1e293b;
    font-size: 13.5px;
    text-decoration: none !important;
    transition: background 0.12s ease;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.org-menu-item {
    justify-content: space-between;
}

.org-menu-item.selected {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.org-item-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.org-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-item-role {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 400;
}

.dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 6px 0;
}

.dropdown-footer-link {
    color: #2563eb;
    font-size: 13px;
    font-weight: 500;
}

.btn-logout-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    font-family: inherit;
    line-height: 1.4;
}

.btn-logout-pill:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

/* --------------------------------------------------------------------------
   2. THẺ THÔNG TIN TỔ CHỨC Ở ĐẦU TRANG (HERO CARD)
   -------------------------------------------------------------------------- */
.org-hero-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 50%, #f4f8fe 100%) !important;
    border: 1px solid #dbeafe !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.06), 0 4px 10px -2px rgba(0, 0, 0, 0.03) !important;
    padding: 24px 28px !important;
    margin-bottom: 24px !important;
    position: relative;
    overflow: hidden;
}

.org-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.org-hero-illustration {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.hero-illus-left svg {
    width: 110px;
    height: 86px;
}

.hero-illus-right svg {
    width: 100px;
    height: 86px;
}

.org-hero-center {
    flex: 1;
    min-width: 0;
}

.org-hero-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.org-hero-name {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.25 !important;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
}

.badge-pill.st-active {
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-pill.st-pending {
    background-color: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-pill.st-suspended {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Dòng thông tin gói cước ngay dưới tên tổ chức (FIX-14) */
.org-hero-package-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 7px;
}

.package-row-lead {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: #334155;
}

.package-row-icon {
    color: #2563eb;
    flex-shrink: 0;
}

.package-row-label {
    color: #64748b;
    font-weight: 500;
}

.package-row-name {
    color: #0f172a;
    font-weight: 600;
}

/* Dải 6 chỉ số có biểu tượng + đường kẻ phân cách */
.org-stats-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.stat-cell {
    padding: 12px 14px;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.stat-cell:last-child {
    border-right: none;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-icon {
    color: #64748b;
    flex-shrink: 0;
}

.stat-value {
    font-size: 13.5px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value strong {
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. BA CỘT NHÓM CHỨC NĂNG (3 COLUMNS)
   -------------------------------------------------------------------------- */
.org-function-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.org-function-columns.member-only {
    grid-template-columns: 1fr;
}

.org-function-columns.member-only .col-personal .column-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.function-column {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.column-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
}

.column-header .header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
}

.column-header .header-action {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none !important;
    transition: opacity 0.15s ease;
}

.column-header .header-action:hover {
    color: #ffffff;
    text-decoration: underline !important;
}

/* Màu thanh tiêu đề 3 cột */
.col-personal .column-header {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

.col-admin .column-header {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.col-utilities .column-header {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
}

.column-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* Thẻ chức năng con bấm được */
.function-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    background: #ffffff;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.function-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px -2px rgba(37, 99, 235, 0.12);
    border-color: #93c5fd;
}

.function-item.item-disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: #f8fafc;
}

.function-item.item-disabled:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    border-color: #edf2f7;
}

/* Biểu tượng tròn nền màu nhạt */
.item-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bg-blue-soft    { background-color: #dbeafe; }
.bg-purple-soft  { background-color: #f3e8ff; }
.bg-orange-soft  { background-color: #ffedd5; }
.bg-teal-soft    { background-color: #ccfbf1; }
.bg-sky-soft     { background-color: #e0f2fe; }
.bg-emerald-soft { background-color: #d1fae5; }
.bg-red-soft     { background-color: #fee2e2; }

.item-text {
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
    line-height: 1.3;
}

.item-desc {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.item-arrow {
    color: #94a3b8;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.function-item:hover .item-arrow {
    transform: translateX(3px);
    color: #2563eb;
}

/* Nút góc dưới cùng cột 3: Tra cứu dữ liệu cũ */
.col-corner-btn-box {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    padding-top: 4px;
}

.btn-legacy-corner {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out;
}

.btn-legacy-corner:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
    transform: scale(1.08);
}

/* --------------------------------------------------------------------------
   4. DẢI LƯU Ý CUỐI TRANG THEO MẪU
   -------------------------------------------------------------------------- */
.org-bottom-notice {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.05);
}

.notice-left {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e40af;
}

.notice-icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #dbeafe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notice-text {
    font-size: 13.5px;
    color: #1e3a8a;
}

.btn-guide-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #93c5fd;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-guide-pill:hover {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* --------------------------------------------------------------------------
   5. TABS CÀI ĐẶT TỔ CHỨC (SETTINGS TABS)
   -------------------------------------------------------------------------- */
.web37-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.web38-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.web38-card-head h2 { margin: 0; }
.web38-table-wrap { width: 100%; overflow-x: auto; }
.web38-table-wrap .grid { min-width: 800px; }
.web38-row-actions { display: flex; gap: 7px; white-space: nowrap; }
.web38-dialog-fields { display: grid; gap: 14px; }
.web38-dialog-fields label { margin: 0; }
.web38-dialog-error { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 12px; margin: 0; }
.web38-dialog-error[hidden] { display: none; }
.web37-card-head h2 { margin: 0; }
.web37-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.web37-settings-grid > div { min-width: 0; padding: 13px 15px; border: 1px solid #e2e8f0; border-radius: 10px; }
.web37-settings-grid dt { color: #64748b; font-size: 13px; margin-bottom: 5px; }
.web37-settings-grid dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.web37-form-group { margin-top: 20px; padding-top: 18px; border-top: 1px solid #e2e8f0; }
.web37-form-group h3 { margin: 0 0 14px; font-size: 17px; }
.web37-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.web37-form-grid label { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; font-size: 13px; font-weight: 600; }
.web37-form-grid input, .web37-form-grid select { display: block; width: 100%; min-height: 40px; box-sizing: border-box; margin: 0; padding: 8px 10px; }
.web37-form-grid .muted { font-weight: 400; }
.web37-form-actions { display: flex; gap: 10px; margin-top: 22px; }
@media (max-width: 600px) {
    .web37-settings-grid, .web37-form-grid { grid-template-columns: minmax(0, 1fr); }
    .web37-card-head { align-items: flex-start; flex-wrap: wrap; }
}
.settings-tabs {
    display: inline-flex !important;
    gap: 6px !important;
    background: #f1f5f9 !important;
    padding: 5px !important;
    border-radius: 12px !important;
    margin-top: 14px !important;
    border: 1px solid #e2e8f0 !important;
}

.settings-tabs .tab-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 9px 18px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    text-decoration: none !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out !important;
}

.settings-tabs .tab-btn:hover {
    color: #1e293b !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.settings-tabs .tab-btn.active {
    background: #ffffff !important;
    color: #2563eb !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* --------------------------------------------------------------------------
   6. RESPONSIVE THIẾT KẾ CHO ĐIỆN THOẠI (~390PX)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .org-hero-illustration {
        display: none !important;
    }

    .org-stats-strip {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .stat-cell:nth-child(3n) {
        border-right: none !important;
    }

    .stat-cell:nth-child(-n+3) {
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .org-function-columns {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .web-navbar-inner {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 10px 14px !important;
        gap: 10px !important;
    }

    .web-navbar-brand-nav {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .web-navbar-user-box {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 36px auto !important;
        align-items: center !important;
        justify-content: stretch !important;
        width: 100% !important;
        gap: 6px !important;
    }

    .org-select-container {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .org-select-btn {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
        padding: 6px 10px !important;
        font-size: 12.5px !important;
    }

    .account-notification-link {
        width: 34px !important;
        height: 34px !important;
        flex-basis: 34px !important;
    }

    .user-profile-link {
        justify-self: stretch;
        padding: 5px 6px !important;
        gap: 6px !important;
        font-size: 12.5px !important;
    }

    .user-display-name {
        max-width: 100% !important;
        min-width: 0;
    }

    .btn-logout-pill {
        padding: 6px 8px !important;
        font-size: 12px !important;
    }

    .org-hero-card {
        padding: 16px !important;
        border-radius: 16px !important;
    }

    .org-hero-name {
        font-size: 20px !important;
    }

    .org-stats-strip {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .stat-cell {
        border-right: 1px solid #e2e8f0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }

    .stat-cell:nth-child(2n) {
        border-right: none !important;
    }

    .stat-cell:nth-child(5),
    .stat-cell:nth-child(6) {
        border-bottom: none !important;
    }

    .org-function-columns.member-only .col-personal .column-body {
        grid-template-columns: 1fr !important;
    }

    .org-bottom-notice {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px 16px !important;
    }

    .btn-guide-pill {
        align-self: flex-start !important;
    }
}


/* Cải tiến tabs dùng chung cho các trang cá nhân và quản trị */
.tabs a {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #64748b !important;
    font-weight: 500 !important;
    transition: all 0.15s ease-in-out !important;
}

.tabs a:hover {
    border-color: #93c5fd !important;
    color: #2563eb !important;
    background: #f8fafc !important;
}

.tabs a.active {
    border-color: #2563eb !important;
    color: #2563eb !important;
    background: #eff6ff !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1) !important;
}

.summary-box {
    background: #f0f7ff !important;
    border: 1px solid #dbeafe !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    color: #1e3a8a !important;
}

p.muted a,
.card .muted a {
    color: #2563eb !important;
    font-weight: 500 !important;
}

p.muted a:hover,
.card .muted a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}

/* WEB-19 — trang Thành viên cùng thang màu, thẻ và hàng mục của tổng quan tổ chức. */
.web19-page { max-width: 1240px; margin: 0 auto 28px; color: #1e293b; }
.web19-page [hidden] { display: none !important; }
.web19-page-head {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 24px 28px; margin-bottom: 16px; border: 1px solid #dbeafe;
    border-radius: 20px; background: linear-gradient(135deg, #f0f7ff 0%, #fff 55%, #f4f8fe 100%);
    box-shadow: 0 10px 25px -5px rgba(37,99,235,.06), 0 4px 10px -2px rgba(0,0,0,.03);
}
.web19-page-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.web19-head-icon, .web19-section-icon, .web19-request-icon {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    border-radius: 12px; background: #dbeafe; color: #2563eb;
}
.web19-head-icon { width: 52px; height: 52px; }
.web19-page-title h1 { margin: 0 0 4px; font-size: 25px; color: #0f172a; }
.web19-page-title p, .web19-card-head p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.4; }
.web19-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.web19-head-actions .btn { margin: 0; min-height: 40px; border-radius: 10px; font-weight: 650; white-space: nowrap; }
.web19-head-actions .web19-primary-action { background: #2563eb; }
.web19-head-actions .web19-primary-action:hover { background: #1d4ed8; }
.web19-head-actions .web19-secondary-action { border-color: #bfdbfe; color: #1d4ed8; }
.web19-shortcuts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 18px; padding: 0 4px; font-size: 13px; }
.web19-shortcuts a { color: #475569; }
.web19-shortcuts a:hover { color: #2563eb; }

body.web-authenticated .web19-card {
    padding: 22px 24px; border: 1px solid #e2e8f0; border-radius: 18px;
    background: #fff; box-shadow: 0 4px 16px rgba(15,23,42,.05); margin-bottom: 20px;
}
.web19-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.web19-card-head > div { min-width: 0; flex: 1; }
.web19-card-head h1, .web19-card-head h2 { margin: 0 0 3px; color: #0f172a; font-size: 19px; font-weight: 700; }
.web19-section-icon { width: 42px; height: 42px; }
.web19-section-icon-blue { background: #dbeafe; color: #2563eb; }
.web19-section-icon-emerald { background: #d1fae5; color: #059669; }
.web19-count-pill, .web19-role-pill {
    display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap;
    padding: 5px 10px; font-size: 12px; font-weight: 700;
}
.web19-count-pill { color: #047857; background: #d1fae5; }
.web19-role-pill { color: #1d4ed8; background: #eff6ff; }
.web19-page .web19-filters { margin-bottom: 14px; }
.web19-page .table-tools { margin-bottom: 10px; }
.web19-row-table { width: 100%; border-collapse: separate; border-spacing: 0 9px; }
.web19-row-table tbody tr > td { padding: 0; }
.web19-row-table tr[hidden] { display: none !important; }
.web19-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.web19-member-row, .web19-request-row {
    display: flex; align-items: center; gap: 14px; padding: 13px 15px;
    border: 1px solid #edf2f7; border-radius: 12px; background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.02);
}
.web19-member-row:hover, .web19-request-row:hover { border-color: #bfdbfe; box-shadow: 0 4px 14px rgba(37,99,235,.07); }
.web19-avatar { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; color: #2563eb; background: #dbeafe; }
.web19-request-icon { width: 44px; height: 44px; background: #d1fae5; color: #059669; }
.web19-member-main { min-width: 0; flex: 1; }
.web19-member-name { color: #0f172a; font-size: 15px; font-weight: 700; line-height: 1.4; }
.web19-member-name small { margin-left: 5px; color: #94a3b8; font-size: 11px; font-weight: 600; }
.web19-member-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 3px; color: #64748b; font-size: 12px; line-height: 1.45; }
.web19-member-meta span { overflow-wrap: anywhere; }
.web19-member-side { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.web19-member-side .badge { padding: 5px 10px; }
.web19-detail-link { margin-left: 4px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.web19-empty { margin: 10px 0 4px; padding: 16px 18px; border: 1px dashed #dbe5f1; border-radius: 12px; background: #f8fafc; color: #64748b; font-size: 13px; }
.web19-page .server-pagination { margin-top: 10px; }
.web19-request-actions { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.web19-approve-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.web19-approve-form label { display: flex; flex-direction: column; gap: 4px; margin: 0; color: #64748b; font-size: 11px; font-weight: 600; }
.web19-approve-form select, .web19-approve-form input { width: 124px; min-height: 36px; padding: 6px 9px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; box-sizing: border-box; }
.web19-approve-form .btn, .web19-reject-form .btn-link { min-height: 36px; margin: 0; }
.web19-reject-form .btn-link { padding: 6px 9px; }

.web19-create-view .web19-card-head { padding-bottom: 16px; border-bottom: 1px solid #e6edf5; }
.web19-create-view .web19-back { margin: 0 0 0 auto; white-space: nowrap; }
.web19-create-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px 18px; }
.web19-create-form label, .web19-dialog-fields label { display: flex; flex-direction: column; gap: 6px; margin: 0; color: #475569; font-size: 13px; font-weight: 600; }
.web19-create-form input, .web19-create-form select, .web19-dialog-fields input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; color: #0f172a; box-sizing: border-box; }
.web19-create-form input:focus, .web19-create-form select:focus, .web19-dialog-fields input:focus { border-color: #60a5fa; outline: 3px solid #dbeafe; }
.web19-form-actions { grid-column: 1 / -1; display: flex; gap: 9px; margin-top: 4px; }
.web19-form-actions .btn { margin: 0; }

.web19-invite-dialog {
    position: fixed; inset: 0; width: min(520px, calc(100vw - 28px)); max-width: none;
    max-height: calc(100vh - 28px); margin: auto; padding: 0;
    border: 1px solid #dbe5f1; border-radius: 18px; color: #0f172a; background: #fff;
    box-shadow: 0 24px 80px rgba(15,23,42,.28); overflow: auto;
}
.web19-invite-dialog::backdrop { background: rgba(15,23,42,.54); backdrop-filter: blur(2px); }
.web19-dialog-head { display: flex; justify-content: space-between; gap: 14px; padding: 20px 22px 17px; background: linear-gradient(110deg,#f2f7ff,#fff 75%); border-bottom: 1px solid #e6edf5; }
.web19-dialog-head h2 { margin: 4px 0 3px; color: #0f172a; font-size: 20px; }
.web19-dialog-head p { margin: 0; color: #64748b; font-size: 13px; }
.web19-eyebrow { color: #2563eb; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.web19-close { width: 36px; height: 36px; flex: 0 0 36px; border: 1px solid #dbe5f1; border-radius: 10px; color: #475569; background: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.web19-close:hover { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.web19-dialog-fields { display: grid; gap: 14px; padding: 20px 22px; }
.web19-dialog-error { margin: 0; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 9px; background: #fef2f2; color: #991b1b; font-size: 13px; }
.web19-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid #e6edf5; }
.web19-dialog-actions .btn { margin: 0; }

@media (max-width: 700px) {
    .web19-page-head { align-items: stretch; flex-direction: column; padding: 18px; }
    .web19-head-actions { justify-content: flex-start; }
    body.web-authenticated .web19-card { padding: 18px; }
    .web19-member-row, .web19-request-row { align-items: flex-start; flex-wrap: wrap; }
    .web19-member-side, .web19-request-actions { width: 100%; justify-content: flex-start; padding-left: 58px; }
    .web19-approve-form { width: 100%; }
}
@media (max-width: 430px) {
    .web19-page-title h1 { font-size: 22px; }
    .web19-head-actions { display: grid; grid-template-columns: 1fr; }
    .web19-head-actions .btn { width: 100%; white-space: normal; }
    .web19-shortcuts { gap: 8px 12px; }
    .web19-card-head { flex-wrap: wrap; }
    .web19-count-pill { margin-left: 54px; }
    .web19-member-row, .web19-request-row { gap: 9px; padding: 12px; }
    .web19-member-main { flex-basis: calc(100% - 56px); }
    .web19-member-side, .web19-request-actions { padding-left: 0; }
    .web19-approve-form label { flex: 1 1 110px; }
    .web19-approve-form select, .web19-approve-form input { width: 100%; }
    .web19-create-form { grid-template-columns: 1fr; }
    .web19-create-view .web19-card-head .web19-back { width: 100%; margin: 4px 0 0; }
    .web19-form-actions { flex-wrap: wrap; }
    .web19-dialog-head, .web19-dialog-fields { padding-left: 16px; padding-right: 16px; }
    .web19-dialog-actions { padding-left: 16px; padding-right: 16px; }
}

/* WEB-20 — trang chi tiết thành viên. */
.web20-page { max-width: 1240px; margin: 0 auto 28px; color: #1e293b; }
.web20-back { display: inline-flex; align-items: center; margin: 0 0 16px; font-size: 13px; font-weight: 650; color: #2563eb; }
body.web-authenticated .web20-identity { display: flex; align-items: center; gap: 16px; padding: 22px 24px; margin: 0 0 20px; }
.web20-avatar { width: 64px; height: 64px; flex-basis: 64px; }
.web20-identity-main { flex: 1; min-width: 0; }
.web20-identity-main h1 { margin: 0 0 5px; color: #0f172a; font-size: 25px; }
.web20-identity-main p { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; color: #64748b; font-size: 13px; }
.web20-identity-main p span { overflow-wrap: anywhere; }
.web20-pills { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.web20-pills .badge { padding: 5px 10px; }
.web20-layout { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); align-items: start; gap: 20px; }
.web20-layout > *, .web20-side { min-width: 0; }
.web20-side { display: grid; gap: 20px; }
body.web-authenticated .web20-card { margin: 0; padding: 22px 24px; }
.web20-card .web19-card-head { margin-bottom: 14px; }
.web20-card .web19-card-head h2 { margin: 0; }
.web20-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.web20-info-grid > div { min-width: 0; padding: 15px 10px; border-top: 1px solid #e6edf5; }
.web20-info-grid dt { margin-bottom: 5px; color: #64748b; font-size: 12px; font-weight: 600; }
.web20-info-grid dd { margin: 0; color: #0f172a; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.web20-info-grid dd span { display: block; }
.web20-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.web20-page .web20-form-grid label { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; color: #475569; font-size: 13px; font-weight: 600; }
.web20-page .member-edit-form input[type="text"], .web20-page .member-edit-form select { width: 100% !important; max-width: none !important; margin: 0 !important; border-radius: 9px !important; }
.web20-form-grid .muted { font-weight: 400; line-height: 1.4; }
.web20-form-actions { display: flex; gap: 9px; align-items: center; margin-top: 20px; }
.web20-page .member-edit-form .web20-form-actions .btn { margin: 0 !important; }
.web20-page .web20-form-actions .btn-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; }
body.web-authenticated .web20-danger { border-color: #fecaca !important; }
.web20-danger h2 { margin: 0 0 8px; color: #991b1b; font-size: 18px; }
.web20-danger p { margin: 0 0 13px; color: #64748b; font-size: 13px; }
.web20-danger form .btn { margin: 0; }
.web20-page [hidden] { display: none !important; }
.web30-edit-toggle { margin-left: 8px; }
.web30-dialog {
    position: fixed; inset: 0; width: min(520px, calc(100vw - 28px)); max-width: none;
    max-height: calc(100vh - 28px); margin: auto; padding: 0;
    border: 1px solid #dbe5f1; border-radius: 18px; color: #0f172a; background: #fff;
    box-shadow: 0 24px 80px rgba(15,23,42,.28); overflow: auto;
}
.web30-dialog::backdrop { background: rgba(15,23,42,.54); backdrop-filter: blur(2px); }
.web30-dialog-head { padding: 20px 22px 17px; background: linear-gradient(110deg,#f2f7ff,#fff 75%); border-bottom: 1px solid #e6edf5; }
.web30-dialog-head h2 { margin: 0; font-size: 20px; line-height: 1.4; }
.web30-dialog > p { margin: 0; padding: 18px 22px 0; line-height: 1.5; }
.web30-dialog-fields { padding: 20px 22px; }
.web30-dialog-fields label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.web30-dialog label:has(:required)::before,
.web20-page .web20-form-grid label:has(:required)::before { content: none; display: none; }
.web30-required { color: var(--danger); font-weight: 700; }
.web30-dialog-fields input { width: 100%; box-sizing: border-box; min-height: 40px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 9px; }
.web30-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid #e6edf5; }
@media (max-width: 1000px) {
    .web20-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    body.web-authenticated .web20-identity { flex-wrap: wrap; padding: 18px; }
    .web20-identity-main h1 { font-size: 22px; }
    .web20-pills { width: 100%; justify-content: flex-start; }
    body.web-authenticated .web20-card { padding: 18px; }
    .web20-form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* WEB-21 — chỉ trang Hồ sơ cá nhân và dialog đổi avatar. */
.web21-page { max-width: 1180px; margin: 0 auto 28px; }
body.web-authenticated .web21-card { padding: 28px; }
.web21-card > h1 { margin: 0 0 22px; color: #0f172a; font-size: 25px; }
.web21-layout { display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.7fr); gap: 24px; }
.web21-layout > * { min-width: 0; }
.web21-avatar-panel, .web21-info-panel { border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; padding: 24px; }
.web21-avatar-panel { display: flex; flex-direction: column; align-items: center; text-align: center; background: #f8fbff; }
.web21-avatar-trigger { position: relative; width: 152px; height: 152px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.web21-avatar-trigger:focus-visible { outline: 3px solid #4f46e5; outline-offset: 4px; }
.web21-avatar-image, .web21-avatar-fallback { display: flex; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; align-items: center; justify-content: center; border: 4px solid #fff; box-shadow: 0 8px 24px rgba(30, 64, 175, 0.12); }
.web21-avatar-fallback { background: linear-gradient(135deg, #dbeafe, #c7d2fe); color: #1d4ed8; font-size: 48px; font-weight: 750; letter-spacing: 1px; }
.web21-camera { position: absolute; right: 4px; bottom: 3px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 3px solid #fff; background: #4f46e5; color: #fff; }
.web21-avatar-panel h2 { margin: 17px 0 14px; color: #0f172a; font-size: 18px; overflow-wrap: anywhere; }
.web21-avatar-panel .web21-change { margin: 0; }
.web21-avatar-hint { margin: 12px 0 0; color: #64748b; font-size: 12px; }
.web21-info-panel h2 { margin: 0 0 22px; color: #0f172a; font-size: 19px; }
.web21-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.web21-form-grid label { display: flex; flex-direction: column; gap: 8px; min-width: 0; color: #475569; font-size: 13px; font-weight: 600; }
.web21-form-grid .web21-name-field { grid-column: 1 / -1; }
.web21-form-grid .web21-name-field::before { display: none; }
.web21-form-grid .web21-name-field em { color: #dc2626; font-style: normal; }
.web21-form-grid input { width: 100%; margin: 0; border-radius: 9px; }
.web21-form-grid input:disabled { background: #f1f5f9; color: #64748b; cursor: not-allowed; }
.web21-security-note { margin: 18px 0 0; line-height: 1.5; }
.web21-save-profile { margin: 20px 0 0; }
.web21-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 24px); margin: auto; padding: 0; overflow-y: auto; border: 1px solid #e2e8f0; border-radius: 18px; box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25); color: #1e293b; }
.web21-dialog::backdrop { background: rgba(15, 23, 42, 0.58); }
.web21-dialog form { margin: 0; }
.web21-dialog-head { display: flex; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid #e6edf5; }
.web21-dialog-head h2 { margin: 0 0 5px; color: #0f172a; font-size: 21px; }
.web21-dialog-head p { margin: 0; color: #64748b; font-size: 13px; }
.web21-dialog-close { align-self: start; border: 0; background: transparent; color: #64748b; font-size: 28px; line-height: 1; cursor: pointer; }
.web21-dialog-body { padding: 22px 24px; }
.web21-dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px; border: 2px dashed #bfdbfe; border-radius: 14px; background: #f8fbff; text-align: center; cursor: pointer; }
.web21-dropzone.is-dragging { border-color: #4f46e5; background: #eef2ff; }
.web21-dropzone strong { color: #1e3a8a; font-size: 15px; }
.web21-dropzone span, .web21-dropzone small { color: #64748b; font-size: 12px; }
.web21-dropzone .btn { margin: 0; }
.web21-error { margin: 14px 0 0; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 9px; background: #fef2f2; color: #b91c1c; font-size: 13px; }
.web21-editor { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; margin-top: 22px; align-items: start; }
.web21-editor[hidden], .web21-error[hidden] { display: none; }
.web21-crop-frame { display: flex; flex-direction: column; gap: 8px; }
.web21-crop-frame canvas { display: block; width: 100%; height: auto; aspect-ratio: 1; border: 3px solid #4f46e5; border-radius: 9px; cursor: grab; touch-action: none; }
.web21-crop-frame canvas:active { cursor: grabbing; }
.web21-crop-frame span { color: #64748b; font-size: 12px; text-align: center; }
.web21-preview-col { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #475569; font-size: 13px; font-weight: 600; }
.web21-preview-col canvas { width: 144px; height: 144px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #cbd5e1, 0 5px 16px rgba(15, 23, 42, 0.12); }
.web21-zoom { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; color: #475569; font-size: 13px; font-weight: 600; }
.web21-zoom input { width: 100%; accent-color: #4f46e5; }
.web21-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid #e6edf5; }
.web21-dialog-actions .btn { margin: 0; }
.web21-dialog-actions .btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 1000px) {
    .web21-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    body.web-authenticated .web21-card { padding: 18px; }
    .web21-avatar-panel, .web21-info-panel { padding: 18px; }
    .web21-form-grid { grid-template-columns: minmax(0, 1fr); }
    .web21-dialog-head, .web21-dialog-body, .web21-dialog-actions { padding-left: 16px; padding-right: 16px; }
    .web21-editor { grid-template-columns: minmax(0, 1fr); }
    .web21-preview-col { align-items: center; }
}

/* WEB-22 — chỉ mục Gói cước của tổ chức. */
body.web-authenticated .badge.st-info { background: #eff6ff; color: #1d4ed8; }
main.container.web22-page { max-width: 1100px; margin: 32px auto; padding: 0 18px; color: #1e293b; }
.web22-back { margin: 0 0 14px; font-size: 13px; font-weight: 650; }
.web22-back a { color: #2563eb; }
body.web-authenticated .web22-heading { display: flex; align-items: center; gap: 16px; padding: 22px 26px; margin-bottom: 20px; background: linear-gradient(135deg, #f0f7ff, #fff 58%, #f4f8fe) !important; border-color: #dbeafe !important; }
.web22-heading-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 52px; width: 52px; height: 52px; border-radius: 13px; background: #dbeafe; color: #2563eb; }
.web22-heading h1 { margin: 0 0 3px; color: #0f172a; font-size: 25px; }
.web22-heading p { margin: 0; color: #64748b; font-size: 13px; }
body.web-authenticated .web22-status-card { padding: 22px 26px; margin-bottom: 28px; }
.web22-section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.web22-section-title h2 { margin: 0; color: #0f172a; font-size: 19px; }
.web22-section-title a { font-size: 13px; font-weight: 650; white-space: nowrap; }
.web22-status-main { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 15px 0; border-top: 1px solid #e6edf5; }
.web22-status-main > div { display: grid; gap: 5px; }
.web22-eyebrow, .web22-expiry > span { color: #64748b; font-size: 12px; font-weight: 600; }
.web22-status-main strong { color: #0f172a; font-size: 21px; }
.web22-status-main .badge, .web22-status-main .plat-badge { padding: 5px 12px; border-radius: 999px; font-weight: 650; font-size: 12.5px; }
.web22-expiry { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 12px; padding-top: 13px; border-top: 1px solid #e6edf5; }
.web22-expiry strong { color: #0f172a; font-size: 15px; }
.web22-expiry small { color: #1d4ed8; background: #eff6ff; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.web22-billing-note { display: flex; gap: 10px; margin-top: 16px; padding: 12px 14px; border: 1px solid #dbeafe; border-radius: 11px; background: #f8fbff; color: #475569; font-size: 13px; }
.web22-billing-note > span { color: #2563eb; font-size: 17px; line-height: 1; }
.web22-billing-note p { margin: 0; line-height: 1.5; }
.web22-billing-note p + p { margin-top: 3px; }
.web22-packages { margin-bottom: 30px; }
.web22-pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.web22-pricing-grid > [hidden] { display: none !important; }
.web44-package-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 20px auto 0; padding: 10px 18px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #1d4ed8; font: inherit; font-weight: 650; cursor: pointer; }
.web44-package-toggle svg { display: block; flex: none; transition: transform .2s; }
.web44-package-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
body.web-authenticated .web22-plan { display: flex; flex-direction: column; min-width: 0; min-height: 295px; padding: 22px; margin: 0; }
body.web-authenticated .web22-plan-current { border: 2px solid #2563eb !important; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08); }
.web22-plan-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 30px; }
.web22-plan h3 { margin: 0; color: #0f172a; font-size: 17px; line-height: 1.35; }
.web22-plan-pills { display: flex; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.web22-plan-pills .badge, .web22-history-table .badge { padding: 5px 10px; }
.web22-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 9px; margin: 17px 0 15px; }
.web22-price strong { color: #0f172a; font-size: 29px; line-height: 1.1; }
.web22-price span { color: #64748b; font-size: 13px; }
.web22-limits { display: grid; align-content: start; gap: 9px; flex: 1; padding: 15px 0 20px; border-top: 1px solid #e6edf5; }
.web22-limit { display: flex; align-items: center; gap: 10px; color: #475569; font-size: 13px; }
.web22-limit-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 7px; background: #eff6ff; color: #2563eb; font-size: 15px; font-weight: 700; }
.web22-plan .web22-buy { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 40px; margin: 0; border-radius: 9px; font-weight: 650; text-decoration: none; }
body.web-authenticated .web22-empty { padding: 22px; color: #64748b; }
body.web-authenticated .web22-orders-card { padding: 12px 18px; }
.web22-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.web22-history-table { min-width: 850px; }
.web22-history-table th { color: #64748b; font-size: 12px; white-space: nowrap; }
.web22-history-table td { vertical-align: middle; }
.web22-history-table td:first-child code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; color: #334155; font-size: 12.5px; font-weight: 600; background: #f1f5f9; padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.web22-history-table td:last-child a { color: #2563eb; font-weight: 650; white-space: nowrap; }
@media (max-width: 800px) {
    main.container.web22-page { margin: 20px auto; }
    body.web-authenticated .web22-heading, body.web-authenticated .web22-status-card { padding: 18px; }
    body.web-authenticated .web22-plan { min-height: 0; }
    .web22-pricing-grid { grid-template-columns: minmax(0, 1fr); }
    .web22-price strong { font-size: 26px; }
}

/* WEB-23 — Trang checkout + trang chi tiết đơn của tổ chức */
main.container.web23-page { max-width: 960px; margin: 32px auto; padding: 0 18px; color: #1e293b; }
.web23-back { margin: 0 0 14px; font-size: 13px; font-weight: 650; }
.web23-back a { color: #2563eb; }
body.web-authenticated .web23-heading { display: flex; align-items: center; gap: 16px; padding: 22px 26px; margin-bottom: 20px; background: linear-gradient(135deg, #f0f7ff, #fff 58%, #f4f8fe) !important; border-color: #dbeafe !important; }
.web23-heading-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 52px; width: 52px; height: 52px; border-radius: 13px; background: #dbeafe; color: #2563eb; }
.web23-heading-content { min-width: 0; flex: 1; }
.web23-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 3px; }
.web23-heading h1 { margin: 0; color: #0f172a; font-size: 22px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.web23-heading p { margin: 0; color: #64748b; font-size: 13px; }
.web23-order-badge { padding: 5px 12px !important; border-radius: 999px !important; font-size: 12.5px !important; font-weight: 650 !important; }

/* Hộp thông báo gói đã áp dụng */
.web23-success-box { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; margin-bottom: 20px; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.web23-success-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; background: #dcfce7; color: #15803d; }
.web23-success-text strong { display: block; font-size: 15px; color: #14532d; margin-bottom: 2px; }
.web23-success-text p { margin: 0; font-size: 13.5px; color: #166534; }

/* Bố cục 2 cột */
.web23-grid-2col { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
body.web-authenticated .web23-card { padding: 22px 24px; margin: 0; }
.web23-section-title { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e6edf5; }
.web23-section-title h2 { margin: 0; color: #0f172a; font-size: 17px; font-weight: 700; }

/* Thẻ tóm tắt gói cước (checkout) */
.web23-package-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.web23-package-header h3 { margin: 0; color: #0f172a; font-size: 20px; font-weight: 700; }
.web23-package-header .badge { padding: 4px 10px; font-size: 12px; }
.web23-limits { display: grid; gap: 10px; }
.web23-limit { display: flex; align-items: center; gap: 10px; color: #475569; font-size: 13.5px; }
.web23-limit-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 7px; background: #eff6ff; color: #2563eb; font-size: 15px; font-weight: 700; }

/* Bảng kê giá */
.web23-pricing-breakdown { display: grid; gap: 10px; margin-bottom: 18px; }
.web23-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: #475569; }
.web23-price-val { font-weight: 600; color: #0f172a; }
.web23-discount-row { color: #059669; }
.web23-discount-val { font-weight: 650; color: #059669; }
.web23-total-row { padding-top: 12px; margin-top: 4px; border-top: 1px dashed #cbd5e1; font-size: 15px; color: #0f172a; }
.web23-total-label { font-weight: 700; }
.web23-total-val { font-size: 24px; font-weight: 800; color: #0f172a; }

/* Form thanh toán */
.web23-form { display: grid; gap: 16px; }
.web23-field-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 650; color: #334155; }
.web23-methods-list { display: grid; gap: 10px; }
.web23-method-card { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1.5px solid #e2e8f0; border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; background: #fff; }
.web23-method-card:hover { border-color: #93c5fd; background: #f8fbff; }
.web23-method-card input[type="radio"] { margin-top: 3px; accent-color: #2563eb; }
.web23-method-card:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.web23-method-body { display: grid; gap: 2px; }
.web23-method-name { font-size: 14px; font-weight: 650; color: #0f172a; }
.web23-method-sub { font-size: 12px; color: #64748b; }
.web23-btn-submit { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; margin: 0; border-radius: 9px; font-size: 14px; font-weight: 650; text-decoration: none; }
.web23-action-form { margin-top: 12px; }
.web23-cancel-form { margin-top: 10px; }
.web23-btn-cancel { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 38px; margin: 0; border-radius: 9px; font-size: 13px; font-weight: 600; }

/* Lưới thông tin đơn hàng (như WEB-20) */
.web23-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.web23-info-grid > div { min-width: 0; padding: 13px 10px; border-top: 1px solid #e6edf5; }
.web23-info-grid dt { margin-bottom: 4px; color: #64748b; font-size: 12px; font-weight: 600; }
.web23-info-grid dd { margin: 0; color: #0f172a; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.web23-code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; color: #1e293b; background: #f1f5f9; padding: 3px 7px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.web23-mono-num { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; letter-spacing: .03em; font-size: 15px; }

/* Thẻ thông tin chuyển khoản */
body.web-authenticated .web23-bank-card { margin-top: 20px; }
.web23-notice-warning { margin: 0; padding: 12px 14px; border: 1px solid #fde68a; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 13px; }

@media (max-width: 768px) {
    .web23-grid-2col { grid-template-columns: minmax(0, 1fr); }
    body.web-authenticated .web23-heading, body.web-authenticated .web23-card { padding: 18px; }
    .web23-heading h1 { font-size: 20px; }
    .web23-info-grid { grid-template-columns: minmax(0, 1fr); }
    .web23-info-grid > div { padding: 10px 0; }
}

/* ==========================================================================
   WEB-24: Phiên chấm công & duyệt tổ chức (/org/{id}/attendance)
   ========================================================================== */
.web24-page { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }
.web24-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 20px 24px; margin-bottom: 16px; border-radius: 12px; }
.web24-heading-icon { width: 48px; height: 48px; border-radius: 12px; background: #eff6ff; color: #2563eb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.web24-heading-text { flex: 1; min-width: 200px; }
.web24-heading-text h1 { font-size: 20px; font-weight: 700; margin: 0; color: #0f172a; line-height: 1.3; }
.web24-subtext { font-size: 13.5px; color: #64748b; margin: 3px 0 0 0; }
.web24-quick-links { font-size: 13.5px; color: #64748b; margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.web24-quick-links a { color: #2563eb; text-decoration: none; font-weight: 500; }
.web24-quick-links a:hover { text-decoration: underline; }

.web24-filters-card { padding: 18px 24px; margin-bottom: 16px; border-radius: 12px; }
.web24-filters-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.web24-filter-group { display: flex; flex-direction: column; gap: 6px; }
.web24-filter-group label { font-size: 13px; font-weight: 600; color: #475569; }
.web24-filter-group input, .web24-filter-group select { height: 38px; padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; background: #fff; color: #1e293b; box-sizing: border-box; }
.web24-filter-action { margin-left: 4px; }
.web24-btn-filter { height: 38px; padding: 0 20px; font-weight: 600; border-radius: 6px; }

.web24-list-card { min-width: 0; padding: 20px 24px; margin-bottom: 24px; border-radius: 12px; }
.web24-section-header { margin-bottom: 14px; }
.web24-section-header h2 { font-size: 17px; font-weight: 700; margin: 0; color: #0f172a; }

.web24-table-responsive { width: 100%; max-width: 100%; box-sizing: border-box; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; margin-top: 14px; }
.web24-table { width: 100%; min-width: 960px; border-collapse: collapse; margin: 0; }
.web24-table th, .web24-table td { padding: 10px 14px; font-size: 13.5px; vertical-align: middle; text-align: left; border-bottom: 1px solid #f1f5f9; }
.web24-table th { background: #f8fafc; font-weight: 650; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }

.web24-col-id { width: 60px; text-align: center; }
.web24-col-member { min-width: 130px; }
.web24-col-date { width: 105px; }
.web24-col-time { width: 90px; }
.web24-col-location { width: 110px; }
.web24-col-flags { min-width: 170px; }
.web24-col-status { width: 115px; }
.web24-col-actions { min-width: 152px; }
.web24-day-note { color: #64748b; font-size: 11px; }

.web24-nowrap { white-space: nowrap; }
.web24-badges-wrap { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.web24-badges-wrap .badge { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; font-weight: 600; line-height: 1.4; }
.web24-session-note { font-size: 12px; color: #475569; margin-top: 2px; line-height: 1.35; }
.web24-session-report { font-size: 11.5px; color: #64748b; margin-top: 2px; line-height: 1.35; }
.web24-actions { display: flex; gap: 6px; align-items: center; }
.web24-btn-action { padding: 4px 10px; font-size: 12px; font-weight: 600; border-radius: 5px; cursor: pointer; border: none; }

@media (max-width: 640px) {
    .web24-heading { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
    .web24-quick-links { margin-left: 0; width: 100%; padding-top: 8px; border-top: 1px solid #f1f5f9; }
    .web24-filters-card, .web24-list-card { padding: 16px; }
    .web24-filters-form { flex-direction: column; align-items: stretch; gap: 12px; }
    .web24-filter-group input, .web24-filter-group select { width: 100%; }
    .web24-filter-action { margin-left: 0; }
    .web24-btn-filter { width: 100%; }
}

/* ==========================================================================
   WEB-25: Bảng công của tôi (/my/timesheet)
   ========================================================================== */
.web25-container { max-width: 1100px; margin: 0 auto; }
.web25-heading-card { padding: 20px 24px; margin-bottom: 16px; border-radius: 12px; }
.web25-header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.web25-heading-left { display: flex; align-items: center; gap: 16px; min-width: 260px; }
.web25-icon-box { width: 48px; height: 48px; border-radius: 12px; background: #eff6ff; color: #2563eb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.web25-title { font-size: 20px; font-weight: 700; margin: 0 0 6px 0; color: #0f172a; line-height: 1.3; }
.web25-meta-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.web25-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.web25-pill-period { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.web25-pill-mode { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.web25-pill-locked { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.web25-pill-open { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

.web25-export-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.web25-btn-export { display: inline-flex; align-items: center; padding: 7px 14px; font-size: 13px; font-weight: 600; border-radius: 8px; text-decoration: none; }

.web25-empty-card { padding: 32px 24px; margin-bottom: 20px; border-radius: 12px; }

/* Stats cards */
.web25-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.web25-stat-card { padding: 16px 20px; border-radius: 12px; margin-bottom: 0; background: #fff; }
.web25-stat-label { font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; }
.web25-stat-value { font-size: 22px; font-weight: 700; color: #0f172a; display: flex; align-items: baseline; gap: 4px; }
.web25-stat-unit { font-size: 13px; font-weight: 500; color: #64748b; }
.web25-pill-leave { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; font-size: 12px; padding: 2px 8px; margin-right: 4px; margin-bottom: 4px; }

/* Table Card */
.web25-table-card { padding: 20px 24px; margin-bottom: 24px; border-radius: 12px; }
.web25-table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; margin-top: 12px; }
.web25-table { width: 100%; min-width: 820px; border-collapse: collapse; margin: 0; }
.web25-table th, .web25-table td { padding: 10px 14px; font-size: 13.5px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; text-align: left; }
.web25-table th { background: #f8fafc; font-weight: 650; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }

.web25-nowrap { white-space: nowrap; }
.web25-col-date { width: 110px; }
.web25-col-sessions { width: 90px; }
.web25-col-minutes { width: 100px; }
.web25-col-late { width: 105px; }
.web25-col-early { width: 105px; }
.web25-col-leave { width: 130px; }
.web25-col-tentative { width: 140px; }
.web25-col-work { width: 110px; }
.web25-col-note { min-width: 140px; }

.web25-badge-num { display: inline-block; padding: 2px 8px; background: #f1f5f9; color: #334155; border-radius: 999px; font-weight: 600; font-size: 12px; }
.web25-num-warn { color: #dc2626; font-weight: 600; }
.web25-num-early { color: #ea580c; font-weight: 600; }
.web25-pill-leave-item { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; }
.web25-pill-tentative { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; }
.web25-note-cell { font-size: 12.5px; color: #475569; line-height: 1.35; }

@media (max-width: 640px) {
    .web25-heading-card { padding: 16px; }
    .web25-header-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
    .web25-export-actions { width: 100%; display: flex; gap: 8px; }
    .web25-export-actions a { flex: 1; justify-content: center; text-align: center; }
    .web25-table-card { padding: 16px; }
    .web25-stats-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* ==========================================================================
   WEB-26: Lịch sử chấm của tôi (/my/attendance)
   ========================================================================== */
.web26-container { max-width: 1100px; margin: 0 auto; }
.web26-heading-card { padding: 20px 24px; margin-bottom: 16px; border-radius: 12px; }
.web26-header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.web26-heading-left { display: flex; align-items: center; gap: 16px; min-width: 260px; }
.web26-icon-box { width: 48px; height: 48px; border-radius: 12px; background: #eff6ff; color: #2563eb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.web26-title { font-size: 20px; font-weight: 700; margin: 0 0 6px 0; color: #0f172a; line-height: 1.3; }
.web26-meta-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.web26-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.web26-pill-org { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.web26-pill-month { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

.web26-card { padding: 20px 24px; margin-bottom: 20px; border-radius: 12px; background: #fff; }
.web26-section-title { font-size: 16px; font-weight: 700; margin: 0 0 14px 0; color: #0f172a; }

.web26-table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; margin-top: 12px; }
.web26-table { width: 100%; min-width: 860px; border-collapse: collapse; margin: 0; }
.web26-table th, .web26-table td { padding: 10px 14px; font-size: 13.5px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; text-align: left; }
.web26-table th { background: #f8fafc; font-weight: 650; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }

.web26-nowrap { white-space: nowrap; }
.web26-col-date { width: 105px; }
.web26-col-time { width: 155px; }
.web26-col-location { min-width: 130px; }
.web26-col-flags { min-width: 170px; }
.web26-col-note { min-width: 160px; }
.web26-col-status { width: 120px; }
.web26-col-work { width: 100px; text-align: right; }
.web26-col-report { min-width: 180px; }

.web26-badges-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.web26-badges-wrap .badge { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; font-weight: 600; line-height: 1.4; }
.web26-note-cell { font-size: 13px; color: #475569; line-height: 1.4; }
.web26-col-status-cell .badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }

@media (max-width: 640px) {
    .web26-heading-card { padding: 16px; }
    .web26-header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .web26-card { padding: 16px; }
}

/* ==========================================================================
   WEB-27: Đơn từ của tôi (/my/requests)
   ========================================================================== */
.web27-container { max-width: 1100px; margin: 0 auto; }
.web27-heading-card { padding: 20px 24px; margin-bottom: 16px; border-radius: 12px; }
.web27-header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.web27-heading-left { display: flex; align-items: center; gap: 16px; min-width: 260px; }
.web27-icon-box { width: 48px; height: 48px; border-radius: 12px; background: #eff6ff; color: #2563eb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.web27-title { font-size: 20px; font-weight: 700; margin: 0 0 6px 0; color: #0f172a; line-height: 1.3; }
.web27-meta-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.web27-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.web27-pill-org { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.web27-pill-month { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.web27-pill-filter { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

.web27-btn-open-create { display: inline-flex; align-items: center; padding: 8px 16px; font-size: 13.5px; font-weight: 600; border-radius: 8px; cursor: pointer; text-decoration: none; }

.web27-card { padding: 20px 24px; margin-bottom: 20px; border-radius: 12px; background: #fff; }
.web27-section-title { font-size: 16px; font-weight: 700; margin: 0 0 14px 0; color: #0f172a; }

.web27-table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; margin-top: 12px; }
.web27-table { width: 100%; min-width: 860px; border-collapse: collapse; margin: 0; }
.web27-table th, .web27-table td { padding: 10px 14px; font-size: 13.5px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; text-align: left; }
.web27-table th { background: #f8fafc; font-weight: 650; color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }

.web27-nowrap { white-space: nowrap; }
.web27-col-type { min-width: 130px; }
.web27-col-date { width: 110px; }
.web27-col-half { width: 100px; text-align: center; }
.web27-col-status { width: 120px; }
.web27-col-note { min-width: 160px; }
.web27-col-actions { width: 110px; text-align: center; }

.web27-badge-half { font-size: 11.5px; padding: 2px 8px; background: #e0f2fe; color: #0369a1; border-radius: 999px; font-weight: 600; }
.web27-col-status-cell .badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.web27-note-cell { font-size: 13px; color: #475569; line-height: 1.4; }

/* Status pill cancelled / neutral */
.badge.st-cancelled, .badge.st-neutral { background-color: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

/* Dialog styles */
.web27-dialog { padding: 0; border: none; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); max-width: 580px; width: 92%; }
.web27-dialog::backdrop { background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(2px); }
.web27-dialog-shell { padding: 24px; background: #fff; border-radius: 12px; }
.web27-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; border-bottom: 1px solid #f1f5f9; padding-bottom: 14px; }
.web27-dialog-eyebrow { font-size: 11px; font-weight: 700; color: #64748b; letter-spacing: 0.05em; text-transform: uppercase; }
.web27-dialog-head h2 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 2px 0 4px 0; }
.web27-dialog-sub { font-size: 13px; color: #64748b; margin: 0; }
.web27-close-btn { background: transparent; border: none; font-size: 24px; color: #94a3b8; cursor: pointer; line-height: 1; padding: 0 4px; }
.web27-close-btn:hover { color: #0f172a; }

.web27-dialog-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; font-weight: 500; }

.web27-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.web27-form-group { display: flex; flex-direction: column; gap: 6px; }
.web27-label { font-size: 13px; font-weight: 600; color: #334155; }
.web27-req { color: #dc2626; }
.web27-input, .web27-textarea { padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13.5px; background: #fff; color: #0f172a; width: 100%; box-sizing: border-box; }
.web27-input:focus, .web27-textarea:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }

.web27-type-box { margin-top: 14px; padding: 14px; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; }
.web27-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155; cursor: pointer; }
.web27-hint { font-size: 12.5px; color: #64748b; margin-bottom: 10px; }

.web27-file-picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.web27-file-input { display: none; }
.web27-btn-choose-file { padding: 6px 12px; font-size: 12.5px; cursor: pointer; }
.web27-file-name { font-size: 12.5px; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.web27-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #f1f5f9; }

@media (max-width: 640px) {
    .web27-heading-card { padding: 16px; }
    .web27-header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .web27-card { padding: 16px; }
    .web27-dialog { width: 95%; max-height: 90vh; overflow-y: auto; }
    .web27-dialog-shell { padding: 16px; }
    .web27-form-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* WEB-28: Đơn từ và duyệt của tổ chức */
.web28-page { max-width: 1200px; margin: 0 auto; }
.web28-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 20px 24px; margin-bottom: 16px; border-radius: 12px; }
.web28-heading-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; flex: none; border-radius: 12px; background: #eff6ff; color: #2563eb; }
.web28-heading-text { flex: 1; min-width: 180px; }
.web28-heading-text h1 { margin: 0; color: #0f172a; font-size: 20px; line-height: 1.3; }
.web28-heading-text p { margin: 3px 0 0; color: #64748b; font-size: 13.5px; }
.web28-quick-links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13.5px; }
.web28-quick-links a { color: #2563eb; font-weight: 600; text-decoration: none; }
.web28-filters-card, .web28-list-card { padding: 20px 24px; margin-bottom: 16px; border-radius: 12px; }
.web28-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.web28-filters label { display: flex; flex-direction: column; gap: 6px; color: #475569; font-size: 13px; font-weight: 600; }
.web28-filters input, .web28-filters select { height: 38px; padding: 6px 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #1e293b; font: inherit; font-weight: 400; }
.web28-filters button { height: 38px; padding: 0 20px; }
.web28-list-card h2 { margin: 0 0 14px; color: #0f172a; font-size: 17px; }
.web28-count { margin-left: 6px; color: #64748b; font-size: 13px; font-weight: 500; }
.web28-table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 12px; }
.web28-table { width: 100%; min-width: 1120px; margin: 0; border-collapse: collapse; }
.web28-table th, .web28-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; text-align: left; vertical-align: middle; font-size: 13px; }
.web28-table th { background: #f8fafc; color: #475569; font-size: 12px; font-weight: 650; white-space: nowrap; }
.web28-nowrap { white-space: nowrap; }
.web28-type { min-width: 140px; }
.web28-badge { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.web28-actions { display: flex; flex-direction: column; gap: 6px; min-width: 142px; }
.web28-actions form { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.web28-actions input { min-width: 0; width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 5px; font-size: 12px; }
.web28-actions button { width: 100%; min-height: 34px; padding: 5px 8px; font-size: 12px; font-weight: 600; }
@media (max-width: 640px) {
    .web28-heading, .web28-filters-card, .web28-list-card { padding: 16px; }
    .web28-heading { align-items: flex-start; }
    .web28-quick-links { width: 100%; padding-top: 10px; border-top: 1px solid #f1f5f9; }
    .web28-filters { flex-direction: column; align-items: stretch; }
    .web28-filters label, .web28-filters button { width: 100%; }
}
.payroll-page-card { min-width: 0; }
.payroll-table-wrap { width: 100%; max-width: 100%; box-sizing: border-box; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.payroll-table-wrap .grid { min-width: 1100px; }
