:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.78);
    --surface-muted: #eef3f8;
    --text: #172033;
    --muted: #687386;
    --line: #dfe7f1;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #14b8a6;
    --warning: #f59e0b;
    --sidebar: #101827;
    --sidebar-soft: #1d293b;
    --radius: 8px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.075);
    --shadow-hover: 0 26px 70px rgba(15, 23, 42, 0.14);
    --ring: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.10), transparent 30%),
        radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.10), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 38%, #eef3f9 100%);
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #111827;
    --surface-glass: rgba(17, 24, 39, 0.82);
    --surface-muted: #1f2937;
    --text: #e5edf8;
    --muted: #9ca3af;
    --line: #263244;
    --app-bg: #0f172a;
    --app-surface: #111827;
    --app-surface-soft: #172033;
    --app-border: #263244;
    --app-border-soft: #1f2a3a;
    --app-text: #e5edf8;
    --app-muted: #9ca3af;
}

:root[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 30%),
        radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.15), transparent 24%),
        linear-gradient(180deg, #0f172a 0%, #111827 48%, #0b1120 100%);
}

:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .page-heading,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .quick-actions a,
:root[data-theme="dark"] .form-page-panel,
:root[data-theme="dark"] .media-panel,
:root[data-theme="dark"] .material-card,
:root[data-theme="dark"] .global-search-results,
:root[data-theme="dark"] .notification-panel {
    background: rgba(17, 24, 39, 0.92);
    border-color: #263244;
}

:root[data-theme="dark"] .global-search-results a:hover,
:root[data-theme="dark"] .notification-item:hover,
:root[data-theme="dark"] .qr-url-box,
:root[data-theme="dark"] .admin-table thead th {
    background: #172033;
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .search-box,
:root[data-theme="dark"] .mini-search,
:root[data-theme="dark"] .mini-filter,
:root[data-theme="dark"] .date-filter input {
    background: rgba(15, 23, 42, 0.84);
    border-color: #263244;
    color: #e5edf8;
}

.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.12), transparent 30%),
        radial-gradient(circle at 82% 8%, rgba(20, 184, 166, 0.12), transparent 26%),
        linear-gradient(180deg, #f8fbff 0%, #eef4fa 100%);
}

.login-shell {
    min-height: 100vh;
    width: min(100% - 32px, 460px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 32px 0;
}

.login-card {
    width: 100%;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(18px);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.login-brand strong,
.login-brand small {
    display: block;
}

.login-brand strong {
    font-size: 18px;
}

.login-brand small,
.login-heading p {
    color: var(--muted);
}

.login-heading {
    margin-bottom: 22px;
}

.login-heading h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.login-heading p {
    margin: 8px 0 0;
}

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

a {
    text-decoration: none;
}

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: 280px;
    padding: 22px 18px;
    color: #d8e0ec;
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.13), transparent 28%),
        var(--sidebar);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
    box-shadow: 18px 0 48px rgba(15, 23, 42, 0.16);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    margin: 0 4px 32px;
}

.brand:hover {
    color: #fff;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, var(--primary), var(--accent));
    font-size: 22px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: #93a3b8;
    font-size: 12px;
}

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

.sidebar-nav a {
    height: 48px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #b8c4d6;
    border-radius: 12px;
    font-weight: 600;
    position: relative;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04));
    transform: translateX(3px);
}

.sidebar-nav a.active::before {
    content: "";
    position: absolute;
    left: -8px;
    width: 4px;
    height: 24px;
    border-radius: 999px;
    background: var(--accent);
}

.sidebar-card {
    margin-top: auto;
    padding: 18px;
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(20, 184, 166, 0.16), rgba(37, 99, 235, 0.18)),
        #172033;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-card strong,
.sidebar-card p {
    display: block;
}

.sidebar-card p {
    margin: 8px 0 0;
    color: #a9b7ca;
    font-size: 13px;
}

.mini-label,
.eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.admin-main {
    width: 100%;
    min-width: 0;
    margin-left: 280px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 78px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(248, 251, 255, 0.76);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(223, 231, 241, 0.8);
}

.search-box {
    width: min(460px, 100%);
    height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-glass);
    color: var(--muted);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.global-search {
    position: relative;
}

