:root {
    --bg: #f6f1e8;
    --paper: rgba(255, 252, 246, 0.92);
    --paper-strong: #fffdf8;
    --ink: #1f1a17;
    --muted: #6d6258;
    --line: rgba(54, 38, 25, 0.12);
    --brand: #8f3d16;
    --brand-deep: #512109;
    --brand-soft: #fff1e6;
    --accent: #d6a14c;
    --danger: #9b2c22;
    --success: #1f7a59;
    --shadow: 0 24px 60px rgba(63, 37, 17, 0.14);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(214, 161, 76, 0.34), transparent 30%),
        radial-gradient(circle at bottom right, rgba(143, 61, 22, 0.2), transparent 28%),
        linear-gradient(135deg, #f8f2e9 0%, #f3ebdf 42%, #efe4d6 100%);
    overflow-x: hidden;
}

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

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

button {
    cursor: pointer;
}

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

.guest-body,
.portal-body {
    min-height: 100vh;
}

.guest-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 480px);
}

.guest-shell-simple {
    display: block;
}

.guest-showcase {
    padding: 40px clamp(24px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 42px;
    background:
        linear-gradient(180deg, rgba(255, 251, 246, 0.42), rgba(255, 247, 239, 0.22)),
        radial-gradient(circle at top right, rgba(143, 61, 22, 0.08), transparent 28%);
}

.guest-brand-bar,
.brand-lockup,
.portal-topbar,
.topbar-main,
.topbar-actions,
.section-head,
.field-row,
.welcome-actions,
.guest-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--brand), var(--brand-deep));
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 12px 24px rgba(81, 33, 9, 0.28);
}

.brand-mark-icon-image {
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(17, 8, 2, 0.22);
}

.brand-mark-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-mark-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.brand-mark-logo {
    display: block;
    width: auto;
    max-width: 156px;
    max-height: 30px;
    object-fit: contain;
}

.brand-mark strong,
.showcase-copy h1,
.auth-card-head h2,
.page-heading h1,
.surface-card h2 {
    font-family: "Fraunces", serif;
}

.brand-mark strong {
    display: block;
    font-size: 1rem;
}

.brand-mark small,
.sidebar-link small,
.sidebar-user p,
.metric-card p,
.feature-card p,
.timeline-item p,
.list-row p,
.auth-card-head p,
.showcase-copy p,
.section-copy,
.section-head p,
.card-label,
.topbar-copy p {
    color: var(--muted);
}

.showcase-copy {
    max-width: 680px;
}

.page-eyebrow,
.sidebar-kicker,
.card-label {
    margin: 0 0 10px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    color: var(--brand);
}

.showcase-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(2.7rem, 5vw, 5.1rem);
    line-height: 0.95;
}

.showcase-copy p {
    margin: 0;
    max-width: 560px;
    font-size: 1.08rem;
    line-height: 1.7;
}

.showcase-grid,
.dashboard-grid,
.feature-grid,
.content-grid {
    display: grid;
    gap: 18px;
}

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

.metric-card,
.surface-card,
.auth-card,
.guest-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.metric-card,
.surface-card {
    background: var(--paper);
    padding: 24px;
}

.metric-card span,
.surface-card strong,
.feature-card strong,
.timeline-item strong,
.list-row strong {
    display: block;
}

.metric-card strong {
    margin: 14px 0 8px;
    font-size: 2rem;
}

