/* ─── Base & Global Styles ─── */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1f2937;
    --light: #f9fafb;
    --border: #e5e7eb;
}

/* Authentication Section Styles */
.auth-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 20px;
}

.auth-tabs {
    display: flex;
    background: var(--light);
    border-bottom: 2px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

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

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

.auth-content {
    padding: 30px;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
    width: auto;
}

.subtitle {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-right: 15px;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

/* Alerts & Status Messages */
.auth-alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    border-left: 4px solid transparent;
    animation: slideDown 0.3s ease;
}

.auth-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
    display: block;
}

.auth-alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left-color: #10b981;
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Loading State */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

body {
    margin: 0;
    font-family: sans-serif;
    transition: padding-top 0.2s ease;
}

body::before {
    content: "";
    display: block;
    height: auto;
}

/* ─── Color Palette ─── */
:root {
    --menu-bg: #3f51b5;
    /* w3-indigo */
    --menu-text: white;
    --menu-hover: #2196f3;
    /* w3-blue */
    --menu-active-bg: #283593;
    /* darker indigo */
    --menu-active-border: #ff9800;
    /* w3-orange accent */
    --sidebar-divider: rgba(255, 255, 255, 0.1);
    --sidebar-shadow: rgba(0, 0, 0, 0.4);
}

/* ─── Menu Bar & Sidebar ─── */
.menu-bar,
.sidebar {
    background-color: var(--menu-bg);
    color: var(--menu-text);
}

/* Ensure sidebar is strictly hidden until active */
.sidebar {
    display: none !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--menu-bg);
    color: var(--menu-text);
    z-index: 1100;
    box-shadow: 2px 0 10px var(--sidebar-shadow);
    padding-top: 20px;
}

.sidebar.active {
    display: flex !important;
}

.menu-bar {
    display: flex;
    flex-wrap: wrap;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.menu-icon {
    display: none;
    border: none;
    font-size: 16px;
    padding: 3px 20px;
    cursor: pointer;
    background-color: var(--menu-bg);
    color: var(--menu-text);
}

/* ─── Menu Buttons & Labels ─── */
.menu-bar .menu-btn,
.menu-bar .menu-label,
.sidebar .menu-btn,
.menu-icon {
    border: none;
    padding: 6px 14px;
    margin: 0 4px;
    cursor: pointer;
    font-size: clamp(14px, 3.5vw, 20px);
    background-color: var(--menu-bg);
    color: var(--menu-text);
    text-decoration: none;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 6px;
    transition: background-color 160ms, color 160ms, transform 120ms;
}

.menu-bar .menu-label,
.sidebar .menu-label {
    font-weight: bold;
    pointer-events: none;
    padding-left: 20px;
    border-bottom: 1px solid var(--sidebar-divider);
}

/* ─── Active & Hover States ─── */
.menu-bar .menu-btn.active,
.sidebar .menu-btn.active,
.sidebar .dropdown-label.active {
    background-color: var(--menu-active-bg);
    border: 2px solid var(--menu-active-border);
}

.menu-bar .menu-btn:hover,
.sidebar .menu-btn:hover,
.menu-bar .menu-icon:hover {
    background-color: var(--menu-hover);
    color: #fff;
    transform: translateY(-1px) scale(1.02);
    border-radius: 12px;
}

.menu-bar .menu-btn:focus,
.sidebar .menu-btn:focus,
.menu-bar .menu-icon:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 128, 0, 0.15);
}

/* ─── Sidebar Specific ─── */
.sidebar {
    box-shadow: 2px 2px 5px var(--sidebar-shadow);
}

.sidebar .menu-btn {
    text-align: left;
    width: 100%;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
}

