/**
 * RE::DACT Modal Styles
 *
 * This file contains:
 * - Modal system (backdrop, container)
 * - Modal header, body, footer
 * - Modal buttons
 * - Disclaimer modal (dark theme)
 * - Login modal
 * - Settings modal
 */

/* --- MODAL SYSTEM --- */
.modal-backdrop {
    display: none;
    position: fixed;
    top: calc(-1 * env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    bottom: calc(-1 * env(safe-area-inset-bottom, 0px));
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-backdrop.active {
    display: block;
    opacity: 1;
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--color-bg-primary);
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transition: all 0.2s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* --- MODAL PARTS --- */
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--color-text-primary);
}

.modal-close {
    width: var(--btn-height-base);
    height: var(--btn-height-base);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-tertiary);
    font-size: 20px;
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
}

/* --- MODAL BUTTONS --- */
.modal-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    min-height: var(--btn-height-base);
}

.modal-btn-primary {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
}

.modal-btn-secondary {
    background: transparent;
    color: var(--color-text-secondary);
    border-color: var(--color-border-medium);
}

/* Neutral outline button - gray border, black on hover */
.modal-btn-outline {
    background: transparent;
    border: 1px solid var(--color-border-medium);
    color: var(--color-text-secondary);
}

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

/* Text Action Button (Elegant Link Style) */
.modal-text-action {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    letter-spacing: 0.02em;
    padding: 10px;
}

.modal-text-action:hover {
    opacity: 1;
}

/* --- DISCLAIMER MODAL (Dark Theme) --- */
#disclaimerModal {
    background: #0A0A0A;
    border: 1px solid rgba(var(--color-overlay-light), 0.15);
    box-shadow: 0 25px 80px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.08);
}

#disclaimerModal .modal-header,
#disclaimerModal .modal-body,
#disclaimerModal .modal-footer {
    position: relative;
    z-index: 1;
}

#disclaimerModal .disclaimer-content {
    color: rgba(var(--color-overlay-light), 0.75);
    font-size: 13px;
    line-height: 1.7;
}

#disclaimerModal .disclaimer-content p {
    margin-bottom: 12px;
}

#disclaimerModal .disclaimer-highlight {
    background: rgba(255,193,7,0.1);
    border-left: 3px solid #FFC107;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 0 6px 6px 0;
    font-size: 12px;
    color: rgba(var(--color-overlay-light), 0.85);
}

#disclaimerModal .disclaimer-highlight strong {
    color: #FFC107;
}

#disclaimerModal .modal-footer {
    border-top: 1px solid rgba(var(--color-overlay-light), 0.1);
}

.disclaimer-welcome {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.disclaimer-subtitle {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: rgba(var(--color-overlay-light), 0.5);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- LOGIN MODAL --- */
.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--color-text-muted);
    font-size: 12px;
}

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

.login-divider span {
    padding: 0 12px;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--color-border-medium);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.15s ease;
    color: var(--color-text-primary);
    -webkit-tap-highlight-color: rgba(var(--color-overlay-dark), 0.1);
    touch-action: manipulation;
}

.login-btn:active,
.login-btn:focus {
    background: #f0f0f0;
    transform: scale(0.98);
}

.login-btn svg {
    width: 18px;
    height: 18px;
}

.login-btn-google {
    border-color: #4285f4;
}

.login-btn-google:active,
.login-btn-google:focus {
    background: #e8f0fe;
    border-color: #1a73e8;
}

.login-guest-note {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-tertiary);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-light);
}

/* --- FULL-SCREEN LOGIN SCREEN --- */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.login-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-screen-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-screen-card {
    position: relative;
    background: var(--color-bg-primary, #fff);
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: loginCardAppear 0.4s ease;
}

@keyframes loginCardAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-screen-logo {
    margin-bottom: 24px;
}

.login-logo-img {
    max-width: 180px;
    height: auto;
}

.login-logo-spark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.login-logo-spark svg {
    width: 48px;
    height: 48px;
}

.login-logo-spark span {
    font-size: 24px;
    font-weight: 700;
    color: #FF9A00;
    letter-spacing: -0.5px;
}

.login-screen-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--color-text-primary, #111);
}

.login-screen-desc {
    font-size: 14px;
    color: var(--color-text-secondary, #666);
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.login-screen-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--color-border-medium, #ddd);
    border-radius: 8px;
    background: var(--color-bg-paper-main);
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.15s ease;
    color: var(--color-text-primary, #111);
}

.login-provider-btn:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #bbb;
}

.login-provider-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.login-provider-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.login-provider-google {
    border-color: #4285f4;
    background: var(--color-bg-paper-main);
}

.login-provider-google:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
}

