/* ============================================================================
   markXpand Accounting — scoped styles
   Loaded ONLY by _AccountingLayout.cshtml. Does not affect the main app.
   Brand: #43a3dd (primary), #2e7ba8 (dark variant). Fonts: Plus Jakarta Sans + Inter.
   Light theme only for v1; dark mode comes later.
   ============================================================================ */

:root {
    --acc-primary: #43a3dd;
    --acc-primary-dark: #2e7ba8;
    --acc-primary-soft: rgba(67, 163, 221, 0.08);
    --acc-bg: #f6f8fb;
    --acc-bg-card: #ffffff;
    --acc-border: #e5eaf0;
    --acc-text: #1a2433;
    --acc-text-muted: #6b7785;
    --acc-success: #16a34a;
    --acc-warning: #d97706;
    --acc-danger: #dc2626;
    --acc-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --acc-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --acc-radius: 10px;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--acc-bg);
    color: var(--acc-text);
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

/* -------- Top navigation -------- */
.acc-topnav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.6rem 1.5rem;
    background: var(--acc-bg-card);
    border-bottom: 1px solid var(--acc-border);
    box-shadow: var(--acc-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
}

.acc-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--acc-primary-dark);
    text-decoration: none;
    letter-spacing: -0.005em;
}

.acc-brand-logo {
    height: 32px;
    width: auto;
    display: block;
}

.acc-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
    flex: 1;
}

.acc-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: var(--acc-radius);
    color: var(--acc-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.acc-nav-link:hover {
    background: var(--acc-primary-soft);
    color: var(--acc-primary-dark);
}

.acc-nav-link.active {
    background: var(--acc-primary-soft);
    color: var(--acc-primary-dark);
    font-weight: 600;
}

.acc-user {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--acc-text-muted);
}

.acc-user-email {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
}

.acc-logout {
    color: var(--acc-text-muted);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.acc-logout:hover {
    background: rgba(220, 38, 38, 0.08);
    color: var(--acc-danger);
}

/* -------- Main content -------- */
.acc-main {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.acc-page-header {
    margin-bottom: 1.5rem;
}

.acc-page-header h1 {
    margin: 0 0 0.35rem 0;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--acc-text);
}

.acc-page-header h1 i {
    color: var(--acc-primary);
    margin-right: 0.5rem;
}

.acc-muted {
    color: var(--acc-text-muted);
    margin: 0;
}

/* -------- KPI cards (dashboard) -------- */
.acc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.acc-kpi-card {
    background: var(--acc-bg-card);
    border: 1px solid var(--acc-border);
    border-radius: var(--acc-radius);
    padding: 1.1rem 1.2rem;
    box-shadow: var(--acc-shadow-sm);
}

.acc-kpi-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--acc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.acc-kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--acc-text);
    letter-spacing: -0.02em;
}

.acc-kpi-placeholder {
    color: var(--acc-text-muted);
    font-weight: 500;
}

/* -------- Phase banner (Phase 1 marker) -------- */
.acc-phase-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.2rem;
    background: var(--acc-primary-soft);
    border: 1px solid rgba(67, 163, 221, 0.25);
    border-radius: var(--acc-radius);
    color: var(--acc-text);
}

.acc-phase-banner i {
    color: var(--acc-primary);
    font-size: 1.1rem;
    margin-top: 0.15rem;
}

.acc-phase-banner code {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    color: var(--acc-primary-dark);
    font-size: 0.85em;
}

/* -------- Empty state (placeholder tabs) -------- */
.acc-empty {
    background: var(--acc-bg-card);
    border: 1px dashed var(--acc-border);
    border-radius: var(--acc-radius);
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--acc-text-muted);
}

.acc-empty i {
    font-size: 2rem;
    color: var(--acc-primary);
    opacity: 0.5;
    margin-bottom: 0.75rem;
}

/* -------- Buttons -------- */
.acc-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.acc-btn-primary {
    background: var(--acc-primary);
    color: #fff;
}

.acc-btn-primary:hover {
    background: var(--acc-primary-dark);
    color: #fff;
}

.acc-btn-secondary {
    background: var(--acc-bg-card);
    color: var(--acc-text);
    border-color: var(--acc-border);
}

