:root {
    --bg: #f3f5f8;
    --bg-panel: #ffffff;
    --surface: #ffffff;
    --surface-muted: #fafaf9;
    --text: #07110d;
    --text-soft: #2f3633;
    --muted: #7a827f;
    --line: #e6e9ed;
    --line-strong: #d9dde3;
    --accent: #155bd5;
    --accent-dark: #0e45a7;
    --accent-soft: #eff6ff;
    --orange: #ef5b2a;
    --orange-soft: #fff1eb;
    --success: #15803d;
    --success-soft: #dcfce7;
    --warning: #d97706;
    --warning-soft: #fef3c7;
    --info: #1e40af;
    --info-soft: #dbeafe;
    --danger: #b91c1c;
    --danger-soft: #fee2e2;
    --radius-sm: 8px;
    --radius: 10px;
    --radius-lg: 12px;
    --shadow: 0 1px 2px rgba(7, 17, 13, 0.04), 0 20px 48px rgba(7, 17, 13, 0.04);
    --shadow-hover: 0 18px 42px rgba(7, 17, 13, 0.08);
    --font-heading: "Manrope", ui-sans-serif, system-ui, sans-serif;
    --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
}

body,
.public-body,
.app-body,
.role-pelanggan {
    background: var(--bg);
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.65rem;
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

h1 {
    font-size: clamp(1.75rem, 4vw, 3.4rem);
}

h2 {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

h3 {
    font-size: 1.08rem;
}

p {
    margin-top: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

a:hover {
    color: var(--accent-dark);
}

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

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    outline: none;
    padding: 0.78rem 0.85rem;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea {
    min-height: 112px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(21, 91, 213, 0.13);
}

code {
    border-radius: var(--radius-sm);
    background: #e7e5e4;
    padding: 0.12rem 0.35rem;
}

.container {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
}

.brand-logo {
    width: 220px;
    height: 56px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    object-fit: contain;
    padding: 0.16rem;
}

.eyebrow,
label span,
th,
.metadata-label {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow {
    margin: 0 0 0.5rem;
}

.muted {
    color: var(--muted);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(214, 211, 209, 0.78);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    padding: 0.85rem 1.4rem;
}

.brand,
.sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--text);
}

.brand:hover,
.sidebar-brand:hover {
    color: var(--text);
}

.brand > span,
.sidebar-brand .brand-copy {
    display: grid;
    min-width: 0;
}

.brand strong,
.sidebar-brand strong {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    line-height: 1.1;
}

.brand small,
.sidebar-brand small,
.user-card small {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: capitalize;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.nav-links a {
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    font-weight: 750;
    padding: 0.58rem 0.78rem;
}

.nav-links a:hover,
.nav-links a.active {
    border-color: rgba(21, 91, 213, 0.2);
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.site-footer,
.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer {
    width: min(1240px, calc(100% - 2rem));
    margin: 0 auto;
    border-top: 1px solid var(--line);
    padding: 1.4rem 0 2rem;
}

.panel,
.stat-card,
.product-card,
.hero-card,
.quick-action-card,
.shop-stat-card,
.shop-shortcut,
.shop-order-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel {
    margin-bottom: 1.15rem;
    padding: clamp(1rem, 2vw, 1.5rem);
}

.panel h1,
.panel h2,
.panel h3 {
    margin-top: 0;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.9rem;
}

.section-title h1,
.section-title h2,
.section-title h3 {
    margin: 0;
}

.grid {
    display: grid;
    gap: 1rem;
}

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

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

.grid-form-list {
    grid-template-columns: minmax(300px, 0.32fr) minmax(0, 0.68fr);
    align-items: start;
}

.grid-form-list > .panel:first-child {
    position: sticky;
    top: 92px;
    border-left: 4px solid var(--accent);
}

.grid-form-list > .panel:first-child h2::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    margin-top: 0.6rem;
    border-radius: 999px;
    background: var(--accent);
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    padding: 0.65rem 0.95rem;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:hover {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
    color: #fff;
    box-shadow: 0 10px 22px rgba(21, 91, 213, 0.16);
    transform: translateY(-1px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.button-secondary {
    border-color: var(--line-strong);
    background: #fff;
    color: var(--text);
}

.button-secondary:hover {
    border-color: rgba(21, 91, 213, 0.35);
    background: var(--accent-soft);
    color: var(--accent-dark);
    box-shadow: none;
}

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

.button-danger:hover {
    border-color: #991b1b;
    background: #991b1b;
}

.button-small {
    min-height: 34px;
    padding: 0.44rem 0.68rem;
    font-size: 0.84rem;
}

.hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(290px, 0.65fr);
    gap: 1.25rem;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: clamp(1.25rem, 4vw, 3rem);
    box-shadow: var(--shadow);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(21, 91, 213, 0.08) 0 1px, transparent 1px),
        linear-gradient(180deg, rgba(21, 91, 213, 0.06) 0 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.75), transparent 70%);
}

.hero > * {
    position: relative;
}

.hero h1 {
    max-width: 860px;
    margin: 0.15rem 0 1rem;
}

.hero p:not(.eyebrow) {
    max-width: 720px;
    color: var(--text-soft);
    font-size: 1.03rem;
}

.hero-actions,
.form-actions,
.actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.hero-card {
    display: grid;
    align-content: center;
    padding: 1.2rem;
    background: var(--surface-muted);
}

.demo-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.demo-list li {
    display: grid;
    gap: 0.15rem;
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 0.78rem;
}

.demo-list span {
    color: var(--muted);
}

.feature-card {
    min-height: 180px;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

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

.feature-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    margin-bottom: 0.9rem;
    place-items: center;
    border: 1px solid rgba(21, 91, 213, 0.2);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: var(--font-heading);
    font-weight: 900;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 180ms ease;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    height: 100vh;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: #1c1917;
    color: #e7e5e4;
    padding: 1rem 0.85rem;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    min-height: 64px;
    margin-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.9rem;
}

.sidebar-brand {
    min-width: 0;
    color: #fff;
}

.sidebar-brand .brand-logo {
    width: 162px;
    height: 44px;
    border: 0;
    padding: 0.14rem;
}

.sidebar-brand small {
    color: rgba(231, 229, 228, 0.68);
}

.brand-copy,
.nav-label {
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 160ms ease, width 160ms ease;
}

.topbar-menu {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.topbar-menu svg {
    width: 21px;
    height: 21px;
}

.topbar-menu:hover {
    border-color: rgba(21, 91, 213, 0.35);
    background: var(--accent-soft);
    color: var(--accent);
}

.sidebar-nav {
    display: grid;
    gap: 0.28rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: rgba(231, 229, 228, 0.76);
    font-weight: 760;
    padding: 0.46rem 0.5rem;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.sidebar-link:hover {
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    transform: translateX(2px);
}

.sidebar-link.active {
    border-color: rgba(21, 91, 213, 0.28);
    background: #292524;
    color: #fff;
}

.sidebar-link.danger {
    color: #fecaca;
}

.nav-icon {
    display: inline-grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.07);
    color: currentColor;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-link.active .nav-icon,
.stat-card .nav-icon,
.quick-action-card .nav-icon,
.shop-shortcut .nav-icon {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.sidebar-backdrop {
    display: none;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 86px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar {
    padding-inline: 0.7rem;
}

.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .nav-label {
    width: 0;
    opacity: 0;
}

.app-shell.sidebar-collapsed .sidebar-brand,
.app-shell.sidebar-collapsed .sidebar-link {
    justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-brand .brand-logo {
    width: 46px;
    object-position: left center;
}

.app-main {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 18;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    padding: 0.95rem 1.4rem;
}

.app-topbar h1 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.user-card {
    display: flex;
    min-width: 210px;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.05);
    padding: 0.62rem 0.75rem;
    text-align: left;
}

.user-card::before {
    content: attr(data-initial);
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: var(--font-heading);
    font-weight: 900;
}

.user-card > div,
.user-card-text {
    flex: 1;
    min-width: 0;
}

.user-card span {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-content {
    flex: 1;
    padding: 1.25rem 1.4rem 2rem;
}

.app-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding: 1rem 1.4rem 1.35rem;
}

.auth-container {
    display: grid;
    min-height: calc(100vh - 190px);
    place-items: center;
}

.auth-layout {
    display: grid;
    width: min(980px, 100%);
    min-height: 560px;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
}

.auth-brand-panel {
    display: grid;
    align-content: space-between;
    gap: 1rem;
    border-right: 1px solid var(--line);
    background: var(--surface-muted);
    padding: clamp(1.25rem, 3vw, 2rem);
}

.auth-brand-panel .brand-logo {
    width: min(260px, 100%);
    height: auto;
}

.auth-illustration {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.auth-illustration span {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-soft);
    font-weight: 760;
}

.auth-illustration span::before {
    content: "";
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 999px;
    background: var(--accent);
}

.auth-form-panel {
    display: grid;
    align-content: center;
    padding: clamp(1.25rem, 3vw, 2.2rem);
}

.auth-card,
.auth-card.wide {
    width: 100%;
}

.form-stack,
.form-grid {
    display: grid;
    gap: 0.9rem;
}

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

label span {
    display: block;
    margin-bottom: 0.35rem;
}

.span-2 {
    grid-column: 1 / -1;
}

.alert {
    margin-bottom: 1rem;
    border: 1px solid rgba(217, 119, 6, 0.28);
    border-radius: var(--radius-sm);
    background: var(--warning-soft);
    color: #92400e;
    padding: 0.85rem 1rem;
}

.alert-success {
    border-color: rgba(21, 128, 61, 0.24);
    background: var(--success-soft);
    color: var(--success);
}

.alert-danger {
    border-color: rgba(185, 28, 28, 0.24);
    background: var(--danger-soft);
    color: var(--danger);
}

.alert-warning {
    background: var(--warning-soft);
    color: #92400e;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.compact-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.stat-card {
    display: grid;
    gap: 0.9rem;
    min-height: 120px;
    padding: 1.1rem;
}

.stat-card-head {
    display: flex;
    align-items: center;
    gap: 0.72rem;
}

.stat-card .nav-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
}

.stat-card span {
    color: var(--muted);
    font-weight: 800;
}

.stat-card strong {
    align-self: end;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1;
}

.stat-link:hover,
.product-card:hover,
.quick-action-card:hover,
.shop-shortcut:hover,
.shop-order-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.dashboard-hero,
.shop-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow);
    padding: clamp(1.2rem, 3vw, 1.8rem);
}

.dashboard-hero {
    border-left: 4px solid var(--accent);
}

.owner-hero {
    border-left-color: var(--info);
}

.dashboard-hero h2,
.shop-hero h2 {
    max-width: 760px;
    margin: 0.1rem 0 0.6rem;
    font-size: clamp(1.45rem, 3vw, 2.4rem);
}

.dashboard-hero p:not(.eyebrow),
.shop-hero p:not(.eyebrow) {
    max-width: 720px;
    color: var(--text-soft);
}

.hero-metrics {
    display: grid;
    gap: 0.75rem;
}

.hero-metrics div {
    display: grid;
    align-content: center;
    gap: 0.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-muted);
    padding: 0.95rem;
}

.hero-metrics span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-metrics strong {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.28rem, 2vw, 1.95rem);
    line-height: 1.08;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.quick-action-card {
    display: grid;
    align-content: start;
    gap: 0.52rem;
    min-height: 150px;
    color: var(--text);
    padding: 1rem;
}

.quick-action-card .nav-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
}

.quick-action-card strong {
    color: var(--text);
    font-family: var(--font-heading);
}

.quick-action-card span:not(.nav-icon) {
    color: var(--muted);
    font-size: 0.9rem;
}

.catalog-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1rem;
    border-left: 4px solid var(--accent);
}

.filter-form,
.filter-form.compact,
.inline-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-form {
    justify-content: flex-end;
}

.filter-form.compact {
    justify-content: flex-start;
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-muted);
    padding: 0.75rem;
}

