/* ====================================================
   RSUD Undata — Modern Admin Design System
   custom.css  |  v2.0
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Lato:wght@400;700&display=swap');

/* ====================================================
   CSS Variables
   ==================================================== */
:root {
    /* Brand */
    --green-950: #0d2318;
    --green-900: #122d20;
    --green-800: #1a4230;
    --green-700: #1e5438;
    --green-600: #246644;
    --green-500: #2c7a52;
    --green-400: #3a9e6a;
    --green-300: #5dbf8a;
    --green-200: #9adcb8;
    --green-100: #cff0df;
    --green-50: #eaf9f1;

    /* Accent */
    --amber-500: #f59e0b;
    --amber-100: #fef3c7;

    /* Semantic */
    --color-success: #16a34a;
    --color-pending: #d97706;
    --color-rejected: #dc2626;
    --color-info: #0284c7;

    /* Surface */
    --surface-body: #f0f4f2;
    --surface-card: #ffffff;
    --surface-subtle: #f8faf9;
    --surface-border: #e4ede8;

    /* Text */
    --text-base: #0f1f16;
    --text-muted: #5a7569;
    --text-faint: #95b0a4;

    /* Sidebar */
    --sidebar-w: 256px;
    --sidebar-bg: var(--green-900);

    /* Misc */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .04);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .10), 0 4px 8px rgba(0, 0, 0, .04);

    --ease: cubic-bezier(.4, 0, .2, 1);
    --dur: .2s;

    /* Topbar */
    --topbar-h: 62px;
}

/* ====================================================
   Reset / Base
   ==================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body.app-body {
    font-family: 'Outfit', 'Lato', sans-serif;
    font-size: 14px;
    background: var(--surface-body);
    color: var(--text-base);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ====================================================
   Layout
   ==================================================== */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--dur) var(--ease);
    scrollbar-width: none;
}

.app-sidebar::-webkit-scrollbar {
    display: none;
}

.app-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--dur) var(--ease);
}

/* ====================================================
   Sidebar — Brand
   ==================================================== */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .10);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-brand-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-200);
    font-size: 18px;
}

.sidebar-brand-title {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -.3px;
    line-height: 1.2;
}

.sidebar-brand-sub {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
    font-weight: 400;
}

/* ====================================================
   Sidebar — Nav
   ==================================================== */
.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .25);
    padding: 20px 20px 6px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    gap: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, .55) !important;
    font-size: 13.5px;
    font-weight: 500;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
    position: relative;
    cursor: pointer;
    text-decoration: none;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .9) !important;
    transform: translateX(2px);
}

.sidebar-link.active {
    background: var(--green-600);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(44, 122, 82, .45);
}

.sidebar-link.active .sidebar-link-icon {
    background: rgba(255, 255, 255, .18);
}

.sidebar-link-danger:hover {
    background: rgba(220, 38, 38, .15);
    color: #fca5a5 !important;
}

.sidebar-link-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: background var(--dur) var(--ease);
}

.sidebar-link-text {
    flex: 1;
}

.sidebar-badge {
    font-size: 10px;
    font-weight: 700;
    background: var(--amber-500);
    color: #fff;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* ====================================================
   Sidebar — Footer
   ==================================================== */
.sidebar-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--green-600);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user-name {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.sidebar-user-role {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
    line-height: 1.3;
}

/* ====================================================
   Topbar
   ==================================================== */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--topbar-h);
    background: var(--surface-card);
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--shadow-sm);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-toggle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.topbar-toggle:hover {
    background: var(--green-50);
    color: var(--green-600);
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.topbar-breadcrumb a {
    color: var(--text-muted);
    transition: color var(--dur);
}

.topbar-breadcrumb a:hover {
    color: var(--green-600);
}

.topbar-breadcrumb span {
    color: var(--text-base);
    font-weight: 600;
}

.topbar-breadcrumb-sep {
    font-size: 10px;
    color: var(--text-faint);
}

.topbar-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    background: var(--surface-card);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--dur) var(--ease);
}

.topbar-icon-btn:hover {
    background: var(--green-50);
    border-color: var(--green-200);
    color: var(--green-600);
}

.topbar-notif {
    position: relative;
}

.notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-rejected);
    border: 2px solid white;
    pointer-events: none;
}