.acc-btn-secondary:hover {
    background: var(--acc-bg);
}

/* -------- Access denied -------- */
.acc-denied {
    max-width: 540px;
    margin: 4rem auto;
    text-align: center;
    background: var(--acc-bg-card);
    border: 1px solid var(--acc-border);
    border-radius: var(--acc-radius);
    padding: 3rem 2rem;
    box-shadow: var(--acc-shadow-md);
}

.acc-denied-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.08);
    color: var(--acc-danger);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.acc-denied h1 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--acc-text);
}

.acc-denied p {
    margin: 0.5rem 0;
    color: var(--acc-text-muted);
}

.acc-denied-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* -------- Footer -------- */
.acc-footer {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--acc-text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--acc-border);
    background: var(--acc-bg-card);
}

/* -------- Auth (sign-in) page -------- */
.acc-auth-body {
    margin: 0;
    background: linear-gradient(135deg, #f6f8fb 0%, #eaf3fa 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--acc-text);
}

.acc-auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.acc-auth-shell {
    width: 100%;
    max-width: 420px;
}

.acc-auth-card {
    background: var(--acc-bg-card);
    border: 1px solid var(--acc-border);
    border-radius: 14px;
    padding: 2.25rem 2rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.acc-auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--acc-primary-dark);
    letter-spacing: -0.005em;
    margin-bottom: 1.5rem;
}

.acc-auth-brand .acc-brand-logo {
    height: 36px;
}

.acc-auth-title {
    margin: 0 0 0.35rem 0;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.acc-auth-sub {
    margin: 0 0 1.5rem 0;
    color: var(--acc-text-muted);
    font-size: 0.92rem;
}

.acc-auth-error {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1.1rem;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.25);
    border-radius: 8px;
    color: var(--acc-danger);
    font-size: 0.9rem;
}

.acc-field {
    margin-bottom: 1rem;
}

.acc-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--acc-text);
    margin-bottom: 0.35rem;
}

.acc-field input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--acc-border);
    border-radius: 8px;
    font: inherit;
    color: var(--acc-text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.acc-field input:focus {
    outline: none;
    border-color: var(--acc-primary);
    box-shadow: 0 0 0 3px var(--acc-primary-soft);
}

.acc-field-error {
    display: block;
    margin-top: 0.3rem;
    color: var(--acc-danger);
    font-size: 0.8rem;
}

.acc-field-optional {
    color: var(--acc-text-muted);
    font-weight: 400;
    font-size: 0.78rem;
}

.acc-otp-input {
    text-align: center;
    letter-spacing: 0.6em;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Inter', monospace;
    padding-left: 0.6em !important;
}

.acc-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(22, 163, 74, 0.1);
    color: var(--acc-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
}

.acc-btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.acc-auth-foot {
    margin-top: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--acc-border);
    text-align: center;
    color: var(--acc-text-muted);
    font-size: 0.82rem;
}

.acc-auth-footer {
    text-align: center;
    padding: 1rem;
    color: var(--acc-text-muted);
    font-size: 0.78rem;
}

/* -------- Compact KPI variant (for Expenses summary tiles) -------- */
.acc-kpi-grid.acc-kpi-compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.acc-kpi-value.acc-kpi-value-sm {
    font-size: 1.25rem;
}

.acc-kpi-count {
    background: var(--acc-bg);
    color: var(--acc-text-muted);
    border-radius: 999px;
    padding: 0.05rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* -------- Filter bar -------- */
.acc-filter-bar {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    background: var(--acc-bg-card);
    border: 1px solid var(--acc-border);
    border-radius: var(--acc-radius);
    box-shadow: var(--acc-shadow-sm);
}

.acc-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 140px;
}

.acc-filter-field.acc-filter-grow {
    flex: 1;
    min-width: 200px;
}

.acc-filter-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--acc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.acc-filter-field input,
.acc-filter-field select {
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--acc-border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    color: var(--acc-text);
}

.acc-filter-field input:focus,
.acc-filter-field select:focus {
    outline: none;
    border-color: var(--acc-primary);
    box-shadow: 0 0 0 3px var(--acc-primary-soft);
}