.search-box:focus-within {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: var(--ring);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.global-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 60;
    display: none;
    width: min(520px, calc(100vw - 32px));
    max-height: 380px;
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--app-border, var(--line));
    border-radius: 16px;
    background: var(--app-surface, #fff);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.global-search-results.open {
    display: grid;
    gap: 4px;
}

.global-search-results a,
.global-search-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
}

.global-search-results a:hover {
    background: #f1f5f9;
}

.global-search-results i {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
}

.global-search-results span,
.global-search-results strong,
.global-search-results small {
    display: block;
}

.global-search-results strong {
    font-size: 14px;
    font-weight: 650;
}

.global-search-results small,
.global-search-empty {
    color: var(--muted);
    font-size: 12px;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-wrap {
    position: relative;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 65;
    display: none;
    width: min(360px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid var(--app-border, var(--line));
    border-radius: 18px;
    background: var(--app-surface, #fff);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.notification-panel.open {
    display: grid;
    gap: 6px;
}

.notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px 10px;
}

.notification-head strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.notification-head span {
    color: var(--muted);
    font-size: 12px;
}

.notification-item {
    display: flex;
    gap: 11px;
    padding: 12px;
    border-radius: 14px;
    color: var(--text);
}

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

.notification-item i {
    margin-top: 2px;
    font-size: 20px;
}

.notification-item.warning i {
    color: #f59e0b;
}

.notification-item.danger i {
    color: #dc2626;
}

.notification-item.info i {
    color: #2563eb;
}

.notification-item.success i {
    color: #16a34a;
}

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

.notification-item strong {
    font-size: 13px;
    font-weight: 700;
}

.notification-item small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.icon-btn {
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-glass);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    position: relative;
}

.icon-btn:hover {
    border-color: #cbd7e6;
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.icon-btn.subtle {
    width: 36px;
    height: 36px;
    background: #f8fafc;
}

.icon-btn.danger {
    color: #dc2626;
}

.icon-btn.danger:hover {
    border-color: rgba(220, 38, 38, 0.26);
    color: #b91c1c;
}

.icon-btn.has-dot::after {
    content: "";
    position: absolute;
    top: 9px;
    right: 10px;
    width: 8px;
    height: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ef4444;
}

.user-chip {
    height: 46px;
    padding: 4px 10px 4px 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(223, 231, 241, 0.86);
    border-radius: 12px;
    background: var(--surface-glass);
}

.user-chip > span {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #111827, #334155);
    color: #fff;
    font-weight: 700;
}

.user-chip strong,
.user-chip small {
    display: block;
    line-height: 1.2;
    padding-left:5px;
    padding-right: 15px;
}

.user-chip small {
    color: var(--muted);
    font-size: 12px;
}

.content-wrap {
    padding: 30px 32px 46px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 14px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.70)),
        linear-gradient(90deg, rgba(37, 99, 235, 0.09), rgba(20, 184, 166, 0.08));
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.page-heading h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
}

.page-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.heading-actions {
    display: flex;
    align-items: start;
    gap: 10px;
}

.live-pill {
    height: 38px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    color: #047857;
    background: #d1fae5;
    font-size: 13px;
    font-weight: 700;
}

.insight-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.insight-strip div {
    min-height: 62px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 34px 1fr;
    column-gap: 10px;
    align-items: center;
    border: 1px solid rgba(223, 231, 241, 0.86);
    border-radius: 14px;
    background: var(--surface-glass);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.insight-strip i {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #0f766e;
    background: #ccfbf1;
}

.insight-strip span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.insight-strip strong {
    font-size: 14px;
}

.btn {
    border-radius: 12px;
    font-weight: 700;
    min-height: 42px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.23);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #1e40af);
    border-color: var(--primary-dark);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.30);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.quick-actions a {
    height: 54px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: var(--surface-glass);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
    font-weight: 700;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quick-actions a i {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--primary);
    background: #eaf1ff;
}

.quick-actions a:hover {
    color: var(--text);
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: var(--shadow-hover);
}

.quick-actions a:active,
.btn:active,
.icon-btn:active {
    transform: translateY(0);
}

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

.stat-card,
.panel {
    background: var(--surface-glass);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.065);
    backdrop-filter: blur(14px);
}

