:root {
    --sidebar-bg: #ffffff;
    --sidebar-border: #e8edf3;
    --sidebar-text: #3d4a5c;
    --sidebar-muted: #8b97a8;
    --sidebar-active-bg: #eef4ff;
    --sidebar-active-text: #1a56db;
    --sidebar-width: 272px;
    --zoho-bg: #f4f6fb;
    --zoho-surface: #ffffff;
    --zoho-border: #e8edf3;
    --zoho-border-strong: #d8dee8;
    --zoho-text: #1a2332;
    --zoho-muted: #6b7789;
    --zoho-primary: #2563eb;
    --zoho-primary-dark: #1d4ed8;
    --zoho-primary-soft: #eef4ff;
    --zoho-success: #059669;
    --zoho-success-soft: #ecfdf5;
    --zoho-warning: #d97706;
    --zoho-warning-soft: #fff7ed;
    --zoho-danger: #dc2626;
    --zoho-danger-soft: #fef2f2;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
    --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font);
    background-color: var(--zoho-bg);
    background-image: url('../martin-martz-3_x1FRGAEwY-unsplash.jpg');
    /* increase background size to make image appear larger (250% scale) */
    background-size: 250% 250%;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--zoho-text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

a {
    color: inherit;
}

.hidden {
    display: none !important;
}

/* App shell */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar — Zoho Commerce style */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.03);
}

.sidebar-top {
    padding: 1.25rem 1rem 0.75rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.65rem 0.75rem;
}

.brand-mark {
    /* increased by 70%: 44px -> 75px */
    width: 75px;
    height: 75px;
    border-radius: 18px;
    background: #2563eb;
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: none;
}

.brand-mark svg {
    width: 38px;
    height: 38px;
}

/* Use image inside brand-mark when available */
.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 14px;
}

.brand-text strong {
    display: block;
    color: var(--zoho-text);
    font-size: 0.98rem;
    font-weight: 720;
    letter-spacing: -0.02em;
}

.brand-text span {
    display: block;
    font-size: 0.76rem;
    color: var(--sidebar-muted);
    font-weight: 450;
    margin-top: 0.1rem;
}

.sidebar-section-label {
    padding: 0.75rem 1.35rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 630;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-muted);
}

.sidebar-nav {
    padding: 0 0.75rem;
    display: grid;
    gap: 0.25rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.72rem 0.85rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--sidebar-text);
    font-size: 0.92rem;
    font-weight: 540;
    transition: all 0.18s ease;
    border: 1px solid transparent;
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
}

