:root {
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --logo-red: #be1e2d;
    --bg-page: #0a0a0a;
    --bg-sidebar: #0a0a0a;
    --sidebar-line: #262626;
    --sidebar-muted: #a3a3a3;
    --brand-strip: #ffffff;
    /* Legacy solids — dashboard mo-glass na */
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.16);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    --text: #171717;
    --text-muted: #71717a;
    --line: rgba(255, 255, 255, 0.12);
    --accent: var(--logo-red);
    --accent-soft: rgba(190, 30, 45, 0.1);
    /* Frosted surfaces (dashboard / inner pages) */
    --glass-bg: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.06) 45%,
        rgba(255, 255, 255, 0.04) 100%
    );
    --glass-blur: blur(22px) saturate(165%);
    --surface-text: #f2f5fc;
    --surface-muted: rgba(255, 255, 255, 0.62);
    --surface-link: #a8ccff;
    /* Reference-style airy spacing (hinlo / negative space) */
    --space-page: clamp(24px, 4vw, 40px);
    --space-page-x: clamp(22px, 3.5vw, 36px);
    --space-section: clamp(1.75rem, 3vw, 2.5rem);
    --space-card-y: 1.5rem;
    --space-card-x: 1.65rem;
    --space-table-cell-y: 1.05rem;
    --space-table-cell-x: 1.2rem;
    /* Type scale — pareho sa reference (tabs/kilid/table/u.b.) */
    --fs-page-title: 2rem; /* ~32px main title */
    --fs-sidebar-brand: 1.5rem; /* ~24px CC BIS */
    --fs-sidebar-sub: 0.75rem; /* ~12px PORTAL line */
    --fs-nav: 1rem; /* ~16px sidebar links */
    --fs-body: 0.875rem; /* ~14px inputs, table body, tabs, buttons */
    --fs-label: 0.75rem; /* ~12px table headers, filters, small labels */
    --fs-badge: 0.6875rem; /* ~11px badges */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text);
}

/* Portal background — same for login and all logged-in roles (dashboard, etc.) */
.login-body,
.app-body {
    font-family: var(--font-sans);
    min-height: 100vh;
    background-color: #bfdbfe;
    background-image:
        radial-gradient(ellipse 54% 48% at 50% 45%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.38) 46%, transparent 72%),
        radial-gradient(ellipse 64% 56% at 50% 48%, rgba(239, 246, 255, 0.62) 0%, transparent 76%),
        radial-gradient(ellipse 92% 165% at 0% 50%, rgba(59, 130, 246, 0.52), transparent 58%),
        radial-gradient(ellipse 92% 165% at 100% 50%, rgba(37, 99, 235, 0.46), transparent 58%),
        linear-gradient(165deg, #eff6ff 0%, #dbeafe 42%, #93c5fd 92%);
    background-attachment: fixed;
}

.login-body,
.app-body {
    color: #334155;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 270px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--sidebar-line);
    padding: 0 18px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.32) transparent;
}

.app-sidebar::-webkit-scrollbar {
    width: 6px;
}

.app-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.48);
}

/* Logged-in shell — sidebar nga bagay sa light blue portal (dili flat black) */
.app-body .app-sidebar {
    background: linear-gradient(180deg, #1a2d4d 0%, #122038 45%, #0c1524 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.06);
}

.app-body .brand-wrap {
    margin: 0 -18px 16px;
    padding: 24px 18px 22px 18px;
    background:
        radial-gradient(ellipse at top, rgba(59, 130, 246, 0.18) 0%, transparent 65%),
        rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0 0 22px 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    text-align: center;
    position: relative;
}

.app-body .brand-wrap::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: -1px;
    transform: none;
    height: 2px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.38);
    opacity: 1;
}

.app-body .brand-lockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    text-decoration: none;
    outline: none;
}

.app-body .brand-sidebar-logo {
    display: block;
    width: auto;
    height: clamp(78px, 14vw, 102px);
    max-width: min(100%, 160px);
    margin: 0 auto;
    align-self: center;
    object-fit: contain;
    object-position: center;
    filter:
        drop-shadow(0 12px 28px rgba(59, 130, 246, 0.38))
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: filter 0.25s ease, transform 0.25s ease;
}

.app-body .brand-lockup:hover .brand-sidebar-logo,
.app-body .brand-lockup:focus-visible .brand-sidebar-logo {
    transform: scale(1.04);
    filter:
        drop-shadow(0 14px 34px rgba(96, 165, 250, 0.55))
        drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.app-body .brand-lockup .brand-title-link {
    margin-top: 0.25rem;
    font-size: clamp(1.5rem, 3.6vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.32em;
    line-height: 1.1;
    text-align: center;
    width: 100%;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(59, 130, 246, 0.22);
    padding-left: 0.32em;
}

.app-body .brand-lockup .brand-subtitle {
    margin-top: 0.35rem;
    display: inline-flex;
    align-self: center;
    width: auto;
    padding: 0.32rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.42);
    border-radius: 999px;
    text-align: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.app-body .brand-lockup:hover .brand-title-link,
.app-body .brand-lockup:focus-visible .brand-title-link {
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(96, 165, 250, 0.45);
}

.app-body .brand-lockup:hover .brand-subtitle,
.app-body .brand-lockup:focus-visible .brand-subtitle {
    background: rgba(59, 130, 246, 0.28);
    border-color: rgba(125, 211, 252, 0.65);
    color: #ffffff;
}

.app-body .sidebar-link:hover {
    color: #f1f5f9;
    background: rgba(59, 130, 246, 0.12);
}

.app-body .sidebar-link.active {
    color: #f8fafc;
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: inset 3px 0 0 0 var(--logo-red);
}

.app-body .sidebar-user {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

/* Sidebar: text ra — mas dako ug sentro (CCBIS + role PORTAL) */
.brand-wrap {
    margin: 0 -18px 10px;
    padding: 26px 18px 22px;
    background: transparent;
    border-bottom: 1px solid var(--sidebar-line);
    text-align: center;
}

.brand-title-link {
    display: block;
    color: #fafafa;
    font-size: clamp(1.2rem, 2.2vw, var(--fs-sidebar-brand));
    font-weight: 700;
    letter-spacing: 0.14em;
    text-decoration: none;
    text-transform: uppercase;
    line-height: 1.28;
}

/* Default hover kung solo pa ang link (walay .brand-lockup) */
.brand-title-link:hover {
    color: #ffffff;
}

.brand-title {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    display: block;
    color: var(--sidebar-muted);
    margin-top: 12px;
    font-size: clamp(0.65rem, 1.5vw, var(--fs-sidebar-sub));
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    line-height: 1.35;
}

.brand-lockup .brand-subtitle {
    margin-top: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--sidebar-muted);
    font-size: var(--fs-nav);
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 14px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.sidebar-link:hover {
    color: #fafafa;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-link.active {
    color: #ffffff;
    background: #171717;
    border-color: #404040;
    box-shadow: inset 3px 0 0 0 var(--accent);
}

.sidebar-user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--sidebar-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.avatar-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #0a0a0a;
    font-weight: 600;
    font-size: 0.875rem;
    background: #fafafa;
    border: 1px solid #e4e4e7;
}

.user-name {
    font-weight: 600;
    font-size: var(--fs-nav);
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #fafafa;
}

.user-role {
    color: var(--sidebar-muted);
    font-size: var(--fs-label);
    font-weight: 400;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #a1a1aa;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: var(--fs-body);
    font-weight: 500;
}

.logout-link:hover {
    color: #fafafa;
    background: rgba(190, 30, 45, 0.15);
}

.app-content {
    flex: 1;
    min-width: 0;
    padding: var(--space-page) var(--space-page-x) calc(var(--space-page) + 6px);
}

/* Sidebar page-transition animation */
.app-body .js-app-content.page-enter {
    animation: pageIn 240ms ease-out;
}

.app-body .js-app-content.page-leave {
    animation: pageOut 220ms ease-in forwards;
    pointer-events: none;
}

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

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

@media (prefers-reduced-motion: reduce) {
    .app-body .js-app-content.page-enter,
    .app-body .js-app-content.page-leave {
        animation: none;
    }
}

/* Title wala, logo tuo — walay box; diretso sa background (sama sa reference) */
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px 24px;
    flex-wrap: wrap;
    margin: 0 0 var(--space-section);
    padding: 0.35rem 0 0.65rem;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.content-header-text {
    flex: 1 1 220px;
    min-width: 0;
}

.content-header-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, var(--fs-page-title));
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-transform: none;
    color: #ffffff;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.35rem !important;
}