.acc-filter-actions {
    display: flex;
    gap: 0.5rem;
}

.acc-filter-field-group {
    display: flex;
    gap: 0.6rem;
    align-items: flex-end;
}

.acc-filter-field-group.d-none {
    display: none;
}

/* -------- Export dropdown panel (period + format inside) -------- */
.acc-export-panel {
    width: 280px;
    border: 1px solid var(--acc-border);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-radius: var(--acc-radius);
}

.acc-export-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.acc-export-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--acc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.4rem;
}

.acc-export-label:first-of-type {
    margin-top: 0;
}

.acc-export-select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--acc-border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    color: var(--acc-text);
    cursor: pointer;
}

.acc-export-select:focus {
    outline: none;
    border-color: var(--acc-primary);
    box-shadow: 0 0 0 3px var(--acc-primary-soft);
}

.acc-export-custom {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.acc-export-custom.d-none {
    display: none;
}

.acc-export-custom > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.acc-export-custom label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--acc-text-muted);
}

.acc-export-custom input[type="date"] {
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--acc-border);
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
}

.acc-export-formats {
    display: flex;
    gap: 0.5rem;
}

.acc-export-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--acc-border);
    background: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.acc-export-excel {
    color: #0f7d3a;
}
.acc-export-excel:hover {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.4);
}

.acc-export-pdf {
    color: var(--acc-danger);
}
.acc-export-pdf:hover {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.4);
}

/* -------- Flash messages -------- */
.acc-flash {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--acc-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.acc-flash-info {
    background: var(--acc-primary-soft);
    border: 1px solid rgba(67, 163, 221, 0.25);
    color: var(--acc-primary-dark);
}

.acc-flash-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: var(--acc-danger);
}

.acc-flash-error:empty {
    display: none;
}

/* -------- Data table -------- */
.acc-table-wrap {
    background: var(--acc-bg-card);
    border: 1px solid var(--acc-border);
    border-radius: var(--acc-radius);
    box-shadow: var(--acc-shadow-sm);
    overflow: hidden;
}

.acc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.acc-table thead th {
    background: var(--acc-bg);
    color: var(--acc-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    padding: 0.7rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid var(--acc-border);
}

.acc-table tbody td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--acc-border);
    vertical-align: middle;
}

.acc-table tbody tr:last-child td {
    border-bottom: 0;
}

.acc-table tbody tr:hover {
    background: rgba(67, 163, 221, 0.04);
}

.acc-table .text-end { text-align: right; }
.acc-table .text-center { text-align: center; }

.acc-cell-desc {
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--acc-text);
}

.acc-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.acc-pill-cat {
    background: var(--acc-primary-soft);
    color: var(--acc-primary-dark);
}

.acc-pill-stripe {
    background: rgba(99, 91, 255, 0.12);
    color: #4f46e5;
}

.acc-pill-manual {
    background: rgba(22, 163, 74, 0.1);
    color: var(--acc-success);
}

.acc-kpi-card.acc-kpi-net {
    background: var(--acc-primary-soft);
    border-color: rgba(67, 163, 221, 0.35);
}

.acc-kpi-card.acc-kpi-net .acc-kpi-value {
    color: var(--acc-primary-dark);
}

.acc-plan-breakdown {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.acc-plan-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.85rem;
    background: var(--acc-bg-card);
    border: 1px solid var(--acc-border);
    border-radius: 999px;
    font-size: 0.85rem;
    box-shadow: var(--acc-shadow-sm);
}

.acc-plan-name {
    font-weight: 600;
    color: var(--acc-primary-dark);
}

.acc-plan-value {
    color: var(--acc-text);
    font-variant-numeric: tabular-nums;
}

.acc-btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--acc-text-muted);
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.acc-btn-link:hover {
    background: var(--acc-primary-soft);
    color: var(--acc-primary-dark);
}

.acc-btn-link-danger:hover {
    background: rgba(220, 38, 38, 0.08);
    color: var(--acc-danger);
}

/* -------- Form pages (Create / Edit) -------- */
.acc-page-narrow {
    max-width: 720px;
}