.catalog-header .filter-form.compact {
    margin-bottom: 0;
}

.filter-form input,
.filter-form select {
    width: auto;
    min-width: 190px;
}

.inline-form input {
    max-width: 120px;
}

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

.product-card {
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-image {
    display: grid;
    aspect-ratio: 16 / 9;
    place-items: center;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(28, 25, 23, 0.04) 0 1px, transparent 1px),
        linear-gradient(180deg, rgba(28, 25, 23, 0.04) 0 1px, transparent 1px),
        #f0efed;
    background-size: 26px 26px;
    color: var(--accent-dark);
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 900;
}

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

.product-body {
    display: grid;
    gap: 0.72rem;
    padding: 1rem;
}

.product-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.product-card-head .muted {
    font-size: 0.82rem;
    font-weight: 800;
}

.product-body h2 {
    margin: 0;
    font-size: 1.12rem;
}

.product-body p {
    min-height: 48px;
    margin: 0;
    color: var(--muted);
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.product-meta strong {
    color: var(--text);
    font-family: var(--font-heading);
}

.product-meta span {
    color: var(--muted);
    font-size: 0.88rem;
}

.pill {
    width: fit-content;
    border: 1px solid rgba(21, 91, 213, 0.16);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    padding: 0.23rem 0.5rem;
    text-transform: uppercase;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f6f4;
}

td {
    color: var(--text-soft);
    background: #fff;
}

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

tbody tr:hover td {
    background: var(--accent-soft);
}

td .form-stack {
    gap: 0.45rem;
}

td input,
td select,
td textarea {
    min-height: 34px;
    padding: 0.46rem 0.55rem;
    font-size: 0.86rem;
}

td textarea {
    min-height: 72px;
}

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

tfoot th {
    color: var(--text);
    font-size: 0.95rem;
}

.empty-state,
.shop-empty {
    padding: 2rem 1rem;
    color: var(--muted);
    text-align: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.24rem 0.52rem;
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
}

.badge-success {
    border-color: rgba(21, 128, 61, 0.16);
    background: var(--success-soft);
    color: var(--success);
}

.badge-info {
    border-color: rgba(30, 64, 175, 0.16);
    background: var(--info-soft);
    color: var(--info);
}

.badge-warning {
    border-color: rgba(217, 119, 6, 0.18);
    background: var(--warning-soft);
    color: #92400e;
}

.badge-danger {
    border-color: rgba(185, 28, 28, 0.18);
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-muted {
    border-color: var(--line-strong);
    background: #f5f5f4;
    color: var(--muted);
}

.detail-list {
    display: grid;
    gap: 0.7rem;
    margin: 0;
}

.detail-list div {
    display: grid;
    gap: 0.18rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.7rem;
}

.detail-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-list dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 0;
    color: var(--text-soft);
}

.total-preview {
    border: 1px solid rgba(21, 91, 213, 0.18);
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--accent-dark);
    padding: 0.95rem;
}

.report-header {
    text-align: center;
}

.report-header h1 {
    font-size: clamp(1.35rem, 2.8vw, 2rem);
}

.report-chart {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.chart-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 96px;
    gap: 0.75rem;
    align-items: center;
}

.chart-label,
.chart-value {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.chart-value {
    text-align: right;
}

.chart-track {
    overflow: hidden;
    height: 10px;
    border-radius: 999px;
    background: #e7e5e4;
}

.chart-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.stepper {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

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

.stepper-item {
    position: relative;
    display: grid;
    gap: 0.4rem;
    justify-items: center;
    color: var(--muted);
    text-align: center;
}

.stepper-item::before {
    content: "";
    position: absolute;
    top: 16px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--line-strong);
}

.stepper-item:first-child::before {
    display: none;
}

.stepper-dot {
    position: relative;
    z-index: 1;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 2px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.stepper-item.done,
.stepper-item.active {
    color: var(--text);
}

.stepper-item.done::before,
.stepper-item.active::before {
    background: var(--accent);
}

.stepper-item.done .stepper-dot,
.stepper-item.active .stepper-dot {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.stepper-failed .stepper-item.active .stepper-dot {
    border-color: var(--danger);
    background: var(--danger);
}

.stepper-failed .stepper-item.active {
    color: var(--danger);
}

.table-tracking {
    display: grid;
    gap: 0.6rem;
    min-width: 320px;
}

.table-tracking .stepper {
    margin: 0;
    gap: 0.25rem;
}

.table-tracking .stepper-item {
    font-size: 0.72rem;
}

.table-tracking .stepper-dot {
    width: 24px;
    height: 24px;
    font-size: 0.68rem;
}

.table-tracking .stepper-item::before {
    top: 12px;
}

.payment-upload-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(260px, 0.55fr);
    gap: 1rem;
    align-items: start;
}

.upload-preview {
    display: grid;
    min-height: 220px;
    place-items: center;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-muted);
    color: var(--muted);
    padding: 1rem;
    text-align: center;
}

.upload-preview img {
    max-height: 260px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.profile-shell {
    display: grid;
    grid-template-columns: minmax(260px, 0.34fr) minmax(0, 0.66fr);
    gap: 1rem;
    align-items: start;
}

.profile-card {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    text-align: center;
}

.profile-avatar {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: var(--radius-lg);
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    overflow: hidden;
}

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

.shop-dashboard {
    display: grid;
    gap: 1rem;
}

.shop-hero {
    border-left: 4px solid var(--accent);
}

.shop-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.shop-stat-grid,
.shop-shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.shop-stat-card {
    display: grid;
    gap: 0.38rem;
    min-height: 104px;
    border-top: 3px solid var(--accent);
    padding: 1rem;
}

.shop-stat-card span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.shop-stat-card strong {
    align-self: end;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2vw, 1.8rem);
    line-height: 1;
}

.shop-shortcut {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    color: var(--text);
    padding: 1rem 0.8rem;
    text-align: center;
}

.shop-shortcut .nav-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}

.shop-shortcut strong {
    color: var(--text);
    font-family: var(--font-heading);
}

.shop-shortcut span:not(.nav-icon) {
    color: var(--muted);
    font-size: 0.84rem;
}

.shop-orders-panel {
    margin-top: 1rem;
}

.shop-order-list {
    display: grid;
    gap: 0.8rem;
}

.shop-order-card {
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.shop-order-head,
.shop-order-product,
.shop-order-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.92rem 1rem;
}

.shop-order-head {
    border-bottom: 1px solid var(--line);
}

.shop-order-head strong,
.shop-order-product strong {
    display: block;
    color: var(--text);
}

.shop-order-head span,
.shop-order-product span,
.shop-order-footer > span {
    color: var(--muted);
    font-size: 0.9rem;
}

.shop-order-product {
    justify-content: flex-start;
}

.shop-product-thumb {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
}