.login-provider-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

.login-provider-guest {
    background: transparent;
    border-style: dashed;
}

.login-provider-guest:hover {
    background: #f9f9f9;
}

.login-screen-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--color-text-tertiary, #999);
    font-size: 12px;
}

.login-screen-divider::before,
.login-screen-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border-light, #e5e5e5);
}

.login-screen-divider span {
    padding: 0 16px;
}

.login-screen-note {
    font-size: 12px;
    color: var(--color-text-tertiary, #888);
    margin-top: 20px;
    line-height: 1.5;
}

/* --- SETTINGS MODAL --- */
.settings-section {
    margin-bottom: 24px;
}

.settings-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-tertiary);
    margin-bottom: 12px;
}

.settings-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.settings-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--color-bg-primary);
}

.settings-input-group {
    margin-bottom: 12px;
}

.settings-input-label {
    display: block;
    font-size: 12px;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.settings-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--color-bg-primary);
    resize: vertical;
    font-family: inherit;
}

.settings-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--color-bg-primary);
    cursor: pointer;
}

.settings-row {
    display: flex;
    gap: 12px;
}

.settings-hint {
    display: block;
    font-size: 11px;
    color: var(--color-text-tertiary);
    margin-top: 4px;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 4px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-light);
    margin-bottom: 16px;
    overflow-x: auto;
}

.settings-tab {
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--color-text-tertiary);
    white-space: nowrap;
}

.settings-tab:hover {
    background: var(--color-bg-secondary);
}

.settings-tab.active {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
    font-weight: 500;
}

.settings-tab-content {
    display: none;
}

.settings-tab-content.active {
    display: block;
}

/* Avatar Section */
.settings-avatar-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.settings-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-secondary);
    overflow: hidden;
}

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

/* Subscription Cards */
.subscription-card {
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 12px;
    position: relative;
}

.subscription-card.active {
    border-color: var(--color-accent);
    background: rgba(var(--color-overlay-dark), 0.02);
}

.subscription-card.disabled {
    opacity: 0.6;
}

.subscription-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-accent);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.subscription-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.subscription-desc {
    font-size: 13px;
    color: var(--color-text-tertiary);
    margin-bottom: 8px;
}

.subscription-features {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.subscription-features div {
    margin-bottom: 4px;
}

/* Usage Bar */
.subscription-usage {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

.usage-bar-container {
    height: 8px;
    background: var(--color-bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.usage-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), #4ade80);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.usage-bar.warning {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.usage-bar.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.usage-text {
    font-size: 11px;
    color: var(--color-text-tertiary);
    text-align: right;
}

/* Tier Grid */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.tier-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    transition: all 0.2s ease;
}

.tier-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--color-overlay-dark), 0.1);
}

.tier-card.featured {
    border-color: var(--color-accent);
    background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(147,51,234,0.05));
}

.tier-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    white-space: nowrap;
}

.tier-header {
    text-align: center;
    margin-bottom: 12px;
}

.tier-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.tier-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-accent);
}

.tier-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-tertiary);
}

