* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #7a2cff;
    --primary-dark: #4b13b7;
    --primary-light: #b08bff;
    --accent-cyan: #3b54ff;
    --text: #1a1833;
    --text-light: #6f6a8f;
    --bg: #ffffff;
    --bg-alt: #f2eeff;
    --bg-dark: #141328;
    --bg-dark-lighter: #1c1a3a;
    --border: #ded6f5;
    --shadow: 0 4px 6px -1px rgba(27, 16, 67, 0.18);
    --shadow-lg: 0 10px 15px -3px rgba(27, 16, 67, 0.24);
    --radius: 12px;
    --radius-lg: 16px;
    --announcement-height: 0px;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-loader {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #151333 0%, #0f0e24 100%);
    opacity: 1;
    transition: opacity 0.35s ease;
    overflow: hidden;
}

.app-loader-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.app-loader-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    opacity: 0.5;
}

.app-loader-orb.orb-a {
    width: 420px;
    height: 420px;
    left: -110px;
    top: -120px;
    background: radial-gradient(circle, rgba(122, 44, 255, 0.55) 0%, rgba(122, 44, 255, 0) 70%);
}

.app-loader-orb.orb-b {
    width: 360px;
    height: 360px;
    right: -80px;
    bottom: -100px;
    background: radial-gradient(circle, rgba(59, 84, 255, 0.5) 0%, rgba(59, 84, 255, 0) 70%);
}

.app-loader-orb.orb-c {
    width: 240px;
    height: 240px;
    right: 18%;
    top: 16%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 72%);
}

.app-loader-glow-line {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(177, 159, 255, 0.42) 50%, rgba(255, 255, 255, 0) 100%);
}

.app-loader.is-hiding {
    opacity: 0;
    pointer-events: none;
}

.app-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: min(92vw, 760px);
    position: relative;
    z-index: 1;
    padding: 22px 20px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(20, 16, 56, 0.72) 0%, rgba(18, 14, 44, 0.6) 100%);
    border: 1px solid rgba(176, 145, 255, 0.34);
    box-shadow: 0 24px 60px rgba(9, 7, 28, 0.45);
    backdrop-filter: blur(8px);
}

.app-loader-logo {
    width: 340px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(122, 44, 255, 0.35));
    animation: loaderLogoPulse 1.6s ease-in-out infinite;
}

.app-loader-spinner {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, 0.28);
    border-top-color: #ffffff;
    animation: loaderSpin 0.9s linear infinite;
}

.app-loader-kicker {
    color: #ffffff;
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 12px rgba(13, 10, 33, 0.52);
}

.app-loader-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.app-loader-pill {
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.2);
    color: #f6f3ff;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.app-loader-info-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
}

.app-loader-info-card {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    padding: 12px 44px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    backdrop-filter: blur(3px);
    position: relative;
    animation: loaderCardFloat 2.2s ease-in-out infinite, loaderCardReady 2.0s ease-out forwards;
}

.app-loader-info-card::after {
    content: '\2713';
    position: absolute;
    right: 12px;
    top: 12px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    animation: loaderCheckReady 2.0s ease-out forwards;
}

.app-loader-info-card:nth-child(2) {
    animation-delay: 0.2s, 0.55s;
}

.app-loader-info-card:nth-child(2)::after {
    animation-delay: 0.55s;
}

.app-loader-info-card:nth-child(3) {
    animation-delay: 0.35s, 0.95s;
}

.app-loader-info-card:nth-child(3)::after {
    animation-delay: 0.95s;
}

.app-loader-info-title {
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.app-loader-info-value {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
}

.app-loader-subnote {
    color: #f4eeff;
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 1px 10px rgba(10, 8, 28, 0.45);
}

@media (max-width: 768px) {
    .app-loader-content {
        padding: 18px 14px 14px;
    }

    .app-loader-logo {
        width: 270px;
    }

    .app-loader-spinner {
        width: 52px;
        height: 52px;
        border-width: 5px;
    }

    .app-loader-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .app-loader-info-card {
        padding: 10px 12px;
    }

    .app-loader-kicker {
        font-size: 0.95rem;
        text-align: center;
    }

    .app-loader-glow-line {
        display: none;
    }
}

@keyframes loaderSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loaderLogoPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.95;
    }
    50% {
        transform: scale(1.03);
        opacity: 1;
    }
}

@keyframes loaderCardFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

@keyframes loaderCardReady {
    0%, 45% {
        border-color: rgba(255, 255, 255, 0.24);
        background: rgba(255, 255, 255, 0.22);
        box-shadow: none;
    }
    100% {
        border-color: rgba(77, 219, 139, 0.68);
        background: linear-gradient(180deg, rgba(59, 176, 111, 0.34) 0%, rgba(47, 133, 90, 0.28) 100%);
        box-shadow: 0 0 0 1px rgba(77, 219, 139, 0.2), 0 8px 22px rgba(13, 78, 46, 0.35);
    }
}

@keyframes loaderCheckReady {
    0%, 45% {
        border-color: rgba(255, 255, 255, 0.42);
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0);
        transform: scale(0.92);
    }
    70% {
        transform: scale(1.08);
    }
    100% {
        border-color: rgba(160, 255, 204, 0.92);
        background: #39c97b;
        color: #ffffff;
        transform: scale(1);
    }
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -40px;
    padding: 10px 14px;
    background: #111827;
    color: #ffffff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    z-index: 2002;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.cookie-consent {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: cookieOverlayIn 0.25s ease-out;
}

.cookie-consent.is-closing {
    animation: cookieOverlayOut 0.22s ease-in forwards;
}

.cookie-consent.hidden {
    display: none;
}

.cookie-consent-card {
    width: 100%;
    max-width: 540px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 16px;
    transform-origin: center;
    animation: cookieCardIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-consent.is-closing .cookie-consent-card {
    animation: cookieCardOut 0.22s ease-in forwards;
}

@keyframes cookieOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cookieOverlayOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes cookieCardIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cookieCardOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
}

.cookie-consent-card h3 {
    margin-bottom: 8px;
    color: var(--text);
}

.cookie-consent-card p {
    color: var(--text-light);
    margin-bottom: 12px;
}

.cookie-consent-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 640px) {
    .cookie-consent-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-consent-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1b1a36;
    z-index: 1000;
    padding: 8px 0;
    border-bottom: none;
}

.navbar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(122, 44, 255, 0.9), transparent);
    opacity: 1;
    pointer-events: none;
    z-index: 2;
}

.announcement-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff3b0;
    color: #b91c1c;
    font-weight: 700;
    text-align: center;
    padding: 10px 0;
    z-index: 1100;
    border-bottom: 1px solid #f2c94c;
}

.announcement-banner .container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding-left: 12px;
    padding-right: 56px;
}

.announcement-close-btn {
    display: inline-flex;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 1px solid rgba(185, 28, 28, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    color: #b91c1c;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    touch-action: manipulation;
    align-items: center;
    justify-content: center;
}

#announcementText {
    display: block;
    width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
    max-height: none;
}

.announcement-banner.hidden {
    display: none;
}

body.has-announcement .navbar {
    top: var(--announcement-height, 44px);
}

body.has-announcement .main-content {
    margin-top: calc(72px + var(--announcement-height, 44px));
}

body.has-announcement .hero {
    min-height: calc(100vh - (72px + var(--announcement-height, 44px)));
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1320px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    margin-right: 14px;
}

.logo-icon {
    width: 170px;
    height: auto;
    max-height: none;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.logo-icon img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    flex: 1;
    justify-content: center;
    margin: 0 20px;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
    font-size: 1rem;
    padding: 6px 10px;
    border-radius: 999px;
    letter-spacing: 0.01em;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    background: rgba(255,255,255,0.08);
}

.mobile-cart-item {
    display: none;
}

.mobile-quick-actions {
    display: none;
}

.mobile-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.mobile-cart-link svg {
    width: 20px;
    height: 20px;
}

.mobile-cart-count {
    position: static;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #23214a;
    border: 1px solid #3a3861;
}

.nav-right .btn {
    white-space: nowrap;
    padding: 8px 14px;
}

.profile-icon-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #7a2cff 0%, #3b54ff 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 18px rgba(59, 84, 255, 0.45);
}

.profile-icon-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #6d1ff2 0%, #3048ea 100%);
}

.profile-icon {
    width: 20px;
    height: 20px;
}

@media (max-width: 1200px) {
    .logo-icon {
        width: 160px;
    }

    .nav-links {
        gap: 6px;
    }
}

@media (max-width: 1100px) {
    .logo-icon {
        width: 150px;
    }

    .nav-links a {
        font-size: 0.9rem;
    }
}