.nav-icon-blue { background: #eef4ff; color: #2563eb; }
.nav-icon-purple { background: #f3efff; color: #7c3aed; }
.nav-icon-green { background: #ecfdf5; color: #059669; }
.nav-icon-gray { background: #f3f4f6; color: #6b7280; }

.nav-label {
    flex: 1;
}

.nav-item:hover {
    background: #f8fafc;
    border-color: var(--sidebar-border);
    color: var(--zoho-text);
}

.nav-item.active {
    background: var(--sidebar-active-bg);
    border-color: #c7d9fc;
    color: var(--sidebar-active-text);
    box-shadow: var(--shadow-sm);
}

.nav-item.active .nav-icon-blue {
    background: #2563eb;
    color: #fff;
}

.nav-item.active .nav-icon-purple {
    background: #7c3aed;
    color: #fff;
}

.nav-item.active .nav-icon-teal {
    background: #0d9488;
    color: #fff;
}

.nav-icon-teal { background: #ecfdf5; color: #0d9488; }

.nav-item-muted {
    color: var(--sidebar-muted);
}

.sidebar-bottom {
    padding: 0.75rem;
    border-top: 1px solid var(--sidebar-border);
    margin-top: auto;
    background: #fafbfd;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.35rem;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--sidebar-border);
}

.user-avatar {
    /* reverted and reduced by 30% from original 40px -> 28px */
    width: 28px;
    height: 28px;
    border-radius: 8px; /* restore subtle rounding */
    background: transparent;
    display: grid;
    place-items: center;
    font-weight: 720;
    color: #fbbf24; /* gold */
    font-size: 0.95rem;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.user-avatar svg {
    width: 22px;
    height: 22px;
    display: block;
}

.user-avatar:hover {
    background: #fbbf24; /* gold background on hover */
    color: #fff; /* icon becomes white */
    transform: translateY(-1px);
}

.user-avatar svg {
    width: 22px;
    height: 22px;
}

/* Avatar image styling to replace SVG icon */
.user-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit; /* match container rounding */
}

.user-meta strong {
    display: block;
    color: var(--zoho-text);
    font-size: 0.88rem;
    font-weight: 630;
}

.user-meta span {
    display: block;
    font-size: 0.74rem;
    color: var(--sidebar-muted);
    font-weight: 450;
}

.app-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
}

.page-header {
    background: var(--zoho-surface);
    border-bottom: 1px solid var(--zoho-border);
    padding: 1.35rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.page-header-actions {
    display: flex;
    align-items: center;
}

.page-header-actions .user-card {
    margin-bottom: 0;
}

.eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--zoho-muted);
    font-weight: 540;
}

.page-header h1 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 720;
    color: #111827;
    letter-spacing: -0.03em;
}

.page-content {
    padding: 1.5rem 2rem 2.5rem;
}

/* Cards & wizard */
.wizard-steps {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.wizard-step {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.1rem;
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: 18px;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.wizard-step:hover {
    transform: translateY(-1px);
    border-color: #c7d9fc;
}

.wizard-step .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef2f7;
    color: var(--zoho-muted);
    display: grid;
    place-items: center;
    font-size: 0.88rem;
    font-weight: 630;
}

.wizard-step.active {
    border-color: #bfdbfe;
    background: var(--zoho-primary-soft);
}

.wizard-step.active .step-num {
    background: var(--zoho-primary);
    color: #fff;
}

.wizard-step.done .step-num {
    background: var(--zoho-success);
    color: #fff;
}

.wizard-step span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    font-weight: 630;
    color: #334155;
}

.wizard-step.active span {
    color: #1d4ed8;
}

.wizard-step svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
}

.wizard-step.active svg {
    color: #1d4ed8;
}

.content-grid {
    display: grid;
    gap: 1.25rem;
}

.panel {
    background: #fff;
    border: 1px solid #e5e9f2;
    border-radius: calc(var(--radius-lg) + 4px);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.panel-head {
    padding: 1.15rem 1.35rem;
    border-bottom: 1px solid #e5e9f2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: #f8fbff;
}

.panel-head-title {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.panel-head-icon {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.12);
    display: grid;
    place-items: center;
    color: #2563eb;
    flex-shrink: 0;
}

.panel-head-icon svg {
    width: 18px;
    height: 18px;
}

.panel-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 630;
    color: #0f172a;
}

.panel-head p {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
    color: #64748b;
    max-width: 560px;
}

.panel-body {
    padding: 1.35rem;
}

/* Forms */
.form {
    display: grid;
    gap: 1.1rem;
}

.form label,
.field-label {
    display: grid;
    gap: 0.4rem;
    font-size: 0.84rem;
    font-weight: 540;
    color: #344054;
}

.form input,
.search-input,
.select-input {
    width: 100%;
    padding: 0.72rem 0.85rem;
    border: 1px solid var(--zoho-border-strong);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form input:focus,
.search-input:focus {
    outline: none;
    border-color: var(--zoho-primary);
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.input-with-meta {
    position: relative;
}

.input-meta {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--zoho-muted);
    font-weight: 540;
}

.input-with-meta input {
    padding-right: 4.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.72rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 540;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--zoho-primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--zoho-primary-dark);
}

.btn-secondary {
    background: #fff;
    color: #344054;
    border-color: var(--zoho-border-strong);
}

.btn-secondary:hover:not(:disabled) {
    background: #f8fafc;
}

.btn-success {
    background: var(--zoho-success);
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background: #0b8a4d;
}

.btn-warning {
    background: #fff;
    color: var(--zoho-warning);
    border-color: #fed7aa;
}

.btn-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Premium button styles */
.btn-premium {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    box-shadow: 0 10px 30px rgba(37,99,235,0.18);
    padding: 0.72rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
}
.btn-premium svg { opacity: 0.95; margin-right: 6px; }
.btn-premium:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(37,99,235,0.22);
}

.btn-outline-premium {
    background: rgba(255,255,255,0.95);
    color: #1d4ed8;
    border: 1px solid rgba(29,78,216,0.12);
    box-shadow: 0 4px 12px rgba(13,67,129,0.06);
    padding: 0.64rem 1rem;
    border-radius: 10px;
}
.btn-outline-premium svg { margin-right: 6px; }
.btn-outline-premium:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(29,78,216,0.18);
}

