/* stor.x — Premium E-Commerce UI */

:root {
    --bg: #f7f4f0;
    --bg-soft: #faf7f3;
    --surface: #ffffff;
    --surface-hover: #fdfcfa;
    --border: #e8e0d8;
    --border-light: #f0ebe5;
    --text: #1a4571;
    --text-secondary: #4a6278;
    --text-muted: #7a8fa3;
    --primary: #1a4571;
    --primary-dark: #133556;
    --primary-light: #e6eef5;
    --accent: #f58220;
    --accent-dark: #e06d10;
    --header-bg: #f2f2f2;
    --rose: #e8b4a0;
    --beige: #f5ebe3;
    --admin: #dc2626;
    --supplier: #059669;
    --merchant: #d97706;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --shadow-sm: 0 2px 8px rgba(45, 55, 72, 0.05);
    --shadow: 0 8px 30px rgba(45, 55, 72, 0.08);
    --shadow-lg: 0 16px 48px rgba(45, 55, 72, 0.12);
    --radius: 20px;
    --radius-sm: 12px;
    --radius-full: 999px;
    --header-h: 96px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1320px;
}

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

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

body {
    font-family: "Tajawal", "Outfit", "Segoe UI", Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Header ── */
.impersonate-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(90deg, var(--primary), #5bb5e8);
    color: #fff;
    font-size: 0.9rem;
}

.impersonate-banner form {
    margin: 0;
}

.impersonate-banner .btn-outline {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.impersonate-banner .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.supplier-mode-banner {
    background: linear-gradient(90deg, #1d4477, #3b9fd9);
}

.supplier-mode-form {
    display: inline-flex;
    margin: 0;
}

.supplier-mode-btn.is-active {
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: inset 0 0 0 2px var(--primary);
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.badge.status-suspended { background: #fef3c7; color: #b45309; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 12px rgba(26, 69, 113, 0.06);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--header-h);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    padding: 0.15rem 0;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.brand-logo-svg {
    display: block;
    width: 9rem;
    height: auto;
    max-height: 2.85rem;
    overflow: visible;
    transform-style: preserve-3d;
    animation: brand-logo-float 5.5s ease-in-out infinite;
}

.brand-logo-mark {
    transform-origin: 79px 23px;
}

.brand-logo-stor-group {
    transform-origin: 40px 22px;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-logo-zero-group {
    transform-origin: 12px 24px;
    animation: brand-logo-zero-tilt 5.5s ease-in-out infinite;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes brand-logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

@keyframes brand-logo-zero-tilt {
    0%, 100% { transform: perspective(600px) rotateY(-8deg) rotateX(10deg); }
    50% { transform: perspective(600px) rotateY(8deg) rotateX(12deg); }
}

.brand:hover .brand-logo-svg {
    animation-play-state: paused;
}

.brand:hover .brand-logo-stor-group {
    transform: perspective(520px) rotateX(6deg) translateY(-1px);
}

.brand:hover .brand-logo-zero-group {
    animation-play-state: paused;
    transform: perspective(520px) rotateY(12deg) rotateX(14deg) scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
    .brand-logo-svg,
    .brand-logo-zero-group {
        animation: none;
    }
}

.footer-brand-link .brand-logo-svg {
    width: 7.5rem;
    max-height: 2rem;
}

.brand-logo-img {
    height: 80px;
    width: auto;
    max-width: 300px;
    min-width: 180px;
    display: block;
    object-fit: contain;
    object-position: center;
}

.brand:hover { opacity: 0.94; }

.footer-brand-link {
    display: inline-block;
    margin-bottom: 0.75rem;
}

.footer-logo-img {
    height: 52px;
    width: auto;
    max-width: 200px;
    display: block;
    object-fit: contain;
}

.header-search {
    display: flex;
    align-items: center;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border: 1.5px solid #d8d6d4;
    border-radius: var(--radius-full);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.header-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 69, 113, 0.12);
}

.header-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1.25rem;
    outline: none;
    color: var(--text);
    font-size: 0.95rem;
}

.header-search input::placeholder { color: var(--text-muted); }

.header-search-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: 4px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #2a5f8f);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition);
}

.header-search-btn:hover { background: var(--primary-dark); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}

.header-icon-btn:hover {
    background: rgba(26, 69, 113, 0.08);
    color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
}

.notif-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
}

.user-chip {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
}

.user-chip .role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.role-dot.admin { background: var(--admin); }
.role-dot.supplier { background: var(--supplier); }
.role-dot.merchant { background: var(--merchant); }

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-panel {
    background: var(--surface);
    padding: 1.25rem;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-10px);
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.mobile-nav.open .mobile-nav-panel { transform: translateY(0); }

.mobile-nav a {
    display: block;
    padding: 0.85rem 1rem;
    color: var(--text);
    border-radius: var(--radius-sm);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.mobile-nav a:hover { background: var(--primary-light); color: var(--primary); }

/* ── Layout ── */
.main-content {
    flex: 1;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.main-content--support {
    max-width: 1280px;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

.page-shell { width: 100%; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.35rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.2;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 69, 113, 0.3);
}

.btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 69, 113, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 4px 14px rgba(245, 130, 32, 0.35);
}

.btn-accent:hover { color: #fff; transform: translateY(-1px); }

.btn-outline {
    background: var(--surface);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
}

.btn-lg { padding: 0.95rem 2rem; font-size: 1.05rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }

/* ── stor.x Homepage ── */
.main-home {
    max-width: var(--container);
    padding-top: 1.25rem;
}

.shop-hero-en {
    display: block;
    font-family: "Outfit", sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.shop-hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
    min-height: 420px;
}

.shop-hero-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.shop-hero-visual {
    flex: 1;
    min-height: 220px;
    background-size: cover;
    background-position: center;
}

.shop-hero-visual--cosmetics {
    background-image:
        linear-gradient(135deg, rgba(232, 180, 160, 0.3), rgba(59, 159, 217, 0.2)),
        linear-gradient(160deg, #f5ebe3 0%, #e8d5c8 40%, #d4e8f5 100%);
}

.shop-hero-body {
    padding: 1.75rem 2rem 2rem;
}

.shop-hero-body h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.shop-hero-body p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    max-width: 36ch;
}

.btn-shop {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-shop:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.shop-categories {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
}

.shop-category-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    transition: transform var(--transition), box-shadow var(--transition);
}

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

.shop-category-visual {
    min-height: 100px;
    background-size: cover;
    background-position: center;
}

.shop-category-card--skincare .shop-category-visual {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
}

.shop-category-card--makeup .shop-category-visual {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.shop-category-card--fragrance .shop-category-visual {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
}

.shop-category-body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.shop-category-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}

.btn-category {
    align-self: flex-start;
    padding: 0.45rem 1.1rem;
    background: var(--beige);
    color: var(--text);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition);
}

.btn-category:hover {
    background: var(--rose);
    color: var(--text);
}

.homepage-preview {
    display: block;
    max-width: 280px;
    max-height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

.homepage-preview--sm {
    max-width: 160px;
    max-height: 90px;
}

.homepage-image-field {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.color-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-input-wrap input[type="color"] {
    width: 48px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.support-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

.support-page {
    max-width: 820px;
    margin: 0 auto;
}

.support-chat {
    display: flex;
    flex-direction: column;
    height: min(72vh, 640px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.support-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #2d7eb5 100%);
    color: #fff;
    flex-shrink: 0;
}

.support-chat-header-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.support-chat-back {
    color: #fff;
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
    opacity: 0.9;
}

.support-chat-back:hover { opacity: 1; color: #fff; }

.support-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.support-chat-header-text {
    min-width: 0;
}

.support-chat-header-text strong {
    display: block;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-chat-header-text span {
    display: block;
    font-size: 0.78rem;
    opacity: 0.88;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-chat-header .badge {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.support-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background:
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.support-chat-empty {
    margin: auto;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.support-bubble-row {
    display: flex;
    width: 100%;
}

.support-bubble-row--mine {
    justify-content: flex-start;
}

.support-bubble-row--theirs {
    justify-content: flex-end;
}

.support-bubble {
    max-width: min(78%, 420px);
    padding: 0.55rem 0.8rem 0.45rem;
    border-radius: 14px;
    position: relative;
}

.support-bubble-row--mine .support-bubble {
    background: #dcf8c6;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.support-bubble-row--theirs .support-bubble {
    background: #fff;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.support-bubble-sender {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.support-bubble-text {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.55;
    font-size: 0.92rem;
    color: var(--text);
    word-break: break-word;
}

.support-bubble-time {
    display: block;
    text-align: left;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.support-chat-composer {
    flex-shrink: 0;
    padding: 0.65rem 0.75rem;
    background: #f0f2f5;
    border-top: 1px solid var(--border);
}

.support-chat-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    background: #fff;
    border-radius: 24px;
    padding: 0.35rem 0.45rem 0.35rem 0.85rem;
    border: 1px solid var(--border);
}

.support-chat-input {
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    min-height: 24px;
    max-height: 120px;
    padding: 0.45rem 0;
    font-family: inherit;
    font-size: 0.92rem;
    background: transparent;
    line-height: 1.4;
}

.support-chat-send {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--transition), transform var(--transition);
}

.support-chat-send:hover {
    background: var(--primary-dark);
    transform: scale(1.04);
}

.support-chat-closed {
    padding: 0.85rem 1rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    background: #f8fafc;
    border-top: 1px solid var(--border);
}

.support-chat-toolbar {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}

.support-inbox-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 1rem;
    min-height: 480px;
}

.support-inbox-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    overflow: hidden;
}

.support-inbox-new {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.support-inbox-new h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.support-inbox-list-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.support-inbox-list-wrap h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.65rem 1rem 0.35rem;
    margin: 0;
}

.support-inbox-list {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
}

.support-inbox-list--admin {
    padding: 0;
    overflow: hidden;
}

.support-inbox-item {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.support-inbox-item:hover {
    background: var(--surface-hover);
}

.support-inbox-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #5bb5e8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.support-inbox-body {
    min-width: 0;
}

.support-inbox-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: baseline;
}

.support-inbox-top strong {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-inbox-top time {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.support-inbox-subject {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-inbox-preview {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-inbox-badge {
    font-size: 0.68rem;
}

.support-inbox-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.support-inbox-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.support-inbox-welcome {
    text-align: center;
    max-width: 320px;
    color: var(--text-secondary);
}

.support-inbox-welcome-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.support-inbox-welcome h2 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* ── Floating support widget (Smart ERP style) ── */
.support-widget {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 1200;
    font-family: "Tajawal", "Outfit", sans-serif;
}

.support-widget-launcher {
    position: relative;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 14px;
    background: #2d3748;
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.support-widget-launcher:hover {
    background: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.support-widget-launcher.is-open {
    background: #1a202c;
}

.support-widget-launcher-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-widget-launcher-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.support-widget-panel {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    width: min(380px, calc(100vw - 2rem));
    height: min(560px, calc(100vh - 6rem));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.support-widget-panel-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #f0f2f5;
}

.support-widget-powered {
    flex-shrink: 0;
    text-align: center;
    padding: 0.45rem;
    font-size: 0.68rem;
    color: #a0aec0;
    background: #fff;
    border-top: 1px solid #edf2f7;
}

.support-widget-powered strong {
    color: #718096;
    font-weight: 600;
}

.support-widget-loading,
.support-widget-error-inline {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #718096;
    font-size: 0.88rem;
}

.support-widget-welcome {
    text-align: center;
    padding: 1.25rem 1rem 0.75rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.support-widget-welcome-avatar {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    border-radius: 50%;
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.support-widget-welcome h3 {
    font-size: 1rem;
    margin: 0 0 0.25rem;
    color: #2d3748;
}

.support-widget-welcome p {
    margin: 0;
    font-size: 0.82rem;
    color: #718096;
}

.support-widget-inbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.support-widget-inbox-toolbar strong {
    font-size: 0.85rem;
    color: #4a5568;
}

.support-widget-new-btn,
.support-widget-back-btn {
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    font-family: inherit;
}

.support-widget-back-btn {
    font-size: 1.1rem;
    color: #4a5568;
    margin-left: 0.25rem;
}

.support-widget-submit-btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 0.65rem;
    background: #2d3748;
    color: #fff;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.support-widget-inbox {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.support-widget-list {
    flex: 1;
    overflow-y: auto;
    background: #f0f2f5;
}

.support-widget-conv-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    text-align: inherit;
    font: inherit;
    transition: background 0.15s;
}

.support-widget-conv-item:hover {
    background: #f7fafc;
}

.support-widget-conv-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.support-widget-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3182ce;
    border: 2px solid #fff;
}

.support-widget-conv-body {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.support-widget-conv-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: baseline;
}

.support-widget-conv-top strong {
    font-size: 0.88rem;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-widget-conv-top time {
    font-size: 0.7rem;
    color: #a0aec0;
    flex-shrink: 0;
}

.support-widget-conv-body p {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-widget-inbox-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #718096;
    font-size: 0.88rem;
}

.support-widget-new {
    height: 100%;
    overflow-y: auto;
    background: #fff;
    padding: 0.85rem;
}

.support-widget-new-form .form-group {
    margin-bottom: 0.75rem;
}

.support-widget-new-form label {
    font-size: 0.82rem;
    color: #4a5568;
}

.support-widget-new-form input,
.support-widget-new-form textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    font-family: inherit;
    font-size: 0.88rem;
}

.support-widget-error {
    color: #c53030;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
}

.support-widget-chat-wrap,
.support-widget-chat-wrap .support-chat {
    height: 100%;
    min-height: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Widget chat mode */
.support-chat--widget .support-chat-header {
    background: #2d3748;
    padding: 0.7rem 0.85rem;
    border-radius: 0;
}

.support-chat--widget .support-chat-avatar {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.15);
}

.support-chat--widget .support-chat-header-text strong {
    font-size: 0.92rem;
}

.support-chat--widget .support-chat-header-text span {
    font-size: 0.72rem;
    opacity: 0.85;
}

.support-chat--widget .support-chat-messages {
    background: #f0f2f5;
    padding: 1rem 0.85rem;
    gap: 0.75rem;
}

.support-chat--widget .support-bubble {
    background: #fff;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    max-width: 92%;
}

.support-chat--widget .support-bubble-row--mine {
    justify-content: flex-start;
}

.support-chat--widget .support-bubble-row--theirs {
    justify-content: flex-end;
}

.support-chat--widget .support-bubble-row--mine .support-bubble {
    border-bottom-right-radius: 4px;
}

.support-chat--widget .support-bubble-row--theirs .support-bubble {
    border-bottom-left-radius: 4px;
}

.support-chat--widget .support-bubble-text {
    font-size: 0.88rem;
    color: #2d3748;
    line-height: 1.55;
}

.support-chat--widget .support-chat-composer--widget {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 0.6rem 0.75rem;
}

.support-chat--widget .support-chat-input-wrap {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.35rem 0.5rem;
    align-items: flex-end;
}

.support-chat--widget .support-chat-input {
    font-size: 0.88rem;
    min-height: 36px;
}

.support-chat-tools {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.support-chat-tool {
    border: none;
    background: transparent;
    font-size: 1rem;
    opacity: 0.45;
    cursor: default;
    padding: 0.2rem;
    line-height: 1;
}

.support-chat--widget .support-chat-send {
    width: 34px;
    height: 34px;
    background: #2d3748;
    border-radius: 8px;
}

.support-chat--widget .support-chat-send:hover {
    background: #1a202c;
    transform: none;
}

.support-chat--widget .support-chat-closed {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 0.85rem;
    text-align: center;
}

.support-chat--widget .support-chat-closed span {
    display: inline-block;
    background: #edf2f7;
    color: #718096;
    font-size: 0.82rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
}

/* Admin support split chat */
.admin-support-page {
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 0;
    min-height: min(720px, calc(100vh - 200px));
    height: min(720px, calc(100vh - 200px));
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.admin-support-sidebar {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e2e8f0;
    background: #f8fafc;
    min-height: 0;
}

.admin-support-sidebar-head {
    padding: 1rem;
    background: #2d3748;
    color: #fff;
}

.admin-support-sidebar-head h2 {
    margin: 0;
    font-size: 1rem;
}

.admin-support-count {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    opacity: 0.85;
}

.admin-support-tabs {
    margin: 0;
    padding: 0.5rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.admin-support-tabs a {
    font-size: 0.82rem;
    padding: 0.4rem 0.65rem;
}

.admin-support-conv-list {
    flex: 1;
    overflow-y: auto;
}

.admin-support-conv-item {
    text-decoration: none;
    color: inherit;
}

.admin-support-conv-item.is-active {
    background: #ebf8ff;
    border-right: 3px solid var(--primary);
}

.admin-support-conv-subject {
    font-weight: 600;
    color: #4a5568 !important;
}

.admin-support-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #f0f2f5;
}

.admin-support-chat-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.admin-support-chat-panel .support-chat {
    flex: 1;
    min-height: 0;
    height: 100%;
}

.admin-support-chat-actions {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.admin-support-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #718096;
    padding: 2rem;
}

.admin-support-placeholder h3 {
    margin: 0.75rem 0 0.35rem;
    color: #2d3748;
}

.hidden {
    display: none !important;
}

.support-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.support-ticket-item {
    display: block;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition), border-color var(--transition);
}

.support-ticket-item:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
}

.support-ticket-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.support-ticket-item time {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.support-thread {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.support-msg {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.support-msg--user {
    background: var(--surface);
    margin-left: 1.5rem;
}

.support-msg--admin {
    background: #eff6ff;
    border-color: #bfdbfe;
    margin-right: 1.5rem;
}

.support-msg-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.support-msg-meta time {
    color: var(--text-muted);
}

.support-msg-body {
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--text-secondary);
}

.support-admin-actions {
    margin-top: 1rem;
}

.shop-products-section {
    margin-bottom: 3rem;
}

.shop-cta-banner {
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary) 0%, #5bb5e8 50%, var(--accent) 100%);
    color: #fff;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 1rem;
}

.shop-cta-content h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.shop-cta-content p {
    opacity: 0.92;
    margin-bottom: 1.5rem;
}

.shop-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.shop-cta-actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.shop-cta-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border-color: #fff;
}

/* ── Landing Hero (legacy) ── */
.landing-hero {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    background: linear-gradient(135deg, var(--primary) 0%, #5bb5e8 50%, var(--accent) 100%);
    color: #fff;
    padding: 3.5rem 2rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.landing-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(249, 115, 22, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.landing-hero-content { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }

.landing-hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.landing-hero p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ── Feature Cards ── */
.features-section { margin-bottom: 3rem; }

.section-title {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-title p { color: var(--text-secondary); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
}

.feature-card.supplier::before { background: linear-gradient(90deg, var(--supplier), #34d399); }
.feature-card.admin::before { background: linear-gradient(90deg, var(--admin), #f87171); }
.feature-card.merchant::before { background: linear-gradient(90deg, var(--merchant), #fbbf24); }

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card.supplier .feature-icon { background: #d1fae5; }
.feature-card.admin .feature-icon { background: #fee2e2; }
.feature-card.merchant .feature-icon { background: #fef3c7; }

.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; }

/* ── How it works ── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.step-num {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    margin: 0 auto 0.75rem;
}

.step-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.35rem; }
.step-card p { font-size: 0.85rem; color: var(--text-secondary); }

/* ── Auth ── */
.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: calc(100vh - var(--header-h) - 120px);
    min-height: calc(100dvh - var(--header-h) - 120px);
    max-width: 960px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.auth-banner {
    background: linear-gradient(160deg, var(--primary), #5bb5e8, var(--accent));
    color: #fff;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-banner h2 { font-size: 1.75rem; font-weight: 800; margin-bottom: 1rem; }
.auth-banner p { opacity: 0.9; line-height: 1.7; margin-bottom: 1.5rem; }

.auth-banner-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-banner-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
}

.auth-banner-list li::before {
    content: "✓";
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.auth-form-side { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; }

.auth-form-side h2 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.35rem; }
.auth-subtitle { color: var(--text-secondary); margin-bottom: 1.75rem; font-size: 0.95rem; }

.demo-accounts {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
}

.demo-accounts p { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.5rem; }
.demo-accounts ul { list-style: none; font-size: 0.85rem; color: var(--text-secondary); }
.demo-accounts li { padding: 0.25rem 0; }
.demo-accounts strong { color: var(--text); }

.auth-switch-link {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-card-single {
    max-width: 440px;
    margin: 2rem auto;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.auth-card-single h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.35rem; }

.customer-order-card {
    max-width: 560px;
    text-align: right;
}

.customer-order-panel {
    text-align: right;
    margin: 1rem 0;
}

.customer-order-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.customer-modify-details summary {
    list-style: none;
    cursor: pointer;
}

.customer-modify-details summary::-webkit-details-marker { display: none; }

.panel-warning {
    border-color: #fbbf24;
    background: #fffbeb;
}
.auth-icon { font-size: 3rem; margin-bottom: 1rem; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.bio-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.5rem 0 0;
    min-height: 1.2rem;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
}

.toggle-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* ── Dashboard Nav ── */
.dashboard-nav {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.dashboard-nav::-webkit-scrollbar { display: none; }

.dashboard-nav a {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.dashboard-nav a.active .nav-badge {
    background: #fff;
    color: var(--primary);
}

.nav-badge--muted {
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.6rem;
    min-width: auto;
    height: auto;
    padding: 0.1rem 0.35rem;
    vertical-align: middle;
}

.dashboard-nav a:hover { background: var(--bg); color: var(--primary); }
.dashboard-nav a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

/* ── Page Header ── */
.page-header {
    margin-bottom: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.page-header h1 {
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    font-weight: 800;
    line-height: 1.3;
}

.page-header p { color: var(--text-secondary); margin-top: 0.35rem; }

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

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

.stat-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.stat-card.stat-admin::after { background: var(--admin); }
.stat-card.stat-supplier::after { background: var(--supplier); }
.stat-card.stat-merchant::after { background: var(--merchant); }
.stat-card.stat-warning::after { background: var(--warning); }
.stat-card.stat-success::after { background: var(--success); }

.stat-value {
    display: block;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin-top: 0.35rem;
    font-weight: 500;
}

/* ── Cards & Panels ── */
.card, .panel {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.card h2, .panel h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.panel-hint {
    margin: -0.35rem 0 1rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-inline .form-group-wide {
    grid-column: 1 / -1;
}

/* ── Product Grid (E-Commerce) ── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.product-image {
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--beige), var(--rose));
    position: relative;
    overflow: hidden;
}

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

.product-img-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 3rem;
    opacity: 0.5;
    background: linear-gradient(135deg, var(--bg-soft), #e0e7ff);
}

.product-image .status-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.product-body {
    padding: 1.15rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.product-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.product-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
    background: var(--bg);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.product-price small {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
}

.price-old {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
}

/* ── Review Card ── */
.review-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.review-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.review-card-header h3 { font-size: 1.1rem; font-weight: 700; }

.review-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.review-detail-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.review-detail-item span { font-weight: 600; font-size: 0.95rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-label-block {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.verify-method-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.verify-method-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: border-color var(--transition), background var(--transition);
}

.verify-method-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.06);
}

.verify-method-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.phone-input-group { margin-top: 0.35rem; }

.phone-input-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.1fr) minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
}

.phone-country-search {
    width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.65rem 0.85rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}

.phone-country-select,
.phone-local-input {
    width: 100%;
    padding: 0.75rem 0.85rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}

.phone-country-select { min-width: 0; }

.phone-input-hint {
    margin-top: 0.45rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .admin-support-page {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 70vh;
    }

    .admin-support-sidebar {
        max-height: 240px;
        border-left: none;
        border-bottom: 1px solid #e2e8f0;
    }

    .support-widget {
        bottom: 1rem;
        left: 1rem;
    }

    .support-widget-panel {
        width: min(360px, calc(100vw - 1.25rem));
        height: min(520px, calc(100vh - 5rem));
    }

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

    .support-inbox-placeholder {
        display: none;
    }

    .support-chat {
        height: min(68vh, 560px);
    }
}

@media (max-width: 768px) {
    .support-layout {
        grid-template-columns: 1fr;
    }

    .support-msg--user { margin-left: 0; }
    .support-msg--admin { margin-right: 0; }
}

@media (max-width: 520px) {
    .phone-input-row {
        grid-template-columns: 1fr;
    }
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 159, 217, 0.15);
}

.form-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.input-sm {
    width: 100%;
    max-width: 120px;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

/* ── Tables ── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

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

.table th,
.table td {
    padding: 0.9rem 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.table th {
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: none;
    white-space: nowrap;
}

.table tbody tr:hover { background: var(--surface-hover); }
.table tbody tr:last-child td { border-bottom: none; }

.table-link {
    color: var(--primary);
    font-weight: 600;
}

/* Mobile table cards */
@media (max-width: 768px) {
    .table-cards .table thead { display: none; }
    .table-cards .table,
    .table-cards .table tbody,
    .table-cards .table tr,
    .table-cards .table td { display: block; min-width: unset; }
    .table-cards .table tr {
        padding: 1rem;
        border-bottom: 1px solid var(--border-light);
        margin-bottom: 0.5rem;
    }
    .table-cards .table td {
        padding: 0.35rem 0;
        border: none;
        display: flex;
        justify-content: space-between;
        gap: 1rem;
    }
    .table-cards .table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-secondary);
        font-size: 0.8rem;
        flex-shrink: 0;
    }
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge.role-admin { background: #fee2e2; color: #b91c1c; }
.badge.role-supplier { background: #d1fae5; color: #047857; }
.badge.role-merchant { background: #fef3c7; color: #b45309; }

.badge.status-pending,
.badge.status-pending_review { background: #fef3c7; color: #b45309; }
.badge.status-awaiting_customer { background: #ffedd5; color: #c2410c; }
.badge.status-customer_modify_requested { background: #fce7f3; color: #be185d; }
.badge.status-customer_confirmed { background: #bbf7d0; color: #15803d; }
.badge.status-approved { background: #dbeafe; color: #1d4ed8; }
.badge.status-rejected { background: #fee2e2; color: #b91c1c; }
.badge.status-sent_to_supplier { background: #ede9fe; color: #6d28d9; }
.badge.status-preparing { background: #e0f2fe; color: #0369a1; }
.badge.status-out_for_delivery { background: #d1fae5; color: #047857; }
.badge.status-completed { background: #d1fae5; color: #065f46; }
.badge.status-returned { background: #fef3c7; color: #b45309; }
.badge.status-damaged { background: #fee2e2; color: #991b1b; }
.badge.status-open { background: #fef3c7; color: #b45309; }
.badge.status-answered { background: #dbeafe; color: #1d4ed8; }
.badge.status-closed { background: #f3f4f6; color: #6b7280; }

.action-form-block {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.action-form-block h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.product-media-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.product-media-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.product-media-video {
    display: block;
    width: 100%;
    max-height: 160px;
    margin-top: 0.5rem;
    border-radius: 8px;
    background: #000;
}

.store-url-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.store-url-box code {
    flex: 1;
    word-break: break-all;
    font-size: 0.9rem;
}

.store-slug-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    direction: ltr;
    text-align: left;
}

.store-slug-field span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.store-slug-field input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
}

.badge.status-pending_merchant { background: #fef3c7; color: #b45309; }

.badge.source-public_store { background: #dbeafe; color: #1d4ed8; font-weight: 600; }
.badge.source-merchant_direct { background: #f3f4f6; color: #6b7280; }

.order-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.panel-highlight {
    border-color: #93c5fd;
    background: #eff6ff;
}

.withdraw-panel {
    margin-bottom: 1.5rem;
}

.profit-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
}

.profit-stat {
    min-width: 140px;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.profit-stat-main {
    border-color: var(--accent);
    background: #fff7ed;
}

.profit-stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.profit-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.profit-available {
    color: var(--accent);
    font-size: 1.35rem;
}

.panel-hint-warn {
    color: #b45309;
    font-weight: 600;
}

.error-page {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 480px;
    margin: 0 auto;
}

.error-page .error-code {
    font-size: 5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.error-page h1 { margin-bottom: 0.75rem; }
.error-page p { color: var(--text-secondary); margin-bottom: 1.5rem; }
.error-page .quick-actions { justify-content: center; }

.withdraw-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.withdraw-available {
    color: var(--accent);
    font-size: 1.15rem;
}

.withdraw-modal-content {
    max-width: 480px;
}

.withdraw-net-preview {
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.badge.status-approved { background: #dbeafe; color: #1d4ed8; }
.badge.status-completed { background: #d1fae5; color: #065f46; }

.stock-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.stock-form label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.product-media-count {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1.25rem 0 0.75rem;
    color: var(--text-secondary);
}

.admin-order-items-edit input.input-sm {
    min-width: 90px;
}

.panel-danger-zone {
    border-color: #fca5a5;
    background: #fef2f2;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
    border: none;
}

.btn-warning:hover {
    background: #d97706;
    color: #fff;
}

/* ── Filters ── */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    padding: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-tabs a {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.filter-tabs a:hover { background: var(--bg); color: var(--primary); }
.filter-tabs a.active { background: var(--primary); color: #fff; }

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

/* ── Info & Misc ── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.info-item {
    padding: 0.85rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.info-item strong {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.text-muted { color: var(--text-secondary); }
.text-success { color: var(--success); }

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
}

.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

.inline-form { display: inline-block; margin-top: 0.5rem; }

.actions-panel .quick-actions form { display: inline-block; }

/* ── Alerts ── */
.flash-messages { margin-bottom: 1.25rem; }

.alert {
    padding: 0.9rem 1.15rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* ── Footer ── */
.site-footer {
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    color: #cbd5e1;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2.5rem 1.5rem 1.5rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
}

.footer-inner--with-social {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
}

.footer-desc { font-size: 0.9rem; line-height: 1.6; }

.footer-col h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.footer-col p, .footer-col a {
    font-size: 0.85rem;
    color: #94a3b8;
    display: block;
    margin-bottom: 0.35rem;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
    border-top: 1px solid #334155;
    padding: 1.25rem;
    text-align: center;
    font-size: 0.82rem;
    color: #64748b;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.social-link svg {
    width: 1.1rem;
    height: 1.1rem;
    display: block;
}

.social-link:hover {
    transform: translateY(-2px);
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.social-link--facebook:hover { background: #1877f2; }
.social-link--instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-link--tiktok:hover { background: #010101; }
.social-link--whatsapp:hover { background: #25d366; }
.social-link--telegram:hover { background: #229ed9; }
.social-link--snapchat:hover { background: #fffc00; color: #111; }
.social-link--youtube:hover { background: #ff0000; }
.social-link--x:hover { background: #111; }

.social-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem 1rem;
}

.social-order-hint {
    margin-top: 0.25rem;
    margin-bottom: 0.65rem;
}

.social-order-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.75rem;
}

.social-order-item {
    display: grid;
    grid-template-columns: auto auto 5.5rem 1fr auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    cursor: grab;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.social-order-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.social-order-item.dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.social-order-handle {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    user-select: none;
    cursor: grab;
}

.social-order-icon {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    pointer-events: none;
}

.social-order-icon svg {
    width: 0.95rem;
    height: 0.95rem;
}

.social-order-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
}

.social-order-item input {
    margin: 0;
    min-width: 0;
}

.social-order-moves {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.social-order-btn {
    border: none;
    background: var(--primary-light);
    color: var(--primary);
    width: 1.75rem;
    height: 1.35rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.65rem;
    line-height: 1;
    padding: 0;
}

.social-order-btn:hover {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 640px) {
    .social-order-item {
        grid-template-columns: auto 1fr auto;
    }

    .social-order-icon {
        display: none;
    }

    .social-order-label {
        grid-column: 2;
    }

    .social-order-item input {
        grid-column: 2;
    }

    .social-order-moves {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
    }
}

.footer-col--social .social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    max-width: 11rem;
    margin-top: 0.35rem;
}

.store-social-bar .social-links {
    justify-content: center;
    max-width: none;
}

.store-social-bar {
    margin-top: 2.5rem;
    padding: 1.5rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.store-social-bar h3 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.store-social-bar .social-link {
    background: var(--primary-light);
    color: var(--primary);
}

.store-social-bar .social-link:hover {
    color: #fff;
}

.social-links--panel {
    gap: 0.65rem;
}

.social-links--panel .social-link {
    width: auto;
    height: auto;
    min-height: 2.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--primary);
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.social-links--panel .social-link span {
    line-height: 1;
}

.admin-social-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-social-panel-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
}

.admin-social-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ── Print Label ── */
.print-page {
    background: #fff;
    color: #111;
    padding: 2rem;
    min-height: auto;
}

.label-card {
    max-width: 400px;
    border: 2px solid #111;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.label-card h1 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.label-order-id { font-size: 1.1rem; font-weight: 700; }
.order-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    background: #f1f5f9;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
}
.label-field { margin: 0.5rem 0; line-height: 1.5; }
.label-card ul { margin: 0.5rem 1.5rem 0 0; }

@media print {
    .no-print, .site-header, .site-footer { display: none !important; }
    .print-page { padding: 0; }
}

/* ── Responsive ── */
@media (min-width: 768px) {
    .user-chip { display: flex; }
    .header-actions .desktop-only { display: inline-flex; }
}

@media (max-width: 1024px) {
    .shop-hero-grid {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .shop-categories {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: unset;
    }

    .shop-category-card {
        grid-template-columns: 1fr;
    }

    .shop-category-visual {
        min-height: 80px;
    }
}

@media (max-width: 767px) {
    :root { --header-h: 76px; }

    .header-inner {
        grid-template-columns: 1fr auto;
        gap: 0.75rem;
    }

    .header-search { display: none; }

    .brand-logo-svg { width: 7.75rem; max-height: 2.35rem; }

    .menu-toggle { display: flex; }
    .header-actions .desktop-only { display: none; }
    .mobile-nav { display: block; }

    .auth-layout { grid-template-columns: 1fr; }
    .auth-banner { padding: 2rem 1.5rem; }
    .auth-form-side { padding: 1.75rem 1.25rem; }

    .landing-hero { padding: 2.5rem 1.25rem; border-radius: var(--radius); }

    .main-content { padding: 1rem 1rem 2.5rem; }

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

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

    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.85rem; }

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

    .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }

    .shop-categories {
        grid-template-columns: 1fr;
    }

    .shop-category-card {
        grid-template-columns: 100px 1fr;
    }
}

@media (max-width: 380px) {
    .stats-grid { grid-template-columns: 1fr; }
    .brand-logo-svg { width: 7rem; max-height: 2.1rem; }
}

/* ── Notifications ── */
.notif-wrap { position: relative; }

.notif-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    font-size: 1.2rem;
    display: grid;
    place-items: center;
}

.notif-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
    padding: 0 4px;
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(340px, 90vw);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    overflow: hidden;
}

.notif-dropdown.open { display: block; }

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}

.notif-mark-all {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.notif-list { max-height: 320px; overflow-y: auto; }

.notif-item {
    display: block;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    transition: background var(--transition);
}

.notif-item:hover { background: var(--surface-hover); }
.notif-item.unread { background: var(--primary-light); border-right: 3px solid var(--primary); }
.notif-item strong { display: block; font-size: 0.88rem; margin-bottom: 0.2rem; }
.notif-item span { display: block; font-size: 0.8rem; color: var(--text-secondary); }
.notif-item time { font-size: 0.72rem; color: var(--text-muted); }

.notif-empty { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

.notif-view-all {
    display: block;
    text-align: center;
    padding: 0.75rem;
    background: var(--bg);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
}

.notif-page-list { display: flex; flex-direction: column; gap: 0.65rem; }

.notif-page-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    color: var(--text);
    transition: var(--transition);
}

.notif-page-item:hover { box-shadow: var(--shadow); }
.notif-page-item.unread { border-right: 4px solid var(--primary); background: var(--primary-light); }
.notif-page-icon { font-size: 1.25rem; flex-shrink: 0; }
.notif-page-body strong { display: block; margin-bottom: 0.25rem; }
.notif-page-body p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.35rem; }
.notif-page-body time { font-size: 0.78rem; color: var(--text-muted); }

/* ── Store & Cart ── */
.store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cart-fab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
    position: sticky;
    top: calc(var(--header-h) + 8px);
    z-index: 50;
}

.store-layout { position: relative; }

.cart-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: min(400px, 100vw);
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    transition: left var(--transition);
}

.cart-panel.open { left: 0; }

.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1150;
}

.cart-overlay.open { display: block; }

.cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}

.cart-panel-header h2 { font-size: 1.15rem; font-weight: 800; }

.cart-close {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    cursor: pointer;
    font-size: 1rem;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

.cart-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}

.cart-item-img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-soft);
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info strong { display: block; font-size: 0.9rem; margin-bottom: 0.2rem; }
.cart-item-base { font-size: 0.75rem; color: var(--text-muted); display: block; margin-bottom: 0.35rem; }
.cart-item-info label { font-size: 0.72rem; color: var(--text-secondary); display: block; margin-bottom: 0.15rem; }

.cart-sell-input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 0.35rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    cursor: pointer;
    font-weight: 700;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
}

.cart-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    font-weight: 600;
}

.cart-total strong { color: var(--primary); font-size: 1.15rem; }

.checkout-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1300;
    place-items: center;
    padding: 1rem;
}

.checkout-modal.open { display: grid; }

.checkout-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 0;
}

.checkout-modal-content {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border-radius: var(--radius);
    width: min(480px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
}

.checkout-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.checkout-modal-header h2 { font-size: 1.2rem; font-weight: 800; }

.checkout-summary {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
}

.checkout-summary h4 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.checkout-list { list-style: none; font-size: 0.85rem; color: var(--text-secondary); }
.checkout-list li { padding: 0.25rem 0; }

@media (min-width: 1024px) {
    .store-layout {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 1.5rem;
        align-items: start;
    }

    .cart-panel {
        position: sticky;
        top: calc(var(--header-h) + 1rem);
        left: auto;
        width: 100%;
        height: auto;
        max-height: calc(100vh - var(--header-h) - 2rem);
        border-radius: var(--radius);
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow);
    }

    .cart-panel.open { left: auto; }
    .cart-fab { display: none; }
    .cart-overlay { display: none !important; }
}

@media (max-width: 1023px) {
    .store-layout .cart-panel { display: none; }
    .store-layout .cart-panel.open { display: flex; }
}

/* Legacy class aliases */
.navbar { display: none; }
.container { max-width: var(--container); width: 100%; margin: 0 auto; }
.footer { display: none; }
.sub-nav { display: none; }
.roles-grid { display: none; }
.role-card { display: none; }
.hero { display: none; }
.auth-card { display: none; }
.dashboard-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.dash-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.dash-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.dash-card h3 { font-weight: 700; margin-bottom: 0.5rem; }
.dash-card p { color: var(--text-secondary); font-size: 0.95rem; }
.price-tag { font-size: 1.1rem; margin-top: 0.5rem; color: var(--primary); font-weight: 700; }
.card-header-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.product-review-card { margin-bottom: 1rem; }
.user-badge { display: none; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1.35rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem; border: none; cursor: pointer; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 14px rgba(59, 159, 217, 0.35); text-decoration: none; transition: all var(--transition); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1.35rem; border-radius: var(--radius-sm); font-weight: 600; background: var(--surface); color: var(--text); border: 1.5px solid var(--border); text-decoration: none; transition: all var(--transition); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-success { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1.35rem; border-radius: var(--radius-sm); font-weight: 600; border: none; cursor: pointer; background: linear-gradient(135deg, var(--success), #059669); color: #fff; }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; padding: 0.7rem 1.35rem; border-radius: var(--radius-sm); font-weight: 600; border: none; cursor: pointer; background: linear-gradient(135deg, var(--danger), #dc2626); color: #fff; }

.otp-destination-hint {
    text-align: center;
    font-size: 1.05rem;
    color: var(--primary);
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
}

.otp-resend-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.otp-expiry-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.otp-channel-picker {
    margin-bottom: 0.75rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.settings-grid .panel h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.otp-input {
    text-align: center;
    font-size: 1.75rem;
    letter-spacing: 0.5rem;
    font-weight: 700;
    padding: 0.85rem 1rem;
}

.network-urls-box {
    max-width: 720px;
    margin: 1rem auto 0;
    padding: 1rem 1.25rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 0.9rem;
}
.network-urls-box ul { margin: 0.5rem 0 0; padding-right: 1.25rem; }
.network-urls-box li { margin-bottom: 0.35rem; }
.network-urls-box code { background: #fff; padding: 0.1rem 0.35rem; border-radius: 4px; }