.cart-btn {
    position: relative;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.cart-btn:hover {
    color: white;
}

.cart-btn svg {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-count:empty,
.cart-count[data-count="0"] {
    display: none;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s;
}

/* Admin Login Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 24px;
}

.login-modal.hidden {
    display: none;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: var(--text);
}

.login-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form label {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.login-form input {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-form button {
    margin-top: 8px;
}

.login-error {
    color: #dc2626;
    font-size: 0.9rem;
    text-align: center;
    min-height: 20px;
}

.login-progress-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 6, 20, 0.74);
    padding: 22px;
}

.login-progress-modal.hidden {
    display: none;
}

.login-progress-box {
    width: min(92vw, 420px);
    border-radius: 16px;
    border: 1px solid rgba(161, 136, 255, 0.34);
    background: linear-gradient(180deg, rgba(27, 22, 68, 0.97) 0%, rgba(18, 15, 52, 0.98) 100%);
    box-shadow: 0 24px 56px rgba(9, 8, 30, 0.45);
    padding: 20px 18px;
    color: #ffffff;
}

.login-progress-box h3 {
    margin: 0;
    font-size: 1.16rem;
    color: #ffffff;
}

.login-progress-box p {
    margin: 8px 0 14px;
    color: #f1ebff;
    font-size: 0.95rem;
}

.login-progress-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.login-progress-step {
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #f0eaff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
}

.login-progress-step.active {
    background: rgba(111, 74, 255, 0.95);
    border-color: rgba(185, 168, 255, 0.9);
    color: #fff;
}

.login-progress-step.done {
    background: rgba(46, 202, 130, 0.92);
    border-color: rgba(141, 255, 209, 0.72);
    color: #072014;
}

.login-progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    overflow: hidden;
}

.login-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6e44ff 0%, #8e74ff 60%, #b59bff 100%);
    transition: width 0.28s ease;
}

/* Email Modal */
.email-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
    padding: 20px;
}

.email-modal.hidden {
    display: none;
}

.email-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.email-modal-container {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2002;
}

.email-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text);
}

.email-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.email-modal-close:hover {
    background: var(--bg-light);
    color: var(--text);
}

.email-modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.email-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.email-form label {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.email-form input,
.email-form textarea {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.email-form input:focus,
.email-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input-readonly {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.form-input-readonly:focus {
    border-color: var(--border) !important;
    box-shadow: none !important;
}

.email-form textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    padding: 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
    min-height: 20px;
}

/* Order Details Modal */
.order-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2100;
    padding: 20px;
}

.order-details-modal.hidden { display: none; }

.order-details-container {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.order-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.order-details-header h2 { margin: 0; font-size: 1.25rem; }

.order-details-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
}

.order-details-content { padding: 20px; max-height: 70vh; overflow: auto; }

.order-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.order-details-grid .label { color: var(--text-light); font-size: 0.9rem; }
.order-details-grid .value { font-weight: 600; }

.order-details-items { margin-top: 12px; }
.order-details-items .order-item-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* Address full display */
.order-details-content > div:nth-child(2) { word-break: break-word; white-space: pre-wrap; }

@media (max-width: 600px) {
    .order-details-grid { grid-template-columns: 1fr; }
}

.form-message.success {
    background: #dcfce7;
    color: #166534;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
}

.email-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-top: 72px;
}

/* Pages */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page.active {
    display: block;
    opacity: 1;
}

.auth-container {
    display: flex;
    justify-content: center;
    padding: 40px 0 80px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-alt) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    padding: 30px;
}

.auth-toggle {
    display: flex;
    gap: 8px;
    background: var(--bg-alt);
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--border);
    margin-bottom: 22px;
}

