/* HostPanel - Minimal base styles (theme-ready) */

*, *::before, *::after { box-sizing: border-box; }
html { background: #f3f4f6; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-weight: 500; line-height: 1.5; color: #333; background: #f3f4f6; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 60vw; margin: 0 auto; padding: 0 1rem; }
@media (max-width: 768px) { .container { max-width: 100%; } }

/* Portal header - WHMCS-style layout */
.portal-header { background: #fff; border-bottom: 1px solid #e5e7eb; }
.portal-header-top { padding: 1rem 0; }
.portal-header-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.portal-logo { font-weight: bold; font-size: 1.5rem; color: #1e3a5f; }
.portal-logo:hover { text-decoration: none; color: #0066cc; }
.portal-header-right { display: flex; align-items: center; gap: 1rem; }
.portal-search { display: flex; align-items: center; border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; background: #fff; }
.portal-search-input { border: none; padding: 0.5rem 1rem; width: 220px; font-size: 0.9rem; }
.portal-search-input:focus { outline: none; }
.portal-search-btn { border: none; background: transparent; padding: 0.5rem 0.75rem; cursor: pointer; color: #6b7280; font-size: 1rem; }
.portal-cart { position: relative; display: flex; align-items: center; justify-content: center; padding: 0.5rem; color: #4b5563; border: 1px solid #d1d5db; border-radius: 6px; transition: box-shadow 0.2s; }
.portal-cart:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.portal-cart-icon { width: 24px; height: 24px; }
.portal-cart-badge { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; background: #3b82f6; color: #fff; font-size: 0.75rem; font-weight: 600; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.portal-nav { background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.portal-nav-list { display: flex; align-items: center; flex-wrap: wrap; margin: 0; padding: 0.75rem 0; list-style: none; gap: 0; }
.portal-nav-list > li { margin-right: 1.5rem; }
.portal-nav-list > li:last-child { margin-right: 0; margin-left: auto; }
.portal-nav-list a { color: #374151; font-size: 0.95rem; }
.portal-nav-list a:hover { color: #0066cc; text-decoration: none; }
.portal-nav-dropdown, .portal-nav-account { position: relative; }
.portal-nav-trigger { cursor: pointer; }
.portal-nav-dropdown .portal-nav-trigger { color: #374151; font-size: 0.95rem; }
.portal-nav-dropdown:hover .portal-nav-trigger { color: #0066cc; }
.portal-nav-menu { display: none; position: absolute; top: 100%; left: 0; width: max-content; min-width: max-content; margin-top: 0; padding: 0.5rem 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); list-style: none; z-index: 100; white-space: nowrap; }
.portal-nav-dropdown.open .portal-nav-menu, .portal-nav-account.open .portal-nav-menu { display: block; }
.portal-nav-menu li { margin: 0; }
.portal-nav-menu li.dropdown-divider { height: 0; padding: 0; margin: 0.25rem 0; border-top: 1px solid #e5e7eb; list-style: none; }
.portal-nav-menu a { display: block; padding: 0.5rem 1rem; color: #374151; }
.portal-nav-menu a:hover { background: #f3f4f6; color: #0066cc; }
.portal-nav-account .portal-nav-trigger { color: #374151; font-size: 0.95rem; }
.portal-nav-account:hover .portal-nav-trigger { color: #0066cc; }
.portal-nav-account .portal-nav-menu { left: auto; right: 0; }

/* Breadcrumb bar - below main nav */
.portal-breadcrumb { background: #f3f4f6; border-bottom: 1px solid #e5e7eb; padding: 0.5rem 0; font-size: 0.9rem; }
.portal-breadcrumb .container { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
.portal-breadcrumb-link { color: #5b7c99; text-decoration: none; }
.portal-breadcrumb-link:hover { color: #4a6a85; text-decoration: underline; }
.portal-breadcrumb-sep { color: #9ca3af; margin: 0 0.25rem; user-select: none; }
.portal-breadcrumb-current { color: #6b7280; font-weight: 500; }

/* Captcha puzzle */
.captcha-puzzle {
    display: inline-flex;
    flex-direction: column;
    gap: 0.35rem;
}
.captcha-puzzle-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.2rem;
    width: 100%;
}
.captcha-puzzle-tile {
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #f9fafb;
    padding: 0.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.captcha-puzzle-tile svg {
    width: 22px;
    height: 22px;
}
.captcha-puzzle-tile-selected {
    border-color: #465fff;
    box-shadow: 0 0 0 1px rgba(70,95,255,0.35);
    background: #eef2ff;
}
.captcha-puzzle-hint {
    margin: 0;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Captcha puzzle widget - verify CTA and verification complete states */
.captcha-puzzle-widget {
    display: inline-block;
    width: fit-content;
    min-width: 260px;
    max-width: 100%;
    margin: 0.25rem 0;
    background: #f8f8f8;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 0;
    position: relative;
    overflow: hidden;
}
.captcha-puzzle-verify {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem 1.25rem 1rem;
    cursor: pointer;
    user-select: none;
    min-height: 48px;
}
.captcha-puzzle-verify:hover {
    background: #f0f0f0;
}
.captcha-puzzle-verify-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.captcha-puzzle-verify-icon svg {
    display: block;
    animation: captcha-pulse 1.5s ease-in-out infinite;
}
@keyframes captcha-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.08); }
}
.captcha-puzzle-verify-text {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: #444;
    text-transform: uppercase;
    white-space: nowrap;
}
.captcha-puzzle-grid-wrap {
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.6rem 1rem;
    width: 100%;
    box-sizing: border-box;
}
.captcha-puzzle-grid-wrap.captcha-puzzle-open {
    display: flex;
}
.captcha-puzzle-grid-wrap .captcha-puzzle-hint {
    line-height: 1.25;
}
.captcha-puzzle-complete {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem 1.5rem;
    min-height: 48px;
}
.captcha-puzzle-complete.captcha-puzzle-done {
    display: flex;
}
.captcha-puzzle-complete-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.captcha-puzzle-complete-icon svg {
    display: block;
}
.captcha-puzzle-complete-text {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: #16a34a;
    text-transform: uppercase;
    white-space: nowrap;
}
.captcha-puzzle-brand {
    display: none;
}

/* Client area banners - promotional strips above main content cards */
.portal-banner { padding: 0.6rem 0; font-size: 0.95rem; text-align: center; }
.portal-banner-inner { display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.portal-banner-icon { flex-shrink: 0; opacity: 0.9; display: block; vertical-align: middle; }
.portal-banner-text { flex: 1; min-width: 0; }
.portal-banner-dashboard { margin-bottom: 1rem; border-radius: 8px; padding: 0.65rem 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

/* Sub-account banner (blue bar when signed in as sub-user) */
.sub-account-banner { background: #1e40af; color: #fff; padding: 0.5rem 0; font-size: 0.9rem; }
.sub-account-banner-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.5rem 1rem; }
.sub-account-banner-label { font-weight: 600; }
.sub-account-banner-account { opacity: 0.95; }
.admin-impersonation-banner { background: #b45309; color: #fff; padding: 0.5rem 0; font-size: 0.9rem; }
.admin-impersonation-banner-inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.75rem 1rem; }
.admin-impersonation-banner-label { font-weight: 600; }
.admin-impersonation-banner-btn { display: inline-block; padding: 0.35rem 0.75rem; background: #fff; color: #b45309; font-weight: 600; text-decoration: none; border-radius: 6px; font-size: 0.875rem; }
.admin-impersonation-banner-btn:hover { background: #fef3c7; color: #92400e; }

/* Portal mobile nav toggle - hidden on desktop, shown on mobile in header row */
.portal-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
}
.portal-nav-toggle:hover { background: #f9fafb; color: #0066cc; }
.portal-nav-toggle-icon { display: block; }
.portal-nav-toggle-close { display: none; }
.portal-nav-toggle.is-open .portal-nav-toggle-bars { display: none; }
.portal-nav-toggle.is-open .portal-nav-toggle-close { display: block; }

@media (max-width: 768px) {
    .portal-header-inner { flex-wrap: wrap; align-items: center; }
    .portal-search-input { width: 140px; }

    .portal-nav-toggle {
        display: flex;
        margin-left: auto;
        flex-shrink: 0;
    }

    /* Remove grey bar on mobile - nav is just a wrapper for the dropdown list */
    .portal-nav {
        background: transparent;
        border-bottom: none;
        padding: 0;
    }
    .portal-nav-container {
        padding: 0;
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        max-width: none;
    }
    .portal-nav-list {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin: 0;
        padding: 0.5rem 0;
        border-top: 1px solid #e5e7eb;
        background: #fff;
        text-align: center;
    }
    .portal-nav-list > li {
        margin: 0;
        border-bottom: 1px solid #e5e7eb;
    }
    .portal-nav-list > li.portal-nav-dropdown,
    .portal-nav-list > li.portal-nav-account {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .portal-nav-list > li > a {
        text-align: center;
    }
    .portal-nav-menu .dropdown-divider {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        box-sizing: content-box;
    }
    .portal-nav-list > li:last-child { margin-left: 0; border-bottom: 0; }
    .portal-nav.open .portal-nav-list {
        display: flex;
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    }
    .portal-nav-list > li > a {
        display: block;
        padding: 0.75rem 1rem;
    }
    .portal-nav-dropdown .portal-nav-trigger,
    .portal-nav-account .portal-nav-trigger {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.75rem 1rem;
        width: 100%;
        text-decoration: none;
        color: inherit;
        font-size: 0.95rem;
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
        text-align: center;
    }
    .portal-nav-caret {
        display: none;
    }
    .portal-nav-dropdown .portal-nav-trigger::after,
    .portal-nav-account .portal-nav-trigger::after {
        content: '▾';
        font-size: 0.8em;
        transition: transform 0.2s;
    }
    .portal-nav-dropdown.open .portal-nav-trigger::after,
    .portal-nav-account.open .portal-nav-trigger::after {
        transform: rotate(180deg);
    }
    .portal-nav-menu {
        display: none;
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 1rem;
        margin: 0 auto;
        background: transparent;
        text-align: center;
        width: max-content;
        max-width: 100%;
    }
    .portal-nav-dropdown.open .portal-nav-menu,
    .portal-nav-account.open .portal-nav-menu {
        display: block;
    }
    .portal-nav-menu a {
        padding: 0.6rem 1rem;
        text-align: center;
    }
    .portal-nav-account .portal-nav-menu {
        left: 0;
        right: auto;
    }
}

/* Legacy - keep for any remaining references */
.site-header { background: #f5f5f5; border-bottom: 1px solid #ddd; padding: 1rem 0; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: bold; font-size: 1.25rem; }
.site-header nav a { margin-left: 1.5rem; }

/* Admin nav dropdowns */
.nav-dropdowns { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-dropdown { position: relative; padding-bottom: 0.5rem; }
.nav-dropdown-trigger { cursor: pointer; padding: 0.5rem 0.5rem 0.5rem 0; margin-left: 1rem; color: #0066cc; display: inline-block; }
.nav-dropdown-trigger:hover { text-decoration: underline; }
.nav-dropdown-trigger::after { content: ' ▾'; font-size: 0.75em; }
.nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 160px; background: #fff; border: 1px solid #ddd; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); padding: 0.5rem 0; z-index: 100; margin-top: 0; padding-top: 0.5rem; }
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: 0.5rem 1rem; margin: 0; color: #333; }
.nav-dropdown-menu a:hover { background: #f5f5f5; text-decoration: none; }

/* Main */
.main-content { flex: 1; padding: 2rem 0; min-height: 60vh; background: #f3f4f6; }

/* Fade-in on load */
.main-content.fade-load-pending { opacity: 0; transition: opacity 0.4s ease-out; }
.main-content:not(.fade-load-pending) { opacity: 1; transition: opacity 0.4s ease-out; }

/* Fade-in on scroll */
.fade-in-scroll { opacity: 0; transform: translateY(16px); transition: opacity 0.45s ease-out, transform 0.45s ease-out; }
.fade-in-scroll.fade-in-visible { opacity: 1; transform: translateY(0); }

/* Hero */
.hero { text-align: center; padding: 3rem 0; }
.hero h1 { margin: 0 0 0.5rem; }
.hero p { margin: 0 0 1.5rem; color: #666; }

/* Buttons */
.btn { display: inline-block; padding: 0.5rem 1rem; border: 1px solid #ccc; background: #fff; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.btn:hover { background: #f0f0f0; }
.btn-primary { background: #0066cc; color: #fff; border-color: #0066cc; }
.btn-primary:hover { background: #0052a3; text-decoration: none; }
.btn-primary:disabled, .btn-primary[disabled] { background: #999; border-color: #999; color: #ccc; cursor: not-allowed; opacity: 0.8; }
.btn-primary:disabled:hover, .btn-primary[disabled]:hover { background: #999; }
.btn-secondary { background: #6c757d; color: #fff; border-color: #6c757d; }
.btn-secondary:hover { background: #5a6268; text-decoration: none; }
.btn-user-mgmt { padding: 0.4rem 0.75rem; font-size: 0.9rem; border-radius: 6px; text-decoration: none; border: 1px solid; cursor: pointer; display: inline-block; }
.btn-user-mgmt-secondary { background: #f3f4f6; color: #374151; border-color: #d1d5db; }
.btn-user-mgmt-secondary:hover:not(:disabled) { background: #e5e7eb; text-decoration: none; }
.btn-user-mgmt-danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.btn-user-mgmt-danger:hover:not(:disabled) { background: #fee2e2; text-decoration: none; }
.btn-user-mgmt:disabled { opacity: 0.6; cursor: not-allowed; }

/* Screen reader only - visually hidden but available to assistive tech */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Forms */
.form-card { max-width: 500px; margin: 0 auto; border: 1px solid #ddd; border-radius: 8px; background: #fff; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.login-page .form-card { margin-top: 1.5rem; }
.form-card-banner { margin: 0; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; color: #fff; background: #334155; border-bottom: 1px solid rgba(255,255,255,0.1); }
.form-card-body { padding: 1.5rem; }
.form-card .form-help { margin: 0 0 1rem; font-size: 0.95rem; color: #6b7280; }
.form-card .input-with-icon input { padding-left: 1rem; padding-right: 1.25rem; }
.form-card .form-group .input-with-icon { max-width: 360px; margin-left: auto; margin-right: auto; }
.form-card .form-group { margin-bottom: 1rem; }
.form-card .form-group:first-of-type { margin-top: 1.5rem; }
.form-card .form-group:has(.login-captcha-wrap) { margin-top: 1.5rem; margin-bottom: 2rem; }
.form-card .login-captcha-wrap { display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.form-card .login-captcha-wrap .captcha-input { width: 100px; font-family: inherit; font-weight: bold; letter-spacing: 0.15em; padding: 0.4rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem; }
.form-card .login-captcha-wrap .captcha-input.field-invalid { border-color: #c00 !important; border-width: 2px; }
.form-card .login-submit-wrap { text-align: center; margin-top: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; transition: border-color 0.2s, border-width 0.2s; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #0066cc; border-width: 2px; }

/* Input with icon (icon on left inside field) */
.input-with-icon { display: flex; align-items: center; min-height: 42px; border: 1px solid #ccc; border-radius: 4px; background: #fff; transition: border-color 0.2s, border-width 0.2s; }
.input-with-icon:focus-within { outline: none; border-color: #0066cc; border-width: 2px; }
.input-with-icon .input-icon { display: flex; align-items: center; justify-content: center; padding-left: 0.75rem; padding-right: 0.5rem; color: #6b7280; flex-shrink: 0; }
.input-with-icon .input-icon svg { width: 18px; height: 18px; opacity: 0.8; }
.input-with-icon input, .input-with-icon select { flex: 1; min-width: 0; border: none; padding: 0.5rem 0.75rem 0.5rem 0; font-size: 1rem; background: transparent; }
.input-with-icon input:focus, .input-with-icon select:focus { outline: none; }
.input-with-icon select { cursor: pointer; appearance: auto; }
.input-with-icon .flag-select-wrap { flex: 1; min-width: 0; }
.input-with-icon .flag-select-trigger { border: none; background: transparent; box-shadow: none; min-height: 42px; }
.input-with-icon input.input-readonly, .input-with-icon input:disabled, .input-with-icon input[readonly] { background: #f3f4f6; color: #6b7280; cursor: not-allowed; }
.input-with-icon:has(input.email-valid), .input-with-icon:has(input.password-valid), .input-with-icon:has(input.password-confirm-match) { border-color: #080 !important; border-width: 2px; }
.input-with-icon:has(input.email-invalid), .input-with-icon:has(input.password-invalid), .input-with-icon:has(input.password-confirm-mismatch), .input-with-icon:has(input.field-invalid) { border-color: #c00 !important; border-width: 2px; }
.input-with-icon:has(input.email-valid:focus), .input-with-icon:has(input.password-valid:focus), .input-with-icon:has(input.password-confirm-match:focus) { box-shadow: 0 0 0 2px rgba(0,128,0,0.2); }
.input-with-icon:has(input.email-invalid:focus), .input-with-icon:has(input.password-invalid:focus), .input-with-icon:has(input.password-confirm-mismatch:focus), .input-with-icon:has(input.field-invalid:focus) { box-shadow: 0 0 0 2px rgba(204,0,0,0.2); }
.form-footer { margin-top: 0.5rem; font-size: 0.9rem; color: #666; }
.form-footer-sep { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #eee; }
.login-forgot-row { text-align: right; margin: 0 auto 0.5rem; max-width: 360px; }
.login-forgot-link { font-size: 0.9rem; color: #0066cc; }
.login-forgot-link:hover { text-decoration: underline; }
.register-form-fields .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .register-form-fields .form-row { grid-template-columns: 1fr; } }
.form-section-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.form-section-card:last-of-type { margin-bottom: 1.5rem; }
.form-section-title { font-size: 1.1rem; font-weight: 600; color: #333; margin: 0 0 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid #eee; }

/* Register page - layout with sidebar */
.register-page-layout { display: flex; gap: 1.5rem; margin-top: 1.5rem; }
.register-sidebar-area { width: 240px; flex-shrink: 0; padding-right: 1rem; border-right: 1px solid #e5e7eb; }
.register-sidebar-wrap { background: #fff; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.register-sidebar-title { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; color: #374151; background: #f3f4f6; border-radius: 6px 6px 0 0; border-bottom: 1px solid #e5e7eb; }
.register-sidebar-title svg { flex-shrink: 0; opacity: 0.7; }
.register-sidebar-content { padding: 1rem; }
.register-sidebar-text { margin: 0 0 1rem; font-size: 0.9rem; color: #6b7280; line-height: 1.5; padding-bottom: 1rem; border-bottom: 1px solid #e5e7eb; }
.register-sidebar-list { list-style: none; margin: 0; padding: 0; }
.register-sidebar-list li { margin: 0; border-bottom: 1px solid #e5e7eb; }
.register-sidebar-list li:last-child { border-bottom: none; }
.register-sidebar-list a { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; color: #374151; font-size: 0.95rem; text-decoration: none; }
.register-sidebar-list a:hover { color: #0066cc; }
.register-sidebar-list a svg { flex-shrink: 0; opacity: 0.7; }
.register-form-main { flex: 1; min-width: 0; }
@media (max-width: 768px) { .register-page-layout { flex-direction: column; } .register-sidebar-area { width: 100%; order: 2; } .register-form-main { order: 1; } }

/* Profile page - layout with sidebar (matches register) */
.profile-page-layout { display: flex; gap: 1.5rem; margin-top: 1.5rem; }
.profile-sidebar-area { width: 240px; flex-shrink: 0; padding-right: 1rem; border-right: 1px solid #e5e7eb; }
.profile-sidebar-wrap { background: #fff; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.profile-sidebar-title { display: flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; color: #374151; background: #f3f4f6; border-radius: 6px 6px 0 0; border-bottom: 1px solid #e5e7eb; }
.profile-sidebar-title svg { flex-shrink: 0; opacity: 0.7; }
.profile-sidebar-list { list-style: none; margin: 0; padding: 0; }
.profile-sidebar-list li { margin: 0; border-bottom: 1px solid #e5e7eb; }
.profile-sidebar-list li:last-child { border-bottom: none; }
.profile-sidebar-list a { display: block; padding: 0.5rem 1rem; color: #374151; font-size: 0.95rem; text-decoration: none; }
.profile-sidebar-list a:hover { color: #0066cc; }
.profile-sidebar-list a.active { background: #334155; color: #fff; }
.profile-sidebar-list a.active:hover { color: #fff; }
.profile-form-main { flex: 1; min-width: 0; }
.profile-form-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.profile-form-card-banner { margin: 0; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; color: #fff; background: #334155; border-bottom: 1px solid rgba(255,255,255,0.1); }
.profile-form-card-body { padding: 1.5rem; }
/* Deep-link from "Change Password" menu: draw attention to the password block */
@keyframes profile-password-section-highlight {
    0%, 28% {
        box-shadow: inset 0 0 0 2px #3b82f6, 0 0 0 4px rgba(59, 130, 246, 0.12);
        background-color: rgba(219, 234, 254, 0.65);
    }
    100% {
        box-shadow: inset 0 0 0 0 transparent, 0 0 0 0 transparent;
        background-color: transparent;
    }
}
#change-password.profile-password-section-highlight {
    border-radius: 8px;
    /* Wider than inner fields: bleed into card body padding, keep content aligned */
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    animation: profile-password-section-highlight 2.4s ease-out forwards;
}
@media (prefers-reduced-motion: reduce) {
    #change-password.profile-password-section-highlight {
        animation: none;
        box-shadow: inset 0 0 0 2px #2563eb;
        background-color: rgba(219, 234, 254, 0.75);
    }
}
.profile-empty { margin: 0; color: #6b7280; }
.email-history-back { display: inline-block; margin-bottom: 1rem; }
.email-history-view { margin-top: 0.5rem; }
.email-history-subject { margin: 0 0 0.25rem; font-size: 1.1rem; }
.email-history-meta { margin: 0 0 1rem; color: #6b7280; font-size: 0.9rem; }
.email-history-body { max-height: 60vh; overflow: auto; padding: 1rem; border: 1px solid #e5e7eb; border-radius: 6px; background: #f9fafb; font-size: 0.95rem; line-height: 1.5; }
.email-history-body img { max-width: 100%; height: auto; }
.email-history-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e5e7eb; }
.email-history-pagination-meta { margin-right: auto; font-size: 0.9rem; color: #64748b; }
/* Security settings – login alerts slide toggle */
.security-settings-toggle-form { margin-top: 0.75rem; }
.security-settings-login-toggle-row { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; user-select: none; }
.security-settings-login-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; vertical-align: middle; }
.security-settings-login-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.security-settings-login-slider { position: absolute; inset: 0; background: #ef4444; border-radius: 26px; transition: background 0.25s; }
.security-settings-login-slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.25s; }
.security-settings-login-switch input:checked + .security-settings-login-slider { background: #22c55e; }
.security-settings-login-switch input:checked + .security-settings-login-slider::before { transform: translateX(22px); }
.security-settings-login-switch input:focus-visible + .security-settings-login-slider { outline: 2px solid #3b82f6; outline-offset: 2px; }
.security-settings-login-toggle-text { font-weight: 500; color: #334155; font-size: 0.95rem; }
@media (max-width: 768px) { .profile-page-layout { flex-direction: column; } .profile-sidebar-area { width: 100%; order: 2; } .profile-form-main { order: 1; } }

/* Register page - single card */
.register-form-wide { width: 100%; }
@media (max-width: 768px) { .register-form-wide { width: 100%; } }
.register-form-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; margin-bottom: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.register-form-card-banner { margin: 0; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; color: #fff; background: #334155; border-bottom: 1px solid rgba(255,255,255,0.1); }
.register-form-card .register-form-section { padding-left: 1.5rem; padding-right: 1.5rem; }
.register-form-card .register-form-section:first-of-type { padding-top: 1.5rem; }
.register-form-card .register-form-section:last-child { padding-bottom: 1.5rem; margin-bottom: 0; }
.register-form-section { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid #eee; }
.register-form-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.register-form-section-first,
.register-form-section-noborder { border-bottom: none; }
.checkout-register-wrap .register-form-section-first { padding-top: 1.5rem; }
.checkout-register-wrap .register-form-submit-wrap { padding: 1.5rem 0 1.5rem; }
.register-form-section-title { font-size: 1.1rem; font-weight: 600; color: #333; margin: 0 0 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid #eee; }
.register-form-section-break { display: flex; align-items: center; margin-top: 0; padding-top: 0; padding-bottom: 0.75rem; font-size: 0.95rem; font-weight: 600; color: #374151; }
.register-form-section-break::before,
.register-form-section-break::after { content: ''; flex: 1; border-bottom: 1px solid #e5e7eb; }
.register-form-section-break::before { margin-right: 1rem; }
.register-form-section-break::after { margin-left: 1rem; }
.register-form-submit-break { margin-top: 1.5rem; }

/* Phone input with country code */
.phone-input-wrapper { display: flex; align-items: center; min-height: 42px; border: 1px solid #ccc; border-radius: 4px; overflow: visible; }
.phone-input-wrapper .phone-country-code { width: 110px; min-width: 110px; padding: 0.5rem; border: none; background: #f5f5f5; font-size: 1rem; cursor: pointer; }
.phone-input-wrapper .phone-number { flex: 1; padding: 0.5rem 0.75rem; border: none; border-left: 1px solid #ccc; font-size: 1rem; }
.phone-input-wrapper:focus-within { border-color: #0066cc; box-shadow: 0 0 0 2px rgba(0,102,204,0.2); }

/* Flag select dropdown (replaces native select with flag images) */
.flag-select-wrap { position: relative; }
.flag-select-wrap select.flag-select-native { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.flag-select-trigger { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; background: #fff; cursor: pointer; font-size: 1rem; min-height: 42px; width: 100%; text-align: left; }
.flag-select-trigger:hover { border-color: #999; }
.flag-select-trigger:focus { outline: none; border-color: #0066cc; box-shadow: 0 0 0 2px rgba(0,102,204,0.2); }
.flag-select-trigger .flag-select-flag { width: 20px; height: 15px; object-fit: cover; flex-shrink: 0; }
.flag-select-trigger .flag-select-chevron { margin-left: auto; opacity: 0.6; font-size: 0.75em; }
.flag-select-dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 100%; margin-top: 2px; max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 100; }
.flag-select-wrap.open .flag-select-dropdown { display: block; }
.flag-select-option { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; cursor: pointer; font-size: 1rem; }
.flag-select-option:hover { background: #f5f5f5; }
.flag-select-option.selected { background: #e8f4ff; }
.flag-select-option .flag-select-flag { width: 20px; height: 15px; object-fit: cover; flex-shrink: 0; }
.flag-select-option[data-flag-cc=""] .flag-select-flag { display: none; }
.flag-select-option .flag-globe { width: 20px; height: 15px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.phone-input-wrapper .flag-select-wrap { width: 110px; min-width: 110px; flex-shrink: 0; }
.phone-input-wrapper .flag-select-wrap.open { z-index: 101; }
.phone-input-wrapper .flag-select-trigger { border: none; border-radius: 0; background: #f5f5f5; }

/* Alerts */
.alert { padding: 0.75rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.alert-error, .alert-danger { background: #fee; border: 1px solid #fcc; color: #c00; }
.alert-success { background: #efe; border: 1px solid #cfc; color: #060; }

/* Product grid - modern cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.product-card { position: relative; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: box-shadow 0.25s ease, transform 0.25s ease; display: flex; flex-direction: column; border: 1px solid rgba(0,0,0,0.06); }
.product-card:hover { box-shadow: 0 12px 24px rgba(0,0,0,0.12); transform: translateY(-2px); }
.product-card-accent { height: 4px; background: var(--product-accent, #3b82f6); }
.product-card-body { padding: 1.5rem 1.5rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.product-card-title { margin: 0 0 0.25rem; font-size: 1.2rem; font-weight: 600; color: #1e293b; letter-spacing: -0.02em; line-height: 1.3; }
.product-card-tagline { margin: 0 0 0.5rem; font-size: 0.8rem; font-weight: 500; color: var(--product-accent, #3b82f6); text-transform: uppercase; letter-spacing: 0.05em; }
.product-card-description { color: #64748b; font-size: 0.9rem; line-height: 1.5; margin: 0 0 1.25rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid #f1f5f9; }
.product-card-price { display: flex; align-items: baseline; gap: 0.15rem; }
.product-card-amount { font-size: 1.35rem; font-weight: 700; color: #1e293b; }
.product-card-cycle { font-size: 0.9rem; color: #64748b; font-weight: 500; }
.product-card-cta { padding: 0.5rem 1rem; font-weight: 600; border-radius: 8px; transition: background 0.2s, transform 0.15s; }
.product-card-cta:hover { transform: scale(1.02); }
.product-card-badge { position: absolute; top: 0.75rem; right: 0.75rem; padding: 0.25rem 0.6rem; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; background: var(--product-accent, #3b82f6); color: #fff; border-radius: 6px; z-index: 1; }
.product-card--clickable { cursor: pointer; }
.product-card--clickable:focus { outline: 2px solid var(--product-accent, #3b82f6); outline-offset: 2px; }
.product-card-more { margin: -0.75rem 0 1rem; font-size: 0.8rem; font-weight: 600; color: var(--product-accent, #3b82f6); }
.product-card-cycle--from { font-size: 0.8rem; text-transform: lowercase; }
.product-card-cta { position: relative; z-index: 2; }

body.product-detail-modal-open { overflow: hidden; }
.product-detail-modal { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.product-detail-modal[hidden] { display: none !important; }
.product-detail-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.product-detail-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(90vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.product-detail-modal-accent { height: 4px; background: var(--product-accent, #3b82f6); border-radius: 12px 12px 0 0; }
.product-detail-modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.65rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    z-index: 2;
    padding: 0.25rem;
}
.product-detail-modal-close:hover { color: #1e293b; }
.product-detail-modal-body { padding: 1.25rem 1.5rem 1.5rem; }
.product-detail-modal-tagline {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--product-accent, #3b82f6);
}
.product-detail-modal-title { margin: 0 0 1rem; font-size: 1.35rem; font-weight: 700; color: #1e293b; line-height: 1.3; }
.product-detail-modal-description {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.product-detail-modal-pricing { margin-bottom: 1.25rem; }
.product-detail-modal-pricing-title { margin: 0 0 0.65rem; font-size: 0.95rem; font-weight: 600; color: #1e293b; }
.product-detail-modal-pricing-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.product-detail-modal-pricing-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
}
.product-detail-modal-pricing-period {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.15rem;
}
.product-detail-modal-pricing-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}
.product-detail-modal-pricing-amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}
.product-detail-modal-setup { margin: 0.65rem 0 0; font-size: 0.85rem; color: #64748b; }
.product-detail-modal-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* Cart */
.cart-table { margin-bottom: 1.5rem; }
.cart-actions { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.cart-total { font-size: 1.2rem; margin-top: 1rem; }
.cart-remove { color: #c00; font-size: 0.9rem; }
.cart-remove:hover { text-decoration: underline; }

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 2rem; margin-top: 1.5rem; }
.checkout-layout-no-summary { grid-template-columns: 1fr; max-width: 700px; }
.checkout-layout .checkout-order-summary { order: 2; }
.checkout-layout .checkout-auth-panel,
.checkout-layout .checkout-form { order: 1; }
@media (max-width: 640px) { .checkout-layout { grid-template-columns: 1fr; } .checkout-layout .checkout-order-summary,
.checkout-layout .checkout-auth-panel,
.checkout-layout .checkout-form { order: unset; } }
/* Single column layout when not logged in (WHMCS-style) */
.checkout-layout-single { grid-template-columns: 1fr; width: 60%; max-width: 60%; }
/* Full width when inside store layout (cart/checkout with sidebar) */
.store-main .checkout-layout-single,
.store-main .checkout-layout { width: 100%; max-width: 100%; }
/* Align checkout card with sidebar (no top margin) */
.store-main .checkout-layout { margin-top: 0; }
/* Add-to-cart uses same layout as checkout for matching width */
.store-main .add-to-cart-layout { width: 100%; max-width: 100%; }
.checkout-layout-single .checkout-order-summary,
.checkout-layout-single .checkout-auth-panel,
.checkout-layout-single .checkout-form { order: unset; }
.checkout-flow-single { display: flex; flex-direction: column; gap: 1.5rem; }
.checkout-total-due-top { margin-bottom: 0; }
.checkout-product { border: 1px solid #ddd; padding: 1.5rem; border-radius: 4px; }
.checkout-auth-tabs { margin-bottom: 1rem; }
.checkout-auth-tabs .btn { margin-right: 0.5rem; }
.checkout-or { margin: 1rem 0; color: #666; font-size: 0.9rem; }

/* Checkout order summary */
.checkout-order-summary { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; padding: 0 0 1.5rem; }
.checkout-summary-title { background: #334155; color: #fff; margin: 0; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; }
.checkout-summary-products { padding: 1rem 1.5rem 0; }
.checkout-summary-product { margin-bottom: 1rem; }
.checkout-summary-product-name { display: block; font-size: 1rem; color: #1e293b; margin-bottom: 0.15rem; }
.checkout-summary-product-type { display: block; font-size: 0.9rem; color: #64748b; margin-bottom: 0.25rem; }
.checkout-summary-product .checkout-item-domain { display: block; color: #475569; font-size: 0.9rem; margin-bottom: 0.5rem; }
.checkout-summary-product-row { display: flex; justify-content: space-between; font-size: 0.95rem; padding: 0.25rem 0; }
.checkout-summary-product-row span:last-child { font-weight: 500; }
.checkout-summary-row { display: flex; justify-content: space-between; padding: 0.5rem 1.5rem; font-size: 0.95rem; }
.checkout-summary-row span:last-child { font-weight: 500; }
.checkout-summary-discount { color: #16a34a; }
.checkout-summary-due { padding: 1rem 1.5rem 0; margin-top: 0.5rem; border-top: 1px solid #cbd5e1; }
.checkout-summary-due-amount { font-size: 1.5rem; font-weight: 700; color: #1e293b; display: block; }
.checkout-summary-due-label { font-size: 0.9rem; color: #64748b; }
.checkout-summary-table { width: 100%; border-collapse: collapse; }
.checkout-summary-table thead { background: #1e3a5f; color: #fff; }
.checkout-summary-table th { padding: 0.75rem 1rem; text-align: left; font-weight: 600; font-size: 0.9rem; }
.checkout-summary-table th.checkout-summary-price-col,
.checkout-summary-table td.checkout-summary-price-col { text-align: right; }
.checkout-summary-table td { padding: 1rem; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.checkout-summary-table tbody tr:last-child td { border-bottom: none; }
.checkout-item-domain { color: #475569; font-size: 0.95rem; }
.checkout-item-price { font-weight: 600; font-size: 1rem; color: #1e293b; }
.checkout-item-cycle { color: #64748b; font-size: 0.85rem; }
.checkout-item-renewal { color: #94a3b8; font-size: 0.8rem; }
.checkout-total-row { margin: 1rem 1rem 0; font-size: 1.1rem; font-weight: 600; }
.checkout-total-row #checkout-total { font-size: 1.2rem; }

/* Checkout card title bar (grey bar at top of main card) */
.checkout-card-title { background: #334155; color: #fff; margin: 0; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; border-radius: 8px 8px 0 0; }
.checkout-card-title-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.35rem 2rem 0.35rem 1.5rem; min-height: auto; }
.checkout-card-title-bar .checkout-card-title-text { margin: 0; font-size: inherit; font-weight: inherit; }
.checkout-card-title-bar .checkout-auth-toggle-wrap { padding: 0; margin: 0; }

/* Checkout auth panel (login/register) - same card style as form */
.checkout-auth-panel { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.checkout-auth-panel > *:not(.checkout-card-title) { padding-left: 1.5rem; padding-right: 1.5rem; }
.checkout-auth-toggle-wrap { padding-top: 1.5rem; padding-bottom: 1rem; text-align: right; }
.checkout-card-title-bar .checkout-auth-toggle-wrap { padding-top: 0; padding-bottom: 0; }
.checkout-auth-forms { display: grid; grid-template-rows: 1fr; overflow: hidden; transition: max-height 0.35s ease; }
.checkout-auth-forms.checkout-auth-show-login { max-height: 240px; }
.checkout-auth-forms.checkout-auth-show-register { max-height: 1200px; }
.checkout-auth-forms > * { grid-area: 1 / 1; min-height: 0; }
.checkout-auth-pane { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s ease, visibility 0.25s ease; }
.checkout-auth-pane.checkout-auth-pane-visible { opacity: 1; visibility: visible; pointer-events: auto; }
.checkout-auth-panel > .checkout-auth-forms { padding-bottom: 0; }
.checkout-auth-panel > .checkout-security-msg { padding-bottom: 1.5rem; }
.checkout-auth-panel .form-section-title { color: #0066cc; }
.checkout-login-btn { display: inline-block; width: auto; padding: 0.4rem 0.75rem; margin: 0; background: #fff; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.875rem; cursor: pointer; color: #374151; }
.checkout-login-btn:hover { background: #f9fafb; border-color: #9ca3af; }
.checkout-login-btn.checkout-tab-active { background: #fff; color: #374151; border-color: #d1d5db; }
.checkout-login-form-wrap { margin-bottom: 0; }
.checkout-login-form-wrap .form-group:first-of-type { margin-top: 1.5rem; }
.checkout-login-form-wrap .form-group .input-with-icon { max-width: 360px; margin-left: auto; margin-right: auto; }
.checkout-login-form-wrap .login-forgot-row { max-width: 360px; margin-left: auto; margin-right: auto; }
.checkout-login-form-wrap .login-captcha-wrap { display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.checkout-login-form-wrap .login-captcha-wrap .captcha-image { width: 100px; height: 36px; object-fit: cover; border: 1px solid #ddd; border-radius: 6px; }
.checkout-login-form-wrap .login-captcha-wrap .captcha-input { width: 100px; height: 36px; box-sizing: border-box; font-family: inherit; font-weight: bold; letter-spacing: 0.15em; padding: 0.4rem; border: 1px solid #ccc; border-radius: 6px; font-size: 0.9rem; }
.checkout-login-form-wrap .login-submit-wrap { text-align: center; margin-top: 1rem; }
.login-form-compact-heading { display: flex; align-items: center; margin-top: 1rem; padding-top: 1rem; font-size: 0.95rem; font-weight: 600; color: #374151; }
.login-form-compact-heading::before,
.login-form-compact-heading::after { content: ''; flex: 1; border-bottom: 1px solid #e5e7eb; }
.login-form-compact-heading::before { margin-right: 1rem; }
.login-form-compact-heading::after { margin-left: 1rem; }
.checkout-payment-break { display: flex; align-items: center; margin-top: 0; padding-top: 0; font-size: 0.95rem; font-weight: 600; color: #374151; }
.checkout-payment-break::before,
.checkout-payment-break::after { content: ''; flex: 1; border-bottom: 1px solid #e5e7eb; }
.checkout-payment-break::before { margin-right: 1rem; }
.checkout-payment-break::after { margin-left: 1rem; }
.login-form-compact .login-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; margin-top: 1rem; }
.login-form-compact .login-form-row .form-group:first-of-type { margin-top: 0; }
.login-form-compact .login-form-row .form-group .input-with-icon { max-width: none; }
@media (max-width: 480px) { .login-form-compact .login-form-row { grid-template-columns: 1fr; } }
.checkout-register-wrap { margin: 0; }
.checkout-register-title { margin: 0 0 1rem; font-size: 1.1rem; }
.checkout-register-form .form-group { margin-bottom: 1rem; }
.checkout-register-form .form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; }
.checkout-register-form .form-group input { width: 100%; padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; }
.checkout-switch-auth { margin-top: 1rem; font-size: 0.9rem; color: #666; }
.checkout-switch-btn { background: none; border: none; padding: 0; color: #0066cc; cursor: pointer; font-size: inherit; }
.checkout-switch-btn:hover { text-decoration: underline; }

/* Checkout form - WHMCS-style sections */
.checkout-form { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.checkout-form > .alert { margin: 1.5rem 1.5rem 0; }
.checkout-form > form { padding: 1.5rem 1.5rem 0.5rem 1.5rem; }
.checkout-form-whmcs .checkout-logged-in-msg { margin-bottom: 1.5rem; color: #64748b; }
.checkout-section { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #e5e7eb; }
.checkout-section:last-of-type { border-bottom: none; padding-bottom: 0.5rem; margin-bottom: 0.5rem; }
.checkout-section-title { font-size: 1.1rem; font-weight: 600; color: #0066cc; margin: 0 0 1rem; }
.checkout-section-desc { margin: 0 0 0.75rem; color: #64748b; font-size: 0.95rem; }
.checkout-addon-option { display: block; margin-bottom: 0.5rem; cursor: pointer; }
.checkout-addon-option input { margin-right: 0.5rem; }
.checkout-terms-label { display: flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; }
.checkout-recurring-breakdown { width: 80%; max-width: 28rem; margin: 0.5rem auto 0.75rem; padding: 0.65rem 1rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; }
.checkout-recurring-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 0.9rem; padding: 0.3rem 0; color: #475569; }
.checkout-recurring-row span:last-child { font-weight: 600; color: #1e293b; flex-shrink: 0; }
.checkout-total-due-box { background: #dcfce7; border: 1px solid #86efac; border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1rem; margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; width: 80%; margin-left: auto; margin-right: auto; }
.checkout-total-due-label { font-size: 0.9rem; color: #166534; }
.checkout-total-due-amount { font-size: 0.9rem; font-weight: 700; color: #15803d; }
.checkout-payment-login-required-wrap { text-align: center; padding: 1rem 0; }
.checkout-payment-login-required { margin: 0; color: #64748b; font-size: 0.95rem; }
.checkout-payment-desc { margin: 0 0 0.75rem; color: #64748b; font-size: 0.95rem; text-align: center; }
.checkout-payment-prompt { margin: 0 0 0.75rem; color: #64748b; font-size: 0.95rem; text-align: center; }
.checkout-payment-methods { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; justify-content: center; }
.checkout-payment-method-btn { padding: 0.6rem 1.25rem; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; font-size: 0.95rem; cursor: pointer; color: #374151; }
.checkout-payment-method-btn:hover { background: #f9fafb; border-color: #9ca3af; }
.checkout-payment-method-stripe { border-color: #635bff; color: #635bff; }
.checkout-payment-method-stripe:hover { background: #f5f5ff; }
.checkout-payment-methods-loggedin .checkout-payment-method-option { display: block; margin-bottom: 0.5rem; cursor: pointer; }
.checkout-payment-methods-loggedin .checkout-payment-method-option input { display: none; }
.checkout-payment-methods-loggedin .checkout-payment-method-btn { display: inline-block; }
.checkout-payment-methods-loggedin .checkout-payment-method-option input:checked + .checkout-payment-method-btn { border-color: #0066cc; background: #0066cc; color: #fff; }
.checkout-stripe-form-wrap { margin-top: 1rem; padding: 1rem; border: 1px solid #e5e7eb; border-radius: 8px; background: #f9fafb; }
.checkout-stripe-form-wrap .btn { margin-right: 0.5rem; margin-top: 0.5rem; }
.checkout-stripe-errors { color: #dc3545; font-size: 0.9rem; margin: 0.5rem 0; }
.checkout-login-required-msg { margin-top: 0.5rem; font-size: 0.9rem; color: #64748b; }
.checkout-login-section .checkout-logged-in-msg { font-size: 0.95rem; color: #166534; font-weight: 500; }
.checkout-logged-in-break { margin-top: 1.5rem; padding-bottom: 0.75rem; }
.checkout-logged-in-welcome { text-align: center; margin: 0; font-size: 0.95rem; color: #333; }
/* Checkout login: side by side, 90% of card width, centered */
.checkout-login-section { margin-bottom: 0; padding-bottom: 0; padding-left: 1.5rem; padding-right: 1.5rem; }
.checkout-login-section .login-form-compact .login-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; max-width: 90%; margin-left: auto; margin-right: auto; }
.checkout-login-section .login-form-compact .form-group .input-with-icon { max-width: 100%; }
@media (max-width: 480px) { .checkout-login-section .login-form-compact .login-form-row { grid-template-columns: 1fr; } }
.payment-method-item { padding: 0.5rem 0; border-bottom: 1px solid #e5e7eb; }
.payment-method-item:last-child { border-bottom: none; }
.payment-method-item strong { display: block; margin-bottom: 0.15rem; }
.checkout-invoice-note { margin-top: 0.75rem; font-size: 0.9rem; color: #64748b; text-align: center; }
.checkout-notes-break { margin-top: 2.25rem; padding-bottom: 0.75rem; }
.checkout-mailing-break { margin-top: 2.25rem; padding-bottom: 0.75rem; }
.checkout-verification-break { margin-top: 2.25rem; padding-bottom: 0.75rem; }
.checkout-notes-input { width: 100%; padding: 0.75rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 1rem; resize: vertical; min-height: 100px; }
.checkout-mailing-section { }
.checkout-mailing-title { font-size: 1rem; font-weight: 600; color: #374151; }
.checkout-mailing-desc { margin: 0 0 1rem; color: #64748b; font-size: 0.95rem; line-height: 1.5; text-align: center; }
.checkout-mailing-toggle { display: flex; align-items: center; gap: 0.75rem; justify-content: center; }
.checkout-mailing-switch { position: relative; display: inline-block; width: 48px; height: 26px; cursor: pointer; }
.checkout-mailing-switch input { opacity: 0; width: 0; height: 0; }
.checkout-mailing-slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 26px; transition: 0.25s; }
.checkout-mailing-slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: 0.25s; }
.checkout-mailing-switch input:checked + .checkout-mailing-slider { background: #22c55e; }
.checkout-mailing-switch input:checked + .checkout-mailing-slider::before { transform: translateX(22px); }
.checkout-mailing-toggle-label { font-size: 0.95rem; font-weight: 500; color: #374151; min-width: 28px; }
.captcha-image { width: 100px; height: 36px; object-fit: cover; border: 1px solid #ddd; border-radius: 6px; }
.captcha-input { width: 100px; font-family: inherit; font-weight: bold; letter-spacing: 0.15em; padding: 0.4rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem; }
.register-form-captcha-wrap { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid #eee; text-align: center; }
.register-form-captcha-info { margin: 0 0 1rem; font-size: 0.9rem; color: #6b7280; }
.register-form-captcha-row { display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.register-form-captcha-row .captcha-input { width: 100px; font-family: inherit; font-weight: bold; letter-spacing: 0.15em; padding: 0.4rem; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem; }
.register-form-submit-wrap { text-align: center; padding-bottom: 1.5rem; }
.checkout-verification-section { text-align: center; }
.checkout-verification-section .form-group { display: inline-block; text-align: left; }
.checkout-captcha-wrap { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.checkout-captcha-wrap img { width: 100px; height: 36px; object-fit: cover; border: 1px solid #ddd; border-radius: 6px; }
.checkout-captcha-wrap input { width: 100px; font-family: inherit; font-weight: bold; letter-spacing: 0.15em; padding: 0.4rem; font-size: 0.9rem; }
.checkout-submit-wrap { text-align: center; }
.checkout-submit-wrap .checkout-security-msg { margin-left: auto; margin-right: auto; }
.btn-checkout-complete { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.875rem 1.5rem; font-size: 1.1rem; font-weight: 600; background: #0066cc; color: #fff; border: none; border-radius: 6px; cursor: pointer; margin-top: 0.5rem; }
.btn-checkout-complete:hover { background: #0052a3; color: #fff; }
.checkout-security-msg { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.5rem; padding: 0.75rem 1rem; background: #fef9c3; border: 1px solid #fde047; border-radius: 6px; font-size: 0.85rem; color: #854d0e; }
.checkout-security-msg svg { flex-shrink: 0; width: 24px; height: 24px; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.data-table th, .data-table td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #ddd; }
.data-table th { background: #f5f5f5; font-weight: 600; }
.data-table-rows-clickable .clickable-row { cursor: pointer; }
.data-table-rows-clickable .clickable-row:hover { background: #f9fafb; }
.data-table small { color: #666; font-size: 0.85rem; }

/* Status badges */
.status { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 3px; font-size: 0.85rem; }
.status-pending { background: #ffc; color: #660; }
.status-active { background: #cfc; color: #060; }
.status-completed { background: #e0e0e0; color: #333; }
.status-cancelled { background: #fcc; color: #600; }
.status-suspended { background: #dc2626; color: #fff; font-weight: 600; }
.status-unpaid { background: #dc2626; color: #fff; font-weight: 600; }
.status-open, .status-customer-reply { background: #ffc; color: #660; }
.status-answered, .status-on-hold, .status-in-progress { background: #cce; color: #336; }
.status-closed { background: #e0e0e0; color: #333; }

/* Badge */
.badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 3px; font-size: 0.75rem; font-weight: 500; }

/* Dashboard layout (shared by dashboard and services pages) */
.dashboard-container { padding: 1.5rem 0 2rem; }
.dashboard-layout { display: flex; gap: 1.5rem; align-items: flex-start; }
.dashboard-sidebar { width: 260px; flex-shrink: 0; display: flex; flex-direction: column; gap: 1rem; }
.dashboard-main { flex: 1; min-width: 0; }
.dashboard-sidebar-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.dashboard-sidebar-card-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; font-size: 0.95rem; font-weight: 600; color: #374151; background: #f3f4f6; border-bottom: 1px solid #e5e7eb; }
.dashboard-sidebar-card-header svg:first-child { flex-shrink: 0; opacity: 0.7; }
.dashboard-sidebar-card-header span { flex: 1; }
.dashboard-sidebar-card-body { padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.dashboard-sidebar-credit-amount { font-size: 1.5rem; font-weight: 600; color: #1e293b; text-align: center; }
.dashboard-sidebar-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.9rem; font-weight: 500; text-decoration: none; border: none; cursor: pointer; }
.dashboard-sidebar-btn-primary { background: #22c55e; color: #fff !important; }
.dashboard-sidebar-btn-primary:hover { background: #16a34a; text-decoration: none; }
.dashboard-sidebar-btn-secondary { background: #fff; color: #374151 !important; border: 1px solid #d1d5db; }
.dashboard-sidebar-shortcuts { list-style: none; margin: 0; padding: 0; width: 100%; }
.dashboard-sidebar-shortcuts li { margin: 0; }
.dashboard-sidebar-shortcuts a { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; color: #374151; font-size: 0.95rem; text-decoration: none; }
.dashboard-sidebar-shortcuts a:hover { color: #0066cc; text-decoration: none; }
.dashboard-sidebar-shortcuts a svg { flex-shrink: 0; opacity: 0.7; }
.dashboard-sidebar-billing-body { align-items: stretch; }
.dashboard-sidebar-billing { width: 100%; }
.dashboard-sidebar-billing a { display: block; padding: 0.5rem 0; border-radius: 4px; }
.dashboard-sidebar-shortcuts a.active { background: #334155; color: #fff !important; padding: 0.5rem 1rem; margin: 0 -1rem; border-radius: 4px; }
.dashboard-sidebar-shortcuts a.active:hover { background: #475569; color: #fff !important; text-decoration: none; }
.dashboard-sidebar-card-body-text { align-items: stretch; text-align: left; }
.dashboard-sidebar-desc { margin: 0; font-size: 0.9rem; color: #6b7280; line-height: 1.5; }
.dashboard-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; margin-bottom: 1.5rem; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.dashboard-card-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid #f3f4f6; }
.dashboard-card-title { margin: 0; font-size: 1rem; font-weight: 600; color: #374151; display: flex; align-items: center; gap: 0.5rem; }
.dashboard-card-icon { font-size: 1rem; opacity: 0.8; }
.dashboard-card-body { padding: 1.25rem; }
.dashboard-empty { margin: 0; color: #6b7280; }
.dashboard-btn-primary { background: #f59e0b; color: #fff !important; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.9rem; text-decoration: none; display: inline-flex; align-items: center; gap: 0.35rem; }
.dashboard-btn-primary:hover { background: #d97706; text-decoration: none; }
.btn-arrow { font-size: 0.9em; }
.services-main-card { margin-bottom: 0; }
.services-main-card .dashboard-card-body { padding: 0; }
.ticket-view-main-card .dashboard-card-body,
.ticket-view-reply-card .dashboard-card-body { padding: 1.25rem; }
.ticket-view-reply-card { margin-top: 1.5rem; }
.ticket-view-reply-card .dashboard-card-body { padding-bottom: 0.75rem; }
.ticket-view-reply-form .form-group { margin-bottom: 1rem; }
.ticket-view-reply-form .form-group:last-of-type { margin-bottom: 0; }
.services-main-card .dashboard-empty,
.services-main-card .services-empty-filtered,
.services-main-card .invoices-empty-filtered,
.services-main-card .quotes-empty-filtered { padding: 1.25rem; }
.services-card-banner { margin: 0; padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600; color: #fff; background: #334155; border-bottom: none; }
.services-card-banner .dashboard-card-title { color: #fff; }
.services-card-banner .dashboard-card-icon { opacity: 1; }
.services-card-banner-btn { background: rgba(255,255,255,0.2) !important; color: #fff !important; border-color: rgba(255,255,255,0.4); }
.services-card-banner-btn:hover { background: rgba(255,255,255,0.3) !important; color: #fff !important; text-decoration: none !important; }
.add-funds-body { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.5rem 1rem; }
.add-funds-content { max-width: 560px; width: 100%; padding-top: 1rem; }
.add-funds-desc { margin: 0 0 2rem; color: #6b7280; font-size: 0.95rem; line-height: 1.6; }
.add-funds-content .form-group { margin-bottom: 1.5rem; }
.add-funds-content .form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.add-funds-content .form-group input { width: 100%; max-width: 200px; margin: 0 auto; display: block; padding: 0.5rem; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; }
.add-funds-content .form-group input:focus { outline: none; border-color: #0066cc; border-width: 2px; }
.add-funds-content .form-hint { display: block; margin-top: 0.5rem; font-size: 0.85rem; color: #6b7280; }
.add-funds-range-hint { display: block; margin-top: 0.5rem; font-size: 0.85rem; color: #6b7280; }
.add-funds-range-hint.add-funds-range-error { color: #dc3545; font-weight: bold; }
.add-funds-presets { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.add-funds-payment-break { margin-top: 2rem; margin-bottom: 1rem; }
.add-funds-payment-desc { margin: 0 0 1rem; font-size: 0.95rem; color: #6b7280; text-align: center; }
.add-funds-payment-methods { justify-content: center; margin-bottom: 1rem; }
.add-funds-payment-placeholder { color: #9ca3af; }
.add-funds-stripe-wrap { margin: 0; padding: 0; border: none; background: transparent; text-align: center; overflow: hidden; max-height: 0; transition: max-height 0.35s ease-out; }
.add-funds-stripe-wrap.add-funds-stripe-open { max-height: 720px; overflow: visible; margin-top: 1.5rem; padding: 1rem 1rem 1.25rem; border: 1px solid #e5e7eb; border-radius: 8px; background: #f9fafb; }
.add-funds-submit-wrap { margin-top: 1.5rem; margin-bottom: 0; padding-bottom: 1.75rem; }

/* Payment Methods */
.services-main-card .dashboard-card-body.payment-methods-body { padding: 2rem 2.25rem; }
.payment-methods-intro { margin: 0 0 1.5rem; color: #6b7280; font-size: 0.95rem; line-height: 1.5; }
.payment-methods-subtitle { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: #374151; padding-bottom: 0.35rem; border-bottom: 1px solid #e5e7eb; }
.payment-methods-subtitle:first-of-type { margin-top: 0; }
.payment-methods-list { list-style: none; margin: 0; padding: 0; }
.payment-methods-item { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid #e5e7eb; background: #fff; }
.payment-methods-item:last-child { border-bottom: none; }
.payment-methods-item:hover { background: #f9fafb; }
.payment-methods-card { font-weight: 500; color: #374151; font-size: 0.95rem; }
.payment-methods-exp { font-size: 0.9rem; color: #6b7280; }
.payment-methods-item .btn { flex-shrink: 0; margin-left: auto; }
.payment-methods-add-wrap { margin-top: 0.5rem; max-width: 480px; text-align: center; margin-left: auto; margin-right: auto; }
.payment-methods-add-wrap .alert-error { margin-bottom: 0.75rem; }
#payment-methods-stripe-element { padding: 0.5rem 0; min-height: 40px; }
.payment-methods-add-wrap .btn-primary { margin-top: 1rem; }
.services-main-card .payment-methods-body .dashboard-empty { padding: 0; margin: 0 0 1rem; }

/* Invoices/Quotes/Services - status filter layout */
.invoices-sidebar .dashboard-sidebar-card-body,
.quotes-sidebar .dashboard-sidebar-card-body,
.support-sidebar .dashboard-sidebar-card-body,
.support-view-sidebar .dashboard-sidebar-card-body { align-items: stretch; }

/* View ticket sidebar */
.support-view-sidebar .dashboard-sidebar-card-body { align-items: stretch; text-align: left; }
.support-view-sidebar-card .dashboard-sidebar-card-header { cursor: pointer; }
.support-view-sidebar-card .collapsible-chevron { margin-left: auto; transition: transform 0.2s; }
.support-view-sidebar-card.collapsed .collapsible-chevron { transform: rotate(-90deg); }
.support-view-sidebar-card.collapsed .dashboard-sidebar-card-body { display: none; }
.support-view-info-row { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.5rem 0; border-bottom: 1px solid #e5e7eb; }
.support-view-info-row:last-of-type { border-bottom: none; }
.support-view-info-label { font-size: 0.8rem; color: #6b7280; }
.support-view-info-value { font-size: 0.95rem; color: #374151; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.support-view-badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
.support-view-badge-owner { background: #22c55e; color: #fff; }
.support-view-badge-premium-yes { background: #16a34a; color: #fff; font-weight: 600; letter-spacing: 0.02em; }
.support-view-badge-premium-no { background: #dc2626; color: #fff; font-weight: 600; letter-spacing: 0.02em; }
.support-premium-service-notice { margin-bottom: 1rem; border-left: 4px solid #16a34a; }
.support-view-status { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 500; border: 1px solid; background: #f3f4f6; color: #4b5563; border-color: #9ca3af; }
.support-view-status-open { background: #dcfce7; color: #166534; border-color: #22c55e; }
.support-view-status-closed { background: #f3f4f6; color: #4b5563; border-color: #9ca3af; }
.support-view-status-customer-reply { background: #cffafe; color: #0e7490; border-color: #06b6d4; }
.support-view-status-answered { background: #e0e7ff; color: #3730a3; border-color: #6366f1; }
.support-view-status-on-hold { background: #fed7aa; color: #c2410c; border-color: #ea580c; }
.support-view-status-in-progress { background: #fef3c7; color: #b45309; border-color: #f59e0b; }
.support-view-status-pending { background: #ffedd5; color: #c2410c; border-color: #f97316; }
.support-view-sidebar-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.support-view-sidebar-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.4rem 0.75rem; font-size: 0.9rem; font-family: inherit; line-height: 1.4; text-decoration: none; border-radius: 6px; border: 1px solid transparent; box-sizing: border-box; min-height: 34px; }
.support-view-sidebar-btn-reply { background: #22c55e; color: #fff !important; border-color: #22c55e; }
.support-view-sidebar-btn-reply:hover { background: #16a34a; color: #fff !important; text-decoration: none; }
.support-view-sidebar-btn-close { background: #ef4444; color: #fff !important; border-color: #ef4444; cursor: pointer; }
.support-view-sidebar-btn-close:hover { background: #dc2626; color: #fff !important; }
.support-view-sidebar-close-form { margin: 0; }
.support-view-empty, .support-view-cc-note { margin: 0 0 0.5rem; font-size: 0.9rem; color: #6b7280; }
.support-view-attachment-list { list-style: none; margin: 0; padding: 0; }
.support-view-attachment-list li { padding: 0.35rem 0; border-bottom: 1px solid #e5e7eb; }
.support-view-attachment-list li:last-child { border-bottom: none; }
.support-view-attachment-link { color: #374151; font-size: 0.9rem; text-decoration: none; }
.support-view-attachment-link:hover { color: #1f2937; text-decoration: none; }
.support-view-cc-list { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.support-view-cc-item { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid #e5e7eb; }
.support-view-cc-item:last-child { border-bottom: none; }
.support-view-cc-email { font-size: 0.9rem; color: #374151; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.support-view-cc-remove-form { margin: 0; }
.support-view-cc-remove { background: none; border: none; color: #6b7280; cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 0.25rem; }
.support-view-cc-remove:hover { color: #ef4444; }
.support-view-cc-form { margin-top: 0.5rem; }
.support-view-cc-form-row { display: flex; gap: 0.5rem; }
.support-view-cc-input { flex: 1; min-width: 0; padding: 0.4rem 0.6rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.9rem; }
.support-view-cc-add { padding: 0.4rem 0.75rem; font-size: 0.9rem; }
.support-view-cc-hint { margin: 0.35rem 0 0; font-size: 0.8rem; color: #6b7280; }
.invoices-filter-form,
.quotes-filter-form,
.services-filter-form,
.support-filter-form { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.services-filter-option,
.invoices-filter-form label,
.quotes-filter-form label,
.support-filter-form label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.35rem 0; font-size: 0.9rem; }
.services-filter-option input,
.invoices-filter-form input[type="radio"],
.quotes-filter-form input[type="radio"],
.support-filter-form input[type="radio"] { margin: 0; flex-shrink: 0; }
.services-filter-label,
.invoices-filter-form .services-filter-label,
.quotes-filter-form .services-filter-label,
.support-filter-form .services-filter-label { flex: 1; min-width: 0; }
.services-filter-count,
.invoices-filter-form .services-filter-count,
.quotes-filter-form .services-filter-count,
.support-filter-form .services-filter-count { color: #6b7280; font-size: 0.85rem; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.dashboard-sidebar-view-filters { padding: 1rem; }
.invoices-table-wrap { overflow-x: auto; width: 100%; }
.invoices-data-table { margin: 0; width: 100%; }
.invoices-data-table th { background: #f9fafb; padding: 0.75rem 1.25rem; font-size: 0.85rem; color: #6b7280; font-weight: 500; border-bottom: 1px solid #e5e7eb; }
.invoices-data-table td { padding: 1rem 1.25rem; border-bottom: 1px solid #e5e7eb; }
.invoices-data-table tbody tr:last-child td { border-bottom: none; }
.invoices-data-table tbody tr:hover { background: #f9fafb; }
.invoices-data-table .status-paid { background: #10b981; color: #fff; }
.invoices-data-table .status-unpaid { background: #dc2626; color: #fff; }
.invoices-data-table .status-cancelled { background: #6b7280; color: #fff; }
.invoices-data-table .status-refunded { background: #8b5cf6; color: #fff; }

.quotes-data-table .status-draft { background: #6b7280; color: #fff; }
.quotes-data-table .status-sent { background: #3b82f6; color: #fff; }
.quotes-data-table .status-accepted { background: #10b981; color: #fff; }
.quotes-data-table .status-declined { background: #ef4444; color: #fff; }
.quotes-data-table .status-expired { background: #9ca3af; color: #fff; }

/* Mobile: constrain to viewport; banners wrap; tables scroll horizontally; no nested scroll - let page scroll normally */
@media (max-width: 768px) {
    .portal-banner-inner { max-width: 100%; min-width: 0; }
    .portal-banner-text { overflow-wrap: break-word; word-wrap: break-word; word-break: break-word; }
    html { overflow-x: clip; overflow-y: visible; }
    body { overflow-x: clip; overflow-y: visible; width: 100%; max-width: 100vw; box-sizing: border-box; }
    /* Remove scroll containers so content flows and page scrolls normally */
    .email-history-body { max-height: none; overflow: visible; }
    .rte-editor { max-height: none; overflow: visible; }
    .rte-preview { max-height: none; overflow: visible; }
    .main-content { overflow-x: clip; overflow-y: visible; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
    .container { overflow-x: clip; overflow-y: visible; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
    .dashboard-container { overflow-x: clip; overflow-y: visible; width: 100%; max-width: 100%; min-width: 0; }
    .dashboard-layout { min-width: 0; }
    .dashboard-main { min-width: 0; overflow-x: clip; overflow-y: visible; width: 100%; max-width: 100%; }
    .dashboard-card { min-width: 0; overflow-x: clip; overflow-y: visible; }
    .dashboard-card-body { min-width: 0; overflow-x: clip; overflow-y: visible; }
    .invoices-table-wrap,
    .quotes-table-wrap,
    .support-tickets-table-wrap,
    .downloads-table-wrap {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }
    .invoices-table-wrap .invoices-data-table,
    .quotes-table-wrap .quotes-data-table,
    .support-tickets-table-wrap .support-tickets-table {
        min-width: 520px;
        width: max-content !important;
    }
    .downloads-table-wrap .downloads-data-table {
        min-width: 480px;
        width: max-content !important;
    }
}

@media (max-width: 900px) {
    .dashboard-layout { flex-direction: column-reverse; }
    .dashboard-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .dashboard-sidebar-card { flex: 1; min-width: 200px; }
}
.dashboard-section { margin-top: 2rem; }
.dashboard-section h2 { margin-bottom: 1rem; }

/* Admin */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat-card { border: 1px solid #ddd; padding: 1rem; border-radius: 4px; text-align: center; }
.stat-value { display: block; font-size: 1.5rem; font-weight: bold; }
.stat-label { font-size: 0.9rem; color: #666; }

/* Form row */
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1rem; }
.form-row-3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.form-hint { display: block; font-size: 0.85rem; color: #666; margin-top: 0.25rem; }
.btn-small { font-size: 0.85rem; padding: 0.25rem 0.5rem; margin-left: 0.5rem; }
.hosting-config { margin: 1.5rem 0; padding: 1rem; border: 1px solid #ddd; border-radius: 4px; }
.hosting-config h3, .hosting-config h4 { margin: 0 0 1rem; }
.muted { color: #666; font-size: 0.9rem; }

/* Password strength bar */
.password-strength-bar { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.password-strength-track { width: 100%; height: 6px; background: #e0e0e0; border-radius: 3px; overflow: hidden; }
.password-strength-bar .password-strength-fill { height: 100%; width: 0; border-radius: 3px; transition: width 0.2s, background 0.2s; }
.password-strength-bar .password-strength-fill.strength-1 { background: #c00; }
.password-strength-bar .password-strength-fill.strength-2 { background: #f80; }
.password-strength-bar .password-strength-fill.strength-3 { background: #fa0; }
.password-strength-bar .password-strength-fill.strength-4 { background: #8c8; }
.password-strength-bar .password-strength-fill.strength-5 { background: #080; }
.password-strength-label { font-size: 0.8rem; color: #666; }
.password-strength-checklist { list-style: none; padding: 0; margin: 0.5rem 0 0; font-size: 0.85rem; color: #666; }
.password-strength-checklist li { padding: 0.15rem 0; }
.password-strength-checklist li::before { content: '○'; margin-right: 0.5rem; color: #999; }
.password-strength-checklist li.met { color: #080; }
.password-strength-checklist li.met::before { content: '✓'; color: #080; }
.password-match-msg { display: block; font-size: 0.85rem; margin-top: 0.25rem; }
.password-match-msg.match { color: #080; }
.password-match-msg.mismatch { color: #c00; }

/* Email validation */
.email-validation-msg { display: block; font-size: 0.85rem; margin-top: 0.25rem; }
.form-card .email-validation-msg { max-width: 360px; margin-left: auto; margin-right: auto; text-align: center; }
.email-validation-msg.valid { color: #080; }
.email-validation-msg.invalid { color: #c00; }
input.email-valid, input.password-valid, input.password-confirm-match { border-color: #080 !important; border-width: 2px; }
input.email-invalid, input.password-invalid, input.password-confirm-mismatch { border-color: #c00 !important; border-width: 2px; }
input.email-valid:focus, input.password-valid:focus, input.password-confirm-match:focus { outline: none; border-color: #080 !important; box-shadow: 0 0 0 2px rgba(0,128,0,0.2); }
input.email-invalid:focus, input.password-invalid:focus, input.password-confirm-mismatch:focus { outline: none; border-color: #c00 !important; box-shadow: 0 0 0 2px rgba(204,0,0,0.2); }

/* Footer */
.site-footer { background: #363636; border-top: none; padding: 1.25rem 0; margin-top: 0; color: #bbbbbb; font-size: 0.9rem; }
.site-footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.site-footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer-links a { color: #bbbbbb; text-decoration: none; }
.site-footer-links a:hover { color: #fff; text-decoration: underline; }
.site-footer-copyright { margin: 0; color: #bbbbbb; }

/* Store layout with sidebar */
.store-container { position: relative; }
.store-layout { display: flex; min-height: 0; align-items: flex-start; }
.store-sidebar-area { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; padding-right: 1rem; border-right: 1px solid #e5e7eb; }
.store-sidebar-wrap { display: flex; flex-direction: column; background: #fff; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.store-sidebar-column { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.store-sidebar { flex: 1; min-height: 0; overflow: hidden; }
.store-sidebar-content { padding: 0 0 1rem 0; }
.store-sidebar-section { margin-bottom: 1.25rem; }
.store-sidebar-title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; padding: 0.5rem 1rem; font-size: 0.85rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; background: #f3f4f6; border-radius: 4px; border-bottom: 1px solid #e5e7eb; }
.store-sidebar-content > .store-sidebar-section:first-child .store-sidebar-title { margin-top: 0; border-radius: 6px 6px 0 0; }
.store-sidebar-title svg { flex-shrink: 0; opacity: 0.7; }
.store-sidebar-list { list-style: none; margin: 0; padding: 0; }
.store-sidebar-list li { margin: 0; }
.store-sidebar-list a { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; color: #374151; font-size: 0.95rem; text-decoration: none; }
.store-sidebar-list a:hover { background: #f3f4f6; color: #0066cc; }
.store-sidebar-list a.active { background: #334155; color: #fff; }
.store-sidebar-list a.active:hover { background: #475569; color: #fff; }
.store-main { flex: 1; min-width: 0; }
.add-to-cart-main { width: 100%; max-width: 100%; margin-top: 0; }
.add-to-cart-card { width: 100%; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border: 1px solid #e5e7eb; }
.add-to-cart-card .add-to-cart-card-body { padding: 1.5rem; }
.product-summary { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 1.5rem; overflow: hidden; }
.product-summary-header { padding: 0.875rem 1.25rem; background: #334155; color: #fff; font-weight: 600; font-size: 1.05rem; }
.product-summary-name { letter-spacing: 0.02em; }
.product-summary-rows { padding: 1rem 1.25rem; }
.product-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid #e2e8f0; gap: 1rem; }
.product-summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.product-summary-row:first-of-type { padding-top: 0; }
.product-summary-label { font-size: 0.9rem; color: #64748b; }
.product-summary-value { font-size: 0.95rem; font-weight: 500; color: #1e293b; }
.product-summary-domain { font-family: ui-monospace, monospace; font-size: 0.9rem; }
@media (max-width: 900px) {
    .store-layout { flex-direction: column-reverse; }
    .store-sidebar-area { position: static; width: 100%; padding: 1rem 0; border-right: none; border-top: 1px solid #e5e7eb; }
    .store-main { margin-left: 0; }
}

/* Admin bar - bottom right when viewing site as admin */
.admin-bar { position: fixed; bottom: 1rem; right: 1rem; background: #333; color: #fff; padding: 0.5rem 0.75rem; border-radius: 4px; font-size: 0.85rem; z-index: 9999; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.admin-bar a { color: #fff; text-decoration: none; }
.admin-bar a:hover { text-decoration: underline; }
