:root {
    --bg: #f4f7fb;
    --bg-soft: #eef3f9;
    --panel: #ffffff;
    --panel-soft: #f8fbff;
    --text: #18212f;
    --muted: #64748b;
    --line: #dbe4f0;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --success: #0f766e;
    --success-soft: #ccfbf1;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.05);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: Aptos, "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

body.mobile-panel-open {
    overflow: hidden;
}

body.submit-loading {
    cursor: progress;
}

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

button,
input,
select {
    font: inherit;
}

.auth-shell {
    min-height: 100vh;
}

.guest-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.guest-main {
    width: min(1120px, 100%);
}

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

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100vh;
    padding: 24px 20px;
    background: #f8fbff;
    border-right: 1px solid var(--line);
}

.sidebar-brand,
.brand-link,
.profile-badge,
.topbar,
.topbar-primary,
.section-head,
.data-table-meta,
.table-pager,
.table-actions,
.action-row {
    display: flex;
    align-items: center;
}

.sidebar-brand,
.section-head,
.data-table-meta,
.action-row {
    justify-content: space-between;
}

.section-head-wrap {
    flex-wrap: wrap;
    gap: 16px;
}

.brand-link {
    gap: 14px;
}

.brand-logo,
.profile-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-weight: 800;
}

.brand-logo {
    background: linear-gradient(135deg, var(--primary), #60a5fa);
    color: #fff;
}

.profile-avatar {
    background: var(--primary-soft);
    color: var(--primary);
}

.brand-link strong,
.profile-badge strong {
    display: block;
}

.brand-link small,
.profile-badge small,
.topbar-user small {
    color: var(--muted);
}

.sidebar-close,
.menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.menu-btn {
    flex-direction: column;
    gap: 4px;
}

.menu-btn span {
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: var(--text);
}

.sidebar-search,
.toolbar-card,
.info-card,
.hero-card,
.form-box,
.table-card,
.login-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.sidebar-search,
.toolbar-card {
    border-radius: var(--radius-lg);
    padding: 16px;
}

.search-label,
label,
.topbar-kicker,
.eyebrow,
.info-kicker,
.nav-caption {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
}

.search-input,
input,
select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
input:focus,
select:focus {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.is-hidden {
    display: none !important;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-menu-group {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.75);
    
}

.sidebar-menu-trigger,
.sidebar-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #334155;
}

.sidebar-menu-trigger {
    justify-content: space-between;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    border-radius: 0;
}

.sidebar-menu-trigger::-webkit-details-marker {
    display: none;
}

.sidebar-menu-trigger::after {
    content: ">";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--muted);
    font-size: 14px;
    transform: rotate(0deg);
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-menu-group[open] .sidebar-menu-trigger::after {
    transform: rotate(90deg);
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.25);
}

.sidebar-submenu {
    display: grid;
    gap: 6px;
    padding: 0 10px 10px;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px 10px 18px;
    border-radius: 12px;
    color: #475569;
    font-size: 0.96rem;
}

.sidebar-sublink::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-right: 10px;
    border-radius: 999px;
    background: #cbd5e1;
    flex: 0 0 auto;
}

.sidebar-link:hover,
.sidebar-link.is-active,
.sidebar-menu-trigger:hover,
.sidebar-menu-trigger.is-active,
.sidebar-sublink:hover,
.sidebar-sublink.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}

.sidebar-sublink.is-active::before,
.sidebar-sublink:hover::before {
    background: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 16px;
}

.profile-badge {
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: var(--panel);
    border: 1px solid var(--line);
}

.main-shell {
    min-width: 0;
    padding: 18px 20px;
}

.topbar {
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.topbar-primary {
    gap: 12px;
    min-width: 0;
}

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

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

h2,
h3 {
    line-height: 1.3;
}

.topbar-title {
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
    line-height: 1.2;
}

.topbar-actions,
.topbar-user,
.stats-inline,
.hero-actions,
.toolbar-grid,
.quick-grid,
.master-grid {
    display: grid;
}

.topbar-actions {
    grid-auto-flow: column;
    align-items: center;
    gap: 10px;
}

.topbar-dropdown {
    position: relative;
}

.topbar-user {
    gap: 2px;
    justify-items: start;
}

.page-content {
    display: grid;
    gap: 16px;
}

.status-banner {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid rgba(15, 118, 110, 0.16);
    font-weight: 700;
}

.guest-status {
    margin-bottom: 20px;
}

.toolbar-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.hero-card,
.form-box,
.table-card,
.info-card,
.login-panel {
    border-radius: var(--radius-xl);
    padding: 18px 20px;
}

.hero-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.98));
}

.hero-card.compact {
    padding-bottom: 18px;
}