.shop-order-footer {
    border-top: 1px solid var(--line);
    background: var(--surface-muted);
}

.shop-order-footer strong {
    color: var(--text);
}

.shop-empty {
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-muted);
}

.shop-empty h3,
.shop-empty p {
    margin: 0;
}

.page-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1rem;
    overflow: hidden;
    border-left: 4px solid var(--accent);
    padding: clamp(1.15rem, 3vw, 1.8rem);
}

.page-hero::after,
.procurement-card::after,
.editor-drawer::after {
    content: "";
    position: absolute;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(28, 25, 23, 0.045) 0 1px, transparent 1px),
        linear-gradient(180deg, rgba(28, 25, 23, 0.04) 0 1px, transparent 1px);
    background-size: 28px 28px;
}

.page-hero::after {
    inset: 0 0 auto auto;
    width: min(340px, 45%);
    height: 100%;
    opacity: 0.7;
    mask-image: linear-gradient(90deg, transparent, #000);
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    max-width: 780px;
    margin-bottom: 0.45rem;
    font-size: clamp(1.55rem, 3vw, 2.55rem);
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin-bottom: 0;
}

.page-hero-meta,
.page-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.page-hero-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-soft);
    font-size: 0.86rem;
    font-weight: 800;
    padding: 0.46rem 0.68rem;
    box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.page-hero-meta strong {
    margin-right: 0.25rem;
    color: var(--accent-dark);
    font-family: var(--font-heading);
}

.home-hero {
    min-height: 520px;
}

.hero-copy {
    display: grid;
    align-content: center;
}

.hero-copy .hero-actions {
    margin-top: 0.35rem;
}

.hero-stat-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    max-width: 700px;
    margin-top: 1.5rem;
}

.hero-stat-strip div {
    display: grid;
    gap: 0.12rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    padding: 0.82rem 0.9rem;
}

.hero-stat-strip span,
.process-strip span,
.auth-demo-box span {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-stat-strip strong {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1rem;
}

.procurement-card {
    position: relative;
    overflow: hidden;
    border-top: 3px solid var(--accent);
}

.procurement-card::after {
    right: -48px;
    bottom: -48px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    opacity: 0.8;
}

.process-strip {
    position: relative;
    z-index: 1;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.process-strip span {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    color: var(--text-soft);
    padding: 0.65rem 0.75rem;
}

.industry-grid {
    align-items: stretch;
}

.auth-brand-copy p:not(.eyebrow) {
    color: var(--text-soft);
}

.auth-demo-box {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-muted);
    padding: 0.85rem;
}

.auth-demo-box p {
    margin: 0.25rem 0 0;
    color: var(--text-soft);
}

.catalog-shell {
    display: grid;
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.catalog-filter-card,
.editor-drawer {
    position: sticky;
    top: 92px;
}

.catalog-filter-card {
    display: grid;
    gap: 1rem;
}

.filter-card-head h2 {
    margin-bottom: 0;
}

.filter-form label {
    display: block;
    min-width: 190px;
}

.filter-form label input,
.filter-form label select {
    width: 100%;
}

.filter-form.filter-form-vertical {
    display: grid;
    align-items: stretch;
    justify-content: stretch;
    gap: 0.85rem;
    margin-bottom: 0;
}

.filter-form.filter-form-vertical input,
.filter-form.filter-form-vertical select,
.filter-form.filter-form-vertical .button {
    width: 100%;
}

.filter-chip-list {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 1rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-soft);
    font-size: 0.8rem;
    font-weight: 850;
    padding: 0.4rem 0.62rem;
}

.filter-chip:hover,
.filter-chip.active {
    border-color: rgba(21, 91, 213, 0.32);
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.product-card-head,
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.metadata-code {
    color: var(--muted);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.stock-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 850;
    padding: 0.28rem 0.5rem;
    white-space: nowrap;
}

.stock-low {
    border-color: rgba(217, 119, 6, 0.22);
    background: var(--warning-soft);
    color: #92400e;
}

.admin-crud-shell,
.page-customers .page-hero + .grid-form-list {
    align-items: start;
}

.editor-drawer,
.page-customers .page-hero + .grid-form-list > .panel:first-child {
    overflow: hidden;
    border-top: 3px solid var(--accent);
}

.editor-drawer::after {
    inset: auto -30px -60px auto;
    width: 160px;
    height: 160px;
    opacity: 0.5;
}

.data-panel,
.page-customers .page-hero + .grid-form-list > .panel:nth-child(2),
.page-payments main > .panel:not(.page-hero),
.page-shipping main > .panel:not(.page-hero) {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.table-toolbar,
.table-toolbar-panel {
    margin-bottom: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-muted);
    padding: 0.75rem;
}

.table-toolbar .filter-form.compact,
.table-toolbar-panel .filter-form.compact {
    margin-bottom: 0;
}

.table-cell-main {
    display: grid;
    gap: 0.16rem;
    min-width: 180px;
}

.table-cell-main strong {
    color: var(--text);
}

.table-cell-main span {
    color: var(--muted);
    font-size: 0.84rem;
}

.action-cell {
    min-width: 230px;
}

.action-cell form,
.actions form {
    margin: 0;
}

.status-update-form {
    flex-wrap: nowrap;
}

.status-update-form select {
    min-width: 190px;
}

.stock-update-form {
    flex-wrap: nowrap;
}

.page-payments td .form-stack,
.page-shipping td .form-stack {
    min-width: 220px;
    gap: 0.45rem;
}

.page-payments td textarea,
.page-shipping td textarea {
    min-height: 72px;
}

.critical-stock-panel {
    border-left: 4px solid var(--warning);
}

.critical-stock-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}

.critical-stock-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-muted);
    padding: 0.82rem;
}

.critical-stock-item div {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.critical-stock-item strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-empty {
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-muted);
    padding: 1.25rem;
}

.order-create-grid {
    align-items: start;
}

.selected-product-panel {
    display: grid;
    gap: 1rem;
}

.selected-product-thumb {
    display: grid;
    min-height: 190px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(28, 25, 23, 0.045) 0 1px, transparent 1px),
        linear-gradient(180deg, rgba(28, 25, 23, 0.045) 0 1px, transparent 1px),
        var(--surface-muted);
    background-size: 30px 30px;
    overflow: hidden;
}

.selected-product-thumb img {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
}

.selected-product-thumb span {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: var(--radius-lg);
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
}

.order-form-panel .section-title {
    align-items: start;
}

.payment-hero {
    border-left-color: var(--info);
}

.upload-card {
    border-top: 3px solid var(--info);
}

.file-drop {
    display: grid;
    gap: 0.45rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-muted);
    padding: 1rem;
}

.file-drop input {
    background: #fff;
}

.file-drop small {
    color: var(--muted);
    font-size: 0.84rem;
}

.upload-preview embed {
    width: 100%;
    min-height: 260px;
    border: 0;
    border-radius: var(--radius-sm);
    background: #fff;
}

.order-progress-panel,
.shipping-progress-panel {
    overflow: hidden;
}

.report-page-hero {
    border-left-color: var(--info);
}

.report-chart-panel .section-title {
    border-bottom: 0;
}

.narrow-panel {
    max-width: 620px;
}

