:root {
    --primary: #14532d;
    --secondary: #16a34a;
    --accent: #f59e0b;
    --accent-soft: #fff7ed;
    --surface: #ffffff;
    --surface-alt: #f8faf7;
    --canvas: #ffffff;
    --dark: #123b27;
    --ink: #24342b;
    --muted: #66756d;
    --border: #d9e8dc;
    --success: #15803d;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #166534;
    --shadow: 0 10px 30px rgba(20, 83, 45, 0.07);
    --radius: 10px;
    --sidebar-w: 248px;
    --font: "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--canvas);
    color: var(--ink);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: rgba(22, 163, 74, 0.28);
    border-radius: 999px;
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 90% 8%, rgba(245, 158, 11, 0.28), transparent 24%),
        radial-gradient(circle at 8% 90%, rgba(134, 239, 172, 0.22), transparent 28%),
        linear-gradient(135deg, #123b27 0%, #14532d 52%, #15803d 100%);
}

.auth-main {
    width: min(100%, 1180px);
}

.auth-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.inventra-auth-card {
    width: min(100%, 460px);
    margin: 0 auto;
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-brand-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 12px;
}

.auth-brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    padding: 8px;
    border: 2px solid rgba(22, 101, 52, 0.08);
    box-shadow: 0 10px 22px rgba(20, 83, 45, 0.1);
}

.auth-brand-logo.featured {
    width: 76px;
    height: 76px;
    padding: 9px;
    border-radius: 22px;
    border-color: rgba(234, 179, 8, 0.28);
    box-shadow: 0 14px 28px rgba(234, 179, 8, 0.18);
}

.auth-brand-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.45;
}

.auth-brand-name span {
    text-transform: none;
    font-size: 0.78rem;
    color: var(--muted);
}

.auth-logo h1 {
    margin-top: 12px;
    font-size: 2.2rem;
    line-height: 1;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.04em;
}

.auth-logo h1 span {
    color: var(--accent);
}

.auth-logo p {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 10px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-label,
label span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark);
}

.form-control,
input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.pw-wrap {
    position: relative;
}

.pw-wrap .form-control {
    padding-right: 74px;
}

.pw-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.stacked-form {
    display: grid;
    gap: 16px;
}

.auth-submit {
    width: 100%;
    justify-content: center;
}

.auth-switch {
    margin-top: 18px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--primary);
    font-weight: 700;
}

.auth-notice {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid rgba(22, 163, 74, 0.25);
    border-radius: 10px;
    background: #f0fdf4;
    color: var(--ink);
    font-size: 0.86rem;
}

.auth-notice a {
    overflow-wrap: anywhere;
    color: var(--primary);
    font-weight: 700;
}

.auth-notice small {
    color: var(--muted);
}

.form-note {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--ink);
    background: #f8fafc;
}

.demo-panel {
    margin-top: 22px;
    padding: 18px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #f0fdf4 100%);
    border: 1px solid var(--border);
}

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

.demo-panel-head strong {
    color: var(--dark);
}

.demo-panel-head small {
    color: var(--muted);
}

.demo-account-grid {
    display: grid;
    gap: 12px;
}

.demo-account {
    border-radius: 12px;
    border: 1px solid #dcfce7;
    background: #fff;
    padding: 12px 14px;
}

.demo-account span {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #854d0e;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.demo-account strong {
    display: block;
    color: var(--dark);
    font-size: 0.88rem;
}

.demo-account small {
    color: var(--muted);
}

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

