/**
 * Sidebar app layout — Shop POS style
 */

:root {
    --sidebar-width: 270px;
    --topbar-height: 64px;
}

html {
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
}

.app-layout {
    min-height: 100vh;
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: transparent;
}

.app-body {
    display: flex;
    flex: 1;
    min-height: calc(100vh - var(--topbar-height));
    position: relative;
}

/* ——— Full-width top bar ——— */
.app-topbar {
    display: flex;
    align-items: center;
    min-height: var(--topbar-height);
    height: var(--topbar-height);
    position: sticky;
    top: 0;
    z-index: 120;
    flex-shrink: 0;
    background: var(--glass-bg, rgba(255, 255, 255, 0.72));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border-light, rgba(255, 255, 255, 0.45));
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.app-topbar-brand {
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-right: 1px solid var(--glass-border-light, rgba(226, 232, 240, 0.8));
}

.app-topbar-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    overflow: hidden;
}

.app-topbar-spacer {
    flex: 1;
    min-width: 12px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--glass-border-light, rgba(226, 232, 240, 0.9));
    flex-shrink: 0;
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--text-muted, #64748b);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.lang-btn:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-primary, #0f172a);
}

.lang-btn.active {
    background: var(--primary, #2563eb);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.pwa-install-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-ui, rgba(0, 0, 0, 0.1));
    background: var(--glass-bg-solid, #fff);
    color: var(--text, #0f172a);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    transition: background 0.15s, border-color 0.15s;
}

.pwa-install-btn:hover {
    background: var(--hover-fill, #f4f4f5);
    border-color: var(--border-ui-hover, rgba(0, 0, 0, 0.18));
}

.pwa-install-btn.hidden,
.pwa-install-btn[hidden] {
    display: none !important;
}

.pwa-install-modal {
    max-width: 420px;
}

.pwa-install-brand {
    display: flex;
    justify-content: center;
    margin: 0.25rem 0 1rem;
}

.pwa-install-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    object-fit: cover;
}

.pwa-install-steps {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    line-height: 1.5;
    font-size: 0.9375rem;
}

.pwa-install-steps li {
    margin-bottom: 0.65rem;
}

.login-lang-switch {
    margin-bottom: 12px;
    justify-content: center;
}

/* ——— Sidebar ——— */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: #f8f9fb;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    height: calc(100vh - var(--topbar-height));
    z-index: 100;
    transition: transform 0.25s ease;
    overflow: hidden;
}

.sidebar-brand {
    padding: 20px 16px 12px;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    width: 100%;
}

.brand-mark-wrap {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-mark-icon {
    width: 100%;
    height: 100%;
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    display: block;
    filter: none;
}

.brand-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    line-height: 1.15;
}

.brand-name-row {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text, #0f172a);
    line-height: 1;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

.brand-group {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #475569;
    text-transform: uppercase;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
}

.brand-caption {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--primary, #2563eb);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px 16px;
    scrollbar-width: thin;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.6);
}

.nav-item.active {
    background: #ffffff;
    color: var(--text);
    font-weight: 600;
    border-color: var(--border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active .nav-icon {
    opacity: 1;
    color: var(--primary);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    background: #f8f9fb;
}

.sidebar-user {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 8px 12px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.nav-item-logout {
    color: var(--text-muted);
}

/* ——— Main area ——— */
.main-wrap {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    flex-direction: column;
    background: transparent;
}

.main-header {
    display: none;
}

.sidebar-toggle {
    display: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
}

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

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
}

.main-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    min-width: 0;
}

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

.site-picker label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.site-context-select {
    min-width: 160px;
    max-width: 220px;
    font-size: 0.8125rem;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--border);
}

.site-context-budget {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.main-content {
    flex: 1;
    padding: 16px 20px 28px;
    max-width: none;
    width: 100%;
    min-width: 0;
}

/* Hide legacy top nav */
.app-layout .navbar,
.app-layout .site-context-bar:not(.main-header-actions) {
    display: none !important;
}

/* ——— Work pages (POS / သုံးစွဲမှု) ——— */
.pos-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
}

.pos-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    align-items: flex-end;
    padding: 14px 16px !important;
}

.pos-sidebar .form-group {
    flex: 1 1 160px;
    margin-bottom: 0;
    min-width: 140px;
}

.pos-sidebar .budget-alert {
    flex: 1 1 100%;
    margin: 0;
}

.pos-work {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pos-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 14px;
    align-items: start;
}

.pos-materials-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.pos-item-panel {
    padding: 14px 16px;
}

.pos-item-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.pos-item-panel-head h4 {
    margin: 0;
    font-size: 1.05rem;
}

.pos-item-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-2, rgba(0, 0, 0, 0.04));
}