/* Alerts & status */
.alert,
.status-box {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-error,
.status-box.error {
    background: var(--zoho-danger-soft);
    border-color: #fecaca;
    color: #991b1b;
}

.alert-success,
.status-box.success {
    background: var(--zoho-success-soft);
    border-color: #bbf7d0;
    color: #166534;
}

.status-box.warning {
    background: var(--zoho-warning-soft);
    border-color: #fed7aa;
    color: #9a3412;
}

.status-box.info {
    background: var(--zoho-primary-soft);
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.hint {
    color: var(--zoho-muted);
    font-size: 0.84rem;
    margin: 0.75rem 0 0;
}

/* Preview */
.preview-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.25rem;
}

.preview-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.label-preview-wrap {
    display: flex;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(180deg, #fafbfd 0%, #f3f6fa 100%);
    border: 1px dashed var(--zoho-border-strong);
    border-radius: var(--radius-md);
}

.summary-card {
    background: #fafbfd;
    border: 1px solid var(--zoho-border);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.summary-card h3 {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
}

.summary-list {
    display: grid;
    gap: 0.55rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
}

.summary-item span:first-child {
    color: var(--zoho-muted);
}

.summary-item strong {
    text-align: right;
}

/* Phone label — print & preview */
.phone-label {
    width: 80mm;
    min-height: 42mm;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: 3mm 2.5mm;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 630;
    color: #000;
}

.phone-label, .phone-label * {
    font-family: Arial, Helvetica, sans-serif !important;
}

.phone-label--preview {
    width: 105mm;
    min-height: 52mm;
    padding: 4mm 3mm;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.12);
}

.label-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5mm;
    font-size: 11pt;
    font-weight: 630;
    margin-bottom: -2mm;
}

.label-title-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.2mm;
}

.phone-label--preview .label-top {
    font-size: 12pt;
}

.label-model {
    white-space: nowrap;
    text-align: left;
    font-weight: 400;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: normal;
}
.label-device {
    text-align: right;
    letter-spacing: normal;
    text-transform: uppercase;
    font-weight: 400;
    font-family: Arial, Helvetica, sans-serif;
}

.label-letter-box {
    width: 6mm;
    height: 6mm;
    border: 2px solid #000;
    display: grid;
    place-items: center;
    font-size: 10pt;
    font-weight: 630;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: -0.02em;
}

.phone-label--preview .label-letter-box {
    width: 7mm;
    height: 7mm;
    font-size: 11pt;
}

.label-body {
    display: grid;
    grid-template-columns: 1fr 22mm;
    gap: 2mm;
    align-items: start;
}

.phone-label--preview .label-body {
    grid-template-columns: 1fr 28mm;
}

.label-left {
    min-width: 0;
}

.barcode-svg {
    width: 100%;
    height: 12mm;
    min-height: 12mm;
    margin: 0;
    padding: 0;
    display: block;
}

.phone-label--preview .barcode-svg {
    height: 15mm;
    min-height: 15mm;
}

.label-imei {
    font-size: 12pt; /* reduced ~5% from 12.6pt */
    margin-top: 0.5mm;
    padding: 0;
    letter-spacing: normal;
    text-align: center;
    width: 100%;
    font-weight: 400;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1;
    display: block;
}

.phone-label--preview .label-imei {
    font-size: 12.8pt; /* reduced ~5% from 13.5pt */
    margin-top: 0.5mm;
    padding: 0;
    line-height: 1;
}

.label-bottom-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 0.5mm;
    font-size: 10pt;
    font-weight: 400;
    width: 100%;
    gap: 8mm;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: normal;
}

.phone-label--preview .label-bottom-row {
    font-size: 11pt;
    margin-top: 0.5mm;
}

.label-spec-box {
    border: 2px solid #000;
    padding: 0.3mm 1.5mm;
    min-width: 12mm;
    text-align: center;
    display: inline-block;
    font-weight: 400;
    margin-left: 4px; /* bring closer to VC */
    font-size: 12pt; /* match IMEI/VC */
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: normal;
}

.label-vc {
    display: inline-block;
    font-weight: 400;
    font-size: 12pt; /* match IMEI */
    margin-right: 4px; /* small gap before spec box */
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: normal;
}

.phone-label--preview .label-vc {
    font-size: 12.8pt; /* preview matches preview IMEI */
}

