/* ZAS Safeguard Web Dashboard Styles - Premium Design */

/* Dark theme (default) - Matching Popup Design */
:root {
    --primary: #3366ff;
    --primary-dark: #2952cc;
    --secondary: #8e2de2;
    --accent-gradient: linear-gradient(135deg, #3366ff, #8e2de2);
    --success: #00e096;
    --success-glow: rgba(0, 224, 150, 0.2);
    --danger: #ff3d71;
    --warning: #ffaa00;
    --bg-dark: #0a0f1c;
    --bg-card: #1a2138;
    --bg-card-hover: #222b45;
    --bg-input: #12182b;
    --text: #ffffff;
    --text-muted: #8f9bb3;
    --border: rgba(255, 255, 255, 0.08);
    --sidebar-width: 260px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Light theme */
[data-theme="light"] {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-input: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

/* Auto-apply based on system preference */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg-dark: #f8fafc;
        --bg-card: #ffffff;
        --bg-input: #f1f5f9;
        --text: #0f172a;
        --text-muted: #64748b;
        --border: #e2e8f0;
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Auth Screen */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 60px 24px;
    text-align: center;
}

.logo {
    font-size: 72px;
    margin-bottom: 16px;
}

.logo img {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    box-shadow:
        0 10px 30px rgba(51, 102, 255, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    filter: drop-shadow(0 0 20px rgba(51, 102, 255, 0.4));
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(51, 102, 255, 0.1), rgba(142, 45, 226, 0.1));
    padding: 8px;
}

.logo img:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow:
        0 16px 40px rgba(51, 102, 255, 0.4),
        0 8px 20px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 30px rgba(51, 102, 255, 0.6));
}

.auth-container h1 {
    font-size: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-muted);
    margin-top: 8px;
}

.auth-tabs {
    display: flex;
    margin: 32px 0;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 4px;
}

.auth-tabs .tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.auth-tabs .tab.active {
    background: var(--primary);
    color: white;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

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

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    color: #333;
    flex: 1;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

.btn-microsoft {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    color: #333;
    flex: 1;
}

.btn-microsoft svg {
    width: 20px;
    height: 20px;
}

.social-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
}

.social-divider::before,
.social-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.social-divider span {
    padding: 0 16px;
    font-size: 13px;
}

.social-buttons {
    display: flex;
    gap: 12px;
}

/* Dashboard Layout */
#dashboardScreen {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.logo-small {
    font-size: 28px;
}

.sidebar-header span {
    font-weight: 700;
    font-size: 18px;
}

.nav-links {
    list-style: none;
    margin-top: 24px;
    flex: 1;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-links li:hover {
    background: var(--bg-input);
    color: var(--text);
}

.nav-links li.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.nav-links .icon {
    font-size: 18px;
}

.pro-badge {
    font-size: 9px;
    background: var(--accent-gradient);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: auto;
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

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

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
}

.section h2 {
    font-size: 28px;
    margin-bottom: 24px;
}

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

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

.stat-icon {
    font-size: 32px;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

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

/* Mode Switcher */
.mode-switcher {
    margin-bottom: 32px;
}

.mode-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.mode-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-tab:hover {
    border-color: var(--primary);
}

.mode-tab.active {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.mode-tab .tab-icon {
    font-size: 32px;
}

.mode-tab .tab-label {
    font-weight: 600;
    color: var(--text);
}

.mode-tab .tab-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.mode-tab.active .tab-label {
    color: var(--primary);
}

/* Mode Banner */
.mode-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.mode-banner .mode-icon {
    font-size: 48px;
}

.mode-banner h3 {
    color: var(--danger);
    margin-bottom: 4px;
}

.mode-banner.family {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
    border-color: rgba(99, 102, 241, 0.3);
}

.mode-banner.family h3 {
    color: var(--secondary);
}

.mode-banner.student {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.05));
    border-color: rgba(16, 185, 129, 0.3);
}

.mode-banner.student h3 {
    color: var(--success);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.category-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.category-icon {
    font-size: 24px;
}

.category-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.category-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Toggle Switch */
.switch {
    position: relative;
    width: 50px;
    height: 28px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-input);
    border-radius: 28px;
    transition: 0.3s;
}

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

input:checked+.slider {
    background: var(--success);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.slider.locked {
    background: var(--danger);
    cursor: not-allowed;
}

.lock-badge {
    font-size: 12px;
    color: var(--danger);
    font-weight: 600;
}

/* Custom Blocklist */
.custom-blocklist {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
}

.custom-blocklist h3 {
    margin-bottom: 16px;
}

.add-domain {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.add-domain input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

#customDomainsList {
    list-style: none;
}

#customDomainsList li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Activity */
.activity-filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.activity-filters select,
.activity-filters input {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.activity-list {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 48px;
}

/* Settings */
.settings-group {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.settings-group h3 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.setting-item {
    margin-bottom: 16px;
}

.setting-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.setting-item input,
.setting-item textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.setting-description {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.danger-zone {
    border: 1px solid var(--danger);
}

.danger-zone h3 {
    color: var(--danger);
}

/* Devices Grid */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.device-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
}

.device-card.add-device {
    border: 2px dashed var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.device-card.add-device:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.device-card .icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* Recent Activity */
.recent-activity {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
}

.recent-activity h3 {
    margin-bottom: 16px;
}

.recent-activity ul {
    list-style: none;
}

.recent-activity li {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.recent-activity li:last-child {
    border-bottom: none;
}

.recent-activity li.empty {
    text-align: center;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .main-content {
        margin-left: 0;
    }

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

/* Section Description */
.section-description {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Study Mode Styles */
.study-active-banner {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.1));
    border: 2px solid rgba(16, 185, 129, 0.4);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    }

    50% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.4);
    }
}

.study-active-banner .study-icon {
    font-size: 64px;
}

.study-active-banner h3 {
    color: var(--success);
    font-size: 24px;
    margin-bottom: 8px;
}

.countdown-timer {
    display: flex;
    gap: 16px;
    margin: 16px 0;
}

.countdown-item {
    background: var(--bg-dark);
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    min-width: 80px;
}

.countdown-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--success);
}

.countdown-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.study-end-date {
    color: var(--text-muted);
}

.study-block-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-label:hover {
    background: var(--bg-dark);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin: 24px 0;
}

.warning-box .warning-icon {
    font-size: 24px;
}

.warning-box p {
    color: var(--warning);
    font-size: 14px;
    line-height: 1.6;
}

.btn-large {
    padding: 18px 32px;
    font-size: 16px;
    width: 100%;
}

.study-history-list .history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 10px;
    margin-bottom: 12px;
}