.pos-item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pos-shop-cart {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 180px);
    position: sticky;
    top: 12px;
}

.pos-shop-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pos-shop-cart-head h3 {
    margin: 0;
    font-size: 1rem;
}

.pos-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--primary, #0f766e);
    color: #fff;
}

.pos-cart-empty-msg {
    text-align: center;
    padding: 16px 8px;
    margin: 0;
}

.pos-cart-table-wrap {
    overflow: auto;
    max-height: 240px;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.06));
    border-radius: 10px;
}

.pos-cart-table {
    font-size: 0.88rem;
}

.pos-cart-table th,
.pos-cart-table td {
    padding: 8px 6px;
    vertical-align: middle;
}

.pos-cart-input {
    width: 4.5rem;
    min-width: 0;
    padding: 6px 8px;
    font-size: 0.88rem;
}

.pos-cart-mat strong {
    display: block;
    line-height: 1.2;
}

.pos-cart-line-total {
    font-size: 0.82rem;
    white-space: nowrap;
}

.pos-cart-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pos-cart-row.editing {
    background: rgba(15, 118, 110, 0.08);
}

.pos-shop-cart-checkout {
    border-top: 1px dashed var(--border-color, rgba(0, 0, 0, 0.12));
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.material-card {
    position: relative;
}

.material-card.in-cart {
    border-color: var(--primary, #0f766e);
    box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.25);
}

.mat-quick-add {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: var(--primary, #0f766e);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mat-quick-add:hover {
    filter: brightness(1.08);
}

.mat-card-body {
    cursor: pointer;
    padding-right: 28px;
}

.usage-layout {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
}

.materials-grid {
    min-height: 160px;
    max-height: 280px;
    overflow-y: auto;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    align-content: start;
}

.pos-cart {
    position: static;
    align-self: stretch;
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
}

.pos-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.pos-cart-head h3 {
    margin: 0;
}

.pos-cart-empty {
    margin: 0;
}

.pos-cart .selected-material:has(.pos-cart-identity) {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr) 250px;
    gap: 16px 20px;
    align-items: start;
}

/* Usage page — vertical panel (not POS 3-column grid) */
.usage-cart .usage-selected-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.usage-cart h3 {
    margin-bottom: 12px;
}

.usage-empty-hint {
    margin: 0;
}

.usage-selected-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.usage-cart .sel-name {
    font-size: 1.15rem;
    line-height: 1.35;
    word-break: break-word;
}

.usage-cart .stock-badge {
    display: block;
    margin: 0;
    padding: 8px 10px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.45;
    white-space: normal;
    color: var(--text-muted);
}

.usage-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.usage-field label {
    display: block;
    margin: 0;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--text);
    text-transform: none;
    letter-spacing: normal;
}

.usage-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
}

.usage-qty-input {
    width: 100px;
    min-width: 72px;
    max-width: 120px;
    flex: 0 0 auto;
    padding: 10px 12px;
    font-size: 1.05rem;
    text-align: center;
}