.label-right {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.label-right canvas,
.label-right img {
    width: 22mm !important;
    height: 22mm !important;
    max-width: 100%;
    margin-top: 10%;
}

.phone-label--preview .label-right canvas,
.phone-label--preview .label-right img {
    width: 28mm !important;
    height: 28mm !important;
    margin-top: 10%;
}

/* History table */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.table-toolbar h2 {
    margin: 0;
    font-size: 1rem;
}

.search-wrap {
    position: relative;
    width: min(360px, 100%);
}

.search-wrap svg {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--zoho-muted);
}

.search-input {
    padding-left: 2.4rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--zoho-border);
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table th,
.data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--zoho-border);
    text-align: left;
    font-size: 0.88rem;
}

.data-table th {
    background: #f8fafc;
    color: #475467;
    font-weight: 540;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.data-table tbody tr:hover {
    background: #fafbfd;
}

.data-table .loading {
    text-align: center;
    color: var(--zoho-muted);
    padding: 2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 540;
}

.badge-blue {
    background: var(--zoho-primary-soft);
    color: #1d4ed8;
}

.pagination {
    display: flex;
    gap: 0.45rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.pagination button {
    border: 1px solid var(--zoho-border-strong);
    background: #fff;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

.pagination button.active {
    background: var(--zoho-primary);
    color: #fff;
    border-color: var(--zoho-primary);
}

/* Auth */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: #fff;
}

.auth-visual {
    background: linear-gradient(160deg, #16243d 0%, #1b2a4a 45%, #2f80ed 100%);
    color: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-visual-footer {
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.auth-visual-footer p {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
}

.auth-visual h1 {
    font-size: 2rem;
    margin: 0 0 0.75rem;
}

.auth-visual p {
    color: #dbe7ff;
    max-width: 420px;
    line-height: 1.7;
}

.auth-features {
    margin-top: 2rem;
    display: grid;
    gap: 0.85rem;
}

.auth-feature {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    color: #e8f0ff;
    font-size: 0.92rem;
}

.auth-feature-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 2rem;
    background-image: url("../download.jfif");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.auth-card {
    width: min(420px, 100%);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.auth-card.wide {
    width: min(520px, 100%);
}

.auth-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
}

.subtitle {
    margin: 0 0 1.5rem;
    color: var(--zoho-muted);
    font-size: 0.92rem;
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: grid;
    place-items: center;
    z-index: 9999;
    animation: fade-in 0.3s ease-out;
}

.loading-overlay.hidden {
    display: none;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255, 255, 255, 0.1);
    border-top: 6px solid #2563eb;
    border-right: 6px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4), inset 0 0 20px rgba(37, 99, 235, 0.2);
}

.loading-text {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 630;
    color: #fff;
    letter-spacing: -0.01em;
    text-align: center;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Toast */
.toast-root {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
    display: grid;
    gap: 0.65rem;
    width: min(360px, calc(100vw - 2rem));
}

.toast {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--zoho-border);
    box-shadow: var(--shadow-md);
    font-size: 0.88rem;
    animation: toast-in 0.25s ease;
}

.toast.success { border-left: 4px solid var(--zoho-success); }
.toast.error { border-left: 4px solid var(--zoho-danger); }
.toast.info { border-left: 4px solid var(--zoho-primary); }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Print */
.print-page {
    background: #fff;
}

.print-toolbar {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    justify-content: center;
    background: var(--zoho-bg);
    border-bottom: 1px solid var(--zoho-border);
}

.print-stage {
    display: grid;
    place-items: center;
    padding: 2rem;
}

@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .phone-label { border: none; margin: 0 auto; }
}

@media (max-width: 980px) {
    .sidebar {
        position: static;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--sidebar-border);
    }

    .app-shell {
        flex-direction: column;
    }

    .app-main {
        margin-left: 0;
    }

    .sidebar-nav {
        grid-template-columns: repeat(3, 1fr);
    }

    .sidebar-bottom {
        display: none;
    }

    .preview-layout {
        grid-template-columns: 1fr;
    }

    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        padding: 2rem;
    }
}

@media (max-width: 720px) {
    .page-content,
    .page-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .form-row,
    .table-toolbar {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }
}

/* Public validation page */
.validate-page {
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.12), transparent 22%),
                radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.16), transparent 18%),
                linear-gradient(180deg, #f7f9fc 0%, #eef3fa 45%, #f8fbff 100%);
    display: flex;
    flex-direction: column;
}

.validate-header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.validate-brand {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.validate-home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 630;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    padding: 0.85rem 1rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.validate-home-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    background: #fff;
}