/* Reference redesign: landing page and admin dashboard treatment */
body {
    color: var(--text);
    font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
.button,
.nav-links a,
.sidebar-link,
.user-card span,
th {
    font-family: var(--font-heading);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(21, 91, 213, 0.12);
}

.button {
    min-height: 48px;
    border-color: var(--accent);
    border-radius: 10px;
    background: var(--accent);
    box-shadow: 0 12px 24px rgba(21, 91, 213, 0.14);
    font-size: 0.96rem;
    letter-spacing: -0.01em;
    padding: 0.72rem 1.1rem;
}

.button:hover {
    border-color: var(--accent-dark);
    background: var(--accent-dark);
    box-shadow: 0 16px 28px rgba(21, 91, 213, 0.18);
}

.button-secondary {
    border-color: var(--line-strong);
    background: #fff;
    color: var(--text);
    box-shadow: none;
}

.button-secondary:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.button-small {
    min-height: 38px;
    border-radius: 9px;
    font-size: 0.84rem;
    padding: 0.5rem 0.75rem;
}

.panel,
.stat-card,
.product-card,
.hero-card,
.quick-action-card,
.shop-stat-card,
.shop-shortcut,
.shop-order-card {
    border-color: var(--line);
    border-radius: 24px;
    box-shadow: none;
}

.panel {
    padding: clamp(1.15rem, 2vw, 1.7rem);
}

.section-title {
    border-bottom-color: var(--line);
}

.section-title h2,
.section-title h3 {
    font-size: clamp(1.24rem, 2vw, 1.65rem);
    letter-spacing: -0.04em;
}

.badge {
    border-radius: 9px;
    font-family: var(--font-heading);
    font-size: 0.79rem;
    font-weight: 800;
    padding: 0.34rem 0.7rem;
}

.site-header {
    height: 80px;
    border-bottom: 1px solid rgba(7, 17, 13, 0.08);
    background: rgba(255, 255, 255, 0.96);
    padding: 0 16.8vw;
}

.site-header .brand-logo {
    width: 74px;
    height: 40px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.brand strong,
.sidebar-brand strong {
    font-size: 1.04rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand small,
.sidebar-brand small {
    color: var(--muted);
    font-weight: 600;
}

.nav-links {
    gap: 1.05rem;
}

.nav-links a {
    border-radius: 10px;
    color: #26302c;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.7rem 0.2rem;
}

.nav-links a:hover,
.nav-links a.active {
    border-color: transparent;
    background: transparent;
    color: #07110d;
}

.nav-links a:last-child {
    min-width: 148px;
    border-color: #101828;
    background: #101828;
    color: #fff;
    justify-content: center;
    padding: 0.72rem 1.2rem;
}

.nav-links a:last-child:hover,
.nav-links a:last-child.active {
    background: #050a14;
    color: #fff;
}

.page-home .container {
    width: 100%;
    padding: 0;
}

.page-home .site-footer {
    width: 100%;
    margin: 0;
    border-top-color: rgba(255, 255, 255, 0.1);
    background: #101828;
    color: rgba(255, 255, 255, 0.72);
    padding-inline: max(1.5rem, 16.8vw);
}

.page-home .home-hero {
    display: grid;
    min-height: calc(100vh - 80px);
    grid-template-columns: minmax(0, 0.75fr) minmax(320px, 0.5fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(90deg, rgba(16, 24, 40, 0.96) 0%, rgba(16, 24, 40, 0.83) 34%, rgba(16, 24, 40, 0.54) 72%, rgba(16, 24, 40, 0.34) 100%),
        linear-gradient(122deg, transparent 0 42%, rgba(255, 255, 255, 0.13) 42.1% 42.6%, transparent 42.8% 100%),
        linear-gradient(105deg, transparent 0 61%, rgba(255, 255, 255, 0.09) 61.2% 62%, transparent 62.2% 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 2px, transparent 2px 76px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 70px),
        #111827;
    background-position: center;
    box-shadow: none;
    padding: clamp(3rem, 8vw, 8rem) max(1.5rem, 16.8vw);
}

.page-home .home-hero::before {
    inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.16), transparent 12rem),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px);
    background-size: auto, 34px 34px, 34px 34px;
    mask-image: none;
    opacity: 1;
}

.page-home .home-hero::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: 58%;
    pointer-events: none;
    background:
        linear-gradient(72deg, transparent 0 32%, rgba(255, 255, 255, 0.16) 32.2% 32.9%, transparent 33.2% 100%),
        repeating-linear-gradient(90deg, transparent 0 58px, rgba(255, 255, 255, 0.12) 58px 62px, transparent 62px 118px),
        repeating-linear-gradient(0deg, transparent 0 70px, rgba(255, 255, 255, 0.09) 70px 74px, transparent 74px 140px);
    opacity: 0.56;
}

.page-home .hero-copy {
    min-width: 0;
}

.page-home .hero-copy .eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 1.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 0.62rem 1rem;
    text-transform: none;
}

.page-home .hero h1 {
    max-width: 720px;
    color: #fff;
    font-size: clamp(3.2rem, 5.6vw, 5.7rem);
    font-weight: 900;
    letter-spacing: -0.065em;
    line-height: 0.96;
}

.page-home .hero p:not(.eyebrow) {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    line-height: 1.5;
}

.page-home .hero-actions {
    gap: 1rem;
    margin-top: 1.8rem;
}

.page-home .hero-actions .button {
    min-width: 220px;
    border-color: #fff;
    background: #fff;
    color: #111827;
    box-shadow: none;
}

.page-home .hero-actions .button-secondary {
    border-color: rgba(255, 255, 255, 0.82);
    background: transparent;
    color: #fff;
}

.page-home .hero-actions .button:hover {
    transform: translateY(-2px);
}

.page-home .hero-stat-strip {
    max-width: 720px;
    margin-top: 3rem;
}

.page-home .hero-stat-strip div {
    border: 0;
    background: transparent;
    padding: 0;
}

.page-home .hero-stat-strip span {
    color: rgba(255, 255, 255, 0.66);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.page-home .hero-stat-strip strong {
    color: #fff;
    font-size: clamp(1.85rem, 3vw, 2.55rem);
    font-weight: 900;
}

.page-home .procurement-card {
    align-self: end;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    backdrop-filter: blur(14px);
}

.page-home .procurement-card h2,
.page-home .procurement-card .eyebrow {
    color: #fff;
}

.page-home .procurement-card .muted,
.page-home .demo-list span {
    color: rgba(255, 255, 255, 0.68);
}

.page-home .demo-list li {
    border-color: rgba(255, 255, 255, 0.14);
    border-left-color: var(--orange);
    background: rgba(255, 255, 255, 0.08);
}

.page-home .process-strip {
    margin-top: 1rem;
    border-top-color: rgba(255, 255, 255, 0.16);
}

.page-home .process-strip span {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
}

.page-home .industry-grid {
    width: min(1240px, calc(100% - 2rem));
    margin: 2rem auto 3rem;
}

.app-body {
    min-height: 100vh;
    background:
        linear-gradient(120deg, transparent 0 42%, rgba(255, 255, 255, 0.18) 42.1% 51%, transparent 51.2% 100%),
        linear-gradient(118deg, transparent 0 75%, rgba(255, 255, 255, 0.22) 75.1% 83%, transparent 83.2% 100%),
        #cfd5df;
    padding: clamp(1rem, 4.9vw, 5rem);
}

.app-shell {
    grid-template-columns: 330px minmax(0, 1fr);
    min-height: min(1080px, calc(100vh - clamp(2rem, 9.8vw, 10rem)));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.08);
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 96px minmax(0, 1fr);
}

.sidebar {
    position: relative;
    height: auto;
    border-right: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    padding: 2rem 1.7rem;
}

.sidebar-head {
    min-height: 74px;
    margin-bottom: 1.45rem;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.3rem;
}

.sidebar-brand {
    color: var(--text);
}

.sidebar-brand:hover {
    color: var(--text);
}

.sidebar-brand .brand-logo {
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 18px;
    padding: 0;
    object-fit: cover;
}

.sidebar-brand small {
    color: var(--muted);
}

.topbar-menu {
    border-color: var(--line);
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(7, 17, 13, 0.04);
}

.topbar-menu:hover {
    border-color: var(--line-strong);
    background: #f8fafc;
    color: var(--accent);
}

.sidebar-nav {
    gap: 0.72rem;
}

.sidebar-link {
    min-height: 56px;
    gap: 0.8rem;
    border-color: transparent;
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    padding: 0.65rem 0.88rem;
}

.sidebar-link:hover {
    border-color: var(--line);
    background: #f8fafc;
    color: var(--text);
    transform: none;
}

.sidebar-link.active {
    border-color: var(--line);
    background: #f6f6f6;
    color: var(--text);
}

.sidebar-link.danger {
    color: var(--text);
}

.nav-icon,
.sidebar-link.active .nav-icon,
.stat-card .nav-icon,
.quick-action-card .nav-icon,
.shop-shortcut .nav-icon {
    border-radius: 10px;
    background: transparent;
    color: currentColor;
}

.sidebar-link.active .nav-icon {
    color: var(--text);
}

.app-main {
    min-height: 0;
    background: #fff;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 126px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    padding: 1.9rem 2.1rem 1.25rem;
}

.app-topbar > div:not(.topbar-tools) .eyebrow {
    display: none;
}

.app-topbar h1 {
    color: var(--text);
    font-size: clamp(1.7rem, 2.4vw, 2.15rem);
    font-weight: 900;
    letter-spacing: -0.055em;
}

.topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    margin-left: auto;
}

.topbar-search {
    display: flex;
    min-width: min(360px, 28vw);
    height: 54px;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--muted);
    padding: 0 0.9rem;
}

.topbar-search:focus-within {
    border-color: var(--accent);
}

.topbar-search .ui-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.topbar-search input[type="search"] {
    flex: 1;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    font-size: 1rem;
}

.topbar-search input[type="search"]:focus {
    outline: none;
    box-shadow: none;
}

.topbar-dropdown {
    position: relative;
}

.dropdown-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    display: none;
    width: max-content;
    min-width: 220px;
    max-width: min(360px, calc(100vw - 2rem));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.topbar-dropdown.open .dropdown-panel {
    display: block;
    animation: dropdown-in 0.16s ease;
}

@keyframes dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

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

.notif-panel {
    width: 340px;
    max-width: calc(100vw - 2rem);
}

.notif-panel .dropdown-head,
.profile-panel .dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
}

.notif-panel .dropdown-head span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.notif-item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 1rem;
    text-decoration: none;
}

.notif-item:last-of-type {
    border-bottom: 0;
}

.notif-item:hover {
    background: #f8fafc;
}

.notif-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.notif-dot.tone-success {
    background: #16a34a;
}

.notif-dot.tone-warning {
    background: #d97706;
}

.notif-dot.tone-danger {
    background: #e11d48;
}

.notif-text {
    min-width: 0;
}

.notif-text strong {
    display: block;
    color: var(--text);
    font-size: 0.92rem;
}