.content-header-welcome {
    font-size: var(--fs-body);
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--surface-muted) !important;
    margin: 0;
}

.content-header-user {
    color: #8ec5ff;
    font-weight: 600;
}

.content-header-logo-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    line-height: 0;
    text-decoration: none;
    margin-left: auto;
}

.content-header-logo-wrap:hover {
    opacity: 0.92;
}

/* Headers readable on light portal background (same as login area) */
.app-body .content-header-title {
    color: #0f172a;
    text-shadow: none;
}

.app-body .content-header-welcome {
    color: #64748b !important;
}

.app-body .content-header-user {
    color: #2563eb;
}

.content-header-logo {
    display: block;
    max-height: 120px;
    width: auto;
    max-width: min(440px, 65vw);
    height: auto;
    object-fit: contain;
}

.content-main .card {
    --bs-card-bg: transparent;
    --bs-card-border-color: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 16px;
    box-shadow:
        var(--card-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.content-main .card .card-body {
    padding: var(--space-card-y) var(--space-card-x);
}

.content-main .card .card-body > h5:first-child,
.content-main .card .card-body > h4:first-child {
    margin-bottom: 1.25rem;
}

/* Mas lapad nga gutter tali sa dashboard cards / columns */
.content-main .row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

.content-main > .row.mb-4 {
    margin-bottom: var(--space-section) !important;
}

.content-main .card h5,
.content-main .card h4,
.content-main .card h3 {
    font-family: var(--font-sans);
    color: var(--surface-text);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.content-main .card h5 {
    font-size: var(--fs-nav);
}

.content-main .card h4 {
    font-size: 1.5rem;
}

.content-main .card h3 {
    font-size: 1.125rem;
}

.content-main .card-body > small {
    font-size: var(--fs-label);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.content-main .text-muted,
.content-main small,
.content-main .text-secondary {
    color: #64748b !important;
}

.content-main .card .text-muted,
.content-main .card small,
.content-main .card .text-secondary {
    color: var(--surface-muted) !important;
}

.content-main {
    color: #334155;
}

.content-main .card {
    color: rgba(255, 255, 255, 0.92);
}

.content-main .card p,
.content-main .card li,
.content-main .card label:not(.btn),
.content-main .card td,
.content-main .card th,
.content-main .card span:not(.badge):not(.status-badge),
.content-main .card div:not(.btn-group):not(.badge):not(.status-badge) {
    color: inherit;
}

.content-main .form-label,
.content-main label.form-label,
.content-main .col-form-label {
    font-size: var(--fs-label);
    letter-spacing: 0.03em;
    color: #475569 !important;
}

.content-main .card .form-label,
.content-main .card label.form-label,
.content-main .card .col-form-label {
    color: var(--surface-muted) !important;
}

.content-main ul li {
    margin-bottom: 8px;
}

.content-main strong {
    color: #0f172a;
    font-weight: 600;
}

.content-main .card strong {
    color: #ffffff;
}

.content-main .form-control,
.content-main .form-select {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(6, 10, 22, 0.45);
    color: var(--surface-text);
    font-size: var(--fs-body);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border-radius: 10px;
}

.content-main .form-control:focus,
.content-main .form-select:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
    background: rgba(6, 10, 22, 0.55);
    color: #ffffff;
}

.content-main .form-control::placeholder {
    color: rgba(255, 255, 255, 0.42);
    font-size: var(--fs-body);
}

.content-main .btn {
    font-size: var(--fs-body);
}

.content-main .nav-tabs .nav-link,
.content-main .nav-pills .nav-link {
    font-size: var(--fs-body);
}

.content-main .badge,
.content-main .status-badge {
    font-size: var(--fs-badge);
    font-weight: 600;
    padding: 0.35em 0.6em;
}

.content-main .mb-3 {
    margin-bottom: 1.25rem !important;
}

.content-main .btn-primary {
    background: #0a0a0a;
    border: 1px solid #0a0a0a;
    color: #ffffff;
    font-weight: 600;
}

.content-main .btn-primary:hover {
    background: #262626;
    border-color: #262626;
    color: #ffffff;
}

.content-main .btn-success {
    background: #171717;
    border-color: #171717;
    color: #ffffff;
    font-weight: 600;
}

.content-main .btn-success:hover {
    background: #404040;
    border-color: #404040;
    color: #ffffff;
}

.content-main .btn-warning {
    background: #ffffff;
    border: 1px solid #181818;
    color: #181818;
    font-weight: 600;
}

.content-main .btn-warning:hover {
    background: #fafafa;
    border-color: #181818;
    color: #0a0a0a;
}

.content-main .btn-danger {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    font-weight: 600;
}

.content-main .btn-danger:hover {
    background: #9c1824;
    border-color: #9c1824;
    color: #ffffff;
}

.content-main a:not(.btn):not(.sidebar-link):not(.logout-link):not(.content-header-logo-wrap) {
    color: #2563eb;
    font-weight: 500;
}

.content-main a:not(.btn):not(.sidebar-link):not(.logout-link):not(.content-header-logo-wrap):hover {
    color: #1d4ed8;
}

.content-main .card a:not(.btn):not(.sidebar-link):not(.logout-link):not(.content-header-logo-wrap) {
    color: var(--surface-link);
}

.content-main .card a:not(.btn):not(.sidebar-link):not(.logout-link):not(.content-header-logo-wrap):hover {
    color: #e8f2ff;
}

.content-main code {
    color: #1e40af;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 0.12em 0.4em;
    border-radius: 6px;
    font-size: 0.88em;
}

.content-main .card code {
    color: #c9e2ff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-main .table {
    color: rgba(255, 255, 255, 0.92);
    --bs-table-bg: transparent;
    --bs-table-color: rgba(255, 255, 255, 0.92);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-striped-color: rgba(255, 255, 255, 0.95);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.09);
    --bs-table-hover-color: #ffffff;
    margin-bottom: 0;
}

.content-main .table thead th {
    color: var(--surface-muted);
    border-color: rgba(255, 255, 255, 0.12);
    font-weight: 600;
    font-size: var(--fs-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    padding: var(--space-table-cell-y) var(--space-table-cell-x);
    vertical-align: middle;
}

.content-main .table td {
    border-color: rgba(255, 255, 255, 0.1);
    background: transparent;
    font-size: var(--fs-body);
    padding: var(--space-table-cell-y) var(--space-table-cell-x);
    vertical-align: middle;
}

.content-main .table th {
    background: transparent;
}

.content-main .table-striped > tbody > tr:nth-of-type(odd) > * {
    color: rgba(255, 255, 255, 0.94);
}

.content-main .table-striped > tbody > tr > * {
    box-shadow: none;
}

/* —— App pages: frosted glass cards (blur sa portal bg; readable dark text) —— */
.app-body .content-main .card {
    --bs-card-border-color: rgba(255, 255, 255, 0.55);
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.52) 0%,
        rgba(239, 246, 255, 0.38) 46%,
        rgba(219, 234, 254, 0.34) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(40px) saturate(195%);
    -webkit-backdrop-filter: blur(40px) saturate(195%);
    border-radius: 20px;
    box-shadow:
        0 22px 56px rgba(30, 58, 138, 0.11),
        0 6px 20px rgba(59, 130, 246, 0.07),
        0 0 0 1px rgba(255, 255, 255, 0.28) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    color: #0f172a;
}

.app-body .content-main .card .card-body {
    padding: clamp(1.35rem, 2.5vw, 1.75rem) clamp(1.35rem, 2.8vw, 1.85rem);
}

.app-body .content-main .card h3,
.app-body .content-main .card h4,
.app-body .content-main .card h5 {
    color: #0f172a;
    letter-spacing: 0.03em;
}

.app-body .content-main .card .card-body > small {
    color: #64748b !important;
    letter-spacing: 0.06em;
}

.app-body .content-main .card strong {
    color: #0f172a;
}

.app-body .content-main .card .text-muted,
.app-body .content-main .card small,
.app-body .content-main .card .text-secondary {
    color: #64748b !important;
}

.app-body .content-main .card .form-label,
.app-body .content-main .card label.form-label,
.app-body .content-main .card .col-form-label {
    color: #475569 !important;
}

.app-body .content-main .form-control,
.app-body .content-main .form-select {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.68);
    color: #0f172a;
    backdrop-filter: blur(18px) saturate(170%);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    border-radius: 11px;
    min-height: 2.65rem;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.75),
        0 1px 3px rgba(15, 23, 42, 0.06);
}