.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
    background: var(--surface-subtle);
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    text-decoration: none !important;
}

.topbar-user-btn:hover {
    border-color: var(--green-200);
    background: var(--green-50);
}

.topbar-user-btn::after {
    display: none !important;
}

.topbar-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--green-600);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.topbar-user-name {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-base);
    line-height: 1.3;
    white-space: nowrap;
}

.topbar-user-role {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    white-space: nowrap;
}

.topbar-chevron {
    font-size: 10px;
    color: var(--text-faint);
}

/* ====================================================
   Dropdown
   ==================================================== */
.app-dropdown {
    border: 1px solid var(--surface-border) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 6px !important;
    min-width: 200px !important;
    margin-top: 6px !important;
}

.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
    margin-bottom: 2px;
}

.dropdown-user-header .dropdown-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--green-600);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.dropdown-user-header strong {
    display: block;
    font-size: 13px;
    color: var(--text-base);
    line-height: 1.3;
}

.dropdown-user-header small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.app-dropdown .dropdown-item {
    border-radius: var(--radius-sm) !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-base) !important;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease) !important;
}

.app-dropdown .dropdown-item:hover {
    background: var(--green-50) !important;
    color: var(--green-700) !important;
}

.app-dropdown .dropdown-item.text-danger {
    color: var(--color-rejected) !important;
}

.app-dropdown .dropdown-item.text-danger:hover {
    background: #fef2f2 !important;
    color: var(--color-rejected) !important;
}

.app-dropdown .dropdown-divider {
    border-color: var(--surface-border) !important;
    margin: 4px 0 !important;
}

/* ====================================================
   Content Area
   ==================================================== */
.app-content {
    flex: 1;
    padding: 24px;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* ====================================================
   Page Heading
   ==================================================== */
.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-base);
    letter-spacing: -.4px;
    line-height: 1.2;
    margin: 0;
}

.page-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 400;
}

.page-subtitle strong {
    color: var(--green-600);
    font-weight: 700;
}

/* ====================================================
   Hero Banner
   ==================================================== */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, var(--green-700) 0%, var(--green-500) 60%, var(--green-400) 100%);
    border-radius: var(--radius-xl);
    padding: 28px 32px;
    margin-bottom: 24px;
    overflow: hidden;
}

.hero-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.hero-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    flex-shrink: 0;
    backdrop-filter: blur(6px);
}

.hero-banner h3 {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px;
    letter-spacing: -.3px;
}

.hero-banner p {
    font-size: 13.5px;
    color: rgba(255, 255, 255, .75);
    margin: 0;
}

.hero-banner-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.hero-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.hero-circle-1 {
    width: 180px;
    height: 180px;
    right: -40px;
    top: -60px;
}

.hero-circle-2 {
    width: 120px;
    height: 120px;
    right: 80px;
    bottom: -50px;
}

/* ====================================================
   Stat Cards Grid
   ==================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    background: var(--surface-card);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: var(--radius-xs) 0 0 var(--radius-xs);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-total::before {
    background: var(--green-500);
}

.stat-pending::before {
    background: var(--amber-500);
}

.stat-approved::before {
    background: var(--color-success);
}

.stat-rejected::before {
    background: var(--color-rejected);
}

.stat-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-total .stat-icon-wrap {
    background: var(--green-50);
    color: var(--green-600);
}

.stat-pending .stat-icon-wrap {
    background: var(--amber-100);
    color: var(--amber-500);
}

.stat-approved .stat-icon-wrap {
    background: #dcfce7;
    color: var(--color-success);
}

.stat-rejected .stat-icon-wrap {
    background: #fee2e2;
    color: var(--color-rejected);
}

.stat-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    color: var(--text-base);
    letter-spacing: -1px;
}

.stat-sub {
    font-size: 11px;
    color: var(--text-faint);
    font-weight: 500;
}

/* Approval Flow inside stat card */
.approval-flow {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.af-step {
    font-size: 10.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.af-done {
    color: var(--color-success);
}

.af-active {
    color: var(--amber-500);
}

.af-wait {
    color: var(--text-faint);
}

.af-rejected {
    color: var(--color-rejected);
}

.af-arrow {
    font-size: 9px;
    color: var(--text-faint);
}

/* ====================================================
   App Card
   ==================================================== */
.app-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--dur) var(--ease);
}