.guest-panel {
    background: linear-gradient(180deg, rgba(250, 246, 240, 0.98), rgba(255, 255, 255, 0.92));
    padding: clamp(24px, 4vw, 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.guest-panel-simple {
    min-height: 100vh;
    padding: 24px;
}

.guest-panel-inner {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.guest-brand-mark {
    justify-self: center;
}

.guest-panel::before {
    content: "";
    position: absolute;
    inset: 24px;
    border-radius: 30px;
    border: 1px solid rgba(54, 38, 25, 0.05);
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--paper-strong);
    padding: clamp(28px, 4vw, 40px);
}

.auth-card-minimal {
    max-width: 420px;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 70px rgba(45, 27, 14, 0.12);
    margin: 0 auto;
}

.auth-card-wide {
    max-width: 560px;
}

.auth-card-head {
    margin-bottom: 26px;
}

.auth-card-head h2 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.auth-card-head p {
    margin: 0;
    line-height: 1.7;
}

.auth-card-minimal .auth-card-head {
    margin-bottom: 30px;
}

.auth-card-minimal .auth-card-head h2 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.stack-form {
    display: grid;
    gap: 18px;
}

.compact-form {
    max-width: 560px;
}

.form-field {
    display: grid;
    gap: 9px;
}

.form-field label,
.check-row {
    font-size: 0.95rem;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid rgba(81, 33, 9, 0.14);
    border-radius: 18px;
    background: rgba(252, 250, 247, 0.98);
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(143, 61, 22, 0.54);
    box-shadow: 0 0 0 4px rgba(214, 161, 76, 0.2);
    transform: translateY(-1px);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 78px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--brand);
    font-weight: 800;
    font-size: 0.82rem;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.check-row input {
    width: 18px;
    height: 18px;
    padding: 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.button-primary {
    background: linear-gradient(145deg, #73401f, #44200d);
    color: #fff;
    box-shadow: 0 14px 28px rgba(81, 33, 9, 0.22);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink);
    border-color: var(--line);
}

.button-danger {
    background: linear-gradient(145deg, #b63e2b, #7d2217);
    color: #fff;
}

.button-block {
    width: 100%;
}

.text-link {
    color: var(--brand);
    font-weight: 700;
}

.auth-foot {
    margin: 22px 0 0;
    color: var(--muted);
}

.status-banner {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(31, 122, 89, 0.08);
    border: 1px solid rgba(31, 122, 89, 0.14);
    color: var(--success);
}

.error {
    margin: 0;
    color: var(--danger);
    font-size: 0.9rem;
    font-weight: 600;
}

.portal-shell {
    min-height: 100vh;
    display: block;
    max-width: 100%;
}

.portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 272px;
    height: 100vh;
    padding: 18px 16px 16px;
    background:
        linear-gradient(180deg, rgba(58, 28, 10, 0.98), rgba(38, 18, 8, 0.99)),
        radial-gradient(circle at top right, rgba(214, 161, 76, 0.12), transparent 24%);
    color: rgba(255, 249, 240, 0.92);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 20;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.portal-sidebar .brand-mark small,
.portal-sidebar .sidebar-copy,
.portal-sidebar .sidebar-user p,
.portal-sidebar .sidebar-link small,
.portal-sidebar .sidebar-kicker {
    color: rgba(255, 241, 230, 0.68);
}

.sidebar-panel {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 248, 238, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.09);
}

.sidebar-panel h1 {
    margin: 0 0 12px;
    font-family: "Fraunces", serif;
    font-size: 1.9rem;
    line-height: 1.05;
}

.sidebar-panel-compact h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.sidebar-copy {
    margin: 0;
    line-height: 1.75;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    align-content: start;
}

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

.sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.sidebar-group {
    display: grid;
    gap: 6px;
}

.sidebar-group-toggle {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sidebar-group-toggle:hover {
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.11);
}

.sidebar-group-toggle span {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(255, 245, 235, 0.84);
}

.sidebar-group-chevron {
    width: 14px;
    height: 14px;
    color: rgba(255, 241, 230, 0.56);
    transition: transform 0.2s ease;
}

.sidebar-group.is-open .sidebar-group-chevron {
    transform: rotate(180deg);
}

.sidebar-group-panel {
    display: grid;
    gap: 4px;
    padding-left: 8px;
    padding-top: 2px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    margin-left: 6px;
}

.sidebar-group-panel[hidden] {
    display: none;
}

.sidebar-link {
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-link:hover {
    transform: translateX(1px);
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(255, 255, 255, 0.11);
}

.sidebar-link span {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    margin-bottom: 0;
}

.sidebar-link.is-active {
    background: linear-gradient(135deg, rgba(214, 161, 76, 0.2), rgba(255, 255, 255, 0.08));
    border-color: rgba(214, 161, 76, 0.24);
    box-shadow: inset 0 0 0 1px rgba(214, 161, 76, 0.1);
}

.sidebar-link-sub {
    min-height: 36px;
    padding: 8px 12px 8px 20px;
    border-radius: 12px;
    border-color: transparent;
    background: transparent;
    position: relative;
}

.sidebar-link-sub span {
    margin-bottom: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: rgba(255, 244, 236, 0.78);
}

.sidebar-link-sub::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 241, 230, 0.42);
    transform: translateY(-50%);
}

.sidebar-link-sub:hover {
    transform: translateX(0);
    background: rgba(255, 255, 255, 0.045);
    border-color: transparent;
}

.sidebar-link-sub.is-active::before {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(214, 161, 76, 0.1);
}

.sidebar-link-sub.is-active {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-link-sub.is-active span {
    color: #fff7ef;
}

.sidebar-user {
    margin-top: auto;
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.sidebar-user strong {
    display: block;
    font-size: 0.96rem;
    line-height: 1.2;
}

.sidebar-user p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    line-height: 1.4;
}

.portal-stage {
    margin-left: 272px;
    padding: 14px;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

.portal-topbar {
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(164, 179, 201, 0.28);
    box-shadow: 0 10px 24px rgba(42, 56, 83, 0.07);
}

.topbar-main {
    min-width: 0;
    justify-content: flex-start;
    gap: 12px;
}

.topbar-actions {
    flex-shrink: 0;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding-right: 4px;
}

.topbar-brand-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 12px;
    background: rgba(248, 250, 255, 0.92);
    border: 1px solid rgba(164, 179, 201, 0.34);
}

.topbar-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.topbar-brand-logo {
    width: auto;
    max-width: 1158px;
    max-height: 1124px;
    object-fit: contain;
}

.topbar-copy {
    min-width: 0;
}

.topbar-copy strong {
    display: block;
    font-size: 0.98rem;
    line-height: 1.15;
}

.topbar-copy p {
    margin: 0 0 8px;
    color: #7c8aa4;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-icon-button,
.topbar-chip {
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(164, 179, 201, 0.34);
    background: rgba(255, 255, 255, 0.88);
    color: #23324a;
}

.topbar-icon-button {
    width: 42px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.topbar-icon-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.topbar-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.topbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    font-weight: 700;
}

.topbar-date {
    color: #617089;
}

.topbar-profile {
    min-width: 184px;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.topbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dbe8ff;
    color: #3564d8;
    font-size: 0.82rem;
    font-weight: 800;
}

.topbar-user-meta {
    min-width: 0;
    display: grid;
    flex: 1;
}

.topbar-user-meta strong {
    font-size: 0.92rem;
    line-height: 1.1;
}

.topbar-user-meta small {
    color: #6d7c95;
    font-size: 0.76rem;
    line-height: 1.2;
}

.topbar-chevron {
    width: 16px;
    height: 16px;
    color: #44526a;
    transition: transform 0.2s ease;
}

.topbar-user-menu {
    position: relative;
}

.topbar-user-menu.is-open .topbar-chevron {
    transform: rotate(180deg);
}

.topbar-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 10px;
    display: none;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(164, 179, 201, 0.34);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(42, 56, 83, 0.14);
    z-index: 30;
}

.topbar-user-menu.is-open .topbar-dropdown {
    display: grid;
    gap: 4px;
}

.topbar-dropdown-link {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    color: #23324a;
    font-weight: 700;
}

.topbar-dropdown-link:hover {
    background: rgba(219, 232, 255, 0.44);
}

.topbar-dropdown-button {
    border: 0;
    background: transparent;
    text-align: left;
}

.notification-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(19, 12, 7, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 42;
}

.notification-panel {
    position: fixed;
    top: 14px;
    right: 14px;
    bottom: 14px;
    width: min(390px, calc(100vw - 28px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    border: 1px solid rgba(191, 206, 227, 0.38);
    border-radius: 24px;
    background: rgba(255, 252, 247, 0.98);
    box-shadow: 0 24px 60px rgba(42, 56, 83, 0.18);
    transform: translateX(calc(100% + 24px));
    transition: transform 0.24s ease;
    z-index: 43;
    overflow: hidden;
}

.portal-body.notification-open .notification-panel {
    transform: translateX(0);
}

.portal-body.notification-open .notification-panel-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.notification-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(191, 206, 227, 0.34);
    background: rgba(255, 255, 255, 0.84);
}

.notification-panel-head h2 {
    margin: 2px 0 0;
    font-family: "Fraunces", serif;
    font-size: 1.08rem;
    line-height: 1.1;
}

.notification-panel-body {
    overflow-y: auto;
    padding: 16px 18px 18px;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-item,
.notification-empty-state {
    display: grid;
    gap: 6px;
    padding: 14px 15px;
    border-radius: 18px;
    border: 1px solid rgba(191, 206, 227, 0.34);
    background: rgba(248, 251, 255, 0.76);
}

.notification-item strong,
.notification-empty-state strong {
    color: #19314f;
    font-size: 0.95rem;
    line-height: 1.35;
}

.notification-item p,
.notification-empty-state p {
    margin: 0;
    color: #6a7b95;
    font-size: 0.88rem;
    line-height: 1.5;
}

.notification-item-warning {
    border-color: rgba(210, 139, 24, 0.18);
    background: rgba(255, 248, 234, 0.82);
}

.notification-item-danger {
    border-color: rgba(200, 53, 48, 0.18);
    background: rgba(255, 243, 242, 0.88);
}

.portal-content {
    display: grid;
    gap: 14px;
    min-width: 0;
    max-width: 100%;
}

.page-hero {
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 250, 243, 0.95), rgba(255, 244, 232, 0.72));
    border: 1px solid var(--line);
    box-shadow: 0 20px 46px rgba(63, 37, 17, 0.08);
}

.page-hero-compact {
    padding: 16px 18px;
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.05;
}

.page-heading p {
    margin: 6px 0 0;
    max-width: 560px;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.92rem;
}

.users-page-grid {
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    align-items: start;
}

.users-stack {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.users-search-card,
.users-form-card,
.users-table-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(191, 206, 227, 0.42);
    box-shadow: 0 14px 32px rgba(42, 56, 83, 0.08);
    min-width: 0;
    max-width: 100%;
}

.section-head-compact {
    margin-bottom: 10px;
}

.users-search-form {
    display: grid;
    gap: 12px;
}

.users-search-row {
    grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(120px, 0.9fr)) auto;
    align-items: end;
}

.items-search-row {
    grid-template-columns: minmax(240px, 2fr) repeat(3, minmax(120px, 0.8fr)) auto;
}

.vendors-search-row {
    grid-template-columns: minmax(240px, 2fr) minmax(140px, 0.9fr) auto;
}

.recipes-search-row {
    grid-template-columns: minmax(240px, 2fr) minmax(160px, 1fr) minmax(140px, 0.9fr) auto;
}

.stockin-search-row {
    grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr) minmax(140px, 0.9fr) auto;
}

.stockallocation-search-row {
    grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr) minmax(140px, 0.9fr) auto;
}