.validate-home-link svg {
    width: 18px;
    height: 18px;
}

.validate-brand .brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: grid;
    place-items: center;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    flex-shrink: 0;
}

.validate-brand .brand-mark svg {
    width: 24px;
    height: 24px;
    color: #2563eb;
}

.validate-brand strong {
    display: block;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.validate-brand span {
    display: block;
    font-size: 0.82rem;
    color: #6b7280;
}

.validate-main {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 2.5rem 1rem 2rem;
}

.verify-card {
    width: min(760px, 100%);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: calc(var(--radius-lg) + 4px);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
    padding: 2rem;
    backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
}

.verify-card::before {
    content: '';
    position: absolute;
    inset: -20% 50% auto auto;
    width: 260px;
    height: 260px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 50%;
}

.verify-card::after {
    content: '';
    position: absolute;
    inset: auto auto 0 60%;
    width: 180px;
    height: 180px;
    background: rgba(59, 130, 246, 0.06);
    border-radius: 50%;
}

.verify-card > * {
    position: relative;
    z-index: 1;
}

.verify-card.verified {
    border-top: 4px solid var(--zoho-success);
}

.verify-card.invalid {
    border-top: 4px solid var(--zoho-danger);
}

.verify-card.neutral {
    border-top: 4px solid var(--zoho-primary);
}

.verify-status {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.verify-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 630;
    flex-shrink: 0;
}

.verify-icon.success {
    background: var(--zoho-success-soft);
    color: var(--zoho-success);
}

.verify-icon.error {
    background: var(--zoho-danger-soft);
    color: var(--zoho-danger);
}

.verify-icon.neutral {
    background: var(--zoho-primary-soft);
    color: var(--zoho-primary);
}

.verify-eyebrow {
    margin: 0 0 0.25rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--zoho-muted);
    font-weight: 540;
}

.verify-status h1 {
    margin: 0 0 0.35rem;
    font-size: 1.55rem;
}

.verify-subtitle {
    margin: 0;
    color: var(--zoho-muted);
    line-height: 1.6;
}

.verify-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.verify-field {
    background: #f8fafc;
    border: 1px solid var(--zoho-border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}

.verify-field.full {
    grid-column: 1 / -1;
}

.verify-field span {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--zoho-muted);
    margin-bottom: 0.25rem;
    font-weight: 540;
}

.verify-field strong {
    font-size: 0.98rem;
    word-break: break-all;
}

.verify-footer-note {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--zoho-border);
    font-size: 0.82rem;
    color: var(--zoho-muted);
    text-align: center;
}

.verify-search {
    margin-top: 0.5rem;
}

.validate-footer {
    text-align: center;
    padding: 1rem;
    color: var(--zoho-muted);
    font-size: 0.82rem;
}

.validate-footer p {
    margin: 0;
}

@media (max-width: 720px) {
    .verify-grid {
        grid-template-columns: 1fr;
    }
}

/* Batch generation */
.form textarea {
    width: 100%;
    min-height: 180px;
    padding: 0.85rem;
    border: 1px solid var(--zoho-border-strong);
    border-radius: var(--radius-sm);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.92rem;
    resize: vertical;
}

.form textarea:focus {
    outline: none;
    border-color: var(--zoho-primary);
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
}

.batch-upload-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-upload input[type="file"] {
    display: none;
}

.panel-subsection {
    background: #fafbfd;
    border: 1px solid var(--zoho-border);
    border-radius: var(--radius-md);
    padding: 1.1rem;
}

.panel-subsection h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
}

.checkbox-label > span {
    display: block;
    margin-bottom: 0.5rem;
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 450;
    font-size: 0.88rem;
    color: var(--zoho-text);
    margin-top: 0.35rem;
}

.inline-check input {
    width: auto;
}

.batch-label-grid,
.batch-print-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.batch-label-item {
    background: linear-gradient(180deg, #fafbfd 0%, #f3f6fa 100%);
    border: 1px dashed var(--zoho-border-strong);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.batch-print-grid {
    padding: 1.5rem;
    justify-items: center;
}

.batch-print-item {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 1rem;
}

.badge-ready { background: var(--zoho-success-soft); color: #166534; }
.badge-warn { background: var(--zoho-warning-soft); color: #9a3412; }
.badge-error { background: var(--zoho-danger-soft); color: #991b1b; }

@media print {
    .batch-print-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4mm;
        padding: 0;
    }
}