.app-body .content-main .form-select {
    cursor: pointer;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232563EB' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px 14px;
}

.app-body .content-main .form-control:focus,
.app-body .content-main .form-select:focus {
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.18),
        inset 0 1px 1px rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.78);
    color: #0f172a;
}

.app-body .content-main .form-control::placeholder {
    color: #64748b;
    font-weight: 500;
    opacity: 1;
}

.app-body .content-main .card a:not(.btn):not(.sidebar-link):not(.logout-link):not(.content-header-logo-wrap) {
    color: #2563eb;
}

.app-body .content-main .card a:not(.btn):not(.sidebar-link):not(.logout-link):not(.content-header-logo-wrap):hover {
    color: #1d4ed8;
}

.app-body .content-main .card code {
    color: #1e40af;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(147, 197, 253, 0.55);
}

.app-body .content-main .table {
    color: #334155;
    --bs-table-color: #334155;
    --bs-table-striped-bg: rgba(241, 245, 249, 0.75);
    --bs-table-striped-color: #334155;
    --bs-table-hover-bg: rgba(219, 234, 254, 0.55);
    --bs-table-hover-color: #0f172a;
}

.app-body .content-main .table thead th {
    color: #0f172a;
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1.35;
    padding: 1rem 1.15rem;
    vertical-align: middle;
    border-color: rgba(226, 232, 240, 0.85);
    border-bottom: 2px solid rgba(59, 130, 246, 0.55);
    background: linear-gradient(
        180deg,
        rgba(248, 250, 252, 0.96) 0%,
        rgba(226, 232, 240, 0.72) 100%
    );
    backdrop-filter: blur(16px) saturate(170%);
    -webkit-backdrop-filter: blur(16px) saturate(170%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

/* Data tables (Personnel, Finance, HR, reports, etc.) — header strip */
.app-body .portal-card-table .table thead th,
.app-body .ims-table-card .table thead th {
    font-size: 0.8125rem;
    padding: 1.05rem 1.25rem;
}

.app-body .portal-card-table .table thead tr:first-child th:first-child,
.app-body .ims-table-card .table thead tr:first-child th:first-child {
    border-top-left-radius: 12px;
}

.app-body .portal-card-table .table thead tr:first-child th:last-child,
.app-body .ims-table-card .table thead tr:first-child th:last-child {
    border-top-right-radius: 12px;
}

.app-body .content-main .table td {
    border-color: rgba(226, 232, 240, 0.65);
    color: #1e293b;
    font-size: 0.875rem;
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.28);
    padding: 0.85rem 1.15rem;
}

.app-body .content-main .table tbody tr:hover td {
    background: rgba(219, 234, 254, 0.62) !important;
}

.app-body .content-main .table-striped > tbody > tr:nth-of-type(odd) > * {
    color: #334155;
}

.app-body .content-main .table-striped > tbody > tr:nth-of-type(odd) > td {
    background: rgba(255, 255, 255, 0.4) !important;
}

.app-body .content-main .table-striped > tbody > tr:nth-of-type(even) > td {
    background: rgba(255, 255, 255, 0.22) !important;
}

.app-body .content-main .btn-primary {
    background: linear-gradient(165deg, #38bdf8 0%, #2563eb 52%, #1d4ed8 100%);
    border: 1px solid rgba(37, 99, 235, 0.45);
    color: #ffffff;
}

.app-body .content-main .btn-primary:hover {
    background: linear-gradient(165deg, #0ea5e9 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    color: #ffffff;
}

.app-body .content-main .btn-success {
    background: linear-gradient(165deg, #4ade80 0%, #059669 88%);
    border: 1px solid rgba(5, 150, 105, 0.45);
    color: #ffffff;
}

.app-body .content-main .btn-success:hover {
    filter: brightness(1.06);
    border-color: #047857;
    color: #ffffff;
}

.app-body .content-main .btn-secondary {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.app-body .content-main .btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.app-body .content-main .nav-pills .nav-link,
.app-body .content-main .nav-tabs .nav-link {
    color: #475569;
    border-radius: 10px;
}

.app-body .content-main .nav-pills .nav-link.active,
.app-body .content-main .nav-tabs .nav-link.active {
    color: #ffffff;
    background: linear-gradient(165deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: transparent;
}

/* Attendance face thumbnails (mobile clock-in photos) */
.ims-attendance-photo-link {
    display: inline-flex;
    vertical-align: middle;
}
.ims-attendance-photo-thumb {
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.app-body .portal-card-table .table-responsive,
.app-body .ims-table-card .table-responsive {
    margin-top: 0.35rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px) saturate(155%);
    -webkit-backdrop-filter: blur(14px) saturate(155%);
    box-shadow:
        0 4px 18px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.app-body .portal-card-table .table,
.app-body .ims-table-card .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.app-body .portal-card-table .card-body > h5,
.app-body .ims-table-card > .card-body > h5 {
    margin-bottom: 1rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.app-body .portal-card-table .card-body > .card-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.app-body .card-section-header .card-section-action {
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
}

.app-body .card-section-header .card-section-action:hover {
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.app-body .table-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: end;
}

.app-body .table-tool {
    min-width: 170px;
    flex: 1 1 180px;
}

.app-body .role-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.app-body .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.18rem 0.58rem;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.app-body .status-waiting {
    background: rgba(245, 158, 11, 0.18);
    color: #92400e;
}

.app-body .status-approved {
    background: rgba(16, 185, 129, 0.18);
    color: #065f46;
}

.app-body .status-rejected {
    background: rgba(239, 68, 68, 0.18);
    color: #991b1b;
}

.app-body .empty-state {
    text-align: center;
    padding: 1.2rem 0.8rem;
    color: #475569;
}

.app-body .empty-state i {
    display: inline-block;
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
    color: #2563eb;
}

.app-body .empty-state small {
    display: block;
    margin-top: 0.2rem;
    color: #64748b !important;
}

.app-body .content-main .btn {
    transition: transform 0.08s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.app-body .content-main .btn:active {
    transform: translateY(1px) scale(0.985);
}

/* Employee modal polish */
.app-body .employee-row-click {
    transition: transform 0.12s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.app-body .employee-row-click:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}

/* Frosted “data table” cards — used across HR / Finance / Business / Reports */
.app-body .ims-table-card {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.38);
    box-shadow:
        0 12px 40px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(239, 246, 255, 0.72) 55%,
        rgba(219, 234, 254, 0.48) 100%
    );
}

.app-body .ims-table-card .employees-directory-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.app-body .ims-table-card .employees-directory-sub {
    font-size: 0.8125rem;
    max-width: 42rem;
    line-height: 1.45;
}

.app-body .ims-table-card .table-tools {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.32);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
}

.app-body .ims-table-card .table tbody tr td:first-child {
    border-left: 3px solid transparent;
}

.app-body .ims-table-card .table tbody tr:hover td:first-child {
    border-left-color: rgba(37, 99, 235, 0.55);
}

.app-body .ims-table-card .table tbody tr:hover td {
    background: rgba(219, 234, 254, 0.78) !important;
}

/* Business — Auto-generated billing card stretches with left column (flex column) */
/* Business page — equal horizontal & vertical rhythm (matches .ims-page-stack) */
.app-body .business-page-flow {
    --business-stack-gap: var(--ims-page-stack-gap, 1.5rem);
    display: flex;
    flex-direction: column;
    gap: var(--business-stack-gap);
}

.app-body .business-stack-inner {
    display: flex;
    flex-direction: column;
    gap: var(--business-stack-gap);
}

.app-body .business-stack-inner > .row.business-top-row {
    --bs-gutter-x: var(--business-stack-gap);
    --bs-gutter-y: var(--business-stack-gap);
    margin-bottom: 0 !important;
}

.app-body .business-right-stack {
    gap: var(--business-stack-gap) !important;
}

.app-body .business-billing-card {
    min-height: 0;
}

.app-body .business-billing-form {
    min-height: 0;
}

.app-body .table-employees-directory thead th.emp-th-id {
    width: 7.5rem;
}

.app-body .table-employees-directory thead th.emp-th-action {
    width: 4.5rem;
}

.app-body .table-employees-directory .emp-id-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.15rem;
    padding: 0.3rem 0.55rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #1d4ed8;
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.86));
    border: 1px solid rgba(147, 197, 253, 0.72);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.app-body .table-employees-directory .emp-name-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
    letter-spacing: 0.015em;
}

.app-body .table-employees-directory .emp-col-position {
    color: #475569;
    font-size: 0.875rem;
    max-width: 16rem;
}

.app-body .table-employees-directory .emp-contact-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-variant-numeric: tabular-nums;
    font-size: 0.875rem;
    color: #334155;
}

.app-body .table-employees-directory .emp-contact-cell i {
    font-size: 1rem;
    color: #64748b;
}

.app-body .table-employees-directory .emp-delete-btn {
    border-radius: 10px;
    padding: 0.38rem 0.52rem;
    line-height: 1;
}

.app-body .employee-edit-modal .modal-dialog {
    max-width: min(700px, 90vw);
}

.app-body .employee-edit-modal .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 18px;
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(239, 246, 255, 0.82) 52%,
        rgba(219, 234, 254, 0.8) 100%
    );
    backdrop-filter: blur(20px) saturate(165%);
    -webkit-backdrop-filter: blur(20px) saturate(165%);
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.24),
        0 2px 10px rgba(37, 99, 235, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.app-body .employee-edit-modal .modal-header,
.app-body .employee-edit-modal .modal-footer {
    border-color: rgba(148, 163, 184, 0.28);
}

.app-body .employee-edit-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(241, 245, 249, 0.78));
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    padding: 0.72rem 0.9rem;
}