.hero-text,
.form-text,
.info-card p,
.empty-state p,
.list-text {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.quick-grid,
.master-grid {
    gap: 16px;
}

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

.hero-actions {
    grid-auto-flow: row;
    gap: 10px;
    margin-top: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
}

.btn:hover {
    filter: brightness(1.03);
}

.btn:disabled,
button:disabled,
input:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-secondary {
    background: #eff6ff;
    color: var(--primary);
    border: 1px solid #bfdbfe;
}

.btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.btn-block {
    width: 100%;
}

.btn-small {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 0.88rem;
}

form {
    margin: 0;
}

form .btn,
form .action-row,
form .table-actions {
    margin-top: 16px;
}

.dip-chart-box {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-soft);
}

.dip-chart-head {
    gap: 16px;
    margin-bottom: 18px;
}

.dip-chart-head h3 {
    margin: 0;
    font-size: 1rem;
}

.dip-chart-list {
    display: grid;
    gap: 16px;
}

.dip-chart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 88px;
    gap: 14px;
    align-items: end;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}

.dip-chart-actions {
    display: grid;
    gap: 8px;
}

.dip-chart-remove-btn {
    width: 48px;
    height: 48px;
}

.optional-group {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel-soft);
    overflow: hidden;
}

.optional-group summary {
    padding: 14px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
    color: #334155;
    list-style: none;
}