.stockadjustment-search-row {
    grid-template-columns: minmax(240px, 2fr) minmax(180px, 1fr) minmax(140px, 0.9fr) auto;
}

.users-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.users-search-row .users-filter-grid {
    display: contents;
}

.users-search-actions {
    justify-content: flex-end;
    align-self: end;
}

.button-wide {
    width: 100%;
}

.users-summary-chips {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(66, 118, 240, 0.12);
    color: #3465dd;
    font-size: 0.84rem;
    font-weight: 800;
}

.form-grid-2,
.filter-grid {
    display: grid;
    gap: 16px;
}

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

.form-grid-3 {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-4 {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-field-span-2 {
    grid-column: span 2;
}

.filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
}

.button-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid rgba(54, 38, 25, 0.08);
    border-radius: 20px;
    max-width: 100%;
}

.table-wrapper-clean {
    border: 1px solid rgba(191, 206, 227, 0.42);
    background: rgba(250, 252, 255, 0.72);
}

.dt-container {
    display: grid;
    gap: 12px;
}

.dt-layout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.dt-layout-row:first-child {
    margin-bottom: 6px;
}

.dt-layout-cell {
    min-width: 0;
}

.dt-length {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: #617089;
    font-size: 0.84rem;
    font-weight: 700;
}