.notif-text p {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.notif-empty {
    margin: 0;
    padding: 1.1rem 1rem;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

.profile-panel {
    min-width: 210px;
}

.dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.78rem 1rem;
    color: var(--text);
    font-size: 0.93rem;
    font-weight: 600;
    text-decoration: none;
}

.dropdown-menu-item:hover {
    background: #f8fafc;
}

.dropdown-menu-item.danger {
    color: #b91c1c;
}

.dropdown-menu-item .ui-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.auth-alt-action {
    margin: 0.9rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    text-align: center;
}

.auth-alt-action a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.reset-link-box {
    display: grid;
    gap: 0.3rem;
    border: 1px solid rgba(21, 91, 213, 0.35);
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    padding: 0.75rem 0.9rem;
    font-size: 0.86rem;
}

.reset-link-box a {
    overflow-wrap: anywhere;
    color: var(--accent-dark);
    font-weight: 700;
}

.reset-link-box small {
    color: var(--muted);
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 200px;
}

.product-thumb {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    object-fit: cover;
}

.product-thumb-empty {
    display: inline-grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-family: var(--font-heading);
    font-weight: 900;
}

.proof-thumb {
    width: 64px;
    height: 64px;
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    object-fit: cover;
}

.form-image-preview {
    width: 100%;
    max-width: 180px;
    margin-top: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    object-fit: cover;
}

.field-hint {
    display: block;
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.78rem;
}

.topbar-icon-button {
    display: inline-grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.topbar-icon-button .nav-icon {
    width: 22px;
    height: 22px;
}

.topbar-icon-button .nav-icon svg {
    width: 21px;
    height: 21px;
}

.user-card {
    min-width: 0;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    padding: 0;
    cursor: pointer;
}

button.user-card {
    appearance: none;
    font: inherit;
}

.user-card .ui-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--muted);
}

.user-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.user-card::before,
.profile-avatar {
    border-radius: 14px;
    background: linear-gradient(135deg, #e8f2ff, #78d4e8);
    color: #08335f;
}

.app-content {
    width: 100%;
    padding: 1.9rem 2.1rem 2rem;
}

.app-footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 1rem 2.1rem 1.5rem;
}

.dashboard-hero,
.shop-hero,
.page-hero {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: none;
}

.dashboard-hero,
.shop-hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
    border-left: 0;
    padding: clamp(1.4rem, 2.2vw, 2rem);
}

.dashboard-hero h2,
.shop-hero h2,
.page-hero h1 {
    font-weight: 900;
    letter-spacing: -0.06em;
}

.dashboard-hero p:not(.eyebrow),
.shop-hero p:not(.eyebrow),
.page-hero p:not(.eyebrow) {
    color: var(--muted);
    font-size: 1rem;
}

.hero-metrics {
    grid-template-columns: 1fr;
}

.hero-metrics div,
.page-hero-meta span {
    border-color: var(--line);
    border-radius: 14px;
    background: #f9fafb;
}

.hero-metrics strong,
.page-hero-meta strong {
    color: var(--text);
}

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

.stat-card,
.quick-action-card,
.shop-stat-card,
.shop-shortcut,
.shop-order-card,
.product-card {
    transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.stat-card {
    min-height: 142px;
    border-radius: 22px;
    padding: 1.25rem;
}

.stat-card span,
.shop-stat-card span {
    color: var(--muted);
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.stat-card strong {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 900;
    letter-spacing: -0.055em;
}

.stat-card .nav-icon,
.quick-action-card .nav-icon,
.shop-shortcut .nav-icon {
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
}

.quick-action-grid,
.shop-shortcut-grid {
    gap: 1rem;
}

.quick-action-card {
    min-height: 168px;
    border-radius: 22px;
    padding: 1.25rem;
}

.quick-action-card:hover,
.stat-link:hover,
.product-card:hover,
.shop-shortcut:hover,
.shop-order-card:hover {
    border-color: #cfd7e3;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.critical-stock-panel {
    border-left: 0;
}

.critical-stock-item {
    border-radius: 18px;
    background: #f9fafb;
}

.catalog-shell {
    grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
    gap: 1.2rem;
}

.catalog-filter-card,
.editor-drawer {
    top: 150px;
}

.catalog-filter-card,
.editor-drawer,
.page-customers .page-hero + .grid-form-list > .panel:first-child {
    border-top: 0;
    border-radius: 24px;
}

.filter-chip,
.stock-chip,
.metadata-code {
    border-radius: 999px;
}

.filter-chip.active,
.filter-chip:hover {
    border-color: rgba(21, 91, 213, 0.24);
    background: var(--accent-soft);
    color: var(--accent);
}

.product-grid {
    gap: 1.2rem;
}

.product-card {
    border-radius: 24px;
}

.product-image {
    background:
        linear-gradient(135deg, rgba(21, 91, 213, 0.1), rgba(239, 91, 42, 0.08)),
        repeating-linear-gradient(90deg, rgba(7, 17, 13, 0.04) 0 1px, transparent 1px 28px),
        #f5f7fa;
}

.product-body {
    padding: 1.15rem;
}

.pill {
    border-color: rgba(21, 91, 213, 0.16);
    background: var(--accent-soft);
    color: var(--accent);
}

.table-wrap {
    border-color: var(--line);
    border-radius: 18px;
}

table {
    min-width: 860px;
}

th {
    background: #f7f7f7;
    color: #6d7672;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
}

th,
td {
    padding: 1rem 1.05rem;
}

td {
    color: var(--text-soft);
}

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

tbody tr:hover td {
    background: #f8fbff;
}

.table-toolbar,
.table-toolbar-panel {
    border-color: var(--line);
    border-radius: 18px;
    background: #f9fafb;
}

.filter-form.compact input,
.filter-form.compact select,
.inline-form input,
.inline-form select,
.form-stack input,
.form-stack select,
.form-stack textarea,
.form-grid input,
.form-grid select,
.form-grid textarea {
    border-radius: 10px;
}

.chart-track {
    height: 13px;
    background: #eef1f5;
}

.chart-bar {
    background: linear-gradient(90deg, var(--orange), var(--accent));
}

.stepper-item::before,
.stepper-item.done::before,
.stepper-item.active::before {
    height: 3px;
}

.stepper-dot {
    width: 40px;
    height: 40px;
    border-color: #dfe3e8;
    font-family: var(--font-heading);
}

.stepper-item.done .stepper-dot,
.stepper-item.active .stepper-dot {
    border-color: var(--accent);
    background: var(--accent);
}

.upload-preview,
.file-drop,
.selected-product-thumb {
    border-radius: 20px;
}

.profile-shell {
    grid-template-columns: minmax(280px, 0.36fr) minmax(0, 0.64fr);
}

.profile-card {
    border-radius: 24px;
}

.auth-container {
    min-height: calc(100vh - 80px);
}

.auth-layout {
    width: min(1120px, 100%);
    border-radius: 28px;
}

.auth-brand-panel {
    background:
        linear-gradient(145deg, rgba(16, 24, 40, 0.92), rgba(16, 24, 40, 0.78)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 52px),
        #111827;
    color: #fff;
}

.auth-brand-panel h2,
.auth-brand-panel .eyebrow {
    color: #fff;
}

.auth-brand-copy p:not(.eyebrow),
.auth-illustration span {
    color: rgba(255, 255, 255, 0.72);
}

.auth-illustration span::before {
    background: var(--orange);
}

.page-login {
    --login-navy: #0a1730;
    --login-navy-soft: #122443;
    --login-orange: #e85c2a;
    background: var(--login-navy);
}

.page-login .site-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    background: var(--login-navy);
}

.page-login .site-header .brand-logo {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.96);
}

.page-login .nav-links a {
    color: rgba(255, 255, 255, 0.62);
}

.page-login .nav-links a:hover,
.page-login .nav-links a.active {
    color: #fff;
}

.page-login .auth-container {
    min-height: calc(100vh - 146px);
    padding: clamp(1.5rem, 5vh, 4.5rem) 0;
}

.page-login .auth-login-layout {
    width: min(1120px, 100%);
    min-height: 625px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    background: #f4f1ea;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.page-login .auth-brand-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.13);
    background-color: var(--login-navy-soft);
    background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.page-login .auth-brand-panel::before {
    position: absolute;
    inset: 1.25rem;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    content: "";
    pointer-events: none;
}

.page-login .auth-brand-panel::after {
    position: absolute;
    right: -44px;
    bottom: 84px;
    z-index: -1;
    width: 150px;
    height: 150px;
    border: 18px solid rgba(232, 92, 42, 0.88);
    content: "";
    transform: rotate(45deg);
}

.page-login .auth-brand-top,
.page-login .auth-brand-copy,
.page-login .auth-illustration,
.page-login .auth-brand-footer {
    position: relative;
    z-index: 1;
}

.page-login .auth-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.page-login .auth-brand-top .brand-logo {
    width: 190px;
    height: 48px;
    border-radius: 6px;
}

.page-login .auth-brand-copy {
    align-self: center;
    max-width: 440px;
}

.page-login .auth-kicker {
    margin-bottom: 1rem;
    color: var(--login-orange);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.page-login .auth-brand-copy h2 {
    max-width: 420px;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.03;
}

.page-login .auth-brand-copy p:not(.auth-kicker) {
    max-width: 390px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.98rem;
}

.page-login .auth-illustration {
    gap: 0;
    margin-top: 0;
}

.page-login .auth-illustration span {
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    padding: 0.72rem 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.page-login .auth-illustration span:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.page-login .auth-illustration span::before {
    width: 5px;
    height: 18px;
    flex-basis: 5px;
    border-radius: 0;
    background: var(--login-orange);
}

.page-login .auth-brand-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.36);
    font-family: var(--font-heading);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.page-login .auth-form-panel {
    align-content: center;
    background: #f4f1ea;
    padding: clamp(1.5rem, 5vw, 4.5rem);
}

.page-login .auth-card {
    width: min(420px, 100%);
    margin: 0 auto;
}

.page-login .auth-form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.6rem;
}

.page-login .auth-form-meta .eyebrow {
    margin: 0;
    color: var(--login-orange);
}

.page-login .auth-form-meta > span {
    color: #697386;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-login .auth-form-meta i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 0.3rem;
    border-radius: 999px;
    background: #2d9b63;
    box-shadow: 0 0 0 3px rgba(45, 155, 99, 0.12);
}

.page-login .auth-card h1 {
    max-width: 330px;
    color: var(--login-navy);
    font-size: clamp(2rem, 4vw, 2.7rem);
}

.page-login .auth-form-lead {
    max-width: 350px;
    margin-bottom: 2rem;
    color: #697386;
}

.page-login .auth-form-panel label span {
    color: var(--login-navy);
}

.page-login .auth-form-panel input {
    border-color: #d8d5ce;
    background: rgba(255, 255, 255, 0.55);
}

.page-login .auth-form-panel input:focus {
    border-color: var(--login-orange);
    box-shadow: 0 0 0 3px rgba(232, 92, 42, 0.14);
}

.page-login .auth-submit-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 0.35rem;
    border-color: var(--login-orange);
    background: var(--login-orange);
    box-shadow: 0 10px 22px rgba(232, 92, 42, 0.2);
}

