/* ==========================================================================
   JOBO RESILIENT CORE VIEWPORT RESETS
   ========================================================================== */
:root {
    --pitch-charcoal: #121212;
    --surface-card: #1A1A1A;
    --surface-container: #222222;
    --border-color: #2A2A2A;
    --text-main: #FFFFFF;
    --text-muted: #A0A0A0;
    --velvet-sage: #4E6E58;
    --warm-sand: #EAE6DF;
    --base-canvas: #FDFBF7;

    /* Semantic Variables - Light Mode (Default) */
    --bg-app: var(--base-canvas);
    --bg-surface: #FFFFFF;
    --bg-container: #F4F1EA;
    --text-primary: #1A1A1A;
    --text-secondary: #5A5A5A;
    --border-subtle: rgba(0, 0, 0, 0.08);
    --nav-bg: #FDFBF7;
    --nav-bg-glass: rgba(253, 251, 247, 0.7);
    --nav-bg-scrolled: rgba(253, 251, 247, 0.98);
}

[data-theme="dark"] {
    --bg-app: var(--pitch-charcoal);
    --bg-surface: var(--surface-card);
    --bg-container: var(--surface-container);
    --text-primary: #FFFFFF;
    --text-secondary: var(--text-muted);
    --border-subtle: var(--border-color);
    --nav-bg: #1A1A1A;
    --nav-bg-glass: rgba(18, 18, 18, 0.7);
    --nav-bg-scrolled: rgba(18, 18, 18, 0.98);
}

 *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* FIX: Clear vertical layout locks and force the container boundaries to dynamically stretch */
html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-app);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
    overflow-y: auto; /* Force structural native thumb-swipe scrolling */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   DYNAMIC APP INNER SHELL FRAMEWORK
   ========================================================================== */
#view-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 92px 16px 100px 16px; /* Increased top padding to ensure content starts below the 72px fixed header */
}

/* ==========================================================================
   SEMANTIC VIEW LAYOUT SYSTEM
   ========================================================================== */
.view-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.view-header {
    margin-bottom: 40px;
}

.view-header.centered {
    text-align: center;
}

.view-tagline {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--velvet-sage);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.view-description {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    max-width: 600px;
}

.view-description.centered {
    margin: 0 auto;
}

/* ==========================================================================
   ELASTIC BENTO GRID & SYSTEM RE-FLOW CARDS
   ========================================================================== */
.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 24px;
    width: 100% !important; /* Overwrites fixed pixel widths globally */
    max-width: 100%;
    height: auto !important; /* Allows deep forms to self-expand vertically */
    margin-bottom: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bento-card.elevated {
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.bento-card.accent-border {
    border: 1px solid var(--warm-sand);
}

/* Fluid responsive grid matrix layout */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    width: 100%;
}

/* ==========================================================================
   EDITORIAL TYPOGRAPHY & SHIMMER COMPONENTS
   ========================================================================== */
.editorial-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 16px;
}

@keyframes skeletonPulseAnimation {
    0% { background-color: var(--surface-container); }
    50% { background-color: var(--border-color); }
    100% { background-color: var(--surface-container); }
}

.skeleton-shimmer-box {
    animation: skeletonPulseAnimation 1.5s ease-in-out infinite;
    border-radius: 6px;
    display: inline-block;
    background-color: var(--surface-container);
}

/* ==========================================================================
   PRIMARY ACTION COMPONENTS
   ========================================================================== */
.pill-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: var(--text-main);
    color: var(--pitch-charcoal);
    font-size: 15px;
    font-weight: 700;
    padding: 16px 28px;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s ease;
    text-decoration: none;
}

.pill-button:active {
    transform: scale(0.98);
}

.pill-button.accent-hustle {
    background-color: var(--velvet-sage);
    color: var(--text-main);
}

/* ==========================================================================
   INPUT COMPONENTS & SYSTEM ACCESSIBILITY ELEMENTS
   ========================================================================== */
.premium-input, 
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="tel"], 
input[type="number"], 
textarea {
    width: 100% !important;
    max-width: 100%;
    padding: 14px 16px;
    background: var(--bg-container);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 16px !important; /* Critical: Prevents iOS Safari from forcing auto-zoom on element focus */
    appearance: none;
    outline: none;
    transition: border-color 0.2s ease;
}

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

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.premium-input:focus {
    border-color: var(--text-muted);
}

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

/* ==========================================================================
   ANIMATIONS & DECORATIVE
   ========================================================================== */