.app-card:hover {
    box-shadow: var(--shadow-md);
}

.app-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--surface-border);
    background: var(--surface-subtle);
}

.app-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-base);
    display: flex;
    align-items: center;
}

.app-card-title i {
    color: var(--green-500);
}

.app-card-body {
    padding: 20px;
}

.app-card-body.p-0 {
    padding: 0;
}

/* ====================================================
   Buttons
   ==================================================== */
.btn-app-primary {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(44, 122, 82, .35);
    transition: all var(--dur) var(--ease);
    text-decoration: none;
    white-space: nowrap;
}

.btn-app-primary:hover {
    background: linear-gradient(135deg, var(--green-600), var(--green-800));
    box-shadow: 0 6px 20px rgba(44, 122, 82, .45);
    transform: translateY(-1px);
}

.btn-app-primary:active {
    transform: translateY(0);
}

.btn-app-ghost {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--text-muted) !important;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur) var(--ease);
    text-decoration: none;
    white-space: nowrap;
}

.btn-app-ghost:hover {
    background: var(--green-50);
    border-color: var(--green-200);
    color: var(--green-700) !important;
}

.btn.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn.btn-danger {
    background: linear-gradient(135deg, #f87171, #dc2626);
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn.btn-warning {
    background: linear-gradient(135deg, #fcd34d, #d97706);
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn.btn-info {
    background: linear-gradient(135deg, #38bdf8, #0284c7);
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn.btn-link {
    color: var(--green-600) !important;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    text-decoration: none;
}

.btn.btn-link:hover {
    color: var(--green-800) !important;
    text-decoration: underline;
}

/* ====================================================
   Table
   ==================================================== */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--surface-border);
    flex-wrap: wrap;
    background: var(--surface-subtle);
}

.table-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}

.table-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-faint);
    font-size: 13px;
    pointer-events: none;
}

.table-search-input {
    width: 100%;
    height: 36px;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: 0 12px 0 36px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: var(--text-base);
    background: var(--surface-card);
    transition: border-color var(--dur), box-shadow var(--dur);
    outline: none;
}

.table-search-input:focus {
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px rgba(44, 122, 82, .1);
}

.table-search-input::placeholder {
    color: var(--text-faint);
}

.table-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.table-filter-select {
    height: 36px;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--surface-card);
    cursor: pointer;
    outline: none;
    transition: border-color var(--dur);
}

.table-filter-select:focus {
    border-color: var(--green-400);
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.app-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-subtle);
    border-bottom: 1.5px solid var(--surface-border);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.app-table tbody tr {
    transition: background var(--dur);
    border-bottom: 1px solid var(--surface-border);
}

.app-table .row-warning {
    background-color: #fffaea !important;
}

.app-table .row-danger {
    background-color: #fff1f2 !important;
}

.app-table tbody tr:last-child {
    border-bottom: none;
}

.app-table tbody tr:hover {
    background: var(--green-50);
}

.app-table tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    color: var(--text-base);
    font-weight: 500;
}

.app-table tfoot th {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    background: var(--surface-subtle);
    border-top: 1.5px solid var(--surface-border);
}

/* Table helpers */
.code-badge {
    font-size: 11.5px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    background: var(--green-50);
    color: var(--green-700);
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--green-100);
    white-space: nowrap;
}

.room-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-subtle);
    border: 1px solid var(--surface-border);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.td-muted {
    color: var(--text-faint) !important;
    font-size: 12.5px;
    white-space: nowrap;
}

/* Status Pills */
.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.status-approved {
    background: #dcfce7;
    color: #15803d;
}

.status-pending {
    background: var(--amber-100);
    color: #92400e;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Action buttons */
.action-btns {
    display: flex;
    gap: 4px;
}

.action-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--dur) var(--ease);
}

.action-btn-view {
    background: #e0f2fe;
    color: #0369a1;
}

.action-btn-edit {
    background: var(--amber-100);
    color: #92400e;
}

.action-btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.action-btn:hover {
    filter: brightness(.9);
    transform: scale(1.08);
}

/* ====================================================
   Form Components
   ==================================================== */
.app-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: .1px;
}

.app-input,
.app-select,
.app-textarea {
    width: 100%;
    height: 40px;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    color: var(--text-base);
    background: var(--surface-card);
    transition: border-color var(--dur), box-shadow var(--dur);
    outline: none;
}