.dt-length select,
.dt-input {
    width: auto;
    min-width: 74px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.84rem;
}

.dt-info {
    color: var(--muted);
    font-size: 0.84rem;
}

.dt-paging {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dt-paging-button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(191, 206, 227, 0.8);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: #35506f;
    font-size: 0.82rem;
    font-weight: 700;
}

.dt-paging-button.current {
    background: rgba(66, 118, 240, 0.12);
    color: #3465dd;
    border-color: rgba(66, 118, 240, 0.22);
}

.dt-paging-button.disabled {
    opacity: 0.55;
    pointer-events: none;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    background: rgba(255, 255, 255, 0.56);
}

.portal-table-clean {
    min-width: 900px;
    background: transparent;
}

.portal-table th,
.portal-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(54, 38, 25, 0.08);
}

.portal-table th {
    background: rgba(248, 243, 236, 0.92);
    color: #6f6359;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.portal-table tbody tr:last-child td {
    border-bottom: 0;
}

.portal-table-clean tbody tr:hover {
    background: rgba(234, 241, 255, 0.34);
}

.table-subtext {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline-flex;
}

.button-small {
    min-height: 34px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 0.84rem;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(191, 206, 227, 0.8);
    background: rgba(255, 255, 255, 0.94);
    color: #35506f;
    position: relative;
}