.app-body .employee-edit-header .modal-title {
    font-size: 0.93rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #0f172a;
}

.app-body .employee-edit-body {
    padding: 0.82rem 0.9rem 0.72rem;
}

.app-body .employee-edit-form .form-label {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569 !important;
}

.app-body .employee-edit-form .form-control,
.app-body .employee-edit-form .form-select {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 10px;
    min-height: 2.15rem;
    font-size: 0.82rem;
    padding-top: 0.32rem;
    padding-bottom: 0.32rem;
}

.app-body .employee-edit-form .form-select {
    cursor: pointer;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%232563EB' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 13px 13px;
    border-color: rgba(37, 99, 235, 0.32);
}

.app-body .employee-edit-form .form-select:hover {
    border-color: rgba(37, 99, 235, 0.55);
    background-color: rgba(239, 246, 255, 0.95);
}

.app-body .employee-edit-form .form-control:focus,
.app-body .employee-edit-form .form-select:focus {
    border-color: rgba(37, 99, 235, 0.62);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    background: #ffffff;
}

.app-body .employee-key-box {
    border: 1px dashed rgba(37, 99, 235, 0.45);
    background: rgba(219, 234, 254, 0.52);
    border-radius: 12px;
    padding: 0.5rem;
}

.app-body .employee-key-actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.app-body .employee-key-actions .form-control {
    flex: 1;
}