.stat-card {
    min-height: 124px;
    padding: 22px;
    display: flex;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card em {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.stat-card::after {
    content: "";
    position: absolute;
    inset: auto 16px 0 auto;
    width: 70px;
    height: 4px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0.7;
}

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

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 22px;
}

.stat-card span,
.stat-card small {
    display: block;
    color: var(--muted);
}

.stat-card strong {
    display: block;
    margin: 4px 0;
    font-size: 28px;
    line-height: 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    margin-bottom: 18px;
}

.panel {
    padding: 24px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.panel-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    position: relative;
}

.panel-header h2::after {
    content: "";
    display: block;
    width: 34px;
    height: 3px;
    margin-top: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.panel-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.admin-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table thead th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    border-bottom-color: var(--line);
    background: rgba(248, 250, 252, 0.86);
    padding-top: 12px;
    padding-bottom: 12px;
}

.admin-table thead th:first-child {
    border-top-left-radius: 12px;
}

.admin-table thead th:last-child {
    border-top-right-radius: 12px;
}

.admin-table td {
    border-bottom-color: #edf2f7;
    padding-top: 15px;
    padding-bottom: 15px;
}

.admin-table tbody tr {
    transition: background 0.16s ease;
}

.admin-table tbody tr:hover {
    background: rgba(248, 251, 255, 0.78);
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-cell strong,
.product-cell small {
    display: block;
}

.product-cell small {
    color: var(--muted);
    font-size: 12px;
}

.row-meta {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

.product-thumb {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.list-thumb {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(223, 231, 241, 0.9);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-badge.active {
    color: #047857;
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
}

.status-badge.passive {
    color: #b45309;
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
}

.crud-grid {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.form-panel {
    position: sticky;
    top: 96px;
}

.form-page-panel {
    min-width: 0;
}

.premium-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.management-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.management-summary article {
    min-height: 88px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 16px;
    background: var(--surface-glass);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.management-summary span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.management-summary strong {
    display: block;
    margin-top: 4px;
    font-size: 30px;
    line-height: 1;
}

.list-tools {
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mini-search,
.mini-filter {
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--muted);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mini-search {
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-filter {
    min-width: 170px;
    color: var(--text);
    outline: 0;
}

.mini-search:focus-within {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: var(--ring);
}

.mini-filter:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: var(--ring);
}

.mini-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

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

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

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

.form-field.full {
    grid-column: 1 / -1;
}

.form-field span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.form-field small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-actions.full {
    grid-column: 1 / -1;
}

.form-actions.align-end {
    align-self: end;
}

.form-actions .btn {
    min-height: 44px;
}

.table-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 8px;
}

.table-actions form {
    margin: 0;
}

.inline-form {
    margin: 0;
}

.status-toggle {
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status-toggle.active {
    color: #047857;
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
}

.status-toggle.passive {
    color: #b45309;
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
}

.drag-handle {
    width: 24px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.45;
    background: #eef6ff;
}

.bulk-bar {
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bulk-bar .btn {
    min-height: 42px;
}

.form-control,
.form-select {
    border-color: var(--line);
    border-radius: 10px;
    min-height: 44px;
    background-color: rgba(255, 255, 255, 0.86);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: var(--ring);
}

.form-control-color {
    width: 100%;
    padding: 6px;
}

.price-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input .form-control {
    min-width: 0;
}

.price-input strong {
    min-width: 54px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--primary);
}

.product-form-preview {
    align-self: end;
    min-height: 68px;
    padding: 13px;
    display: grid;
    align-content: center;
    border: 1px dashed rgba(37, 99, 235, 0.28);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.055), rgba(20, 184, 166, 0.055));
}

.product-form-preview span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.product-form-preview strong {
    margin-top: 4px;
    color: var(--primary);
    font-size: 18px;
    line-height: 1;
}

.media-panel {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 14px;
}

.media-preview {
    position: relative;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 42%),
        linear-gradient(135deg, #fbfdff, #f3f7fb);
    border: 1px solid rgba(223, 231, 241, 0.88);
    color: var(--muted);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.media-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(10px);
    transition: transform 0.18s ease, background 0.18s ease;
}

.media-remove:hover {
    transform: translateY(-1px);
    background: rgba(220, 38, 38, 0.72);
}

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

.media-preview.empty {
    flex-direction: column;
    gap: 8px;
}

.media-preview.empty i {
    color: var(--primary);
    font-size: 34px;
}

.media-preview.empty span {
    font-size: 13px;
    font-weight: 700;
}

.upload-drop {
    min-height: 116px;
    padding: 16px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed rgba(37, 99, 235, 0.24);
    border-radius: 16px;
    background: rgba(248, 251, 255, 0.78);
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.upload-drop:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.upload-drop input {
    display: none;
}

.upload-drop i {
    color: var(--primary);
    font-size: 26px;
}

.upload-drop strong,
.upload-drop span {
    display: block;
}

.upload-drop strong {
    margin-top: 6px;
}

.upload-drop span {
    color: var(--muted);
    font-size: 12px;
}

.swal-premium {
    padding: 8px 4px 20px;
    border: 1px solid rgba(226, 232, 240, 0.72);
    border-radius: 18px;
    box-shadow: 0 22px 64px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(16px);
}

.swal-premium-title {
    font-size: 22px;
    font-weight: 700;
}

.swal-premium-text {
    color: var(--muted);
    font-size: 14px;
}

.swal-premium-btn {
    min-width: 108px;
    min-height: 40px;
    margin: 0 5px;
}

.swal2-timer-progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.swal2-icon.swal2-success {
    border-color: rgba(20, 184, 166, 0.34);
    color: var(--accent);
}

.swal2-icon.swal2-warning {
    border-color: rgba(245, 158, 11, 0.38);
    color: var(--warning);
}

.swal2-icon.swal2-error {
    border-color: rgba(220, 38, 38, 0.34);
    color: #dc2626;
}

.menu-body {
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--menu-theme, #2563eb) 18%, transparent), transparent 32%),
        #f7f9fc;
}

.menu-page {
    width: min(860px, calc(100% - 28px));
    margin: 0 auto;
    padding: 24px 0 46px;
}

.menu-hero {
    min-height: 280px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 18px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.90), rgba(15, 23, 42, 0.58)),
        linear-gradient(135deg, var(--menu-theme, #2563eb), #14b8a6);
    box-shadow: var(--shadow);
}

.menu-chip {
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.menu-hero h1 {
    margin: 0;
    font-size: 38px;
    font-weight: 700;
}

.menu-hero p {
    max-width: 560px;
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.menu-contact {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.menu-contact span {
    min-height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 13px;
    font-weight: 700;
}

.menu-category {
    margin-top: 24px;
}

.menu-category-heading {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-category-heading img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.menu-category h2 {
    margin: 0 0 12px;
    font-size: 21px;
    font-weight: 700;
}

.menu-category-heading h2 {
    margin: 0;
}

.menu-list {
    display: grid;
    gap: 10px;
}

.menu-item {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.menu-item-image {
    width: 74px;
    height: 74px;
    flex: 0 0 auto;
    border-radius: 14px;
    object-fit: cover;
}

.menu-item:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--menu-theme, #2563eb) 28%, var(--line));
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.10);
}

.menu-item h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.menu-item p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.menu-item strong {
    flex: 0 0 auto;
    color: var(--menu-theme, #2563eb);
    font-size: 16px;
}

.menu-empty {
    margin-top: 24px;
    padding: 36px 22px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}

.menu-empty i {
    color: var(--menu-theme, #2563eb);
    font-size: 36px;
}

.menu-empty h2 {
    margin: 12px 0 6px;
    font-size: 22px;
    font-weight: 700;
}

.menu-empty p {
    margin: 0;
    color: var(--muted);
}

.qr-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.qr-preview {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
        radial-gradient(circle at center, rgba(20, 184, 166, 0.16), transparent 58%),
        var(--surface-muted);
    background-size: 18px 18px;
    padding: 26px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.qr-preview img {
    width: min(100%, 280px);
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.10);
}

.qr-info {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-muted);
    border: 1px solid rgba(37, 99, 235, 0.10);
}

.qr-info span,
.qr-info strong {
    display: block;
}

.qr-info span,
.progress-block span {
    color: var(--muted);
    font-size: 13px;
}

.progress {
    height: 8px;
    margin-top: 8px;
    background: #e7edf5;
    border-radius: 999px;
    overflow: hidden;
}

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

.scan-panel {
    overflow: hidden;
}

.chart-wrap {
    height: 280px;
    padding: 6px 0 0;
}

.range-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.range-tabs a {
    min-height: 30px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.range-tabs a.active,
.range-tabs a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.date-filter {
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.date-filter input {
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
}

.settings-upload {
    display: grid;
    grid-template-columns: 62px 1fr;
    gap: 12px;
    align-items: center;
}

.settings-upload-preview {
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--muted);
}

.settings-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-check {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.menu-logo {
    width: 74px;
    height: 74px;
    margin-bottom: 14px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.menu-notice {
    margin-top: 18px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #fde68a;
    border-radius: 14px;
    color: #92400e;
    background: #fffbeb;
    font-weight: 700;
}

.whatsapp-order {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
    min-height: 46px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    color: #fff;
    background: #16a34a;
    box-shadow: 0 16px 38px rgba(22, 163, 74, 0.28);
    font-weight: 700;
}

.whatsapp-order:hover {
    color: #fff;
    background: #15803d;
}

.menu-theme-minimal {
    background: #ffffff;
}

.menu-theme-minimal .menu-hero {
    background: linear-gradient(135deg, #111827, #334155);
}

.menu-theme-dark {
    --text: #f8fafc;
    --muted: #cbd5e1;
    background: #0f172a;
}

.menu-theme-dark .menu-item,
.menu-theme-dark .menu-empty {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.22);
    color: #f8fafc;
}

.menu-font-serif {
    font-family: Georgia, "Times New Roman", serif;
}

.menu-font-rounded {
    font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
}

.menu-card-compact .menu-item {
    padding: 12px;
}

.menu-card-compact .menu-item p {
    display: none;
}

.menu-card-image_focus .menu-item {
    align-items: flex-start;
}

.menu-card-image_focus .menu-item-image {
    width: 96px;
    height: 96px;
}

@media (max-width: 1199.98px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .premium-form-grid {
        grid-template-columns: 1fr;
    }

    .form-panel {
        position: static;
    }

    .media-panel {
        position: static;
        order: -1;
    }

    .qr-preview {
        max-height: 340px;
    }

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

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

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

    .admin-main {
        margin-left: 0;
    }

    .topbar {
        padding: 0 18px;
    }

    .insight-strip {
        grid-template-columns: 1fr;
    }

    .management-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .content-wrap {
        padding: 22px 16px 32px;
    }

    .topbar {
        height: 68px;
    }

    .page-heading,
    .heading-actions,
    .panel-header {
        flex-direction: column;
    }

    .list-tools {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .mini-search,
    .mini-filter {
        width: 100%;
        min-width: 0;
    }

    .heading-actions {
        width: 100%;
    }

    .heading-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .live-pill {
        width: 100%;
        justify-content: center;
    }

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

    .quick-actions {
        grid-template-columns: 1fr;
    }

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

    .insight-strip div {
        min-height: 56px;
    }

    .menu-hero {
        min-height: 240px;
        padding: 24px;
    }

    .menu-hero h1 {
        font-size: 30px;
    }

    .menu-item {
        flex-direction: column;
    }

    .search-box {
        display: none;
    }

    .user-chip div {
        display: none;
    }

    .page-heading h1 {
        font-size: 26px;
    }
}

/* Modern sales-ready admin theme layer */
:root {
    --app-bg: #f6f8fb;
    --app-surface: rgba(255, 255, 255, 0.88);
    --app-surface-strong: #ffffff;
    --app-border: rgba(203, 213, 225, 0.72);
    --app-border-soft: rgba(226, 232, 240, 0.78);
    --app-text: #111827;
    --app-muted: #64748b;
    --app-shadow: 0 16px 44px rgba(15, 23, 42, 0.075);
    --app-shadow-hover: 0 22px 64px rgba(15, 23, 42, 0.12);
}

body {
    color: var(--app-text);
    background:
        radial-gradient(circle at 12% 10%, rgba(37, 99, 235, 0.10), transparent 28%),
        radial-gradient(circle at 92% 6%, rgba(20, 184, 166, 0.10), transparent 26%),
        linear-gradient(180deg, #fbfdff 0%, var(--app-bg) 42%, #eef3f8 100%);
}

.admin-shell {
    isolation: isolate;
}

.sidebar {
    width: 272px;
    padding: 20px 16px;
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.16), transparent 30%),
        linear-gradient(180deg, #111827 0%, #0f172a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-main {
    margin-left: 272px;
}

.brand {
    min-height: 56px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
}

.brand-mark {
    border-radius: 14px;
}

.sidebar-nav {
    gap: 8px;
}

.sidebar-nav a {
    height: 46px;
    padding: 0 13px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.sidebar-card {
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar {
    height: 72px;
    padding: 0 28px;
    background: rgba(248, 251, 255, 0.82);
    border-bottom: 1px solid rgba(226, 232, 240, 0.72);
}

.content-wrap {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 28px;
}

.page-heading {
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid var(--app-border-soft);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78)),
        radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.10), transparent 34%);
    box-shadow: var(--app-shadow);
}

.page-heading h1 {
    font-size: 31px;
    letter-spacing: 0;
}

.page-heading p {
    max-width: 720px;
}

.panel,
.stat-card,
.management-summary article,
.login-card {
    border: 1px solid var(--app-border-soft);
    border-radius: 18px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.panel:hover,
.stat-card:hover {
    box-shadow: var(--app-shadow-hover);
}

.panel-header {
    align-items: center;
}

.panel-header h2 {
    font-size: 17px;
}

.panel-header h2::after {
    width: 28px;
    height: 2px;
    margin-top: 7px;
}

.btn,
.icon-btn,
.form-control,
.form-select,
.mini-search,
.mini-filter,
.date-filter input {
    border-radius: 12px;
}

.btn {
    min-height: 42px;
    padding-inline: 15px;
}

.btn-primary {
    border: 0;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.btn-dark {
    border: 0;
    background: #111827;
}

.search-box,
.mini-search,
.mini-filter,
.form-control,
.form-select,
.date-filter input {
    border-color: var(--app-border);
    background: rgba(255, 255, 255, 0.92);
}

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

.quick-actions a {
    height: 58px;
    border-color: var(--app-border-soft);
    border-radius: 16px;
    background: var(--app-surface);
}

.quick-actions a i {
    border-radius: 12px;
}

.stats-grid,
.management-summary {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.stat-card {
    min-height: 118px;
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.admin-table {
    min-width: 760px;
}

.admin-table thead th {
    color: #64748b;
    background: rgba(248, 250, 252, 0.92);
}

.admin-table tbody tr {
    border-radius: 12px;
}

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

.table-actions {
    white-space: nowrap;
}

.status-toggle,
.status-badge {
    min-width: 64px;
    justify-content: center;
}

.premium-form-grid,
.settings-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
}

.media-panel,
.form-page-panel {
    border-radius: 18px;
}

.media-preview,
.upload-drop {
    border-radius: 16px;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: none;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(3px);
}

.login-shell {
    width: min(100% - 32px, 480px);
}

.login-card {
    padding: 28px;
}

@media (max-width: 1199.98px) {
    .dashboard-grid,
    .premium-form-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .media-panel {
        order: -1;
    }
}

@media (max-width: 991.98px) {
    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .sidebar {
        z-index: 40;
        width: min(288px, calc(100vw - 54px));
    }

    .admin-main {
        margin-left: 0;
    }

    .topbar {
        height: 66px;
        padding: 0 16px;
    }

    .content-wrap {
        padding: 20px 16px 32px;
    }

    .topbar-actions {
        gap: 8px;
    }

    .user-chip {
        padding-right: 4px;
    }
}

@media (max-width: 767.98px) {
    .page-heading {
        padding: 18px;
        border-radius: 16px;
    }

    .page-heading h1 {
        font-size: 25px;
    }

    .heading-actions {
        gap: 8px;
    }

    .heading-actions .btn,
    .heading-actions .live-pill {
        width: 100%;
        justify-content: center;
    }

    .panel {
        padding: 18px;
        border-radius: 16px;
    }

    .panel-header {
        align-items: flex-start;
    }

    .list-tools {
        gap: 8px;
    }

    .bulk-bar,
    .date-filter {
        flex-direction: column;
    }

    .bulk-bar .mini-filter,
    .bulk-bar .btn,
    .date-filter input,
    .date-filter .btn {
        width: 100%;
    }

    .admin-table {
        min-width: 720px;
    }

    .management-summary article,
    .stat-card {
        min-height: 96px;
        padding: 16px;
    }

    .qr-preview {
        padding: 18px;
    }

    .login-card {
        padding: 22px;
    }
}

@media (max-width: 420px) {
    .content-wrap {
        padding-inline: 12px;
    }

    .icon-btn {
        width: 38px;
        height: 38px;
    }

    .brand {
        margin-bottom: 22px;
    }
}

/* Final professional polish */
body {
    font-weight: 500;
    letter-spacing: 0;
}

.btn {
    min-height: 40px;
    border-radius: 11px;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
}

.btn-sm {
    min-height: 34px;
    padding-inline: 12px;
    font-size: 13px;
}

.page-heading h1 {
    font-weight: 750;
}

.page-heading p,
.panel-header p,
.form-text,
.admin-table small,
.qr-info span,
.topbar-date,
.stat-card small {
    font-weight: 500;
}

.eyebrow,
.live-pill,
.status-badge,
.status-toggle,
.range-tabs a,
.admin-table thead th,
.sidebar-nav a,
.quick-actions a,
.brand strong {
    font-weight: 650;
}

.panel-header h2,
.stat-card strong,
.management-summary strong,
.qr-info strong,
.product-cell strong {
    font-weight: 700;
}

.panel,
.stat-card,
.quick-actions a,
.page-heading,
.media-panel,
.form-page-panel,
.login-card {
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #0f766e);
}

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

.qr-preview img {
    image-rendering: crisp-edges;
}

.qr-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 20px;
}

.qr-studio {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
}

.qr-studio-preview {
    display: grid;
    place-items: center;
    min-height: 300px;
    padding: 24px;
    border: 1px solid var(--app-border-soft);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.qr-studio-preview svg,
.qr-studio-preview img {
    width: min(100%, 260px);
    height: auto;
    image-rendering: crisp-edges;
}

.qr-studio-content h2 {
    margin: 8px 0 10px;
    color: var(--app-text);
    font-size: 28px;
    font-weight: 750;
}

.qr-studio-content p {
    max-width: 560px;
    margin: 0 0 18px;
    color: var(--app-muted);
}

.qr-url-box {
    display: grid;
    gap: 5px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--app-border-soft);
    border-radius: 14px;
    background: #f8fafc;
}

.qr-url-box span {
    color: var(--app-muted);
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
}

.qr-url-box strong {
    overflow-wrap: anywhere;
    color: var(--app-text);
    font-weight: 650;
}

.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.qr-checklist {
    align-self: start;
}

.qr-check-row {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--app-border-soft);
}

.qr-check-row i {
    font-size: 22px;
}

.qr-check-row.success i {
    color: #16a34a;
}

.qr-check-row.warning i {
    color: #f59e0b;
}

.qr-check-row strong,
.qr-check-row span {
    display: block;
}

.qr-check-row strong {
    color: var(--app-text);
    font-weight: 700;
}

.qr-check-row span {
    color: var(--app-muted);
    font-size: 13px;
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.material-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    column-gap: 14px;
    row-gap: 14px;
    min-height: 184px;
    padding: 18px;
    border: 1px solid var(--app-border-soft);
    border-radius: 16px;
    background: #ffffff;
}

.material-card > i {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 22px;
}

.material-card-body {
    min-width: 0;
}

.material-card h3 {
    margin: 0 0 6px;
    color: var(--app-text);
    font-size: 16px;
    font-weight: 700;
}

.material-card p {
    margin: 0;
    color: var(--app-muted);
    font-size: 14px;
}

.material-card-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 2px;
}

.material-card-actions .btn {
    width: 100%;
    justify-content: center;
}

.backup-actions {
    display: grid;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--app-border-soft, var(--line));
}

.backup-actions span {
    color: var(--app-muted, var(--muted));
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
}

@media (max-width: 1199.98px) {
    .qr-workspace,
    .qr-studio {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .material-grid {
        grid-template-columns: 1fr;
    }

    .material-card-actions {
        grid-template-columns: 1fr;
    }
}

/* Premium dark theme final layer */
:root[data-theme="dark"] {
    --bg: #0b1120;
    --surface: #111827;
    --surface-glass: rgba(17, 24, 39, 0.86);
    --surface-muted: #182235;
    --text: #e7edf7;
    --muted: #9aa7bb;
    --line: #263449;
    --app-bg: #0b1120;
    --app-surface: #111827;
    --app-surface-soft: #172033;
    --app-border: #263449;
    --app-border-soft: #1f2c40;
    --app-text: #e7edf7;
    --app-muted: #9aa7bb;
    --ring: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

:root[data-theme="dark"] body {
    color: var(--app-text);
    background:
        radial-gradient(circle at 14% 6%, rgba(20, 184, 166, 0.15), transparent 26%),
        radial-gradient(circle at 82% 10%, rgba(37, 99, 235, 0.18), transparent 28%),
        linear-gradient(180deg, #0b1120 0%, #101827 48%, #0b1120 100%);
}

:root[data-theme="dark"] .topbar {
    background: rgba(11, 17, 32, 0.82);
    border-bottom-color: rgba(38, 52, 73, 0.86);
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .page-heading,
:root[data-theme="dark"] .quick-actions a,
:root[data-theme="dark"] .media-panel,
:root[data-theme="dark"] .form-page-panel,
:root[data-theme="dark"] .login-card,
:root[data-theme="dark"] .material-card,
:root[data-theme="dark"] .qr-studio-preview,
:root[data-theme="dark"] .qr-url-box,
:root[data-theme="dark"] .global-search-results,
:root[data-theme="dark"] .notification-panel {
    color: var(--app-text);
    border-color: var(--app-border);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.96));
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.28);
}

:root[data-theme="dark"] .admin-table {
    color: var(--app-text);
    background: transparent;
}

:root[data-theme="dark"] .admin-table thead th {
    color: #b9c5d6;
    background: #172033;
    border-color: #263449;
}

:root[data-theme="dark"] .admin-table tbody,
:root[data-theme="dark"] .admin-table tr,
:root[data-theme="dark"] .admin-table td {
    color: var(--app-text);
    background: #111827;
    border-color: #223047;
}

:root[data-theme="dark"] .admin-table tbody tr:hover td {
    background: #182235;
}

:root[data-theme="dark"] .table,
:root[data-theme="dark"] .table > :not(caption) > * > * {
    color: var(--app-text);
    background-color: transparent;
    border-color: #223047;
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .mini-search,
:root[data-theme="dark"] .mini-filter,
:root[data-theme="dark"] .search-box,
:root[data-theme="dark"] .date-filter input,
:root[data-theme="dark"] textarea {
    color: var(--app-text);
    background: #0f172a;
    border-color: #263449;
}

:root[data-theme="dark"] .form-control::placeholder,
:root[data-theme="dark"] .search-box input::placeholder,
:root[data-theme="dark"] .mini-search input::placeholder {
    color: #74839a;
}

:root[data-theme="dark"] .btn-light,
:root[data-theme="dark"] .btn-light.border {
    color: var(--app-text);
    background: #172033;
    border-color: #2a3a52 !important;
}

:root[data-theme="dark"] .btn-dark {
    color: #ffffff;
    background: #020617;
}

:root[data-theme="dark"] .icon-btn,
:root[data-theme="dark"] .status-toggle,
:root[data-theme="dark"] .range-tabs a {
    color: var(--app-text);
    background: #111827;
    border-color: #263449;
}

:root[data-theme="dark"] .global-search-results a,
:root[data-theme="dark"] .notification-item {
    color: var(--app-text);
}

:root[data-theme="dark"] .global-search-results a:hover,
:root[data-theme="dark"] .notification-item:hover,
:root[data-theme="dark"] .quick-actions a:hover {
    background: #182235;
}

:root[data-theme="dark"] .global-search-results i,
:root[data-theme="dark"] .quick-actions a i,
:root[data-theme="dark"] .material-card > i {
    background: rgba(37, 99, 235, 0.18);
    color: #7dd3fc;
}

:root[data-theme="dark"] .product-thumb,
:root[data-theme="dark"] .list-thumb,
:root[data-theme="dark"] .media-preview,
:root[data-theme="dark"] .upload-drop {
    background-color: #0f172a;
    border-color: #263449;
}

:root[data-theme="dark"] .qr-preview,
:root[data-theme="dark"] .qr-studio-preview {
    background: #f8fafc;
}

:root[data-theme="dark"] .status-badge.passive {
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.16);
}

:root[data-theme="dark"] .status-badge.active {
    color: #86efac;
    background: rgba(22, 163, 74, 0.16);
}

:root[data-theme="dark"] .text-muted,
:root[data-theme="dark"] .panel-header p,
:root[data-theme="dark"] .page-heading p,
:root[data-theme="dark"] .material-card p,
:root[data-theme="dark"] .qr-studio-content p,
:root[data-theme="dark"] .notification-item small,
:root[data-theme="dark"] .global-search-results small,
:root[data-theme="dark"] .stat-card small,
:root[data-theme="dark"] .form-text {
    color: var(--app-muted) !important;
}