.tier-tokens {
    text-align: center;
    font-size: 12px;
    color: var(--color-text-secondary);
    background: var(--color-bg-tertiary);
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.tier-features li {
    font-size: 12px;
    color: var(--color-text-secondary);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.tier-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4ade80;
    font-weight: bold;
}

.tier-btn {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tier-btn:hover {
    background: var(--color-bg-tertiary);
}

.tier-btn-primary {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border: none;
    color: white;
}

.tier-btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Hedera Section */
.hedera-info {
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 8px;
    padding: 16px;
}

.hedera-info p {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

/* Usage Stats */
.usage-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.usage-stat-card {
    padding: 16px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    text-align: center;
}

.usage-stat-label {
    font-size: 11px;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.usage-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* Quota bar */
.quota-container {
    background: var(--color-bg-secondary);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.quota-header {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.quota-bar {
    height: 8px;
    background: var(--color-border-light);
    border-radius: 4px;
    overflow: hidden;
}

.quota-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.quota-bar-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.quota-bar-fill.danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.quota-hint {
    font-size: 11px;
    color: var(--color-text-tertiary);
    margin-top: 8px;
}

/* ============================================
   NEW SETTINGS STYLES (v3.7)
   ============================================ */

/* Settings info rows */
.settings-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light);
}

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

.settings-label {
    color: var(--color-text-secondary);
    font-size: 13px;
}

.settings-value {
    color: var(--color-text-primary);
    font-weight: 500;
    font-size: 13px;
}

.settings-mono {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 11px;
}

/* Account type badges */
.settings-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.settings-badge.badge-test {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.settings-badge.badge-premium {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.settings-badge.badge-guest {
    background: rgba(148, 163, 184, 0.15);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border-light);
}

.settings-select-inline {
    padding: 6px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: 13px;
    cursor: pointer;
}

/* Usage display */
.usage-display {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.usage-bar-large {
    flex: 1;
    height: 24px;
    background: var(--color-bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent));
    border-radius: 12px;
    transition: width 0.3s ease;
}

.usage-percent {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    min-width: 50px;
    text-align: right;
}

.usage-details {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 12px;
}

/* Tier grid mini */
.tier-grid-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* Subscription tier cards */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.tier-card {
    padding: 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    position: relative;
    transition: all 0.2s ease;
}

.tier-card:hover:not(.disabled) {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px rgba(var(--color-overlay-dark), 0.1);
}

.tier-card.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tier-badge {
    position: absolute;
    top: -8px;
    right: 8px;
    background: var(--color-text-tertiary);
    color: white;
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.tier-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.tier-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 12px;
}

.tier-price span {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-text-tertiary);
}

.tier-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 11px;
    color: var(--color-text-secondary);
}

.tier-features li {
    padding: 3px 0;
    padding-left: 16px;
    position: relative;
}

.tier-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0.5;
}

/* New 2x2 Tier Grid */
.tier-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 12px;
}

.tier-card-new {
    position: relative;
    padding: 12px 10px;
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-border);
    border-radius: 10px;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.tier-card-new:hover {
    background: var(--color-accent);
    border-color: var(--color-accent) !important;
}

.tier-card-new:hover .tier-name,
.tier-card-new:hover .tier-price,
.tier-card-new:hover .tier-price span,
.tier-card-new:hover .tier-subtitle,
.tier-card-new:hover .tier-features li {
    color: var(--color-accent-text) !important;
}

.tier-card-new:hover .tier-features li::before {
    background: var(--color-accent-text) !important;
}

.tier-card-new:hover .tier-badge-top {
    background: var(--color-accent-text);
    color: var(--color-accent) !important;
}

/* Border colors per tier - use theme accent */
.tier-card-new.tier-sparks {
    border: 2px solid var(--color-accent);
}

.tier-card-new.tier-freelancer {
    border: 2px solid var(--color-accent);
}

/* PRO box - accent color by default (selected state) with shimmer */
.tier-card-new.tier-pro {
    border: 2px solid var(--color-accent);
    background: var(--color-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.tier-card-new.tier-pro .tier-name,
.tier-card-new.tier-pro .tier-price,
.tier-card-new.tier-pro .tier-price span,
.tier-card-new.tier-pro .tier-features li {
    color: var(--color-accent-text) !important;
}

.tier-card-new.tier-pro .tier-features li::before {
    background: var(--color-accent-text) !important;
}

.tier-card-new.tier-pro .tier-badge-top {
    background: var(--color-accent-text);
    color: var(--color-accent) !important;
}

.tier-card-new.tier-pro::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(var(--color-overlay-light), 0.15) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* When hovering OTHER boxes, PRO goes back to normal */
.tier-grid-2x2:has(.tier-card-new:not(.tier-pro):hover) .tier-pro {
    background: #f8f9fa;
    box-shadow: none;
}

.tier-grid-2x2:has(.tier-card-new:not(.tier-pro):hover) .tier-pro .tier-name,
.tier-grid-2x2:has(.tier-card-new:not(.tier-pro):hover) .tier-pro .tier-price,
.tier-grid-2x2:has(.tier-card-new:not(.tier-pro):hover) .tier-pro .tier-price span,
.tier-grid-2x2:has(.tier-card-new:not(.tier-pro):hover) .tier-pro .tier-features li {
    color: var(--color-text-primary) !important;
}

.tier-grid-2x2:has(.tier-card-new:not(.tier-pro):hover) .tier-pro .tier-features li::before {
    background: var(--color-accent) !important;
}

.tier-grid-2x2:has(.tier-card-new:not(.tier-pro):hover) .tier-pro .tier-badge-top {
    background: rgba(var(--color-overlay-dark), 0.08);
    color: var(--color-text-muted) !important;
}

.tier-grid-2x2:has(.tier-card-new:not(.tier-pro):hover) .tier-pro::before {
    display: none;
}


.tier-card-new.tier-enterprise {
    border: 2px solid var(--color-accent);
}

/* Top badge (SOON) */
.tier-badge-top {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    background: rgba(var(--color-overlay-dark), 0.08);
    border-radius: 3px;
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    z-index: 1;
}

/* Bottom badge (discount) - black bg, white text */
.tier-badge-bottom {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    background: #1a1a1a;
    border-radius: 3px;
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #ffffff;
    white-space: nowrap;
    z-index: 1;
}

.tier-card-new .tier-name {
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    color: var(--color-text-primary);
    position: relative;
    z-index: 1;
}

.tier-card-new .tier-price {
    font-size: 18px;
    font-weight: 700;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-text-primary);
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.tier-card-new .tier-price span {
    font-size: 10px;
    font-weight: 400;
    color: var(--color-text-muted);
}

/* Price spacer for boxes without price (Enterprise) */
.tier-card-new .tier-price-spacer {
    height: 24px;
    margin-bottom: 6px;
}

.tier-card-new .tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.tier-card-new .tier-features {
    padding-left: 8px;
}

.tier-card-new .tier-features li {
    font-size: 11px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #555;
    padding: 2px 0;
    padding-left: 16px;
    position: relative;
    text-align: left;
}

.tier-card-new .tier-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #1a1a1a;
    opacity: 1;
}

/* Legacy mini tier cards */
.tier-mini {
    padding: 16px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    text-align: center;
    position: relative;
}

.tier-mini.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tier-mini-name {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.tier-mini-price {
    display: block;
    font-size: 11px;
    color: var(--color-text-secondary);
}

.tier-mini-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--color-text-tertiary);
    color: white;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Projects list */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
}

.project-name {
    font-size: 13px;
    color: var(--color-text-primary);
}

.project-delete-btn {
    padding: 4px 8px;
    background: transparent;
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.project-delete-btn:hover {
    background: var(--color-danger);
    color: white;
}

/* Danger outline button */
.modal-btn-danger-outline {
    background: transparent;
    border: 1px solid var(--color-danger);
    color: var(--color-danger);
}

.modal-btn-danger-outline:hover {
    background: var(--color-danger);
    color: white;
}

.modal-btn-danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: white;
}

.modal-btn-danger:hover {
    background: var(--color-danger-dark, #b91c1c);
}


/* === ARCHIVE & CERTIFICATION MODAL === */
.archive-modal {
    max-width: 900px;
    width: 95%;
    height: 80vh;
    max-height: 90vh;
}

.archive-modal .modal-body {
    padding: 0;
    flex: 1;
    overflow: hidden;
    display: flex;
}

.archive-split-view {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* Left Panel - Project List */
.archive-left-panel {
    width: 280px;
    min-width: 280px;
    border-right: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    background: var(--color-bg-secondary);
}

.archive-search {
    padding: 12px;
    border-bottom: 1px solid var(--color-border-light);
}

.archive-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
}

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

.archive-project-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.archive-project-item {
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background 0.15s ease;
}

.archive-project-item:hover {
    background: var(--color-bg-tertiary);
}

.archive-project-item.active {
    background: var(--color-accent);
    color: white;
}

.archive-project-item.active .archive-project-date {
    color: rgba(var(--color-overlay-light), 0.8);
}

.archive-project-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-project-date {
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.archive-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-tertiary);
    font-size: 13px;
}

/* Right Panel - Details */
.archive-right-panel {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.archive-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-tertiary);
    text-align: center;
}