.app-body .employee-key-label {
    display: block;
    margin-bottom: 0.28rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1d4ed8;
}

.app-body .employee-edit-footer {
    padding: 0.55rem 0.9rem 0.7rem;
}

.app-body .employee-edit-modal .btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.7rem;
}

.app-toast-container {
    z-index: 1095;
}

.app-toast {
    min-width: 280px;
    max-width: min(92vw, 380px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    color: #0f172a;
}

.app-toast .toast-body {
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.72rem 0.82rem;
}

.app-toast .toast-body i {
    font-size: 1rem;
}

.app-toast-success {
    background: linear-gradient(160deg, rgba(236, 253, 245, 0.94), rgba(167, 243, 208, 0.84));
    border-color: rgba(16, 185, 129, 0.35);
}

.app-toast-warning {
    background: linear-gradient(160deg, rgba(255, 251, 235, 0.94), rgba(253, 230, 138, 0.84));
    border-color: rgba(245, 158, 11, 0.4);
}

.app-toast-danger {
    background: linear-gradient(160deg, rgba(254, 242, 242, 0.94), rgba(252, 165, 165, 0.84));
    border-color: rgba(239, 68, 68, 0.45);
}

.app-alert {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    color: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: var(--space-section);
    font-weight: 500;
    font-size: var(--fs-body);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.login-body .card {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--text);
}

/* Login inputs use .login-input glass styles — do not force solid white here */
.login-body .form-control:not(.login-input) {
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
}

/* Full viewport login layout */
.login-body main.login-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1rem 1.25rem 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.login-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: min(780px, calc(100vh - 2.5rem));
}

.login-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 0 1.5rem;
}

/* Card — frosted glass (blur + translucent fill; blue center shows through) */
.login-panel {
    width: min(100%, 400px);
    border-radius: 32px;
    padding: 0;
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.48) 0%,
        rgba(239, 246, 255, 0.38) 45%,
        rgba(219, 234, 254, 0.34) 100%
    );
    backdrop-filter: blur(44px) saturate(200%);
    -webkit-backdrop-filter: blur(44px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow:
        0 20px 56px rgba(30, 58, 138, 0.12),
        0 4px 16px rgba(59, 130, 246, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.35) inset,
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.login-panel-inner {
    padding: 2.75rem 2rem 2.85rem;
    min-height: min(560px, calc(100vh - 7.5rem));
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .login-panel {
        background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.88));
        border: 1px solid rgba(147, 197, 253, 0.55);
        box-shadow: 0 18px 48px rgba(30, 64, 175, 0.12);
    }

    .login-title {
        color: #0f172a;
        text-shadow: none;
    }

    .login-subtitle {
        color: #64748b;
    }

    .login-input {
        background: rgba(255, 255, 255, 0.82) !important;
        color: #0f172a !important;
        border-color: rgba(148, 163, 184, 0.45) !important;
    }

    .login-input::placeholder {
        color: #94a3b8;
    }

    .login-btn {
        background: linear-gradient(165deg, #7dd3fc 0%, #38bdf8 45%, #64748b 100%);
        color: #fff;
        border-color: rgba(56, 189, 248, 0.45);
    }
}

.login-logo {
    margin: 0 auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.login-logo img {
    max-width: 100%;
    height: auto;
    max-height: min(184px, 36vh);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(15, 23, 42, 0.14)) drop-shadow(0 4px 12px rgba(15, 23, 42, 0.08));
}

.login-heading {
    margin-top: 0;
    margin-bottom: 1.85rem;
    text-align: center;
}

.login-title {
    font-family: var(--font-sans);
    text-align: center;
    font-size: clamp(1.35rem, 4.2vw, 1.75rem);
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.12em;
    line-height: 1.3;
    text-transform: uppercase;
    color: #0f172a;
    text-shadow: none;
}

.login-subtitle {
    font-family: var(--font-sans);
    margin: 0.65rem 0 0;
    font-size: clamp(0.8125rem, 2.2vw, 0.9375rem);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: 0.02em;
    color: #64748b;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}

.login-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    width: 100%;
}