.history-item .session-name {
    font-weight: 600;
}

.history-item .session-dates {
    color: var(--text-muted);
    font-size: 13px;
}

.history-item .session-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.history-item .session-status.completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

/* Creator Block Styles */
.creator-add-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.creators-list .creator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 12px;
    margin-bottom: 12px;
}

.creator-item .creator-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.creator-item .platform-icon {
    font-size: 28px;
}

.creator-item .creator-name {
    font-weight: 600;
}

.creator-item .creator-reason {
    color: var(--text-muted);
    font-size: 13px;
}

.creator-item .btn-remove {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.creator-item .btn-remove:hover {
    background: var(--danger);
    color: white;
}

.info-box {
    display: flex;
    gap: 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.info-box .info-icon {
    font-size: 28px;
}

.info-box h4 {
    color: var(--primary);
    margin-bottom: 12px;
}

.info-box ul {
    color: var(--text-muted);
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.8;
}

/* Footer Links */
.auth-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 12px;
    font-size: 13px;
}

.auth-footer a:hover {
    color: var(--primary);
}

/* Browser Warning Info Box */
.info-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    margin-bottom: 24px;
}

.info-box .info-icon {
    font-size: 32px;
}

.info-box .info-content h4 {
    margin-bottom: 8px;
    color: var(--text);
}

.info-box .info-content p {
    color: var(--text-muted);
    margin-bottom: 12px;
}

.browser-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.browser-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-input);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.browser-link:hover {
    background: var(--primary);
    color: white;
}

/* Alert Badge */
.alert-badge {
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

/* Alert History List */
.alert-history-list {
    max-height: 400px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 12px;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.2s;
}

.alert-item:hover {
    background: var(--bg-dark);
}

.alert-item.unread {
    border-left: 4px solid var(--primary);
}

.alert-item .alert-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.alert-item .alert-content h4 {
    margin-bottom: 4px;
    font-size: 15px;
}

.alert-item .alert-content p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}

.alert-item .alert-time {
    font-size: 12px;
    color: var(--text-muted);
}

.unread-dot {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

/* Device Status List */
.device-status-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.device-status-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: 12px;
}

.device-status-item .device-icon {
    font-size: 28px;
}

.device-status-item .device-info h4 {
    margin-bottom: 4px;
}

.device-status-item .device-status {
    font-size: 13px;
}

.device-status-item .device-status.online {
    color: var(--success);
}

.device-status-item .device-status.offline {
    color: var(--text-muted);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: auto;
}