.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #123b27 0%, #14532d 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    display: grid;
    gap: 16px;
    align-content: start;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-logos {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sidebar-brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-brand-logo.featured {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #fff8db;
}

.sidebar-title-block {
    min-width: 0;
}

.sidebar-title-block h2 {
    font-size: 1.48rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    white-space: nowrap;
}

.sidebar-title-block h2 span {
    color: var(--accent);
}

.sidebar-title-block p,
.sidebar-title-block small {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.68rem;
    max-width: 100%;
}

.sidebar-title-block p {
    margin-top: 10px;
}

.sidebar-title-block small {
    margin-top: 2px;
    line-height: 1.45;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-section {
    padding: 10px 20px 6px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: rgba(255, 255, 255, 0.76);
    border-left: 3px solid transparent;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-left-color: #fbbf24;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-pill {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(234, 179, 8, 0.18);
    color: #fde68a;
    font-size: 0.72rem;
    font-weight: 700;
}

.sidebar-footer {
    padding: 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar.small {
    width: 34px;
    height: 34px;
    font-size: 0.84rem;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar span {
    line-height: 1;
}

.sidebar-user strong {
    display: block;
    font-size: 0.86rem;
}

.sidebar-user small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
}

.main-content {
    width: calc(100% - var(--sidebar-w));
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    position: relative;
    min-width: 0;
}

.main-content::before {
    content: "";
    position: absolute;
    inset: 72px 0 0;
    background: url("../../img/ISU_CAUAYAN.png") center / min(62vw, 620px) no-repeat;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.main-content > * {
    position: relative;
    z-index: 1;
}

.topbar {
    height: 72px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 3px 16px rgba(20, 83, 45, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-left,
.topbar-right,
.page-actions,
.button-row,
.filter-row,
.chip-row,
.row-actions,
.list-row,
.subsection-head,
.demo-panel-head,
.toolbar-form,
.inline-check {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-title {
    display: block;
    color: var(--dark);
    font-size: 1rem;
    font-weight: 700;
}

.topbar-left small,
.user-badge small,
.page-description,
.panel-head span,
.metric-row small,
.timeline-item small,
.list-card small,
.result-card small,
.notification-card small,
.stat-card small,
.detail-card small,
.demo-account small {
    color: var(--muted);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
}

.user-badge strong {
    display: block;
    font-size: 0.82rem;
}

.notif-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #1f2937;
    font-size: 0.72rem;
    font-weight: 800;
}

.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.page-content {
    padding: 28px clamp(18px, 3vw, 38px);
    max-width: 1480px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 22px;
}

.eyebrow {
    margin-bottom: 6px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
    font-weight: 700;
}

.page-header h1 {
    color: var(--dark);
    font-size: clamp(1.55rem, 2vw, 2rem);
    line-height: 1.15;
    margin-bottom: 6px;
    letter-spacing: -0.04em;
}

.panel-grid,
.stats-grid,
.shortcut-grid,
.result-grid,
.detail-grid,
.form-grid,
.info-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
}

.panel-grid.two,
.detail-grid.two,
.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-grid.one {
    grid-template-columns: 1fr;
}

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

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

.stats-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid.five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.shortcut-grid,
.result-grid,
.info-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel,
.stat-card,
.shortcut-card,
.detail-card,
.info-card,
.auth-card,
.result-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.panel,
.stat-card,
.shortcut-card,
.detail-card,
.info-card,
.result-card {
    padding: 22px;
}

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

.panel-head h2 {
    color: var(--dark);
    font-size: 1rem;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--secondary);
}

.stat-card.warning::before { background: var(--accent); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.info::before { background: #65a30d; }
.stat-card.success::before { background: var(--success); }

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 8px;
}

.stat-card strong,
.detail-card strong {
    display: block;
    color: var(--dark);
    font-size: 1.85rem;
    line-height: 1.1;
}

.shortcut-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.shortcut-card strong {
    display: block;
    color: var(--dark);
    margin-bottom: 8px;
}

.category-summary-card {
    color: inherit;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--secondary);
    background: linear-gradient(145deg, #ffffff 0%, #f4faf6 100%);
}

.category-summary-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 12px 26px rgba(20, 83, 45, 0.12);
    transform: translateY(-3px);
}

.category-summary-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 14px;
}

.section-kicker {
    display: block;
    color: var(--secondary);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.category-summary-heading h2 {
    margin-top: 3px;
    color: var(--dark);
    font-size: 1.2rem;
}

.category-summary-hint {
    color: var(--muted);
    font-size: 0.8rem;
}

.category-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 26px;
}

.category-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.category-card-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #dcfce7;
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 800;
}

.category-card-action {
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.category-summary-card strong {
    margin-bottom: 10px;
    font-size: 1rem;
}

.category-stock-value {
    display: inline-block;
    color: var(--primary);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.category-stock-label,
.category-summary-card small {
    display: block;
    color: var(--muted);
}

.category-stock-label {
    display: inline-block;
    margin-left: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.category-summary-card small {
    margin-top: auto;
    padding-top: 14px;
    font-size: 0.78rem;
}

.category-summary-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

@media (max-width: 1180px) {
    .category-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .category-summary-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

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

@media (max-width: 520px) {
    .category-summary-grid {
        grid-template-columns: 1fr;
    }
}

.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    min-height: 42px;
}

.button:hover,
.btn:hover {
    transform: translateY(-1px);
}

.button.primary,
.btn-primary {
    background: var(--primary);
    color: #fff;
}

.button.secondary,
.btn-outline {
    background: #fff;
    color: var(--primary);
    border-color: #c7ddcc;
}

.button.danger {
    background: #fee2e2;
    color: var(--danger);
}

.button.small,
.btn-sm {
    padding: 8px 12px;
    font-size: 0.82rem;
}

.table-wrap {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid #e4eee5;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #f7faf7;
}

tbody tr:nth-child(even) {
    background: #fbfdfb;
}

tbody tr:hover {
    background: #f1f8f1;
}

tbody tr.inventory-item-highlight,
tbody tr:target {
    position: relative;
    scroll-margin-top: 96px;
    animation: inventory-item-highlight 2.8s ease-out;
}

.inventory-list-panel {
    scroll-margin-top: 96px;
}

.inventory-list-panel:target {
    animation: inventory-list-highlight 2.8s ease-out;
}

@keyframes inventory-item-highlight {
    0%,
    70% {
        background: #fff1b8;
        box-shadow: inset 4px 0 0 #d97706;
    }
    100% {
        background: transparent;
        box-shadow: inset 0 0 0 transparent;
    }
}

@keyframes inventory-list-highlight {
    0%,
    70% {
        box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.3), var(--shadow);
    }
    100% {
        box-shadow: var(--shadow);
    }
}

.stack-list,
.timeline-list,
.chat-thread {
    display: grid;
    gap: 12px;
}

.timeline-item,
.list-card,
.priority-card,
.notification-card,
.chat-bubble,
.result-card {
    border: 1px solid #dcfce7;
    border-radius: 12px;
    padding: 15px 16px;
    background: #fff;
}

.clickable:hover,
.priority-card:hover {
    border-color: rgba(234, 179, 8, 0.65);
    box-shadow: 0 10px 24px rgba(22, 101, 52, 0.08);
}

.active-card {
    border-color: rgba(234, 179, 8, 0.7);
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.14);
}

.priority-card,
.notification-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.priority-score {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #854d0e;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #dcfce7;
}

.metric-row:last-child {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge.success { background: #dcfce7; color: #166534; }
.badge.warning { background: #fef3c7; color: #a16207; }
.badge.danger { background: #fee2e2; color: #b91c1c; }
.badge.info { background: #dcfce7; color: #166534; }
.badge.muted { background: #e2e8f0; color: #475569; }

.empty-state {
    padding: 28px 22px;
    border: 1px dashed #bbf7d0;
    border-radius: 14px;
    text-align: center;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.empty-state.compact {
    padding: 18px;
}

.flash-stack {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.flash {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 600;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.flash-warning {
    background: #fef3c7;
    color: #a16207;
    border-color: #fcd34d;
}

.flash-error {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.flash-info {
    background: #ecfccb;
    color: #3f6212;
    border-color: #bef264;
}

.search-panel,
.toolbar-form {
    display: grid;
    gap: 14px;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.toolbar-form {
    grid-template-columns: 2fr 1fr 1fr auto;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #dcfce7;
    background: #fff;
    color: var(--primary);
    font-size: 0.82rem;
}

.request-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 10px;
}

input::placeholder,
textarea::placeholder {
    color: #9aa9a0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(245, 158, 11, 0.35);
    outline-offset: 2px;
}

.detail-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.detail-card span {
    display: block;
    color: var(--muted);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.content-block {
    margin-top: 20px;
}

.profile-photo-editor {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 14px;
    border: 1px dashed #bbf7d0;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

.profile-photo-meta {
    display: grid;
    gap: 10px;
    flex: 1;
}

.profile-avatar-preview {
    width: 88px;
    height: 88px;
    font-size: 1.7rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.field-note {
    font-size: 0.76rem;
    color: var(--muted);
}

.bordered-form {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #dcfce7;
}

.chat-bubble {
    background: #f8fafc;
}

.chat-bubble.own {
    background: #ecfccb;
}

.notification-card.unread {
    border-color: rgba(234, 179, 8, 0.6);
}

.result-card {
    display: grid;
    gap: 10px;
}


.success-panel {
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
}

/* Keep Leaflet map tiles/controls below the sidebar */
#cauayan-leaflet-map .leaflet-pane,
#cauayan-leaflet-map .leaflet-top,
#cauayan-leaflet-map .leaflet-bottom {
    z-index: 400;
}

#cauayan-leaflet-map {
    isolation: isolate;
}

.sidebar-overlay {
    display: none;
}

.inline-check input {
    width: auto;
}

@media (max-width: 1180px) {
    .stats-grid.five,
    .stats-grid.four,
    .stats-grid.three,
    .panel-grid.two,
    .detail-grid.two,
    .form-grid.two,
    .form-grid.three,
    .toolbar-form,
    .request-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 960px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 990;
    }

    .sidebar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

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

    .hamburger {
        display: inline-flex;
    }

    .page-content {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .auth-wrapper,
    .page-content {
        padding: 18px;
    }

    .topbar {
        height: auto;
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .topbar-left,
    .topbar-right {
        width: 100%;
        min-width: 0;
    }

    .topbar-left > div:last-child {
        min-width: 0;
    }

    .topbar-title,
    .topbar-left small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-right {
        justify-content: space-between;
    }

    .topbar-right .user-badge {
        flex: 1;
        min-width: 0;
    }

    .topbar-right .user-badge > div:last-child {
        min-width: 0;
    }

    .topbar-right .user-badge strong,
    .topbar-right .user-badge small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-card,
    .panel,
    .stat-card,
    .detail-card,
    .result-card,
    .shortcut-card,
    .info-card {
        padding: 18px;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .demo-panel-head {
        align-items: flex-start;
    }

    .profile-photo-editor {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-wrap {
        margin-inline: -18px;
        padding-inline: 18px;
    }

    .table-wrap table {
        min-width: 680px;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel-head span {
        font-size: 0.82rem;
    }

    .row-actions {
        align-items: stretch;
        flex-direction: column;
        min-width: 104px;
    }

    .row-actions .button,
    .row-actions form,
    .row-actions form .button {
        width: 100%;
    }

    .priority-card,
    .notification-card {
        flex-direction: column;
    }

    .notification-card .button,
    .priority-card .button {
        width: 100%;
    }

    .modal,
    [role="dialog"] {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }

    .page-actions,
    .page-actions .button,
    .button-row .button,
    .button-row .btn {
        width: 100%;
    }
}

/* INVENTRA visual system refresh */
:root {
    --surface-alt: #f1f7f2;
    --canvas: #f4f8f5;
    --border: #d6e4d9;
    --shadow: 0 12px 30px rgba(20, 83, 45, 0.08);
    --shadow-hover: 0 18px 36px rgba(20, 83, 45, 0.13);
    --radius: 14px;
    --font: "Aptos", "Trebuchet MS", "Segoe UI", sans-serif;
}

body {
    background:
        radial-gradient(circle at 82% -10%, rgba(187, 247, 208, 0.38), transparent 28rem),
        linear-gradient(180deg, #f8fbf8 0%, var(--canvas) 38%, #eef6f0 100%);
}

.auth-wrapper {
    background:
        radial-gradient(circle at 12% 86%, rgba(245, 158, 11, 0.2), transparent 20rem),
        radial-gradient(circle at 92% 10%, rgba(134, 239, 172, 0.24), transparent 24rem),
        linear-gradient(135deg, #0d3321 0%, #14532d 55%, #18753e 100%);
}

.auth-card {
    border-radius: 22px;
    box-shadow: 0 28px 80px rgba(5, 35, 20, 0.28);
}

.sidebar {
    background:
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.18), transparent 14rem),
        linear-gradient(165deg, #0d3321 0%, #14532d 58%, #176b3a 100%);
}

.nav-link {
    margin: 3px 12px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
}

.nav-link:hover,
.nav-link.active {
    border-left-color: transparent;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.topbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
}

.page-content {
    padding: 32px clamp(18px, 3vw, 42px) 46px;
}

.page-header {
    margin-bottom: 28px;
    animation: page-header-in 0.45s ease both;
}

.page-header h1 {
    font-size: clamp(1.7rem, 2.2vw, 2.35rem);
}

.panel,
.stat-card,
.shortcut-card,
.detail-card,
.info-card,
.result-card {
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
}

.panel:hover,
.shortcut-card:hover,
.detail-card:hover,
.info-card:hover,
.result-card:hover {
    border-color: #bfd6c4;
    box-shadow: var(--shadow-hover);
}

.stat-card {
    min-height: 128px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fcf9 100%);
}

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

.stat-card strong,
.detail-card strong {
    font-size: 2rem;
}

.button,
.btn {
    border-radius: 9px;
    font-weight: 700;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.button:hover,
.btn:hover {
    box-shadow: 0 8px 18px rgba(20, 83, 45, 0.12);
}

.button.primary,
.btn-primary {
    background: linear-gradient(135deg, #14532d 0%, #18753e 100%);
    box-shadow: 0 8px 16px rgba(20, 83, 45, 0.16);
}

.button.secondary,
.btn-outline {
    background: rgba(255, 255, 255, 0.78);
}

th {
    background: #f3f8f4;
    font-weight: 800;
}

tbody tr:hover {
    background: #eef8f0;
}

.timeline-item,
.list-card,
.priority-card,
.notification-card,
.chat-bubble,
.result-card {
    border-color: #d5ead9;
    box-shadow: 0 4px 14px rgba(20, 83, 45, 0.035);
}

.badge.info {
    background: #e0f2fe;
    color: #075985;
}

.empty-state {
    background: linear-gradient(180deg, #ffffff 0%, #f1f7f2 100%);
}

@keyframes page-header-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
    .page-content {
        padding: 24px 18px 34px;
    }

    .panel,
    .stat-card,
    .detail-card,
    .result-card,
    .shortcut-card,
    .info-card {
        padding: 18px;
    }
}