/* Gap sa sulod sa wrapper — User ID / Password dili na mag dikit */
#login-standard-fields {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    width: 100%;
}

.login-key-fields {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.login-mode-row {
    margin: -0.35rem 0 0;
    text-align: right;
}

.login-mode-link {
    border: 0;
    background: none;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(37, 99, 235, 0.45);
    cursor: pointer;
}

.login-mode-link:hover {
    color: #1d4ed8;
}

.login-field {
    margin: 0;
    width: 100%;
}

.login-field-pass {
    position: relative;
}

.login-input-pass {
    padding-right: 4.25rem !important;
}

/* Text fields — frosted glass (match panel; must beat Bootstrap .form-control) */
.login-body .login-form .form-control.login-input {
    width: 100%;
    height: 52px;
    box-sizing: border-box;
    border-radius: 12px;
    padding: 0 1.1rem;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.25;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    background: rgba(255, 255, 255, 0.38) !important;
    background-color: rgba(255, 255, 255, 0.38) !important;
    color: #0f172a !important;
    backdrop-filter: blur(22px) saturate(175%);
    -webkit-backdrop-filter: blur(22px) saturate(175%);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.65),
        0 1px 3px rgba(15, 23, 42, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input:hover {
    border-color: rgba(148, 163, 184, 0.55) !important;
    background: rgba(255, 255, 255, 0.52) !important;
    background-color: rgba(255, 255, 255, 0.52) !important;
}

.login-input:focus {
    border-color: rgba(59, 130, 246, 0.55) !important;
    background: rgba(255, 255, 255, 0.55) !important;
    background-color: rgba(255, 255, 255, 0.55) !important;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.75),
        0 0 0 3px rgba(59, 130, 246, 0.22);
    outline: none;
}

.login-form .form-control.login-input {
    min-height: 52px;
    height: 52px;
}

.login-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.toggle-pass-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #475569;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 4px 2px;
}

.toggle-pass-btn:hover {
    color: #2563eb;
}

.login-btn {
    height: 52px;
    box-sizing: border-box;
    border-radius: 12px;
    padding: 0 1.15rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    color: #ffffff;
    background: linear-gradient(
        165deg,
        #7dd3fc 0%,
        #38bdf8 38%,
        #64748b 96%
    );
    border: 1px solid rgba(186, 230, 253, 0.45);
    box-shadow:
        0 6px 24px rgba(14, 165, 233, 0.28),
        0 2px 8px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.login-btn:hover {
    color: #ffffff;
    filter: brightness(1.06);
    box-shadow:
        0 8px 28px rgba(14, 165, 233, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.login-btn:active {
    transform: scale(0.99);
}

.login-form > .login-btn {
    margin-top: 0;
}

.login-btn.w-100 {
    width: 100%;
    display: block;
}

.login-page-footer {
    margin: 0;
    padding: 1rem 1rem 1.35rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.login-body .app-alert,
.app-body .app-alert {
    max-width: min(400px, 100%);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #0f172a;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.app-body .app-alert {
    max-width: 100%;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .content-main .card {
        background: rgba(28, 28, 34, 0.94);
    }

    .app-body .content-main .card {
        background: linear-gradient(165deg, rgba(255, 255, 255, 0.94), rgba(239, 246, 255, 0.9));
        border: 1px solid rgba(147, 197, 253, 0.45);
        box-shadow: 0 16px 44px rgba(30, 64, 175, 0.1);
    }
}

code {
    color: #3f3f46;
    background: #f4f4f5;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    font-size: 0.9em;
}

@media (max-width: 576px) {
    .login-panel-inner {
        padding: 2.35rem 1.5rem 2.5rem;
        min-height: min(520px, calc(100vh - 6rem));
    }

    .login-page {
        min-height: auto;
        padding-top: 0.5rem;
    }

    .login-title {
        letter-spacing: 0.1em;
        font-size: clamp(1.18rem, 4.5vw, 1.55rem);
    }

    .login-subtitle {
        font-size: clamp(0.78rem, 3.2vw, 0.875rem);
        max-width: 100%;
    }

    .login-form {
        gap: 1.05rem;
    }
}

@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        padding: 0 14px 16px;
        position: static;
        top: auto;
        height: auto;
        max-height: none;
        overflow-y: visible;
    }

    .brand-wrap {
        margin: 0 -18px 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .app-body .brand-wrap {
        align-items: stretch;
        text-align: left;
    }

    .brand-title-link {
        letter-spacing: 0.16em;
    }

    .app-content {
        padding: clamp(18px, 4vw, 28px) clamp(16px, 3vw, 24px);
    }

    .content-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .content-header-logo {
        max-height: 84px;
        max-width: min(360px, 78vw);
    }
}

/* ============================================================
   Reports dashboard
   ============================================================ */

.app-body .ims-page-stack {
    --ims-page-stack-gap: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: var(--ims-page-stack-gap);
}

.app-body .ims-page-stack > .report-period-banner,
.app-body .ims-page-stack > .dashboard-hero {
    margin-bottom: 0;
}

.app-body .ims-page-stack > .kpi-grid {
    margin-bottom: 0;
    gap: var(--ims-page-stack-gap);
}

.app-body .ims-page-stack > .row {
    margin-bottom: 0;
    --bs-gutter-x: var(--ims-page-stack-gap);
    --bs-gutter-y: var(--ims-page-stack-gap);
}

.app-body .report-period-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.25rem;
    margin-bottom: 1.1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.85), rgba(191, 219, 254, 0.55));
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.app-body .report-period-eyebrow {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #475569;
    font-weight: 700;
    margin-bottom: 0.18rem;
}

.app-body .report-period-title {
    color: #0f172a;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.app-body .report-period-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.32);
}

.app-body .kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.65rem;
    margin-bottom: 1.1rem;
}

.app-body .kpi-tile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.95rem;
    padding: 1.05rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.24);
    backdrop-filter: blur(16px) saturate(165%);
    -webkit-backdrop-filter: blur(16px) saturate(165%);
    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.app-body .kpi-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.app-body .kpi-tile::after {
    content: "";
    position: absolute;
    inset: auto -30% -60% auto;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.18), transparent 65%);
    pointer-events: none;
}

.app-body .kpi-tile-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ffffff;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.32);
    flex-shrink: 0;
}

.app-body .kpi-tile-sky .kpi-tile-icon {
    background: linear-gradient(135deg, #38BDF8, #0EA5E9);
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.32);
}