.icon-action-edit {
    color: #3564d8;
    border-color: rgba(53, 100, 216, 0.2);
    background: rgba(223, 234, 255, 0.6);
}

.icon-action-neutral {
    color: #7b5a12;
    border-color: rgba(214, 161, 76, 0.28);
    background: rgba(255, 244, 221, 0.66);
}

.icon-action-delete {
    color: #c83530;
    border-color: rgba(200, 53, 48, 0.2);
    background: rgba(255, 231, 230, 0.66);
}

.icon-action svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.icon-action::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    padding: 6px 8px;
    border-radius: 8px;
    background: #23324a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.icon-action:hover::after {
    opacity: 1;
}

.surface-card {
    padding: 18px;
}

.surface-card h2 {
    font-size: 1.05rem;
    line-height: 1.2;
}

.section-head {
    gap: 10px;
    margin-bottom: 12px;
}

.section-head p,
.section-copy {
    font-size: 0.9rem;
    line-height: 1.4;
}

.settings-card {
    display: grid;
    gap: 12px;
}

.settings-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-tabbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(191, 206, 227, 0.42);
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(191, 206, 227, 0.72);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    color: #5b6b82;
    font-size: 0.84rem;
    font-weight: 800;
}

.settings-tab.is-active {
    background: rgba(66, 118, 240, 0.12);
    border-color: rgba(66, 118, 240, 0.18);
    color: #3465dd;
}

.settings-panels {
    display: grid;
}

.settings-panel {
    display: none;
    gap: 12px;
}

.settings-panel-danger {
    border: 1px solid rgba(200, 53, 48, 0.12);
    border-radius: 14px;
    background: rgba(255, 245, 245, 0.5);
    padding: 14px;
}

.item-entry-card {
    gap: 14px;
}

.item-entry-panels {
    gap: 0;
}

.bulk-upload-card {
    display: grid;
    gap: 14px;
    padding: 4px 0 0;
}

.bulk-upload-actions {
    justify-content: flex-start;
}

.recipe-lines-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(191, 206, 227, 0.42);
    border-radius: 18px;
    background: rgba(250, 252, 255, 0.6);
}

.recipe-lines-grid {
    display: grid;
    gap: 10px;
}

.recipe-line-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(120px, 0.8fr) auto;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(191, 206, 227, 0.42);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.recipe-line-remove {
    margin-bottom: 1px;
}

.stockin-line-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr) minmax(130px, 0.8fr) auto;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(191, 206, 227, 0.42);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.stockadjustment-line-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(140px, 0.9fr) auto;
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(191, 206, 227, 0.42);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.recipe-line-row .select2-container {
    width: 100% !important;
}

.stockin-line-row .select2-container {
    width: 100% !important;
}

.stockadjustment-line-row .select2-container {
    width: 100% !important;
}

.recipe-line-row .select2-container .select2-selection--single {
    min-height: 46px;
    padding: 8px 14px;
    border: 1px solid rgba(81, 33, 9, 0.14);
    border-radius: 14px;
    background: rgba(252, 250, 247, 0.98);
}

.stockin-line-row .select2-container .select2-selection--single {
    min-height: 46px;
    padding: 8px 14px;
    border: 1px solid rgba(81, 33, 9, 0.14);
    border-radius: 14px;
    background: rgba(252, 250, 247, 0.98);
}