.app-input:focus,
.app-select:focus,
.app-textarea:focus {
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px rgba(44, 122, 82, .10);
}

.app-input::placeholder {
    color: var(--text-faint);
}

.app-textarea {
    height: auto;
    padding: 10px 14px;
    resize: vertical;
}

.app-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-check-input {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--surface-border);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--green-600);
}

.app-check-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
}

/* Guide list (in form sidebar) */
.guide-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.guide-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.guide-step {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--green-600);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guide-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.guide-text strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-base);
}

.guide-text span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Approval timeline (in form sidebar) */
.approval-timeline {
    display: flex;
    flex-direction: column;
}

.at-step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.at-connector {
    width: 2px;
    height: 24px;
    background: var(--surface-border);
    margin-left: 18px;
}

.at-dot {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--green-50);
    color: var(--green-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    border: 1.5px solid var(--green-100);
}

.at-active .at-dot {
    background: var(--green-600);
    color: #fff;
    border-color: var(--green-600);
    box-shadow: 0 4px 12px rgba(44, 122, 82, .3);
}

.at-info strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-base);
}

.at-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ====================================================
   Alerts (override Bootstrap)
   ==================================================== */
.alert {
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-size: 13.5px;
    font-weight: 500;
    padding: 13px 16px !important;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.alert-primary {
    background: var(--green-50) !important;
    color: var(--green-800) !important;
    border-left: 4px solid var(--green-500) !important;
}

.alert-secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-left: 4px solid #94a3b8 !important;
}

.alert-success {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-left: 4px solid #22c55e !important;
}

.alert-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-left: 4px solid #dc2626 !important;
}

.alert-warning {
    background: var(--amber-100) !important;
    color: #92400e !important;
    border-left: 4px solid var(--amber-500) !important;
}

.alert-info {
    background: #e0f2fe !important;
    color: #075985 !important;
    border-left: 4px solid #0284c7 !important;
}

.alert-light {
    background: #f8fafc !important;
    color: #475569 !important;
    border-left: 4px solid #e2e8f0 !important;
}

.alert-dark {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-left: 4px solid #475569 !important;
}

/* ====================================================
   Badges (override Bootstrap)
   ==================================================== */
.badge {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px !important;
    border-radius: var(--radius-full) !important;
}

.badge.text-bg-primary {
    background: var(--green-50) !important;
    color: var(--green-700) !important;
}

.badge.text-bg-secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
}

.badge.text-bg-success {
    background: #dcfce7 !important;
    color: #15803d !important;
}

.badge.text-bg-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.badge.text-bg-warning {
    background: var(--amber-100) !important;
    color: #92400e !important;
}

.badge.text-bg-info {
    background: #e0f2fe !important;
    color: #075985 !important;
}

.badge.text-bg-light {
    background: #f8fafc !important;
    color: #64748b !important;
}

.badge.text-bg-dark {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* ====================================================
   Toast (override Bootstrap)
   ==================================================== */
.toast {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--surface-border) !important;
    box-shadow: var(--shadow-lg) !important;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
}

.toast-header {
    background: var(--surface-subtle) !important;
    border-bottom: 1px solid var(--surface-border) !important;
    font-weight: 600;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.toast-body {
    color: var(--text-muted);
    font-weight: 500;
}

/* ====================================================
   Footer
   ==================================================== */
.app-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--surface-border);
    background: var(--surface-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-faint);
    font-weight: 500;
}

.app-footer a {
    color: var(--green-600);
    transition: color var(--dur);
}

.app-footer a:hover {
    color: var(--green-800);
}

/* ====================================================
   Scrollbar
   ==================================================== */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--green-200);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--green-400);
}

/* ====================================================
   Responsive
   ==================================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-w: 0px;
    }

    .app-sidebar {
        transform: translateX(-256px);
        width: 256px;
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-banner {
        padding: 22px 20px;
    }

    .app-content {
        padding: 16px;
    }

    .page-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

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

/* ====================================================
   Animation entrance
   ==================================================== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-heading,
.hero-banner,
.stats-grid,
.app-card,
.row {
    animation: fadeUp .35s var(--ease) both;
}

.stats-grid {
    animation-delay: .05s;
}

.row {
    animation-delay: .10s;
}