.app-body .kpi-tile-indigo .kpi-tile-icon {
    background: linear-gradient(135deg, #6366F1, #4338CA);
    box-shadow: 0 8px 18px rgba(67, 56, 202, 0.32);
}

.app-body .kpi-tile-navy .kpi-tile-icon {
    background: linear-gradient(135deg, #1E3A8A, #0F172A);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.36);
}

.app-body .kpi-tile-body {
    display: flex;
    flex-direction: column;
    gap: 0.16rem;
    min-width: 0;
}

.app-body .kpi-tile-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-body .kpi-tile-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.005em;
    line-height: 1.2;
}

.app-body .kpi-tile-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.15rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    width: fit-content;
}

.app-body .kpi-trend-up {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
}

.app-body .kpi-trend-down {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
}

.app-body .kpi-trend-flat {
    color: #475569;
    background: rgba(148, 163, 184, 0.18);
}

.app-body .report-row {
    margin-bottom: 0;
}

.app-body .report-chart-card {
    height: 100%;
}

.app-body .report-chart-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.app-body .report-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.app-body .report-chart-header h5 {
    color: #0f172a;
    font-weight: 700;
}

.app-body .report-chart-header small {
    display: block;
    margin-top: 0.18rem;
    color: #64748b !important;
    font-size: 0.73rem;
}

.app-body .report-legend {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.85rem;
    font-size: 0.72rem;
    color: #475569;
    font-weight: 600;
}

.app-body .legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.app-body .legend-dot-gross { background: #2563EB; }
.app-body .legend-dot-net { background: #0EA5E9; }

.app-body .chart-canvas-wrap {
    position: relative;
    width: 100%;
}

.app-body .chart-canvas-tall {
    height: 280px;
}

.app-body .chart-canvas-donut {
    height: 280px;
}

.app-body .donut-center {
    position: absolute;
    top: 41%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.app-body .donut-center-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
}

.app-body .donut-center-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0.18rem;
}

.app-body .report-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.app-body .report-list-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.app-body .report-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
}

.app-body .report-list-label {
    font-weight: 600;
    color: #475569;
}

.app-body .report-list-value {
    font-weight: 700;
    color: #0f172a;
}

.app-body .report-list-bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
    overflow: hidden;
}

.app-body .report-list-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #3B82F6, #0EA5E9);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

/* ============================================================
   Dashboard overview
   ============================================================ */

.app-body .dashboard-hero {
    position: relative;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.2rem;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.22) 0%, transparent 55%),
        linear-gradient(135deg, rgba(219, 234, 254, 0.82), rgba(191, 219, 254, 0.55));
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow:
        0 14px 32px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px) saturate(165%);
    -webkit-backdrop-filter: blur(16px) saturate(165%);
    overflow: hidden;
}

.app-body .dashboard-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.32), transparent 70%);
    pointer-events: none;
}

.app-body .dashboard-hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.app-body .dashboard-hero-text {
    flex: 1;
    min-width: 240px;
}

.app-body .dashboard-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    border: 1px solid rgba(96, 165, 250, 0.32);
}

.app-body .dashboard-hero-title {
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    margin: 0.45rem 0 0.35rem;
    line-height: 1.2;
}

.app-body .dashboard-hero-subtitle {
    font-size: 0.85rem;
    color: #475569;
    margin: 0;
    line-height: 1.5;
    max-width: 540px;
}

.app-body .dashboard-hero-subtitle strong {
    color: #1d4ed8;
    font-weight: 700;
}

.app-body .dashboard-hero-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.4rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.32);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    min-width: 130px;
}

.app-body .dashboard-hero-clock-time {
    font-size: 1.7rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.01em;
    line-height: 1;
}

.app-body .dashboard-hero-clock-zone {
    margin-top: 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #64748b;
    font-weight: 700;
}

.app-body .kpi-grid-dashboard {
    margin-bottom: 1.1rem;
}

.app-body .kpi-tile-caption {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.18rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.app-body a.kpi-tile-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.app-body .kpi-tile-arrow {
    position: absolute;
    top: 14px;
    right: 16px;
    color: #94a3b8;
    font-size: 1rem;
    transition: color 0.18s ease, transform 0.18s ease;
    z-index: 2;
}

.app-body a.kpi-tile-link:hover .kpi-tile-arrow {
    color: #2563eb;
    transform: translate(2px, -2px);
}

.app-body .dashboard-row {
    margin-bottom: 0;
}

.app-body .dashboard-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.34rem 0.85rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-size: 0.74rem;
    font-weight: 700;
    border: 1px solid rgba(96, 165, 250, 0.4);
}

.app-body .dashboard-attendance-grid {
    display: grid;
    grid-template-columns: minmax(180px, 220px) 1fr;
    gap: 1rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .app-body .dashboard-attendance-grid {
        grid-template-columns: 1fr;
    }
}

.app-body .chart-canvas-mini-donut {
    height: 220px;
}

.app-body .dashboard-attendance-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.app-body .dashboard-attendance-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.app-body .dashboard-attendance-row:hover {
    background: rgba(219, 234, 254, 0.55);
    border-color: rgba(96, 165, 250, 0.4);
}

.app-body .dashboard-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.32);
}

.app-body .dashboard-attendance-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-body .dashboard-attendance-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-body .dashboard-attendance-position {
    font-size: 0.7rem;
    color: #64748b;
    font-weight: 500;
}

.app-body .dashboard-attendance-time {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #1d4ed8;
    flex-shrink: 0;
}

.app-body .dashboard-time-out {
    color: #475569;
    font-weight: 600;
}