.page-login .auth-submit-button:hover {
    border-color: #c94a1e;
    background: #c94a1e;
    box-shadow: 0 13px 26px rgba(232, 92, 42, 0.25);
}

.page-login .auth-submit-button span {
    color: #fff;
    font-size: 1.2rem;
}

.page-login .auth-alt-action a {
    color: var(--login-navy);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-login .auth-security-note {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 2.5rem;
    border-top: 1px solid #dedbd4;
    padding-top: 1rem;
    color: #7c8491;
    font-size: 0.76rem;
}

.page-login .auth-lock-mark {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid #c9c5bc;
    border-radius: 50%;
    color: var(--login-orange);
    font-size: 0.85rem;
    font-weight: 900;
}

.page-login .site-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
    background: var(--login-navy);
    color: rgba(255, 255, 255, 0.42);
}

/* Final reference pass: tighter edges, cleaner type, closer to supplied mockups */
:root {
    --page-gutter: clamp(18px, 4vw, 72px);
    --admin-gutter: clamp(14px, 2.2vw, 36px);
}

body {
    font-size: 15.5px;
    line-height: 1.58;
    letter-spacing: -0.006em;
}

h1,
h2,
h3,
h4 {
    font-weight: 850;
    letter-spacing: -0.04em;
}

h1 {
    font-size: clamp(2.2rem, 4.2vw, 4.65rem);
}

h2 {
    font-size: clamp(1.45rem, 2.1vw, 2.15rem);
}

h3 {
    font-size: clamp(1rem, 1.15vw, 1.22rem);
}

p {
    color: var(--text-soft);
}

.container {
    width: min(100% - calc(var(--page-gutter) * 2), 1680px);
    padding: 1.35rem 0 2.5rem;
}

.eyebrow,
label span,
th,
.metadata-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.site-header {
    height: 80px;
    padding: 0 var(--page-gutter);
}

.site-header .brand {
    min-width: 220px;
}

.site-header .brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    object-fit: cover;
}

.brand strong,
.sidebar-brand strong {
    font-size: 1.02rem;
    font-weight: 850;
    letter-spacing: -0.035em;
}

.nav-links {
    flex: 1;
    justify-content: center;
    gap: clamp(1rem, 2.2vw, 2.6rem);
}

.nav-links a {
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.nav-links a:nth-last-child(2) {
    margin-left: auto;
}

.nav-links a:last-child {
    flex: 0 0 auto;
    min-width: 138px;
    border-radius: 10px;
}

.page-home .home-hero {
    min-height: calc(100vh - 80px);
    grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.46fr);
    gap: clamp(1.8rem, 4vw, 4.5rem);
    padding: clamp(3rem, 6vw, 7rem) var(--page-gutter);
}

.page-home .hero h1 {
    max-width: 760px;
    font-size: clamp(3rem, 5.4vw, 5.4rem);
    letter-spacing: -0.058em;
}

.page-home .hero p:not(.eyebrow) {
    max-width: 690px;
    font-size: clamp(1.02rem, 1.25vw, 1.24rem);
}

.page-home .hero-actions .button {
    min-width: 190px;
    min-height: 58px;
    border-radius: 10px;
    font-size: 0.96rem;
}

.page-home .hero-stat-strip {
    max-width: 680px;
}

.page-home .hero-stat-strip strong {
    font-size: clamp(1.65rem, 2.7vw, 2.35rem);
    letter-spacing: -0.045em;
}

.page-home .procurement-card {
    align-self: center;
    max-width: 430px;
    margin-left: auto;
}

.page-home .process-strip {
    max-width: 100%;
}

.company-section {
    display: grid;
    width: min(100% - calc(var(--page-gutter) * 2), 1680px);
    margin: 0 auto;
    grid-template-columns: minmax(280px, 0.38fr) minmax(0, 0.62fr);
    gap: clamp(1rem, 2.2vw, 2rem);
    align-items: start;
    padding: 2.4rem 0 0;
}

.company-copy {
    position: sticky;
    top: 102px;
    padding-right: clamp(0rem, 2vw, 2.5rem);
}

.company-copy h2,
.vision-panel h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.8rem, 3vw, 3.2rem);
    line-height: 1.02;
}

.company-copy p:not(.eyebrow),
.vision-panel p,
.mission-list {
    max-width: 760px;
    color: var(--text-soft);
    font-size: 1rem;
}

.company-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.company-card-grid .feature-card {
    min-height: 250px;
}

.company-vision-section {
    grid-template-columns: minmax(0, 0.48fr) minmax(0, 0.52fr);
    padding-bottom: 3rem;
}

.vision-panel,
.mission-panel {
    min-height: 100%;
}

.mission-list {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.mission-list li {
    position: relative;
    border-bottom: 1px solid var(--line);
    padding: 0 0 0.85rem 1.35rem;
}

.mission-list li::before {
    content: "";
    position: absolute;
    top: 0.62rem;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
}

.mission-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.app-body {
    padding: var(--admin-gutter);
}

.app-shell {
    width: 100%;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: calc(100vh - calc(var(--admin-gutter) * 2));
    border-radius: 24px;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 92px minmax(0, 1fr);
}

.sidebar {
    padding: 1.55rem 1.35rem;
}

.sidebar-head {
    margin-bottom: 1.2rem;
    padding-bottom: 1.1rem;
}

.sidebar-link {
    min-height: 52px;
    font-size: 0.98rem;
    font-weight: 650;
    letter-spacing: -0.018em;
}

.app-topbar {
    min-height: 104px;
    padding: 1.35rem 1.65rem 1rem;
}

.app-topbar h1 {
    font-size: clamp(1.55rem, 2vw, 2rem);
    letter-spacing: -0.045em;
}

.topbar-search {
    min-width: min(340px, 28vw);
    height: 50px;
}

.topbar-icon-button {
    width: 50px;
    height: 50px;
}

.app-content {
    width: 100%;
    padding: 1.5rem 1.65rem 2rem;
}

.dashboard-hero,
.shop-hero,
.page-hero,
.panel,
.stat-card,
.product-card,
.hero-card,
.quick-action-card,
.shop-stat-card,
.shop-shortcut,
.shop-order-card {
    border-radius: 20px;
}

.dashboard-hero,
.shop-hero,
.page-hero {
    padding: clamp(1.15rem, 1.8vw, 1.7rem);
}

.dashboard-hero h2,
.shop-hero h2,
.page-hero h1 {
    letter-spacing: -0.045em;
}

.stats-grid,
.quick-action-grid,
.shop-stat-grid,
.shop-shortcut-grid,
.product-grid {
    gap: 1rem;
}

.stat-card strong,
.shop-stat-card strong {
    letter-spacing: -0.04em;
}

th,
td {
    padding: 0.88rem 1rem;
}

th {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
}

td,
.table-cell-main span,
.muted {
    color: var(--muted);
}

.table-cell-main strong,
td strong,
.product-body h2,
.quick-action-card strong,
.shop-shortcut strong {
    color: var(--text);
}

input,
select,
textarea {
    min-height: 46px;
    border-radius: 10px;
    padding: 0.72rem 0.85rem;
}

.button {
    min-height: 46px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

/* Admin dashboard layout mirroring reference mockup */
.sidebar-brand .brand-logo {
    border-radius: 50%;
}

.dash-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dash-period {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-period span {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.dash-period strong {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 48px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 750;
    padding: 0.55rem 1rem;
}

.dash-period strong::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid var(--muted);
    border-radius: 3px;
}

.dash-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.56fr) minmax(0, 1.44fr);
    gap: 1.2rem;
    align-items: stretch;
    margin-bottom: 1.2rem;
}

.dash-grid-bottom {
    grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.92fr);
}

.kpi-card {
    display: grid;
    align-content: stretch;
    padding: 0.35rem 1.4rem;
}

.kpi-block {
    display: grid;
    align-content: center;
    gap: 0.4rem;
    border-bottom: 1px solid var(--line);
    padding: 1.1rem 0;
}

.kpi-block:last-child {
    border-bottom: 0;
}