.sidebar .dropdown-label {
    pointer-events: auto !important;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.sidebar .dropdown-label:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .sidebar-submenu {
    border-left: 3px solid var(--menu-active-border);
    margin-left: 5px;
}

/* ─── Dropdown Menu ─── */
.menu-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--menu-bg);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.dropdown-content button,
.dropdown-content a {
    color: var(--menu-text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.dropdown-content button:hover,
.dropdown-content a:hover {
    background-color: var(--menu-hover);
}

.menu-dropdown:hover .dropdown-content {
    display: block !important;
}

.dropdown-label {
    background-color: rgba(0, 0, 0, 0.1);
    font-size: 0.8em;
    padding: 5px 15px;
}

/* ─── Content Sections ─── */
.content-section {
    display: none;
    padding: 20px;
    /*margin-top: 70px; */
    /* Space for fixed menu */
}

.content-section.active {
    display: block;
}

/* ─── Content Sections ─── */
.content-footer {
    display: block;
    padding: 20px;
    /*margin-top: 70px; */
    /* Space for fixed menu */
}

/* ─── Copy Buttons & Tooltips ─── */
.copy-btn {
    margin-top: 4px;
    padding: 4px 10px;
    font-size: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.copy-btn:hover {
    background-color: #45a049;
}

.copy-tooltip {
    position: absolute;
    background-color: #333;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    top: -30px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1000;
}

.code-container {
    position: relative;
}

/* ─── Responsive ─── */
@media(max-width:900px) {

    .menu-bar .menu-btn,
    .menu-bar .menu-label {
        display: none;
    }

    .menu-icon {
        display: inline-block;
    }

    .sidebar {
        display: none;
    }

    .sidebar.active {
        display: flex;
    }

    .sidebar .menu-btn {
        display: block;
        width: 100%;
    }
}

/* ─── Notifier Example ─── */
.notifier {
    position: relative;
    z-index: 1;
    background-color: #fdd835;
    color: black;
    text-align: center;
    padding: 5px;
    font-weight: bold;
    font-size: 25px;
    margin-top: 100px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.3);
}

.unverified-banner {
    background-color: #ffb6c1;
    /* Pink background */
    color: #8b0000;
    /* Dark red text */
    text-align: center;
    padding: 10px;
    font-weight: bold;
    width: 100%;
    z-index: 11000;
    border-bottom: 2px solid #ff69b4;
}

/* ─── Portal Theme Scoping ─── */
.theme-breaker-ace {
    --menu-bg: #FF9100;
    --menu-text: #1a1a1a;
    --menu-hover: #ffab40;
    --menu-active-bg: #E65100;
    --menu-active-border: #212121;
}

.theme-classifieds {
    --menu-bg: #00796B;
    --menu-hover: #009688;
    --menu-active-bg: #004D40;
    --menu-active-border: #FFD600;
}

.theme-moneyangel,
.theme-rational-green {
    --menu-bg: #2E7D32;
    --menu-hover: #43A047;
    --menu-active-bg: #1B5E20;
    --menu-active-border: #C6FF00;
}

/* Breaker-Ace Specific Utilities */
.theme-breaker-ace .w3-vivid-amber {
    background-color: #FF9100 !important;
    color: #000 !important;
}

.theme-breaker-ace .w3-charcoal {
    background-color: #212121 !important;
    color: #fff !important;
}

.theme-breaker-ace .w3-border-amber {
    border-color: #FF9100 !important;
}

.theme-breaker-ace .search-container {
    background: #212121;
    padding: 20px;
    border-radius: 8px;
    color: white;
    margin-bottom: 20px;
}

.theme-breaker-ace .tech-spec-card {
    border-top: 4px solid #FF9100;
}

.theme-breaker-ace .app-feature-icon {
    font-size: 2em;
    margin-bottom: 10px;
    display: block;
}

/* Classifieds Specific Utilities */
.theme-classifieds .icon-links {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
}

.theme-classifieds .icon-links a {
    text-decoration: none;
    color: #00796B;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.theme-classifieds .icon-links a:hover {
    color: #ff9800;
}

.theme-classifieds .contact-hidden {
    display: none;
}

.theme-classifieds .reveal-btn {
    background-color: #eee;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ccc;
}

.theme-classifieds .spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9em;
}

.theme-classifieds .spec-table th,
.theme-classifieds .spec-table td {
    padding: 4px 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.theme-classifieds .spec-table th {
    width: 45%;
    color: #555;
    background-color: #f9f9f9;
    font-weight: bold;
}

.theme-classifieds .im-links {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.theme-classifieds .im-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.85em;
    text-decoration: none !important;
    color: white !important;
    transition: filter 0.2s, transform 0.2s;
    font-weight: bold;
}

.theme-classifieds .im-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.theme-classifieds .btn-wa {
    background-color: #25D366;
}

.theme-classifieds .btn-signal {
    background-color: #3A76F0;
}

.theme-classifieds .btn-li {
    background-color: #0077B5;
}

.theme-classifieds .btn-fb {
    background-color: #1877F2;
}

.theme-classifieds .btn-web {
    background-color: #555;
}

.theme-classifieds .verified-badge {
    color: #2196F3;
    font-size: 0.8em;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.theme-classifieds .tag-recon {
    background-color: #00C853 !important;
    color: white !important;
}

.theme-classifieds .tag-new {
    background-color: #2196F3 !important;
    color: white !important;
}

.theme-classifieds .tag-private {
    background-color: #FFD600 !important;
    color: black !important;
}

.theme-classifieds .tag-used {
    background-color: #FF9800 !important;
    color: white !important;
}

/* Job Popups (Classifieds) */
.job-trigger {
    position: relative;
    cursor: help;
    text-decoration: underline dotted;
    color: #00796B;
    background: rgba(0, 121, 107, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    display: inline-block;
}

.job-popup {
    visibility: hidden;
    width: 280px;
    background-color: #263238;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 15px;
    position: absolute;
    z-index: 1010;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    font-size: 0.85em;
    font-weight: normal;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    line-height: 1.4;
}

.job-popup::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #263238 transparent transparent transparent;
}

.job-trigger:hover .job-popup {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* MoneyAngel Specific Utilities */
.theme-moneyangel .w3-green-theme {
    background-color: #2E7D32 !important;
    color: white !important;
}

.theme-moneyangel .disclaimer-box {
    border: 2px solid #d32f2f;
    background-color: #ffebee;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.theme-moneyangel .disclaimer-box h3 {
    color: #c62828;
    margin-top: 0;
}

/* Rational Green Specific Utilities */
.theme-rational-green .w3-forest {
    background-color: #2e7d32 !important;
    color: white !important;
}

.theme-rational-green .paid-badge {
    background-color: #795548;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}