.status-indicator.online {
    background: var(--success);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-indicator.offline {
    background: var(--text-muted);
}

/* Alert Filters */
.alert-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.alert-filters select {
    flex: 1;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

/* Export/Import Buttons */
.settings-group .btn-row {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.settings-group .btn-row .btn {
    flex: 1;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    text-align: center;
}

.modal-content h2 {
    margin-bottom: 12px;
}

.modal-content>p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.mode-options {
    display: flex;
    gap: 16px;
}

.mode-option {
    flex: 1;
    padding: 24px;
    background: var(--bg-input);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.mode-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.mode-option .mode-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.mode-option h3 {
    margin-bottom: 8px;
}

.mode-option p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 12px;
}

.theme-toggle:hover {
    background: var(--bg-dark);
}

.theme-toggle .icon {
    font-size: 18px;
}

/* Pricing Modal */
.pricing-modal {
    max-width: 700px;
    padding: 32px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
}

.pricing-modal h2 {
    text-align: center;
    margin-bottom: 8px;
}

.pricing-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text);
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.toggle-label {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

.toggle-label.active {
    color: var(--text);
    font-weight: 600;
}

.save-badge {
    background: var(--success);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.toggle-switch {
    width: 50px;
    height: 26px;
    background: var(--bg-input);
    border-radius: 13px;
    cursor: pointer;
    position: relative;
}

.toggle-slider {
    width: 22px;
    height: 22px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
}

.toggle-switch.yearly .toggle-slider {
    transform: translateX(24px);
}

.pricing-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.pricing-card {
    flex: 1;
    background: var(--bg-input);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.pricing-card.active {
    border-color: var(--primary);
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 10px;
    white-space: nowrap;
}

.plan-badge.best-value {
    background: var(--success);
}

.pricing-card h3 {
    text-align: center;
    margin-top: 8px;
    margin-bottom: 16px;
}

.plan-price {
    text-align: center;
    margin-bottom: 8px;
}

.plan-price .currency {
    font-size: 20px;
    vertical-align: top;
}

.plan-price .amount {
    font-size: 48px;
    font-weight: 700;
}

.plan-price .period {
    color: var(--text-muted);
}

.plan-savings {
    text-align: center;
    color: var(--success);
    font-size: 13px;
    margin-bottom: 16px;
}

.plan-features {
    list-style: none;
    margin: 20px 0;
}

.plan-features li {
    padding: 8px 0;
    font-size: 14px;
}

.pricing-card .btn {
    width: 100%;
    margin-top: 16px;
}

.pricing-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Promo Code Section */
.promo-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.promo-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.promo-toggle:hover {
    color: var(--primary);
}

.promo-input-wrap {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.promo-input {
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    width: 200px;
}

.promo-success {
    color: var(--success);
    font-weight: 500;
    margin-top: 12px;
}

/* ============================================
   QUOTES PREVIEW SECTION
   ============================================ */

.quote-preview-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.quote-preview-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin-top: 16px;
    min-height: 80px;
    position: relative;
}

.quote-preview-box:empty {
    display: none;
}

.quote-preview-box p {
    font-size: 18px;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--text);
}

.quote-preview-box small {
    color: var(--text-muted);
    font-size: 14px;
}

.quote-preview-box::before {
    content: '"';
    position: absolute;
    top: 8px;
    left: 16px;
    font-size: 48px;
    color: rgba(99, 102, 241, 0.3);
    font-family: Georgia, serif;
    line-height: 1;
}

/* ============================================
   URL SCAN TABLE
   ============================================ */

.url-scan-table {
    width: 100%;
    border-collapse: collapse;
}

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

.url-scan-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.url-scan-table td {
    font-size: 14px;
}

.url-scan-table .empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 32px;
}

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

.scan-filters select,
.scan-filters input {
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

/* ============================================
   MANUAL URL CHECK FORM
   ============================================ */

.manual-check-form {
    display: flex;
    gap: 12px;
}

.manual-check-form input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.manual-check-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 8px;
}

.manual-check-result.safe {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.manual-check-result.danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.manual-check-result.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

/* ===== CHART SECTION ===== */

.chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
}

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

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

.chart-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

.chart-container canvas {
    max-height: 280px;
}

/* ===== POPUP STYLE ELEMENTS FOR DASHBOARD ===== */

/* Status Banner - Glowing Green */
.status-banner {
    background: var(--bg-card);
    border: 2px solid var(--success);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    margin: 0 auto 24px auto;
    max-width: 100%;
    box-shadow: 0 0 40px var(--success-glow);
}

.status-banner .status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.status-banner .status-dot {
    width: 14px;
    height: 14px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--success);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

.status-banner .status-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--success);
}

.status-banner .status-check {
    font-size: 24px;
    color: var(--success);
}

.status-banner .status-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Stats Grid - Popup Style with Gradient Numbers */
.stats-grid-new {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card-new {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card-new:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label-new {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid-new {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-grid-new {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== 3-COLUMN PRICING CARDS ===== */

.pricing-cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.pricing-card-3 {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card-3:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.pricing-card-3.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.05));
    transform: scale(1.02);
}

.pricing-card-3.featured:hover {
    transform: scale(1.02) translateY(-4px);
}

.pricing-card-3 .plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-card-3 .plan-badge.best-value {
    background: var(--success);
}

.pricing-card-3 h3 {
    font-size: 20px;
    margin-bottom: 12px;
    margin-top: 8px;
}

.pricing-card-3 .plan-price {
    margin-bottom: 8px;
}

.pricing-card-3 .plan-price .amount {
    font-size: 48px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-card-3 .plan-price .currency {
    font-size: 24px;
    vertical-align: super;
    color: var(--text-muted);
}

.pricing-card-3 .plan-price .period {
    font-size: 14px;
    color: var(--text-muted);
}

.pricing-card-3 .plan-tagline {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.pricing-card-3 .plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
    padding: 0;
}

.pricing-card-3 .plan-features li {
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.pricing-card-3 .plan-features li:last-child {
    border-bottom: none;
}

.pricing-card-3 .btn {
    width: 100%;
}

/* Checkout Error */
.checkout-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
}

/* Responsive Pricing */
@media (max-width: 900px) {
    .pricing-cards-3 {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .pricing-card-3.featured {
        transform: none;
        order: -1;
    }

    .pricing-card-3.featured:hover {
        transform: translateY(-4px);
    }
}

/* ===== SETTINGS SECTION OVERFLOW FIX ===== */

.settings-group {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    overflow: hidden;
    /* Prevent overflow */
}

.settings-group h3 {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    word-wrap: break-word;
}

.setting-item {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.setting-item label {
    flex: 0 0 auto;
    min-width: 120px;
    font-weight: 500;
}

.setting-item input,
.setting-item textarea,
.setting-item select {
    flex: 1;
    min-width: 150px;
    max-width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.setting-item textarea {
    width: 100%;
    resize: vertical;
}

.setting-description {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 12px;
    width: 100%;
}

/* Fix owner settings overflow */
#ownerSettings .setting-item {
    flex-direction: column;
    align-items: stretch;
}

#ownerSettings textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Pricing Modal Width */
.pricing-modal {
    max-width: 900px !important;
    width: 95%;
}

/* Mobile settings fix */
@media (max-width: 768px) {
    .setting-item {
        flex-direction: column;
        align-items: stretch;
    }

    .setting-item label {
        min-width: auto;
        width: 100%;
    }

    .setting-item input,
    .setting-item select {
        width: 100%;
    }

    .main-content {
        padding: 16px;
    }
}

/* ===== 4-CARD PRICING LAYOUT ===== */

.pricing-section-title {
    text-align: center;
    font-size: 18px;
    margin: 24px 0 16px;
    color: var(--text);
}

.pricing-section-title.success {
    color: var(--success);
}

.pricing-cards-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.pricing-card-4 {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card-4:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.pricing-card-4.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.05));
}

.pricing-card-4 .plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-card-4 .plan-badge.best-value {
    background: var(--success);
}

.pricing-card-4 h3 {
    font-size: 18px;
    margin-bottom: 12px;
    margin-top: 8px;
}

.pricing-card-4 .plan-price {
    margin-bottom: 8px;
}

.pricing-card-4 .plan-price .amount {
    font-size: 36px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-card-4 .plan-price .currency {
    font-size: 20px;
    vertical-align: super;
    color: var(--text-muted);
}

.pricing-card-4 .plan-price .period {
    font-size: 14px;
    color: var(--text-muted);
}

.pricing-card-4 .plan-tagline {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.pricing-card-4 .plan-tagline.savings {
    color: var(--success);
    font-weight: 600;
}

.pricing-card-4 .plan-features {
    list-style: none;
    text-align: left;
    margin-bottom: 20px;
    padding: 0;
}

.pricing-card-4 .plan-features li {
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

.pricing-card-4 .plan-features li:last-child {
    border-bottom: none;
}

.pricing-card-4 .btn {
    width: 100%;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

/* Responsive Pricing 4 cards */
@media (max-width: 700px) {
    .pricing-cards-4 {
        grid-template-columns: 1fr;
    }

    .pricing-card-4.featured {
        order: -1;
    }
}

/* ===== TOS MODAL ===== */
.tos-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.tos-modal-content {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tos-modal-content h2 {
    margin: 20px 0 8px;
    font-size: 24px;
}

.tos-subtitle {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.tos-scroll-box {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.tos-scroll-box h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.tos-scroll-box ul {
    list-style: none;
    padding: 0;
}

.tos-scroll-box li {
    padding: 6px 0;
    font-size: 14px;
}

.tos-scroll-box a {
    color: var(--primary);
}

.tos-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    margin-bottom: 24px;
}

.tos-checkbox input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.tos-checkbox label {
    font-size: 14px;
    cursor: pointer;
}

.tos-checkbox a {
    color: var(--primary);
}

.tos-buttons {
    display: flex;
    gap: 12px;
}

.tos-buttons .btn {
    flex: 1;
    padding: 14px 24px;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
}

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