@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    color-scheme: light;
    --bg: #f6f7fb;
    --ink: #0f172a;
    --muted: #60708a;
    --panel: #ffffff;
    --brand: #1a4fd7;
    --accent: #f59e0b;
    --accent-2: #0ea5e9;
    --border: #e2e8f0;
    --shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    --control-height: 44px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

h1, h2, h3, h4 {
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    margin: 0 0 12px;
}

p {
    margin: 0 0 12px;
}

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

.app {
    position: relative;
    min-height: 100vh;
}

.bg-glow {
    position: fixed;
    inset: -12% 0 auto 0;
    height: 360px;
    background: radial-gradient(circle at 18% 18%, rgba(26, 79, 215, 0.34), transparent 62%),
                radial-gradient(circle at 82% 12%, rgba(245, 158, 11, 0.28), transparent 58%);
    filter: blur(8px);
    opacity: 0.85;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
}

main,
.site-footer {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.site-header {
    position: sticky;
    top: 0;
    background: var(--brand);
    z-index: 10;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
}

.topbar {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 10px 0;
}

.brand {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
}

.search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    background: #f1f4fb;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e0e6f4;
    position: relative;
    height: var(--control-height);
    align-items: center;
}

.search input {
    border: none;
    background: transparent;
    padding: 0 12px;
    font-size: 0.95rem;
    outline: none;
    height: 100%;
}

.search button {
    border: none;
    background: transparent;
    color: #334155;
    padding: 0 10px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search button svg {
    width: 18px;
    height: 18px;
}

.suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
    z-index: 40;
}

.suggestions.open {
    display: grid;
    gap: 6px;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 600;
    color: #1f2937;
}

.suggestion:hover {
    background: #f1f5f9;
}

.tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #475569;
}

.tag.product {
    background: #dbeafe;
    color: #1d4ed8;
}

.tag.category {
    background: #fef3c7;
    color: #b45309;
}

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

.actions .btn.ghost {
    background: #fff;
    color: var(--ink);
}

.user-trigger {
    background: #fff;
    color: var(--ink);
}

.user-menu {
    position: relative;
}

.user-trigger {
    background: white;
    border: 1px solid #dfe7f3;
    padding: 0 14px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: var(--control-height);
}

.user-trigger .chev {
    font-size: 0.75rem;
    opacity: 0.7;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: all 0.2s ease;
    display: grid;
    gap: 6px;
    z-index: 30;
}

.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown a {
    font-weight: 600;
    color: #1f2937;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.user-dropdown a:hover {
    background: #f1f5f9;
}

.user-dropdown form {
    margin: 0;
}

.user-dropdown .btn {
    width: 100%;
    justify-content: center;
}

.user-dropdown .btn.ghost {
    background: #f8fafc;
}

.nav-strip {
    border-top: 1px solid var(--border);
    background: #ffffff;
}

.nav-strip .container {
    padding-top: 12px;
    padding-bottom: 12px;
}

.nav-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #334155;
    position: relative;
}

.nav-links a {
    padding: 8px 4px;
    font-weight: 600;
    color: inherit;
}

.nav-links a:hover {
    color: var(--brand);
}

.nav-item {
    position: relative;
}