.auth-tab {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.auth-tab.active {
    background: white;
    color: var(--text);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 16px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form .form-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #ffffff;
}

.auth-form .form-group label {
    margin-bottom: 6px;
    color: var(--text-light);
    font-size: 0.9rem;
    letter-spacing: 0.2px;
}

.auth-form .form-group input {
    border: none;
    background: transparent;
    padding: 6px 0 4px;
    box-shadow: none;
}

.auth-form .form-group input:focus {
    border-color: transparent;
    box-shadow: none;
}

.auth-form .form-group input::placeholder {
    color: #9a94bb;
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.85rem;
}

.auth-helper {
    margin-top: 12px;
    text-align: center;
    font-size: 0.9rem;
}

.auth-helper a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-helper a:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.auth-divider span {
    padding: 0 10px;
}

.auth-oauth {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.google-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

/* Hero Section - Dark Theme */
.hero {
    background: var(--bg-dark);
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}


.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(122, 44, 255, 0.18);
    border: 1px solid rgba(122, 44, 255, 0.35);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--primary-light);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 50%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero h1 span {
    color: var(--primary-light);
}

.hero-text > p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.hero-stat .stat-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

/* Hero Image */
.hero-image {
    position: relative;
}

.hero-image-container {
    position: relative;
    background: linear-gradient(135deg, #2a2356 0%, #141328 100%);
    border-radius: 24px;
    padding: 40px;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img-placeholder {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-img-placeholder svg {
    width: 100%;
    height: 100%;
    color: rgba(255,255,255,0.1);
}

.floating-card {
    position: absolute;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.floating-card.card-1 {
    top: 80px;
    left: -20px;
}

.floating-card.card-2 {
    bottom: 80px;
    right: -20px;
    background: rgba(30, 41, 59, 0.9);
    color: white;
}

.floating-card.card-2 .floating-text strong,
.floating-card.card-2 .floating-text span {
    color: white;
}

.floating-card.card-2 .floating-text span {
    opacity: 0.7;
}

.floating-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-icon.green {
    background: var(--primary);
    color: white;
}

.floating-icon.blue {
    background: var(--accent-cyan);
    color: white;
}

.floating-icon svg {
    width: 20px;
    height: 20px;
}

    .home-highlights {
        position: relative;
        padding: 70px 0 80px;
        background: linear-gradient(180deg, var(--bg-alt) 0%, #ffffff 100%);
        overflow: hidden;
    }
    .home-highlights::before {
        content: '';
        position: absolute;
        top: -120px;
        right: -140px;
        width: 320px;
        height: 320px;
        background: radial-gradient(circle, rgba(122, 44, 255, 0.25) 0%, rgba(122, 44, 255, 0.12) 55%, rgba(255,255,255,0) 70%);
        opacity: 0.9;
    }
    .home-highlights-header {
        text-align: center;
        margin-bottom: 36px;
    }
    .home-highlights-header h2 {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    .home-highlights-header p {
        color: var(--text-light);
        font-size: 1rem;
    }
    .highlight-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    .highlight-card {
        background: white;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 24px;
        box-shadow: var(--shadow);
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .highlight-card h3 {
        font-size: 1.1rem;
    }
    .highlight-card p {
        color: var(--text-light);
        font-size: 0.95rem;
    }
    .highlight-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow);
        margin-bottom: 6px;
    }
    .highlight-icon svg {
        width: 26px;
        height: 26px;
    }
    .highlight-icon.blue {
        background: rgba(59, 84, 255, 0.18);
        color: var(--accent-cyan);
    }
    .highlight-icon.green {
        background: rgba(122, 44, 255, 0.16);
        color: var(--primary);
    }
    .highlight-icon.amber {
        background: rgba(176, 139, 255, 0.22);
        color: var(--primary-dark);
    }
    .link-btn {
        margin-top: auto;
        color: var(--primary-dark);
        font-weight: 600;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    .link-btn::after {
        content: '→';
    }
    @media (max-width: 980px) {
        .highlight-grid {
            grid-template-columns: 1fr;
        }
    }
.floating-text {
    display: flex;
    flex-direction: column;
}

.floating-text strong {
    font-size: 0.9rem;
    color: var(--text);
}

.floating-text span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.home-news {
    padding: 46px 0 104px;
    background:
        radial-gradient(1200px 420px at 20% -10%, rgba(149, 76, 233, 0.35), transparent 60%),
        radial-gradient(900px 360px at 90% 8%, rgba(103, 43, 201, 0.3), transparent 62%),
    linear-gradient(180deg, #221039 0%, #180b2a 100%) !important;
}

.home-news .container {
    width: min(1320px, 94vw);
}

.home-news-header {
    text-align: left;
    margin-bottom: 34px;
}

.home-news-header h2 {
    font-size: 2.45rem;
    margin-bottom: 10px;
    color: #f8f2ff;
    letter-spacing: -0.02em;
}

.home-news-header p {
    color: #d6c7ef;
    font-size: 1.02rem;
}

.home-news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.home-news-card {
    border: 1px solid rgba(192, 162, 255, 0.22);
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(65, 37, 106, 0.96), rgba(49, 25, 84, 0.94)) !important;
    box-shadow: 0 18px 34px rgba(5, 1, 10, 0.34);
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    content-visibility: auto;
    contain-intrinsic-size: 360px;
}

.home-news-card.no-image {
    grid-template-columns: 1fr;
}

.home-news-image {
    width: 100%;
    height: 100%;
    min-height: 248px;
    object-fit: cover;
    background: linear-gradient(145deg, #402066 0%, #2a1548 100%);
}

.home-news-body {
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.home-news-card.no-image .home-news-body {
    min-height: 0;
    gap: 12px;
}

.home-news-title {
    margin: 0;
    font-size: 1.42rem;
    color: #f8f2ff;
    line-height: 1.2;
}

.home-news-date {
    margin: 0;
    display: inline-flex;
    align-self: flex-start;
    font-size: 0.72rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(233, 214, 255, 0.16);
    border: 1px solid rgba(233, 214, 255, 0.28);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ceb5f6;
    font-weight: 700;
}

.home-news-summary {
    color: #e2d4f8;
    font-size: 1rem;
    line-height: 1.5;
}

.home-news-summary,
.home-news-summary * {
    background: transparent !important;
    color: #e2d4f8;
}

.home-news-summary p {
    margin: 0 0 8px;
}

.home-news-summary p:last-child {
    margin-bottom: 0;
}

.home-news-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-start;
}

.home-news-actions .btn {
    border-color: rgba(211, 184, 255, 0.45);
    color: #f3e8ff;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 700;
    padding: 10px 16px;
}

.home-news-actions .btn:hover {
    background: rgba(255, 255, 255, 0.14);
}

.news-details-hero {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
}

.news-details-content {
    color: #1f2937;
    line-height: 1.7;
    font-size: 0.95rem;
}

.news-details-date {
    margin: 0 0 12px;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

.news-details-content p {
    margin: 0 0 10px;
}

@media (max-width: 980px) {
    .home-news {
        padding: 34px 0 84px;
    }

    .home-news-header {
        text-align: center;
    }

    .home-news-header h2 {
        font-size: 2rem;
    }

    .home-news-grid {
        grid-template-columns: 1fr;
    }

    .home-news-card {
        grid-template-columns: 1fr;
    }

    .home-news-image {
        min-height: 180px;
    }

    .home-news-body {
        padding: 18px;
    }
}

/* Services Page */
.services-header {
    background: var(--bg-dark);
    padding-top: 80px;
    padding-bottom: 40px;
    color: white;
    text-align: center;
}

.services-header h1 {
    margin: 0 0 8px;
    font-size: 2.4rem;
    font-weight: 800;
}

.services-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

.services-content {
    background: var(--bg);
    padding: 60px 0;
    min-height: calc(100vh - 193px);
}

/* Progress Steps */
.progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    scrollbar-width: thin;
    -ms-overflow-style: auto;
}

.progress-steps.hidden {
    display: none;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.step-circle {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
    color: var(--text-light);
    transition: all 0.3s;
}

.step-item span {
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s;
}

.step-item.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step-item.active span {
    color: var(--text);
}

.step-item.completed .step-circle {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.step-item.completed .step-circle::before {
    /* show a checkmark (U+2713) correctly; use single backslash escape or explicit character */
    content: "\2713";
}

.step-line {
    flex: 1;
    height: 3px;
    background: var(--border);
    margin: 0 8px;
    max-width: 80px;
    transition: all 0.3s;
    flex: 0 0 60px;
}

.step-line.active {
    background: #22c55e;
}

/* Service Steps */
.service-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.service-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--primary);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.step-header-icon.pink { background: #fce7f3; color: #ec4899; }
.step-header-icon.orange { background: #ffedd5; color: #f97316; }
.step-header-icon.red { background: #fee2e2; color: #ef4444; }
.step-header-icon.green { background: #dcfce7; color: #22c55e; }
.step-header-icon.purple { background: #f3e8ff; color: #a855f7; }

.step-header-icon svg {
    width: 24px;
    height: 24px;
}

.step-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.step-header p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Device Selection */
.device-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.device-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.device-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.device-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.device-icon.pink { background: #fce7f3; color: #ec4899; }
.device-icon.orange { background: #ffedd5; color: #f97316; }
.device-icon.red { background: #fee2e2; color: #ef4444; }
.device-icon.green { background: #dcfce7; color: #22c55e; }
.device-icon.purple { background: #f3e8ff; color: #a855f7; }

.device-icon svg {
    width: 28px;
    height: 28px;
}

.device-info {
    flex: 1;
}

.device-info h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.device-info p {
    font-size: 0.9rem;
    color: var(--primary);
}

.device-arrow {
    color: var(--text-light);
}

.device-arrow svg {
    width: 20px;
    height: 20px;
}

/* Brand Selection */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.brand-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}


.brand-card .card-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: var(--bg-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--primary);
    box-shadow: var(--shadow);
}

.brand-card .card-icon svg {
    width: 30px;
    height: 30px;
}

.brand-card .part-media {
    height: 140px;
    border-radius: 12px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 12px;
}

.brand-card .part-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-card .printer-media img {
    object-fit: contain;
}

.brand-card .part-actions {
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.brand-card .details-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    background: var(--primary);
    color: white;
    border: none;
}

.brand-card .details-btn:hover {
    background: var(--primary-dark);
}

.brand-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.brand-card.active {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    background: rgba(59, 130, 246, 0.08);
}

.brand-logo {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.brand-logo img,
.brand-logo svg {
    max-height: 100%;
    max-width: 100%;
    display: block;
}

/* Ensure injected inline sizing from script.js is overridden so logos render larger */
.brand-logo img.brand-img {
    width: auto !important;
    height: 88px !important;
    object-fit: contain !important;
    transform: scale(1.3);
    transform-origin: center;
}

/* Ensure inline SVG fallbacks also scale to container */
.brand-logo svg {
    width: auto;
    height: 88px;
}

.brand-card h3 {
    font-size: 0.95rem;
    color: var(--text);
}

.brand-card .part-price {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 3D Printing Page */
.printing-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-bottom: 60px;
}

.printing-step {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
}

#printing .brand-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    justify-content: center;
    justify-items: center;
}

#printing .brand-card {
    width: 100%;
    max-width: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#colorGrid .brand-card {
    min-height: 100px;
}

.color-chip {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

.multicolor-slots {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.multicolor-slots.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.color-slot-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(90px, 1fr));
    gap: 10px;
}

.color-slot-tab {
    border: 1px solid var(--border);
    background: white;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: 0.2s ease;
}

.color-slot-tab.active {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(76, 29, 149, 0.15);
}

.color-slot-grid {
    animation: slideInFade 0.35s ease;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.color-slot-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 8px;
}


.printing-quantity {
    display: flex;
    justify-content: center;
}

.printing-quantity input {
    width: 160px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}

.printing-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.printing-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

/* Other Items Shop */
.other-shop-container {
    padding-bottom: 60px;
}

.used-shop-container {
    padding-bottom: 60px;
}

.other-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.used-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.used-item-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.used-item-media {
    width: 100%;
    height: 220px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.used-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.used-item-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.used-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.used-item-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.used-item-price {
    font-weight: 700;
}

.used-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-direction: column;
}

.used-item-actions .btn {
    flex: 1;
}

.other-item-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.other-item-media {
    width: 100%;
    height: 220px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.other-item-placeholder {
    color: var(--text-light);
    font-weight: 600;
}

.other-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.other-item-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.other-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.other-item-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.other-item-price {
    font-weight: 700;
}

.other-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-direction: column;
}

.other-item-actions .btn {
    flex: 1;
}

.contact-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 6px 6px;
}

.contact-modal-email {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

.contact-modal-or {
    font-size: 0.9rem;
    color: var(--text-light);
}

.contact-modal-phone {
    font-size: 1.05rem;
    font-weight: 600;
}

.other-item-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
}

.other-item-cart-btn svg {
    width: 18px;
    height: 18px;
}

.other-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
}

.other-details-media img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.other-details-body p {
    margin: 0 0 12px;
    color: var(--text-light);
}

.other-details-body ul {
    padding-left: 18px;
    margin: 0;
}

@media (max-width: 900px) {
    .other-details-content {
        grid-template-columns: 1fr;
    }
}

.used-details-modal .part-details-container {
    max-width: 1100px;
    max-height: 94vh;
}

.used-details-content {
    grid-template-columns: 1.1fr 1fr;
}

.used-details-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.used-details-body h3 {
    margin: 0;
    font-size: 1.45rem;
}

.used-details-body p {
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.used-details-specs h4 {
    margin: 0 0 8px;
}

.used-details-specs ul {
    margin: 0;
    padding-left: 18px;
}

.used-details-specs li {
    margin-bottom: 7px;
    color: var(--text-light);
}

.used-details-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-start;
}

@media (max-width: 900px) {
    .used-details-content {
        grid-template-columns: 1fr;
    }
}

.catalog-editor {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.catalog-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 2px 0;
}

.catalog-tab-btn {
    border: 1px solid var(--border);
    background: white;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.98rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.catalog-tab-btn.has-unsaved {
    position: relative;
    border-color: #f59e0b;
}

.catalog-tab-btn.has-unsaved::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
}

.catalog-tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(122, 44, 255, 0.2);
}

.catalog-panel {
    display: none;
}

.catalog-panel.active {
    display: block;
}

.catalog-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.catalog-advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.catalog-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.catalog-row label {
    font-weight: 600;
    color: var(--text);
    min-width: 80px;
}

.catalog-select,
.catalog-input {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 200px;
    font-size: 0.95rem;
    background: white;
}

.catalog-toggle-input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.catalog-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0 10px;
}

.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.catalog-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: var(--bg-alt);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    align-items: center;
}

.catalog-item > div {
    min-width: 0;
}

.catalog-item .catalog-input {
    min-width: 0;
    width: 100%;
}

.catalog-item[data-type="brand"] {
    grid-template-columns: minmax(120px, 1fr) minmax(160px, 1fr) auto auto;
    align-items: end;
}

.catalog-item[data-type="model"] {
    grid-template-columns: minmax(180px, 1fr) auto auto;
    align-items: end;
}

.catalog-item[data-type="repair"] {
    grid-template-columns: minmax(110px, 1fr) minmax(170px, 1.3fr) minmax(220px, 1.8fr) 90px minmax(110px, 1fr) auto auto;
    align-items: end;
}

.catalog-item[data-type="build-item"] {
    grid-template-columns: minmax(110px, 1fr) minmax(170px, 1.3fr) 90px minmax(220px, 1.8fr) auto auto;
    align-items: end;
}

.catalog-item[data-type="printer"] {
    grid-template-columns: minmax(110px, 1fr) minmax(150px, 1.2fr) minmax(180px, 1.5fr) minmax(220px, 1.7fr) auto auto auto;
    align-items: end;
}

.catalog-item[data-type="filament"] {
    grid-template-columns: minmax(110px, 1fr) minmax(170px, 1.3fr) auto auto;
    align-items: end;
}

.catalog-item[data-type="color"] {
    grid-template-columns: minmax(110px, 1fr) minmax(170px, 1.3fr) 110px auto auto;
    align-items: end;
}

.catalog-item[data-type="news-item"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.catalog-item[data-type="brand"] .catalog-input,
.catalog-item[data-type="model"] .catalog-input {
    min-width: 0;
    width: 100%;
}

.catalog-item[data-type="brand"] .toggle,
.catalog-item[data-type="model"] .toggle,
.catalog-item[data-type="repair"] .toggle,
.catalog-item[data-type="build-item"] .toggle,
.catalog-item[data-type="printer"] .toggle,
.catalog-item[data-type="filament"] .toggle,
.catalog-item[data-type="color"] .toggle,
.catalog-item[data-type="news-item"] .toggle,
.catalog-item[data-type="brand"] .inline-actions,
.catalog-item[data-type="model"] .inline-actions,
.catalog-item[data-type="repair"] .inline-actions,
.catalog-item[data-type="build-item"] .inline-actions,
.catalog-item[data-type="printer"] .inline-actions,
.catalog-item[data-type="filament"] .inline-actions,
.catalog-item[data-type="color"] .inline-actions,
.catalog-item[data-type="news-item"] .inline-actions {
    align-self: end;
}

.catalog-item .inline-actions {
    justify-content: flex-end;
}

.catalog-item .inline-actions .btn {
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .catalog-item[data-type="brand"],
    .catalog-item[data-type="model"],
    .catalog-item[data-type="repair"],
    .catalog-item[data-type="build-item"],
    .catalog-item[data-type="printer"],
    .catalog-item[data-type="filament"],
    .catalog-item[data-type="color"] {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        align-items: center;
    }
}

.catalog-item label {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 4px;
}

.catalog-item .toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-item .inline-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.catalog-header h3 {
    margin: 0 0 6px 0;
}

.catalog-header p {
    margin: 0 0 12px 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.catalog-news-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.catalog-news-sort-label {
    margin: 0;
    font-size: 0.84rem;
    color: var(--text-light);
}

.catalog-news-sort-select {
    min-width: 170px;
}

.catalog-news-state {
    margin: 8px 0 0;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}

.catalog-news-state.is-published {
    color: #15803d;
}

.catalog-news-state.is-scheduled {
    color: #1d4ed8;
}

.catalog-news-state.is-inactive {
    color: #64748b;
}

.catalog-news-warning {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: #b45309;
    font-weight: 700;
}

.catalog-news-preview-wrap label {
    display: block;
    margin-bottom: 8px;
}

.catalog-news-preview {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.catalog-news-preview.no-image {
    padding-top: 6px;
}

.catalog-news-preview-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: linear-gradient(145deg, #dbeafe 0%, #f1f5f9 100%);
}

.catalog-news-preview-body {
    padding: 12px;
}

.catalog-news-preview-date {
    margin: 0 0 6px;
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

.catalog-news-preview-title {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #111827;
}

.catalog-news-preview-summary {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

.catalog-news-preview-summary p {
    margin: 0;
}

.catalog-item[data-type="news-item"] {
    content-visibility: auto;
    contain-intrinsic-size: 920px;
}

.catalog-news-preview-meta {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 0.78rem;
}

.catalog-textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: var(--bg-alt);
}

#catalogAdminEmailMessage {
    min-height: 260px;
    resize: vertical;
}

.catalog-email-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.catalog-row-stack {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
}

.catalog-row-stack label {
    min-width: 0;
}

.catalog-row-stack .catalog-input,
.catalog-row-stack .catalog-textarea {
    width: 100%;
}

.catalog-helper-text {
    margin: 2px 0 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.catalog-rich-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.catalog-rich-btn {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 0.8rem;
    cursor: pointer;
}

.catalog-rich-editor {
    min-height: 92px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    line-height: 1.5;
    font-size: 0.9rem;
    color: #111827;
}

.catalog-rich-editor:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(122, 44, 255, 0.12);
}

.catalog-rich-editor p {
    margin: 0 0 8px;
}

.catalog-rich-editor p:last-child {
    margin-bottom: 0;
}

.catalog-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.catalog-actions-top {
    margin-top: 12px;
    justify-content: flex-end;
    position: sticky;
    top: 96px;
    z-index: 5;
    background: white;
    padding: 8px 0;
}

.printing-file-name {
    color: var(--text-light);
    font-size: 0.95rem;
}

.part-details-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002;
    padding: 20px;
}

.part-details-modal.hidden {
    display: none;
}

.part-details-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
}

.part-details-container {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 2003;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.part-details-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.part-details-price {
    color: var(--text-light);
    margin: 6px 0 0;
}

.part-details-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.part-details-close:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.part-details-content {
    padding: 24px;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    overflow-y: auto;
}

.part-details-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.part-details-gallery img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.part-details-thumbs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 90px;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-behavior: smooth;
}

.part-details-thumbs img {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    cursor: pointer;
    opacity: 0.85;
}

.part-details-thumbs-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}

.thumb-scroll-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.thumb-scroll-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.part-details-thumbs img.active,
.part-details-thumbs img:hover {
    opacity: 1;
    border-color: var(--primary);
}

.part-details-specs ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
}

.part-details-specs li {
    margin-bottom: 8px;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .part-details-content {
        grid-template-columns: 1fr;
    }

    .part-details-gallery img {
        height: 240px;
    }
}

/* Model Selection */
.model-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.model-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.model-card:hover {
    border-color: var(--primary);
    background: var(--bg-alt);
}

/* Repair Selection */
.repair-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.repair-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.repair-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.repair-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-alt);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-light);
}

.repair-icon svg {
    width: 24px;
    height: 24px;
}

.repair-card h4 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.repair-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.repair-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

/* Page Headers */
.page-header-dark {
    background: var(--bg-dark);
    padding-top: 80px;
    padding-bottom: 40px;
    text-align: center;
    color: white;
}

.page-header-dark h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.page-header-dark p {
    color: rgba(255,255,255,0.7);
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    padding: 60px 0;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.about-features {
    list-style: none;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}

.feature-check {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* Contact Directory */
.contact-page {
    background:
        radial-gradient(900px 360px at 50% -100px, rgba(122, 44, 255, 0.16), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, #f8f9ff 0%, #ffffff 58%);
}

.contact-directory {
    padding: 64px 0 72px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-owners-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.contact-owners-grid .contact-card {
    text-align: center;
}

.contact-card {
    border: 1px solid rgba(122, 44, 255, 0.14);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(16, 14, 53, 0.08);
    padding: 30px;
}

.contact-card-universal {
    text-align: center;
    max-width: 840px;
    width: 100%;
    margin: 0 auto;
    background: linear-gradient(145deg, #ffffff 0%, #f4f2ff 100%);
    border-color: rgba(122, 44, 255, 0.22);
}

.contact-card h2,
.contact-card h3 {
    margin-bottom: 12px;
    color: #171632;
}

.contact-person {
    font-size: 1.08rem;
    margin-bottom: 10px;
    font-weight: 700;
    color: #1d2140;
}

.contact-email {
    display: inline-block;
    font-size: 1.06rem;
    font-weight: 700;
    color: #3727b3;
    margin-bottom: 12px;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.contact-email-large {
    font-size: clamp(1.45rem, 3.2vw, 2.3rem);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.contact-email-list .contact-email {
    display: block;
    margin-bottom: 10px;
}

.contact-email-list .contact-email:last-child {
    margin-bottom: 0;
}

.contact-phone-label {
    margin-top: 6px;
    margin-bottom: 4px;
    color: var(--text-light);
    font-size: 0.94rem;
    font-weight: 600;
}

.contact-phone {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #111428;
}

/* Floating Support Chat */
.support-chat {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1100;
}

.support-chat-toggle {
    position: relative;
    border: 0;
    border-radius: 999px;
    width: 78px;
    height: 78px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: radial-gradient(circle at 30% 25%, #8a6bff 0%, #5d39ff 55%, #4722d5 100%);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(72, 46, 183, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-chat-toggle::before {
    content: '';
    position: absolute;
    inset: -7px;
    border-radius: inherit;
    border: 1px solid rgba(122, 44, 255, 0.35);
    animation: supportChatPulse 2.2s ease-out infinite;
}

.support-chat-toggle:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 20px 38px rgba(72, 46, 183, 0.5);
}

.support-chat.open .support-chat-toggle {
    transform: scale(0.96);
}

.support-chat-toggle-icon {
    width: 25px;
    height: 25px;
    display: inline-flex;
}

.support-chat-toggle-icon svg {
    width: 100%;
    height: 100%;
}

.support-chat-toggle-label {
    font-size: 0.68rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    line-height: 1;
}

.support-chat-unread {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ff4a5f;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 6px 14px rgba(255, 74, 95, 0.4);
}

.support-chat-panel {
    width: min(360px, calc(100vw - 24px));
    height: 430px;
    background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
    border: 1px solid rgba(122, 44, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 24px 56px rgba(15, 20, 45, 0.28);
    overflow: hidden;
    display: none;
    flex-direction: column;
    margin-top: 10px;
    position: relative;
}

.support-chat-panel::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, #6b47ff 0%, #8c6dff 55%, #5d39ff 100%);
}

.support-chat.open .support-chat-panel {
    display: flex;
}

.support-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(135deg, #17143d 0%, #251762 100%);
    color: #fff;
}

.support-chat-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.support-chat-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #fbfaff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-msg {
    max-width: 85%;
    padding: 9px 12px;
    border-radius: 12px;
    line-height: 1.35;
    font-size: 0.94rem;
}

.support-msg.typing,
.admin-chat-msg.typing {
    font-style: italic;
    opacity: 0.85;
}

.support-msg.bot {
    align-self: flex-start;
    background: #f0ecff;
    color: #1d1848;
}

.support-msg.user {
    align-self: flex-end;
    background: #2f2b6e;
    color: #fff;
}

.support-msg-meta {
    margin-top: 5px;
    font-size: 0.72rem;
    opacity: 0.65;
}

.support-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #ece9ff;
    background: #fff;
}

.support-chat-form input {
    flex: 1;
    border: 1px solid #d8d2ff;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.93rem;
}

.support-chat-form button {
    border: 0;
    border-radius: 10px;
    padding: 10px 13px;
    font-weight: 700;
    color: #fff;
    background: #5d39ff;
    cursor: pointer;
}

.chat-close-confirm {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.chat-close-confirm.show {
    display: flex;
}

.chat-close-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 8, 27, 0.62);
    backdrop-filter: blur(4px);
}

.chat-close-confirm-dialog {
    position: relative;
    width: min(92vw, 460px);
    border-radius: 16px;
    border: 1px solid rgba(132, 106, 255, 0.5);
    background: linear-gradient(150deg, #18153d 0%, #23195c 52%, #2e1f71 100%);
    color: #fff;
    box-shadow: 0 28px 64px rgba(9, 8, 27, 0.55);
    padding: 18px 18px 16px;
    animation: chatConfirmIn 0.2s ease-out;
}

.chat-close-confirm-dialog h3 {
    margin: 0;
    font-size: 1.15rem;
}

.chat-close-confirm-dialog p {
    margin: 9px 0 0;
    color: rgba(245, 240, 255, 0.94);
    line-height: 1.45;
}

.chat-close-confirm-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.chat-close-btn {
    border-radius: 10px;
    border: 1px solid transparent;
    padding: 9px 14px;
    font-weight: 700;
    cursor: pointer;
}

.chat-close-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #f6f2ff;
    border-color: rgba(255, 255, 255, 0.28);
}

.chat-close-btn-confirm {
    background: linear-gradient(135deg, #8d6dff 0%, #643fff 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(100, 63, 255, 0.44);
}

@keyframes chatConfirmIn {
    from {
        transform: translateY(8px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes supportChatPulse {
    0% {
        transform: scale(0.96);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.08);
        opacity: 0;
    }
    100% {
        transform: scale(1.08);
        opacity: 0;
    }
}

/* Admin chats */
.admin-chat-filters {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.admin-chat-filter-label {
    color: #4b3f83;
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.admin-chat-filter-select {
    min-width: 190px;
    border: 1px solid #d8d2ff;
    border-radius: 10px;
    background: #fff;
    padding: 8px 10px;
    color: #2f2b6e;
    font-size: 0.88rem;
}

.admin-chat-open-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #22c55e;
    color: #fff;
}

.admin-chat-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 18px;
    margin-top: 18px;
}

.admin-chat-sessions {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: 10px;
    max-height: 600px;
    overflow-y: auto;
}

.admin-chat-session-item {
    border: 1px solid #ece7ff;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.admin-chat-session-item.active {
    border-color: #7a2cff;
    background: #f6f1ff;
}

.admin-chat-session-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.admin-chat-badge {
    background: #5d39ff;
    color: #fff;
    border-radius: 999px;
    padding: 0 7px;
    font-size: 0.78rem;
    font-weight: 700;
}

.admin-chat-session-last {
    color: var(--text-light);
    font-size: 0.88rem;
}

.admin-chat-session-meta {
    color: #4b3f83;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.admin-chat-session-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.admin-chat-assign-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
}

.admin-chat-thread {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    min-height: 560px;
    display: flex;
    flex-direction: column;
}

.admin-chat-ai-config {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    padding: 14px;
}

.admin-chat-ai-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.admin-chat-ai-config-header h3 {
    margin: 0;
    color: #2f2b6e;
    font-size: 1rem;
}

.admin-chat-ai-config-note {
    margin: 8px 0 12px;
    color: var(--text-light);
    font-size: 0.86rem;
}

.admin-chat-ai-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.admin-chat-ai-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.admin-chat-ai-field label {
    font-size: 0.82rem;
    color: #4b3f83;
    font-weight: 700;
}

.admin-chat-ai-field input,
.admin-chat-ai-field textarea {
    border: 1px solid #d8d2ff;
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 0.88rem;
    color: #2f2b6e;
    background: #fff;
}

.admin-chat-ai-field textarea {
    resize: vertical;
}

.admin-chat-ai-actions {
    display: flex;
    justify-content: flex-end;
}

.admin-chat-thread-header {
    padding: 12px 14px;
    border-bottom: 1px solid #ece9ff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-chat-thread-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-chat-close-btn {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.admin-chat-close-btn:hover {
    background: #fecaca;
}

.btn-danger {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: #ef4444 !important;
}

.btn-danger:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

.admin-chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fbfaff;
}

.admin-chat-msg {
    max-width: 82%;
    border-radius: 12px;
    padding: 10px 12px;
    line-height: 1.35;
    font-size: 0.92rem;
}

.admin-chat-msg.user {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e6e1ff;
}

.admin-chat-msg.bot {
    align-self: flex-start;
    background: #efe9ff;
}

.admin-chat-msg.admin {
    align-self: flex-end;
    background: #2f2b6e;
    color: #fff;
}

.admin-chat-msg-meta {
    margin-top: 6px;
    font-size: 0.75rem;
    opacity: 0.7;
}

.admin-chat-reply {
    display: flex;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid #ece9ff;
}

.admin-chat-reply input {
    flex: 1;
    border: 1px solid #d8d2ff;
    border-radius: 10px;
    padding: 10px 12px;
}

.admin-chat-empty {
    color: var(--text-light);
    font-size: 0.92rem;
    padding: 12px 10px;
}

.admin-chat-take-modal,
.support-rating-modal {
    position: fixed;
    inset: 0;
    z-index: 2450;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-chat-take-modal.show,
.support-rating-modal.show {
    display: flex;
}

.admin-chat-take-backdrop,
.support-rating-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 9, 31, 0.68);
    backdrop-filter: blur(8px);
}

.admin-chat-take-dialog,
.support-rating-dialog {
    position: relative;
    width: min(92vw, 460px);
    border-radius: 16px;
    border: 1px solid rgba(132, 106, 255, 0.5);
    background: linear-gradient(150deg, #18153d 0%, #23195c 52%, #2e1f71 100%);
    color: #fff;
    box-shadow: 0 28px 64px rgba(9, 8, 27, 0.55);
    padding: 18px;
    animation: chatConfirmIn 0.2s ease-out;
}

.support-rating-dialog {
    text-align: center;
}

.admin-chat-take-dialog h3,
.support-rating-dialog h3 {
    margin: 0;
    font-size: 1.15rem;
}

.admin-chat-take-note,
.support-rating-dialog p {
    margin: 8px 0 0;
    color: rgba(245, 240, 255, 0.92);
}

.admin-chat-take-meta {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(189, 171, 255, 0.35);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    display: grid;
    gap: 6px;
}

.admin-chat-take-actions,
.support-rating-actions {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.support-rating-stars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.support-rating-star {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #f6f2ff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.support-rating-star[data-rating="1"] {
    width: 34px;
    height: 34px;
    font-size: 1rem;
}

.support-rating-star[data-rating="2"] {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
}

.support-rating-star[data-rating="3"] {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
}

.support-rating-star[data-rating="4"] {
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
}

.support-rating-star[data-rating="5"] {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
}

.support-rating-star.active {
    background: #39c97b;
    border-color: #8ce8b2;
    color: #fff;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.stat {
    text-align: center;
    padding: 32px 16px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Location Section */
.location-section {
    padding: 60px 0;
}

.location-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-item svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 4px;
}

.info-item strong {
    display: block;
    margin-bottom: 4px;
}

.info-item p {
    color: var(--text-light);
    margin: 0;
}

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 360px;
    border: none;
}


.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.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, 130, 246, 0.1);
}

.form-error {
    display: block;
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 6px;
    min-height: 20px;
}

.form-helper {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 8px;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group input.error:focus,
.form-group select.error:focus,
.form-group textarea.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #151333 0%, #0f0e24 100%);
    color: white;
    padding: 60px 0 0;
    margin-top: auto;
    border-top: 1px solid rgba(122, 44, 255, 0.35);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(122, 44, 255, 0.25);
}

.footer-brand .logo {
    display: inline-flex;
    align-items: center;
    margin-bottom: 18px;
    text-decoration: none;
}

.footer-logo {
    width: 180px;
    height: auto;
    display: block;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary);
    color: #fff;
}

.nav-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-social-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.social-links-form {
    padding: 12px 0 4px;
}

.footer h4 {
    margin-bottom: 20px;
    color: #e9e4ff;
}

.footer-links ul,
.footer-services ul {
    list-style: none;
}

.footer-links a,
.footer-services li,
.footer-services a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    padding: 6px 0;
    transition: color 0.2s;
    cursor: pointer;
}

.footer-links a:hover,
.footer-services a:hover {
    color: #ffffff;
}

.footer-contact p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.875rem;
}

.profile-page-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.profile-summary-card,
.profile-history-card {
    background: #fff;
    border: 1px solid #e5ddff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(27, 16, 67, 0.06);
}

.profile-summary-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 10px;
}

.profile-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-summary-item .label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #6b6a8c;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.profile-summary-item .value {
    font-size: 1rem;
    color: #1f1748;
    font-weight: 600;
}

.profile-history-list {
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.profile-history-item {
    border: 1px solid #e8e2ff;
    border-radius: 12px;
    padding: 10px 12px;
    background: #faf8ff;
}

.profile-history-item .title {
    font-weight: 700;
    color: #221a4f;
}

.profile-history-item .meta {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #655e8f;
}

.profile-history-item .preview {
    margin-top: 6px;
    font-size: 0.92rem;
    color: #2b255c;
}

.profile-order-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.profile-order-toggle {
    flex-shrink: 0;
}

.profile-order-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd3ff;
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    color: #3b3368;
}

.profile-order-items {
    margin-top: 6px;
    display: grid;
    gap: 8px;
}

.profile-order-item {
    background: #fff;
    border: 1px solid #e6ddff;
    border-radius: 10px;
    padding: 8px 10px;
}

.profile-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.profile-chat-toggle {
    flex-shrink: 0;
}

.profile-chat-transcript {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd3ff;
    display: grid;
    gap: 8px;
}

.profile-chat-message-row {
    background: #fff;
    border: 1px solid #e7e0ff;
    border-radius: 10px;
    padding: 8px 10px;
}

.profile-chat-message-row.user {
    border-left: 4px solid #4f46e5;
}

.profile-chat-message-row.admin {
    border-left: 4px solid #7a2cff;
}

.profile-chat-message-row.bot {
    border-left: 4px solid #22c55e;
}

.profile-chat-messages {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ddd3ff;
    display: grid;
    gap: 6px;
}

.profile-chat-message {
    font-size: 0.85rem;
    color: #3d356d;
}

.profile-empty {
    color: #6f6a8f;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text > p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .brand-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .repair-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-owners-grid {
        grid-template-columns: 1fr;
    }

    .location-content {
        grid-template-columns: 1fr;
    }

    .map-container iframe {
        height: 320px;
    }
    
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .announcement-banner {
        padding: 8px 0;
        font-size: clamp(0.74rem, 2.5vw, 0.82rem);
    }

    .announcement-banner .container {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        min-height: 0;
        padding: 8px 50px 8px 10px;
    }

    .announcement-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        top: 8px;
        right: 10px;
        transform: none;
        width: 28px;
        height: 28px;
    }

    #announcementText {
        display: block;
        width: 100%;
        line-height: 1.3;
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        max-height: none;
        -webkit-line-clamp: unset;
    }

    .support-chat-toggle {
        width: 68px;
        height: 68px;
    }

    .support-chat-toggle-icon {
        width: 22px;
        height: 22px;
    }

    .support-chat-toggle-label {
        font-size: 0.62rem;
    }

    .logo-icon {
        width: 150px;
        max-height: 64px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 20px 18px calc(124px + env(safe-area-inset-bottom));
        gap: 12px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        max-height: calc(100dvh - var(--announcement-height, 0px) - 72px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        box-shadow: 0 12px 24px rgba(6, 8, 22, 0.35);
    }
    
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li > a {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    .mobile-cart-item {
        display: block;
        width: 100%;
    }

    .mobile-quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 10px;
        justify-content: stretch;
        align-items: center;
    }

    .mobile-quick-actions .btn {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }

    .mobile-quick-actions .profile-icon-btn {
        min-width: 0;
        width: 100%;
    }

    #langToggleMobile {
        grid-column: 1 / 2;
    }

    #loginNavBtnMobile,
    #logoutBtnMobile {
        grid-column: 2 / 3;
    }

    #profileNavBtnMobile {
        grid-column: 1 / -1;
    }

    .nav-links.active .mobile-cart-item {
        display: block;
    }

    .nav-links .mobile-cart-link {
        display: flex;
        width: auto;
        justify-content: center;
        margin: 0 auto;
    }
    
    .nav-right {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    body.mobile-nav-open .support-chat {
        opacity: 0;
        pointer-events: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .step-item span {
        display: none;
    }
    
    .step-line {
        max-width: 40px;
    }
    
    .device-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .model-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .repair-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .location-content {
        grid-template-columns: 1fr;
    }

    .about-text h2,
    .location-section h2 {
        font-size: 1.6rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .contact-directory {
        padding: 42px 0 52px;
    }

    .contact-card {
        padding: 22px;
    }

    .contact-email-large {
        word-break: break-word;
    }

    .support-chat {
        right: 10px;
        bottom: 10px;
    }

    .admin-chat-layout {
        grid-template-columns: 1fr;
    }

    .admin-chat-filter-select {
        min-width: 150px;
    }

    .admin-chat-ai-grid {
        grid-template-columns: 1fr;
    }

    .map-container iframe {
        height: 260px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .part-details-modal {
        padding: 12px;
    }

    .part-details-container,
    .used-details-modal .part-details-container {
        width: min(100%, 100vw - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 18px;
    }

    .part-details-header {
        padding: 18px 16px;
        align-items: flex-start;
    }

    .part-details-header h2 {
        font-size: 1rem;
        line-height: 1.15;
    }

    .part-details-close {
        flex-shrink: 0;
    }

    .logo-icon {
        width: 138px;
        padding: 16px;
        gap: 16px;
    }

    .nav-links {
        height: 200px;
    }

    .part-details-thumbs {
        grid-auto-columns: 72px;
    }

    .part-details-thumbs img {
        width: 72px;
        height: 72px;
    }

    .thumb-scroll-btn {
        width: 28px;
        height: 28px;
    }

    .other-details-content,
    .used-details-content {
        gap: 16px;
        padding: 16px;
    }

    .used-details-body h3 {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .used-details-body p,
    .other-details-body p {
        font-size: 0.95rem;
    }

    .used-details-actions .btn {
        width: 100%;
        gap: 10px;
    }

    .nav-links a {
        font-size: 0.96rem;
        padding: 8px 10px;
    }

    .mobile-quick-actions {
        gap: 8px;
    }

    .mobile-quick-actions .btn {
        padding: 8px 10px;
        font-size: 0.88rem;
    }

    .announcement-banner {
        font-size: 0.74rem;
    }
}

@media (max-width: 480px) {
    .repair-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .map-container iframe {
        height: 220px;
    }
}

/* Cart Page */
.cart-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    padding: 60px 0;
    align-items: start;
}

.cart-items {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    min-height: 300px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.cart-empty svg {
    width: 80px;
    height: 80px;
    color: var(--border);
    margin-bottom: 24px;
}

.cart-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.cart-empty p {
    color: var(--text-light);
    margin-bottom: 24px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-alt);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.cart-item-info p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-right: 16px;
}

/* Custom PC builder styles */
.custom-pc-container {
    display: grid;
    grid-template-columns: 1fr 0px;
    gap: 0px;
    align-items: start;
    transition: grid-template-columns 0.4s ease, gap 0.4s ease;
}

.custom-pc-container.sidebar-active {
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.custom-pc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.4s ease;
}

#customPcProgress {
    justify-content: flex-start;
    width: min(100%, 700px);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px 8px;
    box-sizing: border-box;
    scroll-padding-left: 10px;
    scroll-padding-right: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#customPcProgress::-webkit-scrollbar {
    display: none;
}

@media (min-width: 769px) {
    #customPcProgress {
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    }
}

.custom-pc-container.sidebar-active .custom-pc-main {
    align-items: stretch;
}

.custom-pc-main .brand-grid {
    max-width: 800px;
    margin: 0 auto;
    transition: max-width 0.4s ease;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

#cpuBrandGrid.brand-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 600px;
}

#buildTypeGrid.brand-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 600px;
    justify-content: center;
    justify-items: center;
}

#cpuBrandGrid .brand-card {
    padding: 80px 60px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#buildTypeGrid .brand-card {
    padding: 80px 60px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
}

#cpuBrandGrid .brand-card h3 {
    font-size: 3rem;
    font-weight: 700;
    margin: 0;
}

#buildTypeGrid .brand-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

#addBuildToCartBtn {
    background: var(--primary);
    color: white;
    border: none;
}