.stockadjustment-line-row .select2-container .select2-selection--single {
    min-height: 46px;
    padding: 8px 14px;
    border: 1px solid rgba(81, 33, 9, 0.14);
    border-radius: 14px;
    background: rgba(252, 250, 247, 0.98);
}

.recipe-line-row .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    color: var(--ink);
    line-height: 28px;
}

.stockin-line-row .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    color: var(--ink);
    line-height: 28px;
}

.stockadjustment-line-row .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    color: var(--ink);
    line-height: 28px;
}

.recipe-line-row .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 10px;
}

.stockin-line-row .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 10px;
}

.stockadjustment-line-row .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 10px;
}

.select2-dropdown {
    border: 1px solid rgba(191, 206, 227, 0.72);
    border-radius: 14px;
    overflow: hidden;
}

.select2-search--dropdown {
    padding: 10px;
}

.select2-search--dropdown .select2-search__field {
    border-radius: 10px;
}

.settings-inline-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

#tab-profile:checked ~ .settings-tabbar label[for="tab-profile"],
#tab-security:checked ~ .settings-tabbar label[for="tab-security"],
#tab-delete:checked ~ .settings-tabbar label[for="tab-delete"] {
    background: rgba(66, 118, 240, 0.12);
    border-color: rgba(66, 118, 240, 0.18);
    color: #3465dd;
}

#tab-profile:checked ~ .settings-panels .settings-panel-profile,
#tab-security:checked ~ .settings-panels .settings-panel-security,
#tab-delete:checked ~ .settings-panels .settings-panel-delete {
    display: grid;
}

#item-entry-form-tab:checked ~ .settings-tabbar label[for="item-entry-form-tab"],
#item-entry-bulk-tab:checked ~ .settings-tabbar label[for="item-entry-bulk-tab"] {
    background: rgba(66, 118, 240, 0.12);
    border-color: rgba(66, 118, 240, 0.18);
    color: #3465dd;
}

#item-entry-form-tab:checked ~ .item-entry-panels .item-entry-panel-form,
#item-entry-bulk-tab:checked ~ .item-entry-panels .item-entry-panel-bulk {
    display: grid;
}

.form-field {
    gap: 6px;
}

.form-field label,
.check-row {
    font-size: 0.82rem;
}

input,
textarea,
select {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.95rem;
}

.button.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pill-success {
    background: rgba(31, 122, 89, 0.12);
    color: var(--success);
}

.status-pill-warning {
    background: rgba(214, 161, 76, 0.18);
    color: #8c5f19;
}

.status-pill-muted {
    background: rgba(95, 109, 130, 0.12);
    color: #5f6d82;
}

.currentstock-search-row {
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 0.85fr)) auto;
}

.stock-detail-card {
    gap: 18px;
}

.stock-detail-head {
    align-items: flex-start;
}

.stock-detail-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-tile {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #d7e2f0;
    border-radius: 18px;
    background: #f8fbff;
}

.summary-tile-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c7192;
}

.summary-tile strong {
    font-size: 1rem;
    line-height: 1.3;
    color: #173258;
}

.stock-change-positive {
    font-weight: 700;
    color: #12724c;
}

.stock-change-negative {
    font-weight: 700;
    color: #c73c3c;
}

.empty-state {
    padding: 24px 12px;
    color: var(--muted);
    text-align: center;
}

.pagination-wrap,
.pagination-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pagination-wrap {
    margin-top: 18px;
}

.pagination-meta {
    color: var(--muted);
    font-size: 0.92rem;
}

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

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