.archive-empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.archive-empty-state p {
    font-size: 14px;
}

.archive-details {
    animation: fadeIn 0.2s ease;
}

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

.archive-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border-light);
}

.archive-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.archive-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.archive-info-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    font-size: 13px;
}

.archive-label {
    color: var(--color-text-secondary);
    flex-shrink: 0;
    margin-right: 12px;
}

.archive-value {
    color: var(--color-text-primary);
    text-align: right;
    word-break: break-word;
}

.archive-hash {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 11px;
    background: var(--color-bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Verification Status */
.archive-verification-status {
    padding: 12px;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    margin-bottom: 12px;
}

.verification-pending {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-secondary);
    font-size: 13px;
}

.verification-icon {
    font-size: 16px;
}

.verification-success {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #16a34a;
    font-size: 13px;
    font-weight: 500;
}

.verification-success svg {
    stroke: #16a34a;
}

.verification-failed {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-danger);
    font-size: 13px;
    font-weight: 500;
}

.archive-verify-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
}

/* Certificate Preview */
.archive-certificate-preview {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    min-height: 200px;
}

.archive-certificate-actions {
    display: flex;
    gap: 12px;
}

.archive-certificate-actions .modal-btn {
    display: inline-flex;
    align-items: center;
}

/* Certificate Styles */
.certificate {
    text-align: center;
    font-family: 'Georgia', serif;
}