.kpi-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.kpi-label {
    color: var(--text-soft);
    font-size: 0.98rem;
    font-weight: 650;
}

.kpi-badge {
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.3rem 0.65rem;
}

.kpi-badge.tone-success {
    background: #e7f6ec;
    color: #157347;
}

.kpi-badge.tone-info {
    background: #e9f1ff;
    color: #1d6ff2;
}

.kpi-badge.tone-warn {
    background: #fdf1e2;
    color: #b45309;
}

.kpi-value {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 2.2vw, 2.05rem);
    font-weight: 900;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.kpi-caption {
    color: var(--muted);
    font-size: 0.85rem;
}

.kpi-spark {
    width: 132px;
    height: 42px;
    margin-top: 0.2rem;
}

.chart-card {
    display: grid;
    gap: 1rem;
}

.chart-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
}

.chart-card-head h2 {
    margin: 0;
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
    font-weight: 850;
    letter-spacing: -0.04em;
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.chart-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--text-soft);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
}

.chart-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 3px;
    background: var(--accent);
}

.kebab {
    display: inline-grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.kebab::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted);
    box-shadow: 0 -6px 0 var(--muted), 0 6px 0 var(--muted);
}

.bar-chart {
    display: flex;
    align-items: stretch;
    gap: clamp(0.5rem, 1.6vw, 1.4rem);
    padding: 0.4rem 0.2rem 0;
}

.bar-col {
    display: grid;
    flex: 1;
    grid-template-rows: 1fr auto;
    gap: 0.5rem;
    justify-items: center;
}

.bar-area {
    display: flex;
    width: 100%;
    height: 250px;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    background: repeating-linear-gradient(to top, rgba(7, 17, 13, 0.045) 0 1px, transparent 1px 25%);
}

.bar {
    width: clamp(13px, 1.6vw, 22px);
    border-radius: 8px 8px 3px 3px;
}

.bar-sales {
    background: linear-gradient(180deg, #f2926b, #fdeee6);
}

.bar-orders {
    background: linear-gradient(180deg, #2f7bf6, #dce9ff);
}

.bar-day {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.table-card {
    padding-bottom: 0.5rem;
}

.table-card .table-wrap {
    border: 0;
    border-radius: 0;
}

.donut-card {
    display: grid;
    gap: 1.1rem;
    align-content: start;
}

.donut {
    position: relative;
    display: grid;
    width: min(232px, 82%);
    aspect-ratio: 1;
    margin: 0.4rem auto;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0 calc(var(--done, 0) * 1%), var(--orange) calc(var(--done, 0) * 1%) 100%);
}

.donut::before {
    content: "";
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    background: #fff;
}

.donut-center {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.1rem;
    justify-items: center;
}

.donut-center strong {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.donut-center span {
    color: var(--muted);
    font-size: 0.85rem;
}

.donut-legend {
    display: grid;
    gap: 0.7rem;
}

.legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
    font-size: 0.92rem;
    padding-bottom: 0.7rem;
}

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

.legend-row strong {
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 850;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 0.55rem;
    border-radius: 4px;
    vertical-align: -1px;
}

.dot-blue {
    background: var(--accent);
}

.dot-orange {
    background: var(--orange);
}

.dot-gray {
    background: #d7dde5;
}

@media (max-width: 1060px) {
    .dash-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .dash-toolbar-actions {
        width: 100%;
    }

    .dash-toolbar-actions .button {
        flex: 1;
    }

    .dash-grid,
    .dash-grid-bottom {
        grid-template-columns: 1fr;
    }

    .bar-area {
        height: 190px;
    }
}

@media (max-width: 760px) {
    .bar-area {
        height: 150px;
    }

    .bar {
        width: 11px;
    }

    .dash-period {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 1060px) {
    .app-body {
        padding: 0;
    }

    .app-shell,
    .app-shell.sidebar-collapsed {
        display: block;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .sidebar {
        position: fixed;
        left: 0;
        height: 100vh;
        width: min(320px, calc(100% - 2rem));
        transform: translateX(-105%);
        transition: transform 180ms ease;
    }

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

    .app-shell.sidebar-collapsed .brand-copy,
    .app-shell.sidebar-collapsed .nav-label {
        width: auto;
        opacity: 1;
    }

    .app-shell.sidebar-collapsed .sidebar-brand,
    .app-shell.sidebar-collapsed .sidebar-link {
        justify-content: flex-start;
    }

    .app-shell.sidebar-open .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        border: 0;
        background: rgba(28, 25, 23, 0.46);
    }

    .site-header,
    .app-topbar {
        align-items: flex-start;
    }

    .site-header {
        flex-direction: column;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .hero,
    .page-hero,
    .dashboard-hero,
    .shop-hero,
    .catalog-shell,
    .catalog-header,
    .grid-form-list,
    .profile-shell,
    .payment-upload-panel {
        grid-template-columns: 1fr;
    }

    .catalog-filter-card,
    .editor-drawer {
        position: static;
    }

    .stats-grid,
    .product-grid,
    .quick-action-grid,
    .shop-stat-grid,
    .shop-shortcut-grid,
    .critical-stock-grid,
    .process-strip,
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-hero-actions {
        justify-content: flex-start;
    }

    .topbar-tools {
        gap: 0.55rem;
    }

    .topbar-search {
        display: none;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 14px;
    }

    .brand-logo {
        width: min(220px, 72vw);
        height: auto;
        min-height: 48px;
    }

    .sidebar-brand .brand-logo {
        width: 180px;
        height: 46px;
    }

    .container,
    .app-content {
        width: min(100% - 1rem, 1240px);
        padding-top: 0.85rem;
    }

    .site-header,
    .app-topbar {
        padding: 0.85rem;
    }

    .site-header {
        height: auto;
    }

    .page-home .home-hero {
        min-height: auto;
        padding: 3.2rem 1rem;
    }

    .page-home .hero h1 {
        font-size: clamp(2.45rem, 16vw, 4rem);
    }

    .page-home .hero-actions .button {
        width: 100%;
        min-width: 0;
    }

    .page-home .procurement-card {
        align-self: stretch;
    }

    .app-topbar {
        display: grid;
        grid-template-columns: auto 1fr;
        min-height: 0;
    }

    .topbar-tools {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: space-between;
    }

    .topbar-icon-button {
        width: 44px;
        height: 44px;
    }

    .topbar-dropdown {
        display: flex;
        flex: 1;
        min-width: 0;
    }

    .topbar-dropdown .dropdown-panel {
        left: 0;
        right: auto;
    }

    .user-card {
        width: 100%;
        min-width: 0;
    }

    .hero,
    .dashboard-hero,
    .shop-hero,
    .auth-layout {
        border-radius: var(--radius-lg);
    }

    .grid-2,
    .stats-grid,
    .compact-stats,
    .hero-stat-strip,
    .process-strip,
    .critical-stock-grid,
    .product-grid,
    .quick-action-grid,
    .shop-stat-grid,
    .shop-shortcut-grid,
    .grid-3,
    .form-grid,
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .filter-form,
    .filter-form.compact,
    .inline-form,
    .page-hero-meta,
    .page-hero-actions,
    .table-toolbar,
    .section-title,
    .site-footer,
    .app-footer,
    .product-meta,
    .shop-order-head,
    .shop-order-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-form input,
    .filter-form select,
    .filter-form label,
    .inline-form input,
    .filter-form .button,
    .page-hero-meta,
    .page-hero-meta span,
    .page-hero-actions,
    .page-hero-actions .button,
    .shop-hero-actions,
    .shop-hero-actions .button,
    .shop-order-footer .button,
    .shop-order-footer .actions {
        width: 100%;
        max-width: none;
    }

    .action-cell,
    .status-update-form select,
    .page-payments td .form-stack,
    .page-shipping td .form-stack {
        min-width: 0;
    }

    .panel {
        padding: 1rem;
    }

    .shop-order-product {
        align-items: flex-start;
    }

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

    .stepper-item {
        grid-template-columns: 34px 1fr;
        justify-items: start;
        text-align: left;
    }

    .stepper-item::before {
        top: -50%;
        left: 16px;
        width: 2px;
        height: 100%;
    }

    .chart-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .chart-value {
        text-align: left;
    }
}

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

    .site-header,
    .sidebar,
    .app-topbar,
    .site-footer,
    .app-footer,
    .print-hidden,
    .button,
    .actions,
    form {
        display: none !important;
    }

    .app-shell {
        display: block;
    }

    .container,
    .app-content {
        width: 100%;
        padding: 0;
    }

    .panel,
    .stat-card,
    .product-card {
        border-color: #ccc;
        box-shadow: none;
        break-inside: avoid;
    }

    .table-wrap {
        border: 0;
        overflow: visible;
    }

    table {
        min-width: 0;
    }
}

/* AdminLTE-style full-bleed application frame: no outer gray gutter */
.app-body {
    padding: 0;
    background: #f4f6f9;
}

.app-shell {
    grid-template-columns: 288px minmax(0, 1fr);
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 92px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--line);
}

.app-main {
    min-height: 100vh;
    background: #f4f6f9;
}

.app-topbar {
    min-height: 88px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    padding: 1.05rem 1.65rem;
}

.app-content {
    background: #f4f6f9;
}

.app-footer {
    background: #f4f6f9;
}

/* Logo lockup: wide logo only, no adjacent wordmark, always fully visible */
.site-header .brand {
    min-width: 0;
}

.brand-logo {
    width: auto;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    object-fit: contain;
    padding: 5px 10px;
}

.site-header .brand-logo {
    width: auto;
    max-width: 100%;
    height: 46px;
    border-radius: 10px;
    object-fit: contain;
}

.sidebar-brand {
    justify-content: flex-start;
}

.sidebar-brand .brand-logo {
    width: auto;
    max-width: 100%;
    height: 46px;
    border-radius: 10px;
    object-fit: contain;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 116px minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar {
    padding-inline: 0.7rem;
}

.app-shell.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}

.app-shell.sidebar-collapsed .sidebar-brand .brand-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    padding: 3px 4px;
}

.auth-brand-panel .brand-logo {
    width: auto;
    max-width: 100%;
    height: 60px;
}

@media (max-width: 760px) {
    .brand-logo,
    .site-header .brand-logo,
    .sidebar-brand .brand-logo {
        height: 40px;
    }
}

/* Centered flash modal popups */
.flash-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-content: center;
    gap: 0.8rem;
    background: rgba(7, 17, 13, 0.46);
    backdrop-filter: blur(3px);
    padding: 1.5rem;
    animation: flashFade 180ms ease;
}