.stat-card strong {
    margin: 14px 0 10px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.accent-amber {
    background: linear-gradient(145deg, rgba(255, 249, 241, 0.98), rgba(255, 238, 214, 0.86));
}

.accent-red {
    background: linear-gradient(145deg, rgba(255, 247, 244, 0.98), rgba(255, 229, 221, 0.86));
}

.accent-green {
    background: linear-gradient(145deg, rgba(245, 255, 251, 0.98), rgba(222, 245, 234, 0.86));
}

.list-table,
.timeline-list {
    display: grid;
    gap: 14px;
}

.list-row,
.timeline-item,
.feature-card {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(54, 38, 25, 0.08);
}

.surface-card,
.list-row,
.timeline-item,
.feature-card,
.page-heading,
.topbar-copy {
    min-width: 0;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.list-row span {
    white-space: nowrap;
    font-weight: 800;
    color: var(--brand);
}

.timeline-item strong,
.feature-card strong {
    margin-bottom: 8px;
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pill-warn {
    background: rgba(214, 161, 76, 0.16);
    color: #8c5f19;
}

.pill-ok {
    background: rgba(31, 122, 89, 0.12);
    color: var(--success);
}

.pill-danger {
    background: rgba(155, 44, 34, 0.12);
    color: var(--danger);
}

.danger-surface {
    border-color: rgba(155, 44, 34, 0.16);
    background: linear-gradient(145deg, rgba(255, 250, 248, 0.98), rgba(255, 238, 235, 0.9));
}

.nav-toggle,
.nav-close {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    padding: 0;
}

.nav-toggle span,
.nav-close span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
    border-radius: 999px;
}

.nav-close span:first-child {
    transform: translateY(3px) rotate(45deg);
}

.nav-close span:last-child {
    transform: translateY(-3px) rotate(-45deg);
}

.portal-overlay {
    display: none;
}

.floating-shortcut {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    display: grid;
    justify-items: end;
    gap: 14px;
}

.floating-shortcut-menu {
    width: min(300px, calc(100vw - 32px));
    padding: 16px;
    border: 1px solid rgba(191, 206, 227, 0.42);
    border-radius: 24px;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 22px 52px rgba(42, 56, 83, 0.18);
    backdrop-filter: blur(18px);
}

.floating-shortcut-menu[hidden] {
    display: none;
}

.floating-shortcut-head {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.floating-shortcut-head strong {
    font-family: "Fraunces", serif;
    font-size: 1rem;
    color: #1f2d43;
}

.floating-shortcut-head span,
.floating-shortcut-link span {
    color: #6d7c95;
    font-size: 0.82rem;
    line-height: 1.35;
}

.floating-shortcut-links {
    display: grid;
    gap: 10px;
}

.floating-shortcut-link {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid rgba(191, 206, 227, 0.42);
    border-radius: 16px;
    background: rgba(248, 251, 255, 0.82);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.floating-shortcut-link:hover {
    transform: translateY(-1px);
    border-color: rgba(66, 118, 240, 0.28);
    background: rgba(234, 241, 255, 0.72);
}

.floating-shortcut-link strong {
    font-size: 0.92rem;
    color: #20324d;
}

.floating-shortcut-toggle {
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(145deg, #73401f, #44200d);
    box-shadow: 0 18px 36px rgba(81, 33, 9, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #fff;
}

.floating-shortcut-toggle span {
    position: absolute;
    width: 24px;
    height: 2.5px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease;
}

.floating-shortcut-toggle span:last-child {
    transform: rotate(90deg);
}

.floating-shortcut.is-open .floating-shortcut-toggle span:first-child {
    transform: rotate(45deg);
}

.floating-shortcut.is-open .floating-shortcut-toggle span:last-child {
    transform: rotate(-45deg);
}

@media (max-width: 1180px) {
    .guest-shell:not(.guest-shell-simple) {
        grid-template-columns: 1fr;
    }

    .users-search-row,
    .items-search-row,
    .vendors-search-row,
    .recipes-search-row,
    .stockin-search-row,
    .stockallocation-search-row,
    .stockadjustment-search-row,
    .users-filter-grid,
    .users-page-grid,
    .form-grid-2,
    .form-grid-3,
    .form-grid-4,
    .filter-grid,
    .showcase-grid,
    .dashboard-grid,
    .content-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .form-field-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 960px) {
    .portal-shell {
        display: block;
    }

    .portal-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(292px, calc(100vw - 28px));
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        padding: 16px 14px 14px;
        box-shadow: 18px 0 38px rgba(22, 10, 4, 0.24);
    }

    .portal-body.nav-open .portal-sidebar {
        transform: translateX(0);
    }

    .portal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(20, 10, 4, 0.4);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
        z-index: 10;
    }

    .portal-body.nav-open .portal-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-toggle,
    .nav-close {
        display: inline-block;
    }

    .topbar-actions {
        gap: 10px;
    }

    .sidebar-panel {
        padding: 18px;
    }

    .portal-stage {
        margin-left: 0;
        padding: 12px;
    }

    .portal-topbar {
        padding: 12px 14px;
    }
}

@media (max-width: 720px) {
    .guest-panel,
    .portal-stage,
    .surface-card,
    .metric-card,
    .auth-card,
    .page-hero {
        padding: 14px;
    }

    .portal-topbar,
    .field-row,
    .section-head,
    .welcome-actions,
    .guest-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-main,
    .topbar-actions {
        width: 100%;
    }

    .topbar-actions {
        justify-content: stretch;
    }

    .topbar-date {
        display: none;
    }

    .topbar-user-menu,
    .topbar-profile {
        width: 100%;
    }

    .topbar-icon-button {
        justify-content: center;
    }

    .topbar-profile {
        min-width: 0;
    }

    .topbar-dropdown {
        left: 0;
        right: 0;
        min-width: 0;
    }

    .topbar-brand-logo {
        max-width: 1112px;
        max-height: 122px;
    }

    .notification-panel {
        inset: 0;
        width: 100vw;
        border-radius: 0;
        border: 0;
        transform: translateY(100%);
    }

    .portal-body.notification-open .notification-panel {
        transform: translateY(0);
    }

    .notification-panel-head,
    .notification-panel-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .sidebar-group-toggle {
        min-height: 40px;
    }

    .sidebar-link {
        min-height: 40px;
        padding: 10px 12px;
    }

    .sidebar-link span {
        font-size: 0.9rem;
    }

    .sidebar-link-sub {
        min-height: 34px;
        padding: 7px 10px 7px 20px;
    }

    .sidebar-link-sub span {
        font-size: 0.82rem;
    }

    .floating-shortcut {
        right: 16px;
        bottom: 16px;
    }

    .floating-shortcut-menu {
        width: min(280px, calc(100vw - 24px));
        padding: 14px;
        border-radius: 20px;
    }

    .floating-shortcut-toggle {
        width: 56px;
        height: 56px;
    }

    .page-heading h1 {
        font-size: 2rem;
    }

    .page-heading p,
    .sidebar-copy,
    .timeline-item p,
    .feature-card p,
    .list-row p {
        line-height: 1.55;
    }

    .button-row,
    .table-actions,
    .pagination-wrap,
    .pagination-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .users-search-actions {
        justify-content: stretch;
    }

    .settings-tabbar {
        align-items: stretch;
        flex-direction: column;
    }

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

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

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

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

    .list-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand-mark {
        gap: 10px;
    }

    .brand-mark-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .brand-mark-logo {
        max-width: 142px;
        max-height: 28px;
    }

    .auth-card-minimal {
        max-width: 100%;
        border-radius: 24px;
    }

    .users-summary-chips {
        width: 100%;
    }
}

@media (max-width: 560px) {
    body {
        background: linear-gradient(180deg, #f8f2e9 0%, #f2e8dc 100%);
    }

    .guest-panel-simple {
        padding: 16px;
    }

    .guest-panel::before {
        inset: 12px;
        border-radius: 24px;
    }

    .portal-stage,
    .surface-card,
    .metric-card,
    .auth-card,
    .page-hero {
        padding: 12px;
    }

    .portal-topbar {
        gap: 12px;
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-copy strong {
        font-size: 1rem;
    }

    .topbar-brand-icon {
        width: 30px;
        height: 30px;
        border-radius: 10px;
        padding: 5px;
    }

    .topbar-brand-logo {
        max-width: 1104px;
        max-height: 120px;
    }

    .currentstock-search-row,
    .stock-detail-summary {
        grid-template-columns: 1fr;
    }

    .sidebar-link,
    .list-row,
    .timeline-item,
    .feature-card {
        padding: 12px;
        border-radius: 16px;
    }

    .portal-table th,
    .portal-table td {
        padding: 10px;
    }
}

@media print {
    body {
        background: #fff;
    }

    .portal-shell,
    .portal-stage,
    .portal-content {
        display: block;
        padding: 0;
    }

    .portal-sidebar,
    .portal-overlay,
    .portal-topbar,
    .print-hidden,
    .dt-length,
    .dt-info,
    .dt-paging {
        display: none !important;
    }

    .surface-card,
    .users-table-card,
    .stock-detail-card {
        box-shadow: none;
        border: 1px solid #d0d7e2;
        background: #fff;
        padding: 12px;
    }

    .table-wrapper {
        overflow: visible;
    }

    .portal-table {
        min-width: 0;
    }
}