.acc-form-card {
    background: var(--acc-bg-card);
    border: 1px solid var(--acc-border);
    border-radius: var(--acc-radius);
    padding: 1.5rem;
    box-shadow: var(--acc-shadow-sm);
}

.acc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
}

.acc-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.acc-form-field-full {
    grid-column: 1 / -1;
}

.acc-form-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--acc-text);
}

.acc-form-field input,
.acc-form-field select,
.acc-form-field textarea {
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--acc-border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    color: var(--acc-text);
}

.acc-form-field input:focus,
.acc-form-field select:focus,
.acc-form-field textarea:focus {
    outline: none;
    border-color: var(--acc-primary);
    box-shadow: 0 0 0 3px var(--acc-primary-soft);
}

.acc-form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.acc-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--acc-border);
}

.acc-receipt-current {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.85rem;
    background: var(--acc-primary-soft);
    border: 1px solid rgba(67, 163, 221, 0.25);
    border-radius: 8px;
    color: var(--acc-primary-dark);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.acc-receipt-current a {
    color: var(--acc-primary-dark);
    font-weight: 600;
    text-decoration: underline;
}

.acc-receipt-remove {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--acc-text);
}

.acc-receipt-remove input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.acc-muted.small {
    font-size: 0.8rem;
    margin: 0;
}

/* -------- Dashboard period filter -------- */
.acc-period-filter {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    background: var(--acc-bg-card);
    border: 1px solid var(--acc-border);
    border-radius: var(--acc-radius);
    box-shadow: var(--acc-shadow-sm);
}

.acc-period-filter > label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--acc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 0.6rem;   /* visually align with the select below */
}

.acc-period-filter > label i {
    color: var(--acc-primary);
}

.acc-period-filter > select {
    padding: 0.55rem 0.85rem;
    min-width: 200px;
    border: 1px solid var(--acc-border);
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-weight: 500;
    color: var(--acc-text);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.acc-period-filter > select:focus {
    outline: none;
    border-color: var(--acc-primary);
    box-shadow: 0 0 0 3px var(--acc-primary-soft);
}

.acc-custom-range-inline {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.acc-custom-range-inline.d-none {
    display: none;
}

/* -------- Dashboard cards & charts -------- */
.acc-kpi-card.acc-kpi-negative {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.2);
}

.acc-kpi-card.acc-kpi-negative .acc-kpi-value {
    color: var(--acc-danger);
}

.acc-dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.acc-dash-grid.acc-dash-grid-half {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 920px) {
    .acc-dash-grid,
    .acc-dash-grid.acc-dash-grid-half {
        grid-template-columns: 1fr;
    }
}

.acc-card {
    background: var(--acc-bg-card);
    border: 1px solid var(--acc-border);
    border-radius: var(--acc-radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--acc-shadow-sm);
}

.acc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.acc-card-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--acc-text);
}

.acc-card-header h2 i {
    color: var(--acc-primary);
    margin-right: 0.45rem;
}

.acc-card-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--acc-primary-dark);
    text-decoration: none;
}

.acc-card-link:hover {
    text-decoration: underline;
}

.acc-chart-wrap {
    position: relative;
    height: 280px;
}

.acc-chart-wrap-sm {
    height: 200px;
}

.acc-legend {
    list-style: none;
    margin: 1rem 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.acc-legend li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: var(--acc-text);
}

.acc-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.acc-legend-count {
    margin-left: auto;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--acc-primary-dark);
}

.acc-empty.acc-empty-sm {
    padding: 1.5rem 1rem;
}

.acc-empty.acc-empty-sm i {
    font-size: 1.5rem;
}

.acc-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.acc-recent-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--acc-border);
}

.acc-recent-list li:last-child {
    border-bottom: 0;
}

.acc-recent-main {
    flex: 1;
    min-width: 0;
}

.acc-recent-title {
    font-weight: 600;
    color: var(--acc-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acc-recent-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: var(--acc-text-muted);
}

.acc-recent-side {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* -------- Mobile -------- */
@media (max-width: 720px) {
    .acc-topnav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .acc-nav {
        order: 3;
        flex-basis: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .acc-user-email {
        display: none;
    }
}