.optional-group summary::after {
    content: ">";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #64748b;
    font-size: 14px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.optional-group summary::-webkit-details-marker {
    display: none;
}

.optional-group[open] summary {
    border-bottom: 1px solid var(--line);
}

.optional-group[open] summary::after {
    transform: rotate(90deg);
    color: var(--brand);
    border-color: rgba(20, 184, 166, 0.35);
}

.optional-group > :not(summary) {
    margin-left: 16px;
    margin-right: 16px;
}

.optional-group > label:first-of-type {
    margin-top: 16px;
}

.optional-group > .error:last-of-type,
.optional-group > input:last-of-type,
.optional-group > select:last-of-type {
    margin-bottom: 16px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 8px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
}

.checkbox-card input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.checkbox-card span {
    margin: 0;
    color: #334155;
    font-weight: 600;
    font-size: 0.92rem;
}

label {
    margin-top: 12px;
    color: #334155;
}

label:first-of-type {
    margin-top: 0;
}

.error {
    margin: 6px 0 2px;
    color: var(--danger);
    font-size: 0.92rem;
}

.section-count {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

.stats-inline {
    grid-auto-flow: column;
    gap: 10px;
}

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

.inline-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-controls > :first-child {
    flex: 1 1 auto;
}

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.data-table th,
.data-table td {
    padding: 11px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background: #f8fbff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.status-pill.active {
    background: var(--success-soft);
    color: var(--success);
}

.status-pill.inactive {
    background: var(--danger-soft);
    color: var(--danger);
}

.submit-loader {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(3px);
}

.submit-loader.is-visible {
    display: flex;
}

.submit-loader-card {
    width: min(320px, 100%);
    padding: 24px 22px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.submit-loader-card strong {
    display: block;
    margin-top: 14px;
    font-size: 1.05rem;
}

.submit-loader-card p {
    margin: 8px 0 0;
    color: var(--muted);
}

.submit-loader-spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 4px solid #dbeafe;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: submit-loader-spin 0.8s linear infinite;
}

@keyframes submit-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

.data-table-meta,
.table-pager,
.table-actions,
.action-row {
    gap: 10px;
}

.data-table-meta {
    margin-top: 12px;
    flex-wrap: wrap;
}

.table-summary {
    margin: 0;
    color: var(--muted);
}

.table-actions,
.action-row {
    flex-wrap: wrap;
}

.icon-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: #475569;
    cursor: pointer;
}

.icon-action-btn svg,
.topbar-icon-btn svg,
.topbar-chevron {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.icon-action-btn.edit {
    color: var(--primary);
    background: #eff6ff;
    border-color: #bfdbfe;
}

.icon-action-btn.toggle {
    color: var(--success);
    background: #f0fdfa;
    border-color: #99f6e4;
}

.icon-action-btn.delete {
    color: var(--danger);
    background: #fef2f2;
    border-color: #fecaca;
}

.popup-shell {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.popup-shell.is-open {
    display: flex;
}

.popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(4px);
}

.popup-card {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 24px;
    border-radius: var(--radius-xl);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}

.popup-card-wide {
    width: min(1240px, 100%);
}

.popup-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.popup-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

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

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

.sales-line-items {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.sales-line-items-head {
    position: sticky;
    top: -24px;
    z-index: 5;
    margin: -24px -24px 16px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.sale-item-list {
    display: grid;
    gap: 14px;
}

.sale-item-row {
    display: grid;
    grid-template-columns: minmax(260px, 2.2fr) repeat(5, minmax(110px, 1fr)) 74px;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.challan-item-row {
    display: grid;
    grid-template-columns: minmax(260px, 2.2fr) repeat(3, minmax(120px, 1fr)) 74px;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.sales-product-cell {
    min-width: 220px;
}

.sale-row-action .icon-action-btn {
    width: 48px;
    height: 48px;
}

.sales-summary-grid {
    margin-top: 24px;
    align-items: end;
}

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

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

.online-receipt-item-list {
    display: grid;
    gap: 14px;
}

.online-receipt-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) minmax(220px, 1.5fr) minmax(140px, 1fr) 74px;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.cash-denomination-list {
    display: grid;
    gap: 14px;
}

.cash-denomination-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

@media (max-width: 960px) {
    .online-receipt-item-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.print-body {
    background: #fff;
}

.print-slip {
    width: min(900px, 100%);
    margin: 0 auto;
    padding: 24px;
    background: #fff;
}

.print-head,
.print-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.print-head {
    margin-bottom: 18px;
}

.print-info-grid {
    margin-bottom: 18px;
}

.print-total {
    margin-top: 20px;
    text-align: right;
}

.topbar-icon-btn,
.topbar-profile,
.topbar-date {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    min-height: 44px;
}

.topbar-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    color: #334155;
    cursor: pointer;
}

.icon-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

.topbar-date {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.topbar-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    color: var(--text);
    cursor: pointer;
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 11px;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 25;
    display: none;
    width: min(360px, 88vw);
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
}

.dropdown-panel.is-open {
    display: block;
}

.panel-header,
.profile-menu-head,
.notification-item {
    display: flex;
    align-items: flex-start;
}

.panel-header,
.profile-menu-head {
    justify-content: space-between;
    gap: 12px;
}

.panel-title {
    font-size: 1rem;
    line-height: 1.2;
}

.panel-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.panel-close svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

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

.notification-item {
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
}

.notification-item strong,
.notification-item small {
    display: block;
}

.notification-item p {
    margin: 4px 0;
    color: var(--muted);
    line-height: 1.55;
}

.notification-item small {
    color: var(--muted);
}

.notification-dot {
    display: inline-flex;
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 999px;
    background: var(--primary);
}

.notification-dot.muted {
    background: #94a3b8;
}

.profile-menu-head {
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.profile-menu-link,
.profile-logout-btn {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #334155;
}

.profile-menu-link:hover,
.profile-logout-btn:hover {
    background: var(--panel-soft);
}

.profile-logout-btn {
    margin-top: 8px;
    border: 0;
    background: #fef2f2;
    color: var(--danger);
    font-weight: 700;
    cursor: pointer;
}

.empty-state {
    padding: 20px;
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel-soft);
    text-align: center;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 440px);
    gap: 24px;
}

.login-panel {
    min-height: 100%;
}

.login-panel-brand {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 35%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.login-feature-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.login-feature-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.login-feature {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
}

.login-feature strong,
.login-feature span {
    display: block;
}

.login-feature span {
    margin-top: 6px;
    color: var(--muted);
}

.hidden-by-search {
    display: none !important;
}

.sidebar-overlay {
    display: none;
}

@media (max-width: 1080px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 40;
        width: min(88vw, 320px);
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

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

    .sidebar {
        padding-right: 16px;
    }

    .sidebar-submenu {
        gap: 8px;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(15, 23, 42, 0.28);
    }

    .sidebar-overlay.is-open {
        display: block;
    }

    .sidebar-close,
    .menu-btn {
        display: inline-flex;
    }

    .main-shell {
        padding: 18px;
    }

    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-panel-brand {
        order: 2;
    }

    .login-layout .login-panel:not(.login-panel-brand) {
        order: 1;
    }
}

@media (max-width: 720px) {
    .main-shell,
    .guest-shell {
        padding: 16px;
    }

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

    .topbar-primary {
        width: 100%;
    }

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

    .dip-chart-actions {
        justify-items: start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .topbar-date {
        display: none;
    }

    .dropdown-panel {
        width: 100%;
    }

    .notification-panel {
        position: fixed;
        inset: 0;
        top: 0;
        width: 100vw;
        height: 100vh;
        max-width: none;
        padding: 18px 16px 24px;
        border-radius: 0;
        border: 0;
        overflow-y: auto;
    }

    .notification-panel .panel-close {
        display: inline-flex;
    }

    .hero-card,
    .form-box,
    .table-card,
    .info-card,
    .login-panel {
        padding: 16px;
    }

    .stats-inline {
        grid-auto-flow: row;
    }

    .inline-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sales-form-grid,
    .sales-summary-grid,
    .sale-item-row,
    .challan-item-row,
    .online-receipt-item-row,
    .cash-denomination-row,
    .print-head,
    .print-info-grid {
        grid-template-columns: 1fr;
    }

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

    .popup-shell {
        padding: 12px;
    }

    .popup-card {
        max-height: calc(100vh - 24px);
        padding: 18px;
    }

    .sales-line-items-head {
        top: -18px;
        margin: -24px -18px 16px;
        padding: 14px 18px;
    }
}