.flash-modal {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    width: min(430px, calc(100vw - 2rem));
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(7, 17, 13, 0.2);
    padding: 1.1rem 1.15rem;
    animation: flashPop 200ms ease;
}

.flash-modal.alert-success,
.flash-modal.alert-danger,
.flash-modal.alert-warning,
.flash-modal.alert {
    background: #fff;
}

.flash-modal.alert-success {
    border-color: rgba(21, 128, 61, 0.28);
}

.flash-modal.alert-danger {
    border-color: rgba(185, 28, 28, 0.28);
}

.flash-modal.alert-warning {
    border-color: rgba(217, 119, 6, 0.3);
}

.flash-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 999px;
}

.flash-icon svg {
    width: 21px;
    height: 21px;
}

.flash-success .flash-icon,
.flash-modal.alert-success .flash-icon {
    background: #e7f6ec;
    color: #157347;
}

.flash-danger .flash-icon,
.flash-modal.alert-danger .flash-icon {
    background: #fdeaea;
    color: #b91c1c;
}

.flash-warning .flash-icon,
.flash-modal.alert-warning .flash-icon {
    background: #fdf1e2;
    color: #b45309;
}

.flash-info .flash-icon,
.flash-modal.alert .flash-icon {
    background: #e9f1ff;
    color: #1d6ff2;
}

.flash-body {
    min-width: 0;
    flex: 1;
}

.flash-body strong {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.flash-body p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.flash-close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
    padding: 0 0.15rem;
    transition: color 150ms ease;
}

.flash-close:hover {
    color: var(--text);
}

.flash-overlay.flash-hide {
    animation: flashFadeOut 180ms ease forwards;
}

.flash-overlay.flash-hide .flash-modal {
    animation: flashPopOut 180ms ease forwards;
}

body.modal-open {
    overflow: hidden;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(7px);
    padding: 1rem;
}

.modal-panel {
    width: min(620px, 100%);
    max-height: min(760px, calc(100vh - 2rem));
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.3);
    padding: clamp(1.15rem, 3vw, 1.75rem);
    animation: modalIn 180ms ease;
}

.modal-panel-large {
    width: min(840px, 100%);
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.modal-head h2 {
    margin-bottom: 0.25rem;
}

.modal-head p:not(.eyebrow) {
    margin-bottom: 0;
}

.modal-close {
    display: inline-grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-muted);
    color: var(--text-soft);
    cursor: pointer;
    font-size: 1.45rem;
    line-height: 1;
}

.modal-close:hover {
    border-color: var(--accent);
    color: var(--accent-dark);
}

.modal-form {
    margin-bottom: 0;
}

.dropdown-menu-form {
    margin: 0;
}

.dropdown-menu-form .dropdown-menu-item {
    width: 100%;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.admin-table-card {
    border-top: 3px solid var(--accent);
}

.page-customers .grid-form-list > .panel:first-child,
.page-categories .grid-form-list > .panel:first-child {
    display: none;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
}

@keyframes flashFade {
    from {
        opacity: 0;
    }
}

@keyframes flashPop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
}

@keyframes flashFadeOut {
    to {
        opacity: 0;
    }
}

@keyframes flashPopOut {
    to {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
}

@media print {
    .flash-overlay {
        display: none !important;
    }
}

@media (max-width: 760px) {
    .page-login .auth-container {
        min-height: auto;
        padding: 0.8rem 0 1.5rem;
    }

    .page-login .auth-login-layout {
        min-height: 0;
        border-radius: 14px;
    }

    .page-login .auth-brand-panel {
        min-height: 440px;
        border-bottom-color: rgba(255, 255, 255, 0.13);
        padding: 1.35rem;
    }

    .page-login .auth-brand-panel::before {
        inset: 0.8rem;
    }

    .page-login .auth-brand-top .brand-logo {
        width: 165px;
        height: 42px;
    }

    .page-login .auth-brand-copy h2 {
        font-size: clamp(2rem, 11vw, 2.75rem);
    }

    .page-login .auth-brand-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }

    .page-login .auth-form-panel {
        padding: 2rem 1.35rem 2.2rem;
    }

    .page-login .auth-form-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
        margin-bottom: 2rem;
    }

    .page-login .auth-security-note {
        margin-top: 2rem;
    }
}

/* Mobile layout overrides. Keep the desktop frame unchanged. */
@media (max-width: 1060px) {
    .app-shell,
    .app-shell.sidebar-collapsed {
        display: block;
        min-height: 100vh;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 40;
        width: min(300px, calc(100vw - 2rem));
        height: 100vh;
        max-height: 100vh;
        transform: translateX(-105%);
    }

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

    .app-main {
        width: 100%;
        min-width: 0;
    }

    .app-topbar {
        min-height: 76px;
        padding: 0.85rem 1rem;
    }

    .app-content {
        width: 100%;
        min-width: 0;
        padding: 1rem;
    }

    .app-footer {
        padding: 1rem;
    }

    .topbar-search {
        display: none;
    }

    .hero,
    .dashboard-hero,
    .shop-hero,
    .page-hero,
    .catalog-shell,
    .catalog-header,
    .grid-form-list,
    .profile-shell,
    .payment-upload-panel {
        grid-template-columns: minmax(0, 1fr);
    }

    .page-home .home-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .catalog-filter-card,
    .editor-drawer {
        position: static;
    }

    .company-section {
        grid-template-columns: minmax(0, 1fr);
    }

    .company-copy {
        position: static;
        padding-right: 0;
    }
}

@media (max-width: 760px) {
    html,
    body {
        overflow-x: hidden;
    }

    .site-header {
        align-items: stretch;
        gap: 0.7rem;
        padding: 0.75rem;
    }

    .site-header .brand {
        max-width: 100%;
    }

    .site-header .brand-logo {
        max-width: min(220px, 100%);
    }

    .nav-links {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .nav-links a,
    .nav-links a:last-child {
        min-width: 0;
        margin-left: 0;
        padding: 0.58rem 0.45rem;
        text-align: center;
    }

    .app-topbar {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .app-topbar h1 {
        overflow-wrap: anywhere;
        font-size: clamp(1.25rem, 7vw, 1.65rem);
    }

    .topbar-tools {
        gap: 0.45rem;
    }

    .user-card-text {
        overflow: hidden;
    }

    .user-card-text > span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .container,
    .app-content {
        width: 100%;
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .dashboard-hero,
    .shop-hero,
    .page-hero,
    .panel,
    .auth-layout,
    .product-card,
    .shop-order-card {
        border-radius: 16px;
    }

    .dashboard-hero,
    .shop-hero,
    .page-hero {
        padding: 1rem;
    }

    .page-hero h1,
    .dashboard-hero h2,
    .shop-hero h2 {
        overflow-wrap: anywhere;
    }

    .company-section,
    .company-vision-section {
        width: min(100% - 1.5rem, 1680px);
        gap: 1rem;
        padding-top: 1.5rem;
    }

    .company-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .company-vision-section {
        padding-bottom: 1.5rem;
    }

    .form-actions,
    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .form-actions > .button,
    .form-actions > a.button,
    .actions > .button,
    .actions > form {
        width: 100%;
        max-width: none;
    }

    .product-card-head,
    .chart-card-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .product-card-head .metadata-code {
        overflow-wrap: anywhere;
    }

    .shop-order-head > div,
    .shop-order-product > div {
        min-width: 0;
    }

    .shop-order-product strong,
    .shop-order-product span {
        overflow-wrap: anywhere;
    }

    .modal-backdrop {
        align-items: flex-start;
        padding: 0.5rem;
    }

    .modal-panel {
        max-height: calc(100vh - 1rem);
        border-radius: 16px;
        padding: 1rem;
    }

    .flash-overlay {
        padding: 0.75rem;
    }

    .flash-modal {
        width: min(430px, calc(100vw - 1.5rem));
        padding: 0.9rem;
    }
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 3.25rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    display: inline-grid;
    width: 2.25rem;
    height: 2.25rem;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 160ms ease, color 160ms ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: var(--accent-soft);
    color: var(--accent);
    outline: none;
}

.password-toggle svg {
    width: 1.15rem;
    height: 1.15rem;
}
