:root {
    --ink: #17202a;
    --muted: #64748b;
    --cream: #fff8ef;
    --blue: #3b82f6;
    --purple: #7c3aed;
    --coral: #fb7185;
    --mint: #2dd4bf;
    --navy: #111827;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--cream);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, var(--navy), #312e81);
}

.navbar-brand:hover {
    color: #fff;
}

.hero {
    padding: 6rem 0;
    background:
        radial-gradient(circle at top right, rgba(45, 212, 191, .25), transparent 35%),
        radial-gradient(circle at bottom left, rgba(251, 113, 133, .22), transparent 35%),
        linear-gradient(135deg, #fff8ef, #eef2ff);
}

.eyebrow {
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
    font-weight: 800;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: .95;
    font-weight: 900;
    max-width: 800px;
}

.hero-text {
    color: var(--muted);
    font-size: 1.25rem;
    max-width: 650px;
    margin: 1.5rem 0 2rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border: none;
    box-shadow: 0 12px 30px rgba(59, 130, 246, .25);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-card,
.feature-card {
    background: rgba(255, 255, 255, .85);
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(15, 23, 42, .12);
}

.hero-card {
    padding: 2rem;
}

.hero-card h2 {
    font-weight: 850;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: .85rem 0;
    color: var(--muted);
}

.summary-row strong {
    color: var(--ink);
}

.summary-row.total {
    font-size: 1.2rem;
    color: var(--ink);
}

.features {
    padding: 5rem 0;
    background: #fff;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 2rem;
}

.section-heading h2 {
    font-weight: 900;
    font-size: clamp(2rem, 4vw, 3.25rem);
}

.feature-card {
    padding: 2rem;
    height: 100%;
}

.feature-card h3 {
    font-weight: 850;
}

.feature-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.8);
    padding: 2rem 0;
}

.nav-link {
    color: rgba(255,255,255,.85);
    font-weight: 600;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link.disabled {
    opacity: .5;
    pointer-events: none;
}

.btn-light {
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(59,130,246,.15);
    color: var(--ink);
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(15,23,42,.08);
}

.btn-light:hover {
    background: #ffffff;
    color: var(--blue);
    transform: translateY(-1px);
}

.btn-outline-primary-custom {
    background: transparent;
    border: 2px solid var(--blue);
    color: var(--blue);
    font-weight: 600;
}

.btn-outline-primary-custom:hover {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    color: white;
    border-color: transparent;
}

.drag-parent-handle,
.drag-dept-handle {
    cursor: grab;
    color: var(--muted);
    font-weight: 800;
}

.parent-group {
    border-top: 2px solid rgba(15,23,42,.08);
}

.empty-dept-row td {
    background: rgba(248,250,252,.7);
}

.site-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    margin-right: 12px;
}

.navbar-brand {
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: .6rem;
}

html,
body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.site-footer a {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-weight: 600;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.status-open {
    background: rgba(59,130,246,.15);
    color: #2563eb;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}

.status-pending {
    background: rgba(148,163,184,.18);
    color: #475569;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}

.status-info {
    background: rgba(148,163,184,.12);
    color: #475569;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
}

.status-secondary {
    background: rgba(148, 163, 184, .18);
    color: #475569;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 700;
}

.status-finalized {
    background: rgba(34,197,94,.15);
    color: #16a34a;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}

.margin-input {
    width: 90px;
    display: inline-block;
    margin-right: .35rem;
}

.margin-edit-btn {
    padding: .2rem .45rem;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

th.sortable:hover {
    color: var(--blue);
}

.sort-icon {
    font-size: .8rem;
    color: var(--muted);
    margin-left: .25rem;
}

.stale-count-row td {
    background-color: #fff1f2;
}

.stale-count-warning {
    color: #dc2626;
    font-weight: 900;
    margin-right: .4rem;
    cursor: help;
}

.status-danger {
    background: rgba(239, 68, 68, .15);
    color: #dc2626;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 700;
}

.status-warning {
    background: rgba(245, 158, 11, .18);
    color: #b45309;
    padding: .25rem .6rem;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 700;
}

.progress {
    background: rgba(15,23,42,.08);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--blue), var(--purple));
}

/* ----------------------------------------
   Start - Breadcrumbs
----------------------------------------- */

.ir-breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: .92rem;
}

.ir-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #94a3b8;
    padding: 0 .6rem;
}

.ir-breadcrumb a {
    color: var(--blue);
    text-decoration: none;
}

.ir-breadcrumb a:hover {
    text-decoration: underline;
}

.ir-breadcrumb .active {
    color: #64748b;
}

/* ----------------------------------------
   End - Breadcrumbs
----------------------------------------- */

/* ----------------------------------------
   Numeric Input Widths
----------------------------------------- */

.input-money {
    min-width: 155px;
}

.input-percent {
    min-width: 85px;
}

/* ----------------------------------------
   End - Numeric Input Widths
----------------------------------------- */

/* ----------------------------------------
   Navbar Admin Dropdown
----------------------------------------- */

.nav-admin {
    color: rgba(255,255,255,.9) !important;
}

.nav-admin:hover,
.nav-admin:focus,
.nav-admin.show {
    color: rgba(255,255,255,.9) !important;
}

.nav-admin::after {
    margin-left: .45rem;
}

.input-basis {
    min-width: 110px;
}

.profile-icon {
    color: rgba(255,255,255,.95) !important;
    text-decoration: none !important;
    font-size: 1.35rem;
    line-height: 1;
    padding: .25rem .4rem;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.profile-icon:hover,
.profile-icon:focus,
.profile-icon:active,
.profile-icon.show {
    color: rgba(255,255,255,.95) !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.profile-icon.dropdown-toggle::after {
    display: none;
}

.inventory-calculation-card {
    display:inline-block;
    min-width:620px;
}

.summary-calc-table {
    width:100%;
}

.summary-subtotal td {
    border-top:2px solid #0f172a;
    font-weight:600;
}

.summary-grand-total td {
    border-top:2px solid #0f172a;
    border-bottom:4px double #0f172a;
    font-size:1.05rem;
    font-weight:700;
}

.impersonation-banner {
    position: sticky;
    top: 72px;
    z-index: 999;
    padding: .75rem 0;
    background: #f59e0b;
    color: #111827;
    border-bottom: 2px solid rgba(17, 24, 39, .25);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .18);
}

.impersonation-banner strong {
    font-weight: 800;
}

.impersonation-banner .small {
    color: rgba(17, 24, 39, .75);
}

.impersonation-banner .btn-dark {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.impersonation-banner .btn-dark:hover {
    background: #020617;
    border-color: #020617;
    color: #fff;
}