.app-body .dashboard-status-dot {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.app-body .dashboard-status-active {
    background: rgba(16, 185, 129, 0.16);
    color: #047857;
}

.app-body .dashboard-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.app-body .dashboard-quick-action {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    color: #0f172a;
    position: relative;
}

.app-body .dashboard-quick-action:hover {
    transform: translateX(3px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    border-color: rgba(59, 130, 246, 0.44);
    background: rgba(239, 246, 255, 0.95);
    color: #0f172a;
}

.app-body .dashboard-quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 1.15rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
}

.app-body .dashboard-quick-action-sky .dashboard-quick-action-icon {
    background: linear-gradient(135deg, #38BDF8, #0EA5E9);
    box-shadow: 0 6px 14px rgba(14, 165, 233, 0.3);
}

.app-body .dashboard-quick-action-indigo .dashboard-quick-action-icon {
    background: linear-gradient(135deg, #6366F1, #4338CA);
    box-shadow: 0 6px 14px rgba(67, 56, 202, 0.3);
}

.app-body .dashboard-quick-action-navy .dashboard-quick-action-icon {
    background: linear-gradient(135deg, #1E3A8A, #0F172A);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.36);
}

.app-body .dashboard-quick-action-label {
    flex: 1;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.app-body .dashboard-quick-action-arrow {
    color: #94a3b8;
    font-size: 1.05rem;
    transition: color 0.18s ease, transform 0.18s ease;
}

.app-body .dashboard-quick-action:hover .dashboard-quick-action-arrow {
    color: #2563eb;
    transform: translateX(3px);
}

.app-body .dashboard-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.app-body .dashboard-activity-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.16);
    transition: background 0.15s ease;
}

.app-body .dashboard-activity-row:hover {
    background: rgba(241, 245, 249, 0.85);
}

.app-body .dashboard-activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.app-body .dashboard-activity-icon-green {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.app-body .dashboard-activity-icon-indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
}

.app-body .dashboard-activity-icon-amber {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.app-body .dashboard-activity-icon-blue {
    background: rgba(37, 99, 235, 0.15);
    color: #1d4ed8;
}

.app-body .dashboard-activity-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-body .dashboard-activity-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.app-body .dashboard-activity-detail {
    font-size: 0.74rem;
    color: #64748b;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-body .dashboard-activity-time {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
    flex-shrink: 0;
}

/* ============================================================
   Service billing invoice (print layout + on-screen preview)
   ============================================================ */

.app-body .service-billing-card.card {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow:
        0 12px 36px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    overflow: hidden;
}

.app-body .service-billing-card .card-body {
    padding: clamp(1rem, 2.5vw, 1.35rem);
}

.app-body .service-billing-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding-bottom: 1rem;
    margin-bottom: 1.15rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.app-body .service-billing-toolbar-text {
    flex: 1;
    min-width: min(100%, 220px);
}

.app-body .service-billing-toolbar-title {
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.app-body .service-billing-toolbar-sub {
    margin-top: 0.28rem;
    max-width: 28rem;
    line-height: 1.4;
}

.app-body .service-billing-toolbar-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
    flex-shrink: 0;
}

.app-body .service-billing-record-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    width: 100%;
    max-width: min(20rem, 88vw);
}

@media (min-width: 480px) {
    .app-body .service-billing-record-group {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0.45rem 0.65rem;
    }
}

.app-body .service-billing-record-select {
    min-width: min(18rem, 100%);
}

.app-body .service-billing-print-btn {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.app-body .d-print-none .business-billing-info-card {
    margin-bottom: 0 !important;
}

.app-body .service-billing-preview {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.92) 100%);
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 14px;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.app-body .service-billing-sheet {
    font-family: 'Times New Roman', Times, serif;
    font-size: 11pt;
    line-height: 1.35;
    color: #000;
    max-width: 900px;
    margin: 0 auto;
}

.app-body .service-billing-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 2rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(37, 99, 235, 0.12);
}

@media (max-width: 720px) {
    .app-body .service-billing-top {
        grid-template-columns: 1fr;
    }
}

.app-body .service-billing-company-name {
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.app-body .service-billing-meta {
    text-align: right;
}

.app-body .service-billing-title {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

.app-body .service-billing-date-row {
    margin-bottom: 0.45rem;
}

.app-body .service-billing-label {
    font-weight: 700;
    margin-right: 0.25rem;
}

.app-body .service-billing-mini-table {
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    border-collapse: collapse;
    font-size: 10pt;
}

.app-body .service-billing-mini-table th,
.app-body .service-billing-mini-table td {
    border: 1px solid #000;
    padding: 0.2rem 0.45rem;
    text-align: left;
}

.app-body .service-billing-mini-table th {
    width: 42%;
    font-weight: 700;
}

.app-body .service-billing-for-row {
    margin-top: 0.55rem;
    text-align: left;
}

.app-body .service-billing-for-line {
    display: inline-block;
    border-bottom: 1px solid #000;
    min-width: 60%;
    padding: 0 0.15rem 0.1rem;
}

.app-body .service-billing-billto {
    border: 1px solid #000;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.75rem;
}

.app-body .service-billing-billto-title {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.app-body .service-billing-billto-grid {
    display: grid;
    gap: 0.2rem;
    font-size: 10.5pt;
}

.app-body .service-billing-lines {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.app-body .service-billing-lines th,
.app-body .service-billing-lines td {
    border: 1px solid #000;
    padding: 0.45rem 0.5rem;
    vertical-align: top;
}

.app-body .service-billing-lines thead th {
    font-weight: 700;
    text-align: center;
}

.app-body .service-billing-lines .col-item {
    width: 52px;
    text-align: center;
}

.app-body .service-billing-lines .col-desc {
    min-height: 4.5rem;
}

.app-body .service-billing-lines .col-amt {
    width: 110px;
    text-align: right;
    white-space: nowrap;
}

.app-body .service-billing-totals {
    width: 100%;
    border-collapse: collapse;
    margin-top: -1px;
}

.app-body .service-billing-totals td {
    border: 1px solid #000;
    padding: 0.35rem 0.5rem;
}

.app-body .service-billing-totals .lbl {
    text-align: right;
    font-weight: 600;
    width: 100%;
}

.app-body .service-billing-totals .num {
    width: 110px;
    text-align: right;
    white-space: nowrap;
}

.app-body .service-billing-totals tr.service-billing-grand .lbl {
    font-size: 11pt;
}

.app-body .service-billing-words {
    border: 1px solid #000;
    border-top: none;
    padding: 0.45rem 0.55rem;
    min-height: 2rem;
    font-size: 10.5pt;
}

@media print {
    .app-body .business-page-flow {
        gap: 0;
    }

    .app-body .business-stack-inner {
        gap: 0;
    }

    .app-body .app-shell > aside,
    .app-body .content-header {
        display: none !important;
    }

    .app-body .content-main {
        margin: 0 !important;
        padding: 10mm 12mm !important;
        max-width: none !important;
    }

    .app-body #service-billing-sheet.card {
        border: none !important;
        box-shadow: none !important;
    }

    .app-body #service-billing-sheet .card-body {
        padding: 0 !important;
    }

    .app-body .service-billing-preview {
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .app-body .service-billing-sheet {
        max-width: none;
    }

    .app-body .service-billing-top {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }
}