#addBuildToCartBtn:hover {
    background: var(--primary-dark);
}

.custom-pc-os-description {
    margin: 8px 0 12px;
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.45;
    max-width: 720px;
}

.custom-pc-container.sidebar-active .custom-pc-main .brand-grid {
    max-width: 100%;
}

.custom-pc-sidebar {
    position: sticky;
    top: 100px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    overflow: hidden;
    width: 0;
}

.custom-pc-sidebar.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    width: 320px;
}

.summary-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.summary-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100px;
    margin-bottom: 16px;
    max-height: 360px;
    overflow: auto;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: var(--bg);
    border-radius: 8px;
    font-size: 0.82rem;
}

.summary-item.empty {
    color: var(--text-light);
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80px;
    font-size: 0.85rem;
}

.summary-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    color: var(--text);
    font-weight: 500;
}

.summary-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid var(--border);
    font-weight: 700;
    font-size: 1rem;
}

.summary-total span:last-child {
    color: var(--primary);
    font-size: 1.1rem;
}

@media (max-width: 1024px) {
    .custom-pc-container {
        grid-template-columns: 1fr;
    }

    .custom-pc-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    #custompc .services-content {
        padding: 32px 0;
    }

    .custom-pc-container.sidebar-active {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    #custompc .custom-pc-main {
        align-items: stretch;
    }

    .custom-pc-sidebar {
        position: static;
        width: 100%;
        overflow: visible;
        transform: none;
    }

    #custompc .step-header {
        margin-bottom: 24px;
    }

    #custompc .step-header h2 {
        font-size: 1.35rem;
    }

    #custompc .step-header p {
        font-size: 0.95rem;
    }

    #customPcProgress {
        width: 100%;
        max-width: 340px;
        margin: 0 auto 20px;
        padding: 0 4px 6px;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    #customPcProgress .step-item,
    #customPcProgress .step-line {
        flex: 0 0 auto;
    }

    #customPcProgress .step-circle {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        flex: 0 0 26px;
        font-size: 0.75rem;
    }

    #customPcProgress .step-line {
        flex-basis: 18px;
        max-width: 18px;
        margin: 0 3px;
    }

    #custompc .brand-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    #custompc .brand-card {
        padding: 16px 12px;
    }

    #custompc .brand-card h3 {
        font-size: 0.9rem;
    }

    #custompc .brand-card .part-media {
        height: 110px;
    }

    #buildTypeGrid.brand-grid,
    #cpuBrandGrid.brand-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        max-width: 100%;
    }

    #buildTypeGrid .brand-card,
    #cpuBrandGrid .brand-card {
        width: 100%;
        max-width: 360px;
        min-height: 120px;
        padding: 24px 10px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
        margin: 0 auto;
    }

    #buildTypeGrid .brand-card h3 {
        font-size: 1.2rem;
    }

    #cpuBrandGrid .brand-card h3 {
        font-size: 1.4rem;
    }

    .custom-pc-sidebar.show {
        width: 100%;
        margin-top: 4px;
    }

    .summary-card {
        padding: 16px;
    }
}