.certificate-header {
    margin-bottom: 20px;
}

.certificate-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.certificate-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    letter-spacing: 0.5px;
}

.certificate-subtitle {
    font-size: 11px;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.certificate-body {
    margin: 24px 0;
}

.certificate-project-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.certificate-author {
    font-size: 13px;
    color: #444;
    margin-bottom: 16px;
}

.certificate-details {
    font-size: 11px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.certificate-hash {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 9px;
    background: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    margin-top: 12px;
    word-break: break-all;
}

.certificate-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border-light);
    font-size: 10px;
    color: #999;
}

.certificate-qr {
    width: 64px;
    height: 64px;
    margin: 12px auto;
    background: #f0f0f0;
    border-radius: 4px;
}

/* Archive Button in Sidebar */
.archive-btn {
    width: var(--btn-height-base);
    height: var(--btn-height-base);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: all 0.15s ease;
}

.archive-btn:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

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

/* Back button — hidden on desktop */
.scanner-back-btn { display: none; }

/* Responsive Archive Modal */
@media (max-width: 768px) {
    .archive-modal {
        max-width: 100%;
        width: 100%;
        height: 85vh;
        height: 85svh;
        max-height: 85vh;
        max-height: 85svh;
    }

    .archive-split-view {
        flex-direction: column;
    }

    .archive-left-panel {
        width: 100%;
        min-width: auto;
        flex: 1;
        border-right: none;
    }

    .archive-right-panel {
        display: none;
    }

    /* After project selection: swap panels */
    .archive-split-view.project-selected .archive-left-panel { display: none; }
    .archive-split-view.project-selected .archive-right-panel { display: block; flex: 1; }

    .scanner-back-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        background: none;
        cursor: pointer;
        color: var(--color-text-secondary);
        margin-right: 6px;
        flex-shrink: 0;
    }

    .archive-certificate-actions {
        flex-direction: column;
    }

    .archive-certificate-actions .modal-btn {
        width: 100%;
        justify-content: center;
    }
}

/* === SCANNER TAB STYLES === */
.scanner-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.scanner-info-card{padding:10px 12px;background:var(--color-bg-secondary);border-radius:6px}
.scanner-info-label{font-size:11px;color:var(--color-text-muted);margin-bottom:2px}
.scanner-info-value{font-size:14px;font-weight:600;color:var(--color-text-primary)}
.scanner-tab-btn{padding:6px 14px;border:1px solid var(--color-border);border-radius:6px;background:none;cursor:pointer;font-size:12px;color:var(--color-text-muted);transition:.2s}
.scanner-tab-btn.active{background:var(--color-accent);color:var(--color-accent-text);border-color:var(--color-accent)}
.scanner-tab-btn:hover:not(.active){border-color:var(--color-accent);color:var(--color-accent)}

/* === CONTACTS MODAL === */
.contacts-modal {
    max-width: 600px;
    width: 95%;
    height: 70vh;
    max-height: 80vh;
}

.contacts-modal .modal-header {
    padding: 16px 20px;
}

.contacts-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contacts-modal-title svg {
    color: var(--color-text-secondary);
}

.contacts-modal-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.contacts-body {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.contacts-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

.contacts-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
}

.contacts-search-icon {
    color: var(--color-text-tertiary);
    flex-shrink: 0;
}

.contacts-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--color-text-primary);
    outline: none;
}

.contacts-search-input::placeholder {
    color: var(--color-text-tertiary);
}

.contacts-add-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-accent-text);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.contacts-add-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Contact card in modal */
.contacts-list .contact {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    padding: 12px;
    position: relative;
    transition: all 0.15s ease;
}

.contacts-list .contact:hover {
    border-color: var(--color-border-medium);
    box-shadow: 0 2px 8px rgba(var(--color-overlay-dark), 0.05);
}