.nav-link {
    font-weight: 700;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-caret {
    font-size: 0.75rem;
    opacity: 0.75;
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 320px;
    padding: 16px 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-col {
    display: grid;
    gap: 6px;
    position: relative;
}

.nav-sub {
    font-weight: 700;
    color: #1f2937;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border);
}

.nav-flyout {
    position: static;
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 8px 0 0;
    box-shadow: none;
    display: grid;
    gap: 6px;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    z-index: 21;
}

.nav-flyout a {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
    padding: 2px 0;
}

.nav-empty {
    color: var(--muted);
    font-weight: 600;
    padding: 10px 0;
}

.page {
    position: relative;
    z-index: 1;
    animation: fadeUp 0.6s ease both;
}

.btn {
    padding: 0 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: var(--control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

.btn.ghost {
    background: transparent;
    border: 1px solid var(--border);
}

.btn.cart {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-weight: 700;
}

.cart-icon {
    height: var(--control-height);
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn.danger {
    background: #ef4444;
    color: #fff;
}

.btn.small {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.logout-form {
    display: inline;
}

.hero-slider {
    position: relative;
    height: 260px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    padding: 36px;
    color: white;
    opacity: 0;
    transform: translateX(20px);
    animation: heroSlide 18s infinite;
}

.hero-slide h1 {
    color: white;
}

.hero-slide p {
    color: rgba(255, 255, 255, 0.85);
}

.slide-one {
    background: linear-gradient(120deg, #0f172a, #1a4fd7);
    animation-delay: 0s;
}

.slide-two {
    background: linear-gradient(120deg, #0f172a, #f97316);
    animation-delay: 6s;
}

.slide-three {
    background: linear-gradient(120deg, #0f172a, #22c55e);
    animation-delay: 12s;
}

@keyframes heroSlide {
    0% { opacity: 0; transform: translateX(20px); }
    5% { opacity: 1; transform: translateX(0); }
    30% { opacity: 1; transform: translateX(0); }
    35% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 0; transform: translateX(-20px); }
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.badge {
    background: #eef2ff;
    color: #1e3a8a;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-group {
    display: grid;
    gap: 10px;
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.section {
    margin-top: 28px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

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

.product-card {
    background: var(--panel);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 18px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 12px;
    transition: transform 0.2s ease;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
}

.product-card-link:hover h3 {
    color: var(--brand);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 24px;
}

.product-gallery {
    display: grid;
    gap: 16px;
}

.gallery-frame {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    align-items: start;
}

.product-main {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    min-height: 360px;
    display: grid;
    place-items: center;
}

.product-main img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.product-thumbs {
    display: grid;
    gap: 10px;
    align-content: start;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.thumb {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: white;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
}

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

.product-info {
    display: grid;
    gap: 14px;
}

.product-header h1 {
    margin: 0 0 6px;
}

.gallery-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

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

.gallery-actions .btn {
    width: 100%;
}

.gallery-actions form {
    width: 100%;
}

.btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn.cart-action {
    background: #facc15;
    color: #1f2937;
}

.btn.buy-action {
    background: #f97316;
    color: #ffffff;
}

.product-meta {
    display: grid;
    gap: 6px;
}

.variant-section {
    margin-top: 8px;
}

.variant-group {
    display: grid;
    gap: 8px;
}

.variant-groups {
    display: grid;
    gap: 16px;
}

.variant-group.is-hidden {
    display: none;
}

.variant-swatches {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.swatch {
    width: 84px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    padding: 6px;
    display: grid;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.swatch img {
    width: 100%;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
}

.swatch span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
}

.swatch.is-selected {
    border-color: var(--brand);
    box-shadow: 0 10px 20px rgba(26, 79, 215, 0.12);
    transform: translateY(-1px);
}

.swatch.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.variant-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pill-option {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pill-option.is-selected {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.pill-option.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

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

.variant-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.variant-item input {
    margin-top: 4px;
}

.variant-item.is-selected {
    border-color: rgba(26, 79, 215, 0.55);
    box-shadow: 0 10px 20px rgba(26, 79, 215, 0.12);
    background: rgba(26, 79, 215, 0.05);
}

.variant-price {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.variant-selected {
    display: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand);
}

.variant-item.is-selected .variant-selected {
    display: inline-flex;
}

.plan-heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--muted);
    background: #fff;
    cursor: pointer;
}

.plan-info svg {
    width: 14px;
    height: 14px;
}

.plan-tooltip {
    position: absolute;
    top: 28px;
    left: 0;
    min-width: 200px;
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    background: #0f172a;
    color: #fff;
    border-radius: 10px;
    font-size: 0.75rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    z-index: 5;
}

.plan-tooltip strong {
    color: #e2e8f0;
    font-weight: 600;
}

.plan-info:hover .plan-tooltip,
.plan-info:focus-within .plan-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.purchase {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.form-inline .btn {
    align-self: stretch;
}

@media (max-width: 960px) {
    .product-detail {
        grid-template-columns: 1fr;
    }

    .gallery-frame {
        grid-template-columns: 1fr;
    }

    .product-thumbs {
        grid-auto-flow: column;
        grid-auto-columns: 68px;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        padding-right: 0;
    }

    .gallery-actions {
        grid-template-columns: 1fr;
    }
}
.product-card:hover {
    transform: translateY(-4px);
}

.product-image {
    height: 140px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e2e8f0, #c7d2fe);
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    overflow: hidden;
}

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

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

.price {
    font-weight: 700;
    color: var(--brand);
}

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

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-link {
    display: grid;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.subnav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.subnav a {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.subnav a.active {
    background: var(--brand);
    color: white;
    border-color: transparent;
}

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

.console-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    align-items: start;
}

.console-sidebar {
    position: sticky;
    top: 110px;
    align-self: start;
}

.console-sidebar .card {
    padding: 16px;
}

.console-nav {
    display: grid;
    gap: 10px;
}

.console-nav a {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--panel);
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.console-nav a:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
}

.action-icons {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: var(--ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
}

.icon-btn svg {
    width: 16px;
    height: 16px;
}

.icon-btn.danger {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff5f5;
}

.icon-btn.success {
    color: #166534;
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.icon-btn.warn {
    color: #b45309;
    border-color: #fde68a;
    background: #fffbeb;
}

.metric-card {
    display: grid;
    gap: 10px;
}

.metric-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
}

.order-summary-qty {
    display: none;
}

.checkout.checkout-has-address .order-summary-qty {
    display: grid;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.modal.is-open {
    display: flex;
}

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

.modal-card {
    position: relative;
    z-index: 1;
    width: min(520px, 92vw);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.dataTables_wrapper {
    display: grid;
    gap: 14px;
}

.dataTables_wrapper .dt-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.dataTables_wrapper .dt-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.dataTables_length,
.dataTables_filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.dataTables_length label,
.dataTables_filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--muted);
}

.dataTables_filter input,
.dataTables_length select {
    height: var(--control-height);
    padding: 0 12px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    background: #fff !important;
    font-family: inherit !important;
}

.dataTables_filter input {
    min-width: 220px;
}

.dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    align-items: center;
}

.dataTables_paginate .paginate_button {
    padding: 6px 12px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border) !important;
    background: #fff !important;
    cursor: pointer;
    font-weight: 600;
    color: var(--ink) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dataTables_paginate .paginate_button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.1);
}

.dataTables_paginate .paginate_button.current {
    background: var(--brand) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.table.compact th,
.table.compact td {
    padding: 10px 8px;
    font-size: 0.88rem;
}

.table th {
    color: var(--muted);
    font-weight: 600;
}

.table-input,
.table-select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    width: 100%;
    font-family: inherit;
}

.form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.attribute-more {
    margin-top: 10px;
}

.attribute-more summary {
    cursor: pointer;
    font-weight: 600;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #ecfeff;
    color: #155e75;
}

.pill.warn {
    background: #fffbeb;
    color: #b45309;
}

.pill.success {
    background: #ecfdf3;
    color: #166534;
}

.link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.timeline-card {
    margin-bottom: 18px;
}

.timeline {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-top: 16px;
}

.timeline-step {
    flex: 1;
    position: relative;
    text-align: center;
    color: var(--muted);
}

.timeline-step .dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--border);
    margin: 0 auto 10px;
    box-shadow: 0 0 0 6px rgba(94, 234, 212, 0.08);
}

.timeline-step::before {
    content: "";
    position: absolute;
    top: 7px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--border);
}

.timeline-step:first-child::before {
    display: none;
}

.timeline-step.completed {
    color: var(--text);
}

.timeline-step.completed .dot {
    background: var(--primary);
}

.timeline-step.completed::before {
    background: var(--primary);
}

.timeline-step.current {
    color: var(--text);
    font-weight: 600;
}

.timeline-step.current .dot {
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.14);
}

.totals {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}

.totals .line {
    display: flex;
    justify-content: space-between;
}

.totals .line.total {
    font-weight: 700;
    font-size: 1.05rem;
}

.info-grid {
    display: grid;
    gap: 14px;
}

.invoice-page {
    padding-bottom: 30px;
}

.invoice-sheet {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

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

.invoice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.invoice-totals {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.invoice-totals .line {
    display: flex;
    justify-content: space-between;
}

.invoice-totals .line.total {
    font-weight: 700;
    font-size: 1.05rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.image-tile {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
    display: grid;
    gap: 8px;
}

.image-tile img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

.image-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .timeline {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-step {
        text-align: left;
    }

    .timeline-step::before {
        display: none;
    }

    .timeline-step .dot {
        margin: 0 0 8px;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 18px;
    }

    .topbar {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-dropdown {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .topbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .search {
        grid-template-columns: 1fr auto;
        height: 42px;
    }

    .brand {
        font-size: 1.4rem;
    }

    .nav-strip .container {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .nav-links {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 6px;
    }

    .nav-links::-webkit-scrollbar {
        height: 4px;
    }

    .nav-links::-webkit-scrollbar-thumb {
        background: #cbd5f5;
        border-radius: 999px;
    }

    .nav-item {
        position: static;
    }

.nav-dropdown {
        position: static;
        border: none;
        box-shadow: none;
        padding: 6px 0 0;
        background: transparent;
        display: none;
        grid-template-columns: 1fr;
    }

    .nav-item:focus-within .nav-dropdown,
    .nav-item:active .nav-dropdown {
        display: grid;
    }

    .nav-col {
        padding: 6px 0;
    }

    .nav-flyout {
        position: static;
        border: none;
        box-shadow: none;
        padding: 6px 0 0 12px;
        transform: none;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-gallery,
    .product-info {
        width: 100%;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

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

    .console-sidebar {
        position: static;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .form-inline {
        flex-wrap: wrap;
        width: 100%;
    }

    .table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .table th,
    .table td {
        padding: 10px 8px;
    }

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

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

@media print {
    .site-header,
    .site-footer,
    .topbar,
    .nav-strip,
    .actions,
    .btn {
        display: none !important;
    }

    .invoice-sheet {
        box-shadow: none;
        border: none;
        padding: 0;
    }
}

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

.auth-shell {
    max-width: 880px;
    margin: 30px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.auth-full {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: stretch;
}

.auth-full-shell {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    grid-template-columns: 1fr;
    min-height: calc(100vh - 120px);
    padding: 24px;
}

.auth-page-header {
    text-align: center;
    padding: 24px 16px 8px;
}

.auth-page-header h1 {
    margin: 0 0 8px;
}

.auth-full .auth-panel {
    height: 100%;
}

@media (max-width: 960px) {
    .auth-full-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}

.auth-panel {
    background: var(--panel);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 28px;
    border: 1px solid var(--border);
}

.form {
    display: grid;
    gap: 14px;
}

.form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.form input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.form select,
.form textarea {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    font-family: inherit;
}

.form textarea {
    resize: vertical;
    min-height: 90px;
}

.form button {
    background: var(--brand);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff1f1;
    border: 1px solid #f3caca;
    color: #b42318;
    font-weight: 600;
}

.alert.success {
    background: #ecfdf3;
    border-color: #b7ebc6;
    color: #10734a;
}

.site-footer {
    background: #0f172a;
    color: #e2e8f0;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.site-footer h4 {
    color: white;
    margin-bottom: 8px;
}

.site-footer a {
    display: block;
    color: #cbd5f5;
    margin: 6px 0;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    padding-top: 12px;
    padding-bottom: 20px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .hero-slider {
        height: 320px;
    }
}

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

    .actions {
        width: 100%;
        justify-content: flex-start;
    }
}