@media (max-width: 420px) {
    #customPcProgress {
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    #custompc .brand-grid {
        grid-template-columns: 1fr;
    }

    #buildTypeGrid.brand-grid,
    #cpuBrandGrid.brand-grid {
        grid-template-columns: 1fr;
    }

    #buildTypeGrid .brand-card,
    #cpuBrandGrid .brand-card {
        min-height: 96px;
        padding: 18px 12px;
        max-width: 320px;
    }

    #buildTypeGrid .brand-card h3,
    #cpuBrandGrid .brand-card h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    #serverTypeGrid .brand-card,
    #haBrandGrid .brand-card,
    #haTypeGrid .brand-card,
    #haStorageTypeGrid .brand-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-align: center;
    }
}

#custompc .back-btn {
    display: inline-flex;
}

.preview-canvas {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 12px;
    background: var(--bg);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: #ef4444;
}

.cart-item-remove svg {
    width: 20px;
    height: 20px;
}

.cart-summary {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    position: sticky;
    top: 100px;
}

.cart-summary .summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 10px 0;
    line-height: 1.5;
}

.cart-summary .summary-row.total {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.cart-summary .summary-row .free {
    color: #22c55e;
    font-weight: 600;
}

.cart-summary .summary-note {
    color: #ef4444;
    margin-top: 12px;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Checkout Page */
.checkout-wrapper {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    padding: 60px 0;
    align-items: start;
}

.checkout-form {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px;
}

.checkout-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.checkout-section:last-of-type {
    margin-bottom: 24px;
    padding-bottom: 0;
    border-bottom: none;
}

.checkout-section h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.service-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.service-option:hover {
    border-color: var(--primary-light);
}

.service-option input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.service-option input:checked + .option-content {
    color: var(--primary);
}

.service-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

.option-content {
    display: flex;
    flex-direction: column;
}

.option-content strong {
    font-size: 1rem;
}

.option-content span {
    font-size: 0.9rem;
    color: var(--text-light);
}

.checkout-summary {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    position: sticky;
    top: 100px;
}

.checkout-summary h3 {
    font-size: 1.25rem;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.checkout-items {
    margin-bottom: 20px;
}

.checkout-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 36px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.checkout-item-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.checkout-item-price {
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: min(420px, calc(100vw - 32px));
    background: var(--bg-dark);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s forwards;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .toast {
        right: 12px;
        left: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        padding: 12px 14px;
        gap: 10px;
        font-size: 0.92rem;
    }

    .toast svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
}

.toast svg {
    width: 24px;
    height: 24px;
    color: #22c55e;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Success Page */
.order-success {
    text-align: center;
    padding: 80px 24px;
}

.success-icon {
    width: 100px;
    height: 100px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
}

.success-icon svg {
    width: 50px;
    height: 50px;
    color: #22c55e;
}

.order-success h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.order-success p {
    color: var(--text-light);
    margin-bottom: 8px;
}

.order-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin: 24px 0;
}

/* Order Tracking Page */
.track-wrapper {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 32px;
    padding: 60px 0;
    align-items: start;
}

.track-form {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
}

.track-form-header {
    margin-bottom: 20px;
}

.track-form-header h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.track-form-header p {
    color: var(--text-light);
}

.track-result {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    min-height: 260px;
}

.loader {
    text-align: center;
    color: var(--text-light);
    padding: 24px 0;
}

.track-empty {
    text-align: center;
    color: var(--text-light);
    padding: 40px 12px;
}

.track-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.track-meta {
    color: var(--text-light);
    font-size: 0.9rem;
}

.track-items {
    border-top: 1px solid var(--border);
    margin-top: 16px;
    padding-top: 16px;
    display: grid;
    gap: 12px;
}

.track-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-alt);
}

.track-item h4 {
    margin-bottom: 4px;
    font-size: 1rem;
}

.track-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive Cart/Checkout */
@media (max-width: 1024px) {
    .cart-wrapper,
    .checkout-wrapper,
    .track-wrapper {
        grid-template-columns: 1fr;
    }
    
    .cart-summary,
    .checkout-summary {
        position: static;
    }

    .checkout-summary {
        order: -1;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-price {
        margin-right: 0;
    }
    
    .checkout-form {
        padding: 24px;
    }
}

/* Admin Orders Page */
/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    padding-bottom: 4px;
}

.admin-tab-btn {
    background: none;
    border: none;
    padding: 16px 24px;
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.admin-tab-btn svg {
    width: 22px;
    height: 22px;
}

.admin-tab-btn:hover {
    color: var(--text);
}

.admin-tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(122, 44, 255, 0.08);
    border-radius: 10px 10px 0 0;
}

.admin-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 5px;
    font-size: 0.65rem;
    font-weight: 700;
    background: #ef4444;
    color: #fff;
    margin-left: 4px;
    flex-shrink: 0;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
}