.contacts-list .contact.hidden {
    display: none;
}

.contacts-list .contact-first-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.contacts-list .contact input {
    background: transparent;
    border: none;
    padding: 4px 0;
    font-size: 13px;
    color: var(--color-text-primary);
    width: 100%;
}

.contacts-list .contact input:focus {
    outline: none;
    background: var(--color-bg-primary);
    border-radius: 4px;
    padding: 4px 8px;
    margin: -4px -8px;
    width: calc(100% + 16px);
}

.contacts-list .contact-name {
    font-weight: 600;
    flex: 1;
}

.contacts-list .contact-placeholder {
    font-size: 11px;
    color: var(--color-text-tertiary);
    background: var(--color-bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', monospace;
}

.contacts-list .contact-role,
.contacts-list .contact-phone,
.contacts-list .contact-email {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.contacts-list .contact .del {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--color-text-tertiary);
    font-size: 14px;
    opacity: 0;
    transition: all 0.15s ease;
}

.contacts-list .contact:hover .del {
    opacity: 1;
}

.contacts-list .contact .del:hover {
    background: var(--color-danger);
    color: white;
}

.contacts-list .contact-aliases {
    font-size: 11px;
    color: var(--color-text-tertiary);
    margin-top: 4px;
}

.contacts-list .alias-tag {
    display: inline-block;
    background: var(--color-bg-tertiary);
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 4px;
    cursor: pointer;
}

.contacts-list .alias-tag:hover {
    background: var(--color-danger);
    color: white;
}

/* Contacts Button in Sidebar Footer */
.contacts-btn {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contacts-btn svg {
    width: 18px;
    height: 18px;
    stroke: white !important;
}

.contacts-btn:hover {
    background: rgba(var(--color-overlay-light), 0.1);
    color: white;
}

/* Responsive Contacts Modal */
@media (max-width: 768px) {
    .contacts-modal {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .contacts-list .contact input {
        font-size: 14px;
    }
}

/* --- TOGGLE SWITCH --- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-border);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--color-accent);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- RECOMMENDED BADGE --- */
.settings-recommended-badge {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 6px;
    background: var(--color-accent);
    color: var(--color-accent-text);
    border-radius: 4px;
}

/* --- SITES/STRONY TAB --- */
.sites-scroll-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.site-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.site-input-row .settings-input {
    flex: 1;
    font-size: 12px;
    padding: 8px 10px;
}

.site-check-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.site-check-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-accent-text);
}

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

.site-led {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-border-medium);
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.site-led.green {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.site-led.red {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.site-led.loading {
    background: #f59e0b;
    animation: led-pulse 1s infinite;
}

@keyframes led-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- THEME SELECTOR --- */
.theme-boxes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-box {
    display: flex;
    gap: 2px;
    padding: 4px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-box:hover {
    border-color: #9ca3af;
    transform: scale(1.05);
}

.theme-box.active {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 2px rgba(26, 26, 26, 0.2);
}

.theme-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

/* =============================================================================
   SITES/PAGES LIST (Sparks integration)
   ============================================================================= */

.pages-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.pages-count {
    font-size: 11px;
    color: var(--color-text-muted);
}

.pages-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.page-monitor-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.page-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.page-status.ok {
    background: #22c55e;
}

.page-status.error {
    background: #ef4444;
}

.page-status.pending {
    background: var(--color-text-muted);
}

.page-monitor-url {
    flex: 1;
    font-size: 11px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-last-check {
    font-size: 9px;
    color: var(--color-text-muted);
}

.page-remove {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
}

.page-remove:hover {
    color: #ef4444;
}

.page-remove svg {
    width: 14px;
    height: 14px;
}

.add-page-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.add-page-form .form-input {
    flex: 1;
    font-size: 12px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}

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

.add-page-form .btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    border: none;
    border-radius: 6px;
    color: var(--color-accent-text);
    cursor: pointer;
}

.add-page-form .btn-icon:hover {
    opacity: 0.9;
}

.add-page-form .btn-icon svg {
    width: 18px;
    height: 18px;
}

.pages-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--color-bg-tertiary);
    border-radius: 6px;
    margin-top: 12px;
    font-size: 10px;
    color: var(--color-text-muted);
}

.pages-info svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.pages-info a {
    color: var(--color-accent);
    text-decoration: none;
}

.pages-info a:hover {
    text-decoration: underline;
}
