/* CPR Forum - Dark Theme */
:root {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-card: #111111;
    --bg-input: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;
    --accent: #c41e3a;
    --accent-hover: #e02244;
    --accent-dark: #8b1529;
    --link-default: #e0e0e0;
    --link-hover: #4a9eff;
    --link-active: #1a5fb4;
    --border: #2a2a2a;
    --border-light: #333333;
    --shadow: rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--link-default);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover);
}

a:active {
    color: var(--link-active);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 1px;
}

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

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

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s ease;
}

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

.nav-search {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    gap: 6px;
}

.search-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 0.9rem;
    width: 220px;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-search {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-search:hover {
    background: var(--accent-hover);
}

/* Hero Banner - image only, no overlay text */
.hero-banner {
    width: 100%;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.hero-bg-img {
    max-height: 280px;
    width: 100%;
    object-fit: contain;
    display: block;
}

/* Main content */
.main-content {
    padding: 20px 20px 40px;
}

.page-title {
    color: var(--text-primary);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    display: inline-block;
}

/* Category grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow);
}

.category-info h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.category-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 8px;
}

.thread-count {
    display: inline-block;
    background: var(--accent-dark);
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Thread list */
.thread-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.thread-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.thread-item:hover {
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.thread-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

/* Thread detail */
.thread-main {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
}

.thread-content {
    margin-top: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

/* Replies */
.replies-section {
    margin-top: 30px;
}

.reply {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 10px;
}

.reply-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.reply-content {
    line-height: 1.7;
    color: var(--text-primary);
}

/* Products Horizontal Scroll with Arrows */
.product-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.product-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0;
    flex: 1;
    scroll-behavior: smooth;
}

.product-scroll::-webkit-scrollbar {
    display: none;
}

.product-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.product-scroll::-webkit-scrollbar-thumb {
    display: none;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    min-width: 200px;
    max-width: 200px;
    transition: border-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.product-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.product-image-placeholder {
    width: 100%;
    height: 120px;
    background: var(--bg-input);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.product-info h3 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.product-price {
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
}

.scroll-arrow {
    background: var(--accent-dark);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.scroll-arrow:hover {
    background: var(--accent);
}

.scroll-left { margin-right: 8px; }
.scroll-right { margin-left: 8px; }

/* Forms */
.form-section {
    margin-top: 30px;
}

.thread-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.thread-form input[type="text"],
.thread-form textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 12px 14px;
    margin-bottom: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.thread-form input[type="text"]:focus,
.thread-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    background: var(--accent-dark);
}

.btn-secondary {
    background: var(--border-light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-small {
    background: var(--accent-dark);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-small:hover {
    background: var(--accent);
}

/* Auth action buttons */
.btn-approve {
    background: rgba(46, 160, 67, 0.2);
    border: 1px solid rgba(46, 160, 67, 0.5);
    color: #7ee787;
}

.btn-approve:hover {
    background: rgba(46, 160, 67, 0.35);
    color: #fff;
}

.btn-warn {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.5);
    color: #ffc107;
}

.btn-warn:hover {
    background: rgba(255, 193, 7, 0.3);
    color: #fff;
}

.btn-danger {
    background: rgba(196, 30, 58, 0.15);
    border: 1px solid rgba(196, 30, 58, 0.5);
    color: #ff8fa3;
}

.btn-danger:hover {
    background: rgba(196, 30, 58, 0.3);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-outline:hover {
    background: var(--bg-input);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: 6px;
    margin-right: 6px;
}

/* Cart */
.cart-items {
    margin: 16px 0;
}

.cart-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item-info h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.cart-item-price {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.back-link:hover {
    color: var(--link-hover);
}

/* Empty state */
.empty {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 30px 0;
}

/* Admin styles */
.admin-login {
    max-width: 400px;
    margin: 80px auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
}

.admin-login h2 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.admin-login input[type="text"],
.admin-login input[type="password"] {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.admin-login input:focus {
    outline: none;
    border-color: var(--accent);
}

.error-msg {
    color: #e74c3c;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

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

/* Dashboard tables */
.category-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.category-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
}

.category-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.category-table tr:hover td {
    background: var(--bg-secondary);
}

code {
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 30px 0 20px;
    margin-top: 40px;
    color: var(--text-secondary);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 24px;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
    line-height: 1.5;
}

.footer-col a {
    color: var(--link-hover);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--link-hover);
}

.payment-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.payment-icons img {
    height: 30px;
    border-radius: 4px;
    background: #fff;
    padding: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        height: auto;
        padding: 12px 20px;
        gap: 12px;
    }

    .nav-links {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-search {
        width: 100%;
    }

    .search-form {
        width: 100%;
    }

    .search-input {
        flex: 1;
    }

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

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

    .hero-bg-img {
        max-height: 180px;
    }
}

/* ===== Auth / Members / Admin ===== */

/* Navbar user chip */
.nav-brand-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 5px;
    border-radius: 999px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    text-decoration: none;
    transition: border-color .15s, background .15s;
}

.nav-user-chip:hover {
    border-color: var(--accent);
    background: var(--bg-card);
}

.nav-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.nav-username {
    color: var(--text-primary);
    font-size: 0.9rem;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-login,
.nav-logout {
    font-size: 0.9rem;
}

.nav-logout {
    color: var(--text-secondary);
    text-decoration: none;
}

.nav-logout:hover {
    color: var(--accent);
}

/* Avatars */
.avatar-img,
.avatar-default {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.avatar-default {
    color: #fff;
    font-weight: 700;
    font-size: 0.85em;
    user-select: none;
}

.avatar-img {
    object-fit: cover;
}

/* Auth card (login / register / account) */
.auth-card {
    max-width: 440px;
    margin: 48px auto;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 32px var(--shadow);
}

.auth-card h2 {
    margin: 0 0 20px;
    font-size: 1.5rem;
}

.auth-card label {
    display: block;
    margin: 14px 0 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
    box-sizing: border-box;
}

.auth-card input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0;
    font-size: 0.85rem;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    cursor: pointer;
}

.forgot-link {
    color: var(--link-hover);
    text-decoration: none;
}

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

.auth-alt {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Captcha Widget Styling */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

#captchaImg {
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#captchaImg:hover {
    transform: scale(1.05);
}

.btn-refresh-captcha {
    padding: 8px 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-refresh-captcha:hover {
    opacity: 0.8;
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: -12px;
    margin-bottom: 12px;
}

/* Honeypot: visually hidden but present for bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Messages */
.success-msg {
    background: rgba(46, 160, 67, 0.15);
    border: 1px solid rgba(46, 160, 67, 0.4);
    color: #7ee787;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 0.9rem;
}

.error-msg {
    background: rgba(196, 30, 58, 0.15);
    border: 1px solid rgba(196, 30, 58, 0.4);
    color: #ff8fa3;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 0.9rem;
}

.auth-notice {
    color: var(--text-secondary);
    padding: 12px 0;
    font-size: 0.95rem;
}

/* Account page */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.account-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
}

.account-card h3 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.account-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.account-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.account-info-row:last-child {
    border-bottom: none;
}

.account-info-row .label {
    color: var(--text-secondary);
}

/* Admin */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 16px 0;
}

.admin-tabs .tab {
    padding: 8px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all .15s;
}

.admin-tabs .tab:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.admin-tabs .tab.active {
    background: var(--accent-dark);
    border-color: var(--accent);
    color: #fff;
}

.admin-search {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-search input[type="text"] {
    flex: 1;
    max-width: 320px;
    padding: 8px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

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

.admin-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.member-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-badge {
    display: inline-block;
    background: var(--accent-dark);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 6px;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.status-approved {
    background: rgba(46, 160, 67, 0.15);
    color: #7ee787;
    border: 1px solid rgba(46, 160, 67, 0.4);
}

.status-suspended {
    background: rgba(196, 30, 58, 0.15);
    color: #ff8fa3;
    border: 1px solid rgba(196, 30, 58, 0.4);
}

.actions-cell {
    white-space: nowrap;
}

.inline-form {
    display: inline;
}

.no-action {
    color: var(--text-muted);
}

/* Account header */
.account-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.account-header-info h2 {
    margin: 0;
    font-size: 1.4rem;
}

.account-email {
    color: var(--text-secondary);
    margin: 4px 0;
}

.account-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 8px 0 0;
}

.account-section {
    margin-top: 28px;
}

.account-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.account-card label {
    display: block;
    margin: 10px 0 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.account-card input[type="email"],
.account-card input[type="password"],
.account-card input[type="file"] {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    box-sizing: border-box;
    margin-bottom: 12px;
}

.account-card input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Forgot password dev link */
.dev-reset-link {
    background: var(--bg-input);
    border: 1px dashed var(--border-light);
    border-radius: 6px;
    padding: 12px 14px;
    margin: 12px 0;
    font-size: 0.85rem;
    word-break: break-all;
    color: var(--text-secondary);
}

.dev-reset-link a {
    color: var(--link-hover);
}

/* ========================================
   Dashboard Styles
   ======================================== */

.dashboard-page {
    padding-top: 80px;
    min-height: 100vh;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* Dashboard Header */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.dash-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-header-left h2 {
    margin: 0;
    font-size: 1.5rem;
}

/* Tab Navigation */
.dash-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.dash-tab {
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.dash-tab:hover {
    color: var(--text-primary);
}

.dash-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.dash-admin-tab {
    background: rgba(196, 30, 58, 0.08);
    border-radius: 8px;
    margin-left: auto;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(196, 30, 58, 0.15);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dash-admin-tab:hover {
    background: rgba(196, 30, 58, 0.15);
    color: var(--accent);
    border-color: rgba(196, 30, 58, 0.3);
}

/* Stats Grid */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.dash-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border-radius: 12px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Sections */
.dash-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.dash-section h3 {
    margin: 0 0 16px 0;
    font-size: 1.15rem;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
}

.activity-item:hover {
    background: var(--bg-input);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-thread .activity-dot {
    background: #4f8cff;
}

.activity-reply .activity-dot {
    background: var(--accent);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
}

.activity-meta {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Orders */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--bg-input);
    border-bottom: 1px solid var(--border);
}

.order-number {
    font-weight: 700;
    color: var(--text-primary);
}

.order-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 12px;
}

.order-items-table {
    padding: 16px 20px;
}

.order-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.order-item-row + .order-item-row {
    border-top: 1px solid var(--border);
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-weight: 500;
}

.order-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-item-price {
    font-weight: 600;
    white-space: nowrap;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 2px solid var(--border);
    background: var(--bg-input);
}

/* Invoices */
.invoices-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invoice-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
}

.invoice-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.invoice-number {
    font-weight: 700;
    font-family: monospace;
    font-size: 1rem;
}

.invoice-details p {
    margin: 4px 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .dash-grid {
        grid-template-columns: 1fr 1fr;
    }
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ============================================================
   Two-Step Verification (2FA) styling
   ============================================================ */
#two-fa-section .success-msg { display: inline-block; padding: 4px 10px; border-radius: 4px; background: rgba(0,200,83,.1); color: var(--accent); font-size: 13px; margin-bottom: 8px; }
#two-fa-section img { max-width: 200px; border: 1px solid var(--border); border-radius: 6px; padding: 4px; background: #fff; }