/* Device Type Tabs for Repairs */
.device-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.device-tab-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.device-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.device-tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Custom PC Tabs */
.custompc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.custompc-tab-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.custompc-tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.custompc-tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.admin-wrapper {
    padding: 40px 0 60px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.admin-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-stat {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 28px;
    text-align: center;
    min-width: 120px;
}

.admin-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 6px;
}

.admin-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-stat-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: rgba(122, 44, 255, 0.14);
    border-radius: 999px;
}

.admin-stat-icon svg {
    width: 12px;
    height: 12px;
}

.order-file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
}

.order-file-link:hover {
    text-decoration: underline;
}

.admin-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-filter {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.admin-filter:focus {
    outline: none;
    border-color: var(--primary);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.no-orders {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 80px 40px;
    text-align: center;
}

.no-orders svg {
    width: 64px;
    height: 64px;
    color: var(--border);
    margin-bottom: 20px;
}

.no-orders h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.no-orders p {
    color: var(--text-light);
}

.order-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.order-id {
    font-weight: 600;
    font-size: 1.1rem;
}

.order-date {
    color: var(--text-light);
    font-size: 0.9rem;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.order-status.pending {
    background: #efe7ff;
    color: #6b2cff;
}

.order-status.in-progress {
    background: #e0e5ff;
    color: #3b54ff;
}

.order-status.waiting {
    background: #efe7ff;
    color: #6b2cff;
}

.order-status.delivering {
    background: #e0e5ff;
    color: #3b54ff;
}

.order-status.completed {
    background: #dcfce7;
    color: #16a34a;
}

.order-status.delivered {
    background: #dcfce7;
    color: #16a34a;
}

.order-status.cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.order-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.order-card-body {
    padding: 24px;
}

.order-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.order-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-info-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-info-value {
    font-weight: 500;
}

.order-items {
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

.order-items h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.order-item-row:last-child {
    border-bottom: none;
}

.order-item-details h5 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.order-item-details p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.order-item-price {
    font-weight: 600;
    color: var(--primary);
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.order-total {
    font-size: 1.1rem;
}

.order-total strong {
    color: var(--primary);
}

.order-actions {
    display: flex;
    gap: 8px;
}

.order-action-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.order-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.order-action-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.order-action-btn.primary:hover {
    background: var(--primary-dark);
}

.order-action-btn.info {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: white;
}

.order-action-btn.info:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.order-action-btn.danger {
    color: #dc2626;
    border-color: #fecaca;
}

.order-action-btn.danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

/* Credentials Management */
.credentials-section {
    margin-top: 40px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.credentials-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.credentials-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.credentials-header button {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.credentials-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.credentials-users {
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.credentials-users h4,
.credentials-form h4,
.credentials-reset h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text);
}

.credentials-users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.credentials-users-header h4 {
    margin-bottom: 0;
}

#credentialsCustomerUsersSection.is-collapsed .users-list {
    display: none;
}

.users-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.user-item {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.users-empty {
    opacity: 0.85;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    color: var(--text);
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-light);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-delete-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.user-edit-btn {
    background: #e0e5ff;
    color: var(--primary-dark);
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.user-details-btn {
    background: #dbeafe;
    color: #1d4ed8;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.user-delete-btn:hover {
    background: #fecaca;
}

.user-edit-btn:hover {
    background: #bfdbfe;
}

.user-details-btn:hover {
    background: #bfdbfe;
}

.credentials-form {
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
}

.credentials-form:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.credentials-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.credentials-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credentials-form label {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.credentials-form input,
.credentials-form select {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.credentials-form .password-field {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.credentials-form .password-field input {
    padding-right: 44px;
    position: relative;
    z-index: 1;
}

.credentials-form .password-toggle {
    position: absolute;
    right: 10px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: var(--bg-alt);
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease, background 0.2s ease;
}

.credentials-form .password-toggle:hover {
    color: var(--primary);
    background: rgba(122, 44, 255, 0.14);
}

.credentials-form .password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

.credentials-users .user-role {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary-dark);
    background: rgba(122, 44, 255, 0.14);
    padding: 2px 8px;
    border-radius: 999px;
}

.credentials-form input:focus,
.credentials-form select:focus {
    outline: none;
    border-color: var(--primary);
}

.credentials-form button {
    margin-top: 8px;
}

.permissions-group {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    background: var(--bg-alt);
    margin-bottom: 8px;
}

.permissions-help {
    margin: -2px 0 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.permission-option {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    font-weight: 500;
}

.permission-option input {
    margin: 0;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    border: 1.5px solid rgba(122, 44, 255, 0.45);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    flex: 0 0 18px;
}

.permission-option input::after {
    content: '';
    width: 5px;
    height: 9px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg) scale(0.7);
    opacity: 0;
    transition: opacity 0.16s ease;
}

.permission-option input:checked {
    background: linear-gradient(135deg, #8d6dff 0%, #643fff 100%);
    border-color: #643fff;
    box-shadow: 0 0 0 2px rgba(100, 63, 255, 0.18);
}

.permission-option input:checked::after {
    opacity: 1;
}

.permission-option input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(100, 63, 255, 0.3);
}

.permission-card {
    border: 1px solid rgba(122, 44, 255, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(247, 243, 255, 0.82) 100%);
    border-radius: 12px;
    padding: 12px 14px;
    min-height: 84px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    box-shadow: 0 6px 16px rgba(96, 70, 170, 0.08);
}

.permission-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.permission-title {
    font-weight: 700;
    color: var(--text);
}

.permission-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

.permissions-group {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {
    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

.form-message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    min-height: 20px;
    display: none;
}

.form-message.success {
    background: #dcfce7;
    color: #16a34a;
    display: block;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-field input {
    padding-right: 44px;
    width: 100%;
}

.password-field .password-toggle {
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    transform: none;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: var(--bg-alt);
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s ease, background 0.2s ease;
}

.password-field .password-toggle:hover {
    color: var(--primary);
    background: rgba(122, 44, 255, 0.14);
}

.password-field .password-toggle svg {
    width: 18px;
    height: 18px;
}

.form-message.error {
    background: #fee2e2;
    color: #dc2626;
    display: block;
}

.credentials-reset {
    padding-top: 0;
    border-top: 1px solid var(--border);
}

.credentials-reset p {
    color: var(--text-light);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

/* Order Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 24px;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-user-details-modal {
    max-width: 900px;
}

.manual-order-modal {
    max-width: 900px;
}

.manual-order-form {
    max-height: min(78vh, 760px);
    overflow-y: auto;
}

.manual-order-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.manual-order-form input,
.manual-order-form select,
.manual-order-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
}

.manual-order-items {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #fafbff;
}

.manual-order-items-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.manual-order-items-header h4 {
    margin: 0;
}

.manual-order-item-row {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: white;
    margin-bottom: 10px;
}

.manual-order-item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.manual-order-item-actions {
    display: flex;
    justify-content: flex-end;
}

.manual-order-total {
    margin-top: 6px;
    text-align: right;
    font-weight: 700;
    color: var(--primary);
}

@media (max-width: 768px) {
    .manual-order-grid {
        grid-template-columns: 1fr;
    }

    .manual-order-item-grid {
        grid-template-columns: 1fr;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-body {
    padding: 24px;
}

.status-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Shared popup animations */
@keyframes popupOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupDialogIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-modal:not(.hidden),
.login-progress-modal:not(.hidden),
.email-modal:not(.hidden),
.order-details-modal:not(.hidden),
.part-details-modal:not(.hidden),
.modal-overlay,
.chat-close-confirm.show,
.admin-chat-take-modal.show,
.support-rating-modal.show {
    animation: popupOverlayIn 0.22s ease-out;
}

.login-modal:not(.hidden) .login-box,
.login-progress-modal:not(.hidden) .login-progress-box,
.email-modal:not(.hidden) .email-modal-container,
.order-details-modal:not(.hidden) .order-details-container,
.part-details-modal:not(.hidden) .part-details-container,
.modal-overlay .modal,
.chat-close-confirm.show .chat-close-confirm-dialog,
.admin-chat-take-modal.show .admin-chat-take-dialog,
.support-rating-modal.show .support-rating-dialog {
    animation: popupDialogIn 0.24s ease-out;
    transform-origin: center top;
}

@media (prefers-reduced-motion: reduce) {
    .login-modal:not(.hidden),
    .login-progress-modal:not(.hidden),
    .email-modal:not(.hidden),
    .order-details-modal:not(.hidden),
    .part-details-modal:not(.hidden),
    .modal-overlay,
    .chat-close-confirm.show,
    .admin-chat-take-modal.show,
    .support-rating-modal.show,
    .login-modal:not(.hidden) .login-box,
    .login-progress-modal:not(.hidden) .login-progress-box,
    .email-modal:not(.hidden) .email-modal-container,
    .order-details-modal:not(.hidden) .order-details-container,
    .part-details-modal:not(.hidden) .part-details-container,
    .modal-overlay .modal,
    .chat-close-confirm.show .chat-close-confirm-dialog,
    .admin-chat-take-modal.show .admin-chat-take-dialog,
    .support-rating-modal.show .support-rating-dialog {
        animation: none !important;
    }
}

@media (max-width: 768px) {
    .admin-wrapper {
        padding: 28px 0 48px;
    }

    .admin-tabs {
        gap: 8px;
        margin-bottom: 20px;
        padding-bottom: 8px;
    }

    .admin-tab-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .admin-tab-btn svg {
        width: 18px;
        height: 18px;
    }

    .admin-header {
        flex-direction: column;
    }
    
    .admin-stats {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    
    .admin-stat {
        min-width: 0;
        width: 100%;
        padding: 16px 12px;
    }
    
    .admin-stat-number {
        font-size: 1.5rem;
    }

    .admin-filters {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-filter,
    .admin-filters .btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }
    
    .order-info-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .order-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .order-actions {
        justify-content: stretch;
    }
    
    .order-action-btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 560px) {
    .admin-filter,
    .admin-filters .btn,
    .admin-stat,
    .order-action-btn {
        width: 100%;
        flex-basis: 100%;
    }

    .admin-stats,
    .order-info-grid {
        grid-template-columns: 1fr;
    }

    .order-card-header,
    .order-card-body,
    .order-card-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}