.usage-unit-badge {
    flex: 0 0 auto;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.usage-hint {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.usage-notes-field {
    padding-top: 4px;
}

.usage-notes-field .form-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.usage-cart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.inv-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.inv-table-wrap {
    overflow-x: auto;
}

.inv-table-wrap .table {
    min-width: 720px;
}

.inv-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.inv-toolbar .form-select {
    min-width: 140px;
    flex: 1 1 140px;
}

.inv-toolbar .btn,
.inv-toolbar a.btn {
    flex: 0 0 auto;
}

.pos-cart-identity .selected-info {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    gap: 8px;
}

.pos-cart-inputs {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pos-cart-inputs .form-group,
.pos-cart-checkout .form-group {
    margin-bottom: 0;
}

.pos-price-group {
    max-width: 280px;
}

.pos-currency-group {
    max-width: 100%;
}

.currency-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.currency-btn {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-ui, #d1d5db);
    border-radius: var(--radius-sm, 8px);
    background: var(--glass-bg-subtle, #f8fafc);
    color: var(--text-primary, #1e293b);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.currency-btn.active {
    background: var(--primary-soft, rgba(20, 184, 166, 0.15));
    border-color: var(--primary, #14b8a6);
    color: var(--primary, #0d9488);
}

.fx-rate-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.fx-rate-label {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
}

.fx-rate-input {
    width: 88px;
    min-width: 72px;
}

.fx-rate-suffix {
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.pos-cart-checkout {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pos-cart .area-calculator,
.pos-cart .quantity-section {
    flex: 0 0 auto;
    margin-bottom: 0;
    padding: 10px 12px;
}

.pos-cart .area-calc-header {
    margin-bottom: 6px;
}

.pos-cart .form-hint {
    margin: 0 0 6px;
    line-height: 1.35;
    white-space: normal;
}

.area-calc-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.area-calc-footer .area-add-btn {
    margin: 0;
}

.area-calc-footer .area-result-row {
    margin-left: auto;
    padding: 0;
    border: none;
}

.pos-cart .calc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pos-cart .calc-row .area-row-label {
    width: 100%;
    min-width: 0;
}

.pos-cart .calc-row .form-input {
    width: 88px;
    min-width: 72px;
    max-width: 110px;
    flex: 0 0 auto;
}

.pos-cart .total-row {
    margin: 0;
    padding: 8px 0;
}

.pos-total-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    margin-bottom: 4px;
    border-radius: 12px;
    background: var(--glass-bg-strong, #ffffff);
    border: 1px solid var(--glass-border-light, #e2e8f0);
    box-shadow: var(--glass-inner, inset 0 1px 0 rgba(255, 255, 255, 0.6));
}

.pos-total-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
}

.pos-total-value,
#pos-total.pos-total-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f766e;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    word-break: break-word;
}

.site-dash-credit-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border-light, #e2e8f0);
}

.site-dash-credit-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
}

.site-dash-credit-value {
    font-size: 1.125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text, #0f172a);
}

.site-dash-credit-value.has-outstanding {
    color: #0f766e;
}

.site-dash-credit-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    text-decoration: none;
    margin-left: auto;
}

.site-dash-credit-link:hover {
    color: var(--text, #0f172a);
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .pos-cart .selected-material:has(.pos-cart-identity) {
        grid-template-columns: 1fr 1fr;
    }

    .pos-cart-identity {
        grid-column: 1 / -1;
    }
}

@media (max-width: 1024px) {
    .pos-work,
    .pos-main {
        display: flex;
        flex-direction: column;
    }

    .pos-shop-cart {
        position: static;
        max-height: none;
    }

    .pos-cart .selected-material:has(.pos-cart-identity) {
        grid-template-columns: 1fr;
    }

    .materials-grid {
        max-height: none;
    }

    .pos-cart {
        position: static;
        max-height: none;
    }
}

.app-layout .container {
    max-width: none;
    padding: 0;
    margin: 0;
}

/* Page header inside content — lighter */
.app-layout .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 0;
    border: none;
    min-height: 0;
}

.app-layout .page-header:not(:has(h1)) {
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.app-layout .page-header:not(:has(h1)) .btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

.app-layout .page-desc {
    margin-top: 0;
    margin-bottom: 12px;
}

.app-layout .page-header:empty {
    display: none;
}

.app-layout .page-header h1 {
    font-size: 1.125rem;
    font-weight: 600;
}

/* KPI cards — reference style */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 4px;
    background: var(--primary);
}

.kpi-card.accent-warning::before,
.kpi-card.accent-success::before,
.kpi-card.accent-primary::before { background: #111111; }

.kpi-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Hero action card */
.hero-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.hero-card-header {
    margin-bottom: 16px;
}

.pill-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    margin-bottom: 8px;
}

.pill-badge.blue {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.hero-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.filter-bar-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-bar-inline .form-select {
    min-width: 160px;
}

.page-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.content-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* Purchase list on POS */
.purchase-list-panel {
    margin-bottom: 20px;
}

.purchase-list-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.purchase-list-panel-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pl-pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-weight: 700;
    font-size: 0.875rem;
    border: 1px solid #fcd34d;
}

.pl-pending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.pl-pending-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.pl-pending-card:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}

.pl-pending-card.selected {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.pl-pending-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.3;
}

.pl-pending-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.pl-pending-price {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.pl-pending-list {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.purchase-list-empty {
    margin-bottom: 20px;
    padding: 20px;
}

/* Supplier credit detail */
.site-credit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.site-credit-header h3 {
    font-size: 1.0625rem;
    font-weight: 600;
}

.credit-matrix-table .credit-expand-btn {
    min-width: 36px;
    padding: 4px 8px;
}

.credit-supplier-row.has-outstanding td {
    background: var(--primary-soft);
}

.credit-detail-row td {
    padding: 0 !important;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
}

.credit-detail-wrap {
    padding: 12px 16px 16px;
}

.credit-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.credit-lines-table th,
.credit-lines-table td {
    font-size: 0.9375rem;
}

.credit-lines-table td:nth-child(3) {
    white-space: normal;
    word-break: break-word;
}

.credit-line-paid td {
    opacity: 0.65;
}

.credit-line-open td:last-child {
    font-weight: 600;
}

.credit-section-title {
    margin: 0 0 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.credit-credit-section {
    margin-bottom: 16px;
}

.credit-payments-section {
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

.credit-payments-empty {
    margin: 0;
    font-size: 0.875rem;
}

.credit-payments-table td {
    font-size: 0.8125rem;
}

.text-sm {
    font-size: 0.8125rem;
}

/* Login */
.login-page {
    background: #eef1f6;
    min-height: 100vh;
    overflow-y: auto;
}

.login-brand-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border-light, rgba(226, 232, 240, 0.7));
}

.login-brand-identity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.login-brand-mark {
    width: 48px;
    height: 48px;
    min-width: 48px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.login-brand-name {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--text, #0f172a);
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

.login-brand-group {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    margin-top: 3px;
    white-space: nowrap;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 150;
}

/* Mobile */
@media (max-width: 1024px) {
    .app-body {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: var(--topbar-height);
        left: 0;
        bottom: 0;
        width: var(--sidebar-width);
        height: calc(100vh - var(--topbar-height));
        z-index: 200;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-backdrop.open {
        display: block;
    }

    .main-wrap {
        margin-left: 0;
        width: 100%;
    }

    .app-topbar-brand {
        width: auto;
        min-width: 0;
        padding: 0 12px;
        border-right: none;
    }

    .app-topbar-brand .brand-caption,
    .app-topbar-brand .brand-group {
        display: none;
    }

    .app-topbar-brand .brand-name {
        font-size: 1.15rem;
    }

    .app-topbar-brand .brand-mark-wrap {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .app-topbar-brand .brand-mark-icon {
        max-width: 32px;
        max-height: 32px;
    }

    .sidebar-toggle {
        display: block;
    }

    .app-topbar-main {
        padding: 0 16px;
        gap: 12px;
    }

    .main-content {
        padding: 12px 16px 32px;
    }

    .main-header-actions {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .site-context-budget {
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 1024px) {
    .content-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1025px) {
    .page-header .header-actions {
        margin-top: 0;
    }
}

/* ——— Stock sheet (စရင်းဇယား) ——— */
.stock-sheet-card {
    padding: 0;
    overflow: hidden;
}

.stock-sheet-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.sheet-site-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text);
}

.sheet-meta {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.sheet-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-muted);
    white-space: nowrap;
}

.stock-sheet-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-bottom: 1px solid var(--border);
}

.stock-kpi {
    background: #fff;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stock-kpi-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.stock-kpi-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.stock-kpi-highlight {
    background: #f0f7ff;
}

.stock-kpi-highlight .stock-kpi-value {
    color: var(--primary);
}

.stock-sheet-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stock-sheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.stock-sheet-table .col-mat { width: 22%; min-width: 140px; }
.stock-sheet-table .col-unit { width: 6%; min-width: 50px; }
.stock-sheet-table .col-qty { width: 6%; min-width: 52px; }
.stock-sheet-table .col-price { width: 8.5%; min-width: 80px; }
.stock-sheet-table .col-money { width: 9.5%; min-width: 88px; }

.stock-sheet-table thead th {
    padding: 10px 12px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    background: #f8f9fb;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.stock-sheet-table .group-qty {
    background: #eef4ff;
    color: #3b5bdb;
    border-bottom: 1px solid #d0dcf5;
}

.stock-sheet-table .group-money {
    background: #f0fdf4;
    color: #15803d;
    border-bottom: 1px solid #bbf7d0;
}

.stock-sheet-table .stock-subhead-row th {
    background: #fafbfc;
    font-size: 0.65rem;
}

.stock-sheet-table tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid #eef1f6;
    vertical-align: middle;
}

.stock-sheet-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.stock-sheet-table tbody tr:hover {
    background: #f0f4ff;
}

.stock-sheet-table .mat-cell {
    font-weight: 500;
    color: var(--text);
    text-align: left;
    white-space: nowrap;
}

.stock-sheet-table .unit-cell {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.stock-sheet-table .num-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.stock-sheet-table .money-cell {
    font-size: 0.8125rem;
}

.stock-sheet-table .closing-qty {
    font-weight: 700;
    color: var(--primary);
}

.stock-sheet-table .closing-value {
    font-weight: 700;
    color: var(--primary);
}

.stock-kpi-sub {
    font-size: 0.725rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.stock-sheet-table .empty-row {
    padding: 32px 16px;
}

.stock-sheet-table tfoot .stock-total-row td {
    padding: 14px 12px;
    background: #f1f5f9;
    border-top: 2px solid var(--border);
    font-weight: 600;
}

.stock-sheet-table .total-label {
    text-align: left;
    color: var(--text);
    font-size: 0.875rem;
}

.stock-sheet-table .total-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

@media (max-width: 900px) {
    .stock-sheet-kpis {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stock-sheet-kpis {
        grid-template-columns: 1fr;
    }

    .stock-sheet-title {
        flex-direction: column;
        padding: 16px;
    }
}

@media print {
    .sidebar,
    .sidebar-backdrop,
    .app-topbar,
    .main-header,
    .page-header,
    .filter-bar,
    .page-desc {
        display: none !important;
    }

    .main-wrap {
        margin: 0 !important;
    }

    .main-content {
        padding: 0 !important;
    }

    .stock-sheet-card {
        box-shadow: none !important;
        border: none !important;
    }

    .stock-sheet-scroll {
        overflow: visible !important;
    }

    .stock-sheet-table {
        font-size: 10pt;
    }
}

/* ——— Labor entry form (modern) ——— */
.labor-entry-card {
    padding: 0 !important;
    overflow: hidden;
    border-radius: var(--radius-lg, 20px) !important;
}

.labor-entry-card > .labor-entry-head,
.labor-entry-card > .labor-entry-form {
    padding: 0 24px;
}

.labor-entry-card > .labor-entry-actions {
    padding: 16px 24px 24px;
}

.labor-entry-head {
    padding-top: 24px;
    padding-bottom: 8px;
}

.labor-entry-title {
    margin: 8px 0 4px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text, #0f172a);
    line-height: 1.2;
}

.labor-entry-sub {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    line-height: 1.45;
}

.labor-entry-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 20px;
}

.labor-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.labor-section-label {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
}

.labor-grid {
    display: grid;
    gap: 14px;
}

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

.labor-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary, var(--text-muted, #334155));
    line-height: 1.3;
}

.labor-control {
    width: 100%;
    min-height: 44px;
    font-size: 0.9375rem !important;
}

.expense-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.expense-cat-pill {
    flex: 0 1 auto;
    min-height: 40px;
    padding: 8px 14px;
}

.labor-type-pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.labor-type-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--border-ui, #e2e8f0);
    border-radius: 14px;
    background: var(--glass-bg-subtle, #f8fafc);
    color: var(--text-secondary, #475569);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.labor-type-pill:hover {
    border-color: var(--border-ui-hover, #cbd5e1);
    transform: translateY(-1px);
}

.labor-type-pill.active {
    background: var(--primary-soft, rgba(20, 184, 166, 0.12));
    border-color: var(--primary, #14b8a6);
    color: var(--primary, #0d9488);
    box-shadow: var(--focus-ring, 0 0 0 3px rgba(20, 184, 166, 0.15));
}

.labor-pill-icon {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.85;
}

.labor-currency-panel {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--glass-bg-subtle, #f8fafc);
    border: 1px solid var(--glass-border-light, #e2e8f0);
}

.labor-currency-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.labor-currency-toggle {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
}

.labor-rate-panel {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--glass-bg-subtle, #f8fafc);
    border: 1px solid var(--glass-border-light, #e2e8f0);
}

.labor-metric-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: end;
}

.labor-metric-op {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted, #94a3b8);
    padding-bottom: 2px;
}

.labor-payment-hint {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--warning-soft, rgba(251, 191, 36, 0.12));
    border: 1px solid rgba(251, 191, 36, 0.25);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.labor-entry-actions {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 24px 24px;
    margin: 0;
    border-top: 1px solid var(--glass-border-light, #e2e8f0);
    background: var(--glass-bg-subtle, #f8fafc);
}

.labor-total-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
    flex: 1 1 200px;
    padding: 14px 18px;
    border-radius: 14px;
    background: var(--glass-bg-strong, #ffffff);
    border: 1px solid var(--glass-border-light, #e2e8f0);
    box-shadow: var(--glass-inner, inset 0 1px 0 rgba(255, 255, 255, 0.6));
}

.labor-total-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #64748b);
}

.labor-total-value,
#labor-total-preview.labor-total-value {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f766e;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    word-break: break-word;
}

.labor-save-btn {
    flex-shrink: 0;
    min-width: 140px;
    border-radius: 14px !important;
    padding: 14px 28px !important;
    font-weight: 700 !important;
}

.labor-entry-card .hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .labor-grid-2,
    .labor-grid-3,
    .labor-type-pills {
        grid-template-columns: 1fr;
    }

    .labor-metric-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .labor-metric-op {
        min-height: auto;
        padding: 0;
    }

    .labor-currency-head {
        flex-direction: column;
        align-items: stretch;
    }

    .labor-currency-toggle {
        max-width: none;
    }

    .labor-entry-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .labor-save-btn {
        width: 100%;
    }
}

/* ——— Purchase list action cards ——— */
.pl-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.pl-action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    min-height: 64px;
    border-radius: 16px;
    border: 1px solid var(--glass-border, #e2e8f0);
    background: var(--glass-bg, #fff);
    box-shadow: var(--glass-shadow, 0 2px 8px rgba(15, 23, 42, 0.06)), var(--glass-inner, inset 0 1px 0 rgba(255,255,255,0.6));
    color: var(--text-primary, #0f172a);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
    flex: 1 1 220px;
    max-width: 320px;
}

.pl-action-card:hover {
    border-color: var(--border-ui-hover, #cbd5e1);
    box-shadow: var(--glass-shadow-lg, 0 4px 16px rgba(15, 23, 42, 0.08)), var(--glass-inner);
    transform: translateY(-1px);
}

.pl-action-card-new {
    background: var(--primary-soft, rgba(20, 184, 166, 0.1));
    border-color: var(--primary, #14b8a6);
}

.pl-action-card-new:hover {
    background: var(--primary-soft, rgba(20, 184, 166, 0.16));
    border-color: var(--primary-dark, #0d9488);
}

.pl-action-card-compact {
    flex: 0 1 auto;
    min-width: 140px;
    max-width: none;
    min-height: 48px;
    padding: 10px 14px;
}

.pl-action-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: var(--glass-bg-subtle, #f1f5f9);
    border: 1px solid var(--glass-border-light, #e2e8f0);
    color: var(--text-secondary, #475569);
}

.pl-action-icon-plus {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    background: var(--primary, #14b8a6);
    border-color: var(--primary, #14b8a6);
    color: var(--on-primary, #fff);
}

.pl-action-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pl-action-body strong {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    color: inherit;
}

.pl-action-body small {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    line-height: 1.3;
}

.pl-action-card-new .pl-action-body strong {
    color: var(--primary-dark, #0d9488);
}

.pl-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pl-filter-bar .form-select {
    flex: 1 1 180px;
    min-width: 160px;
}

.pl-filter-bar .pl-action-card-compact {
    margin: 0;
}

.pl-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.pl-new-list-modal {
    max-width: 420px;
}

@media (max-width: 768px) {
    .pl-page-actions {
        flex-direction: column;
    }

    .pl-action-card {
        max-width: none;
    }
}

/* ——— Account page ——— */
.account-page {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-card {
    padding: 24px;
}

.account-head {
    margin-bottom: 16px;
}

.account-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text, #0f172a);
}

.account-sub {
    margin: 6px 0 0;
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
}

.account-section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text, #0f172a);
}

.account-profile {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-profile-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--glass-bg-subtle, #f8fafc);
    border: 1px solid var(--glass-border-light, #e2e8f0);
}

.account-profile-label {
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
    font-weight: 600;
}

.account-settings-card {
    display: none;
}

.account-settings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--glass-bg-subtle, #f8fafc);
    border: 1px solid var(--glass-border-light, #e2e8f0);
}

.account-setting-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text, #0f172a);
    flex-shrink: 0;
}

.account-setting-row .lang-switch,
.account-setting-row .theme-switch {
    flex-shrink: 0;
}

.account-setting-row-action {
    align-items: center;
}

.account-setting-row-action .btn {
    min-width: 7rem;
}

@media (max-width: 899px) {
    .account-settings-card {
        display: block;
    }

    .app-topbar-main > #lang-switch,
    .app-topbar-main > #theme-switch {
        display: none !important;
    }
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}