@keyframes pulse-radar {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(217, 119, 6, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

.pulse-radar {
    animation: pulse-radar 2s infinite;
}

/* ==========================================================================
   MOBILE FIRST RESPONSIVE FLOATING NAV DOCK
   ========================================================================== */
.navbar {
    position: fixed;
    bottom: 0; /* Pins navigation bar to the bottom on smartphones for ergonomic thumb access */
    left: 0;
    width: 100%;
    height: 72px;
    background: rgba(26, 26, 26, 0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    z-index: 9999;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 24px;
}

/* ==========================================================================
   COMPREHENSIVE ADAPTIVE MEDIA QUERY QUARANTINE BREAKPOINTS
   ========================================================================== */

/* Tablet & Desktop Layout Realignment Modes */
@media (min-width: 768px) {
    .navbar {
        top: 0; /* Moves navigation to the traditional top row position on wider workspace monitors */
        bottom: auto;
        border-top: none;
        border-bottom: 1px solid var(--border-color);
        height: 64px;
    }

    #view-container {
        padding: 96px 24px 40px 24px; /* Adapts spacing parameters for top navigation configurations */
    }
    
    .grid-layout {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 24px;
    }
}

/* ==========================================================================
   UNIVERSAL AUTH OVERLAY FLOATING VIEW WINDOWS
   ========================================================================== */
.modal-content {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--surface-card);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 32px 24px;
    max-height: 90vh; /* Limits the element to the active visible viewport height footprint */
    overflow-y: auto; /* Restores scrolling for micro-elements trapped inside overlay views */
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   ADMINISTRATIVE DASHBOARD SYSTEM
   ========================================================================== */
.admin-view-wrapper {
    background-color: var(--base-canvas);
    color: var(--pitch-charcoal);
    padding: 40px 16px;
    min-height: 100vh;
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--warm-sand);
    padding-bottom: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.admin-header-title {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
}

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

.admin-registry-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #FFFFFF;
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--warm-sand);
}

.admin-registry-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-registry-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-badge {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    background: #F4F1EA;
    padding: 4px 10px;
    border-radius: 6px;
    color: #5A5A5A;
}

.admin-table-container {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 800px;
}

.admin-table th {
    padding: 12px 8px;
    border-bottom: 1px solid var(--warm-sand);
    font-size: 11px;
    text-transform: uppercase;
    color: #5A5A5A;
}

.admin-table td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--base-canvas);
    font-size: 14px;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.admin-stat-card {
    background: var(--base-canvas);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--warm-sand);
}

.admin-danger-zone {
    border-top: 1px solid var(--warm-sand);
    padding-top: 24px;
}

/* ==========================================================================
   MOBILE DRAWER TEXT CONTRAST & ACCESSIBILITY REALIGNMENT
   ========================================================================== */

/* Target the mobile slide-out container and force accessible typography contrast */
#joboProfileDropdown,
#joboMobileMenu,
.modal-content,
.admin-view-wrapper,
.admin-stat-card,
.admin-registry-item,
.admin-table-container,
.mobile-nav-drawer,
.ai-copilot-section,
.ai-insight-box,
[id*="Dropdown"] {
    background-color: #FDFBF7 !important; /* Soft Alabaster backdrop */
    color: #1A1A1A !important;            /* High-contrast Pitch Charcoal ink text */
}

/* Force all text headers and anchors inside the menu container to be visible */
#joboProfileDropdown h4,
#joboProfileDropdown a,
#joboProfileDropdown span,
#joboProfileDropdown button,
#joboMobileMenu h3,
#joboMobileMenu a,
#joboMobileMenu button,
.admin-header-title,
.admin-registry-info span,
.admin-table th,
.mobile-nav-drawer a,
.mobile-nav-drawer li,
.ai-copilot-section h3,
.ai-copilot-section p,
.ai-insight-box,
.admin-stat-card span {
    color: #1A1A1A !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

/* Force dark text for inputs and textareas inside light panels in Dark Mode */
.ai-copilot-section textarea,
.modal-content input,
.modal-content textarea,
.admin-view-wrapper input {
    color: #1A1A1A !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Give links a clean subtle hover state change inside the panel */
#joboProfileDropdown a:hover,
.mobile-nav-drawer a:hover {
    color: #4E6E58 !important; /* Velvet Sage accent highlight */
    background-color: rgba(78, 110, 88, 0.08);
    border-radius: 8px;
}

/* ==========================================================================
   ADMINISTRATIVE UI COMPONENTS
   ========================================================================== */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #C53939; }
input:checked + .slider:before { transform: translateX(20px); }

/* ==========================================================================
   JOBO TOUR ENGINE (INTERACTIVE HIGHLIGHTS)
   ========================================================================== */
body.tour-active {
    overflow: hidden !important; /* Locks background scrolling so tooltip aligns perfectly */
}

.jobo-tour-highlight {
    position: relative;
    z-index: 99999 !important; /* Forces element above the overlay */
    background-color: var(--bg-surface); /* Prevents transparent elements from bleeding */
    box-shadow: 0 0 0 4px var(--velvet-sage), 0 10px 30px rgba(0,0,0,0.5) !important;
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
}
