/* --- CINEMATIC ENTERPRISE SYSTEM (Porcelain & Carbon) --- */
:root {
    --bg-porcelain: #F6F7F8;
    --bg-surface: #FFFFFF;
    --text-carbon: #0B0D0F;
    --text-secondary: rgba(11, 13, 15, 0.65);
    --text-tertiary: rgba(11, 13, 15, 0.40);
    --border-hairline: rgba(11, 13, 15, 0.10);
    --border-hover: rgba(11, 13, 15, 0.18);
    --state-hover: rgba(11, 13, 15, 0.03);
    --state-active: rgba(11, 13, 15, 0.05);

    --radius-card: 14px;
    --radius-sm: 8px;

    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Geist Mono', 'SF Mono', monospace;

    --ease: cubic-bezier(0.2, 0, 0, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    background-color: var(--bg-porcelain);
    color: var(--text-carbon);
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* --- AMBIENT --- */
.ambient-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.ambient-gradient {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 40%);
    pointer-events: none;
    z-index: -2;
}

/* --- TYPOGRAPHY --- */
.h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-carbon);
}

.h2 {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.3px;
    color: var(--text-carbon);
    margin-bottom: 24px;
}

.h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-carbon);
}

.body {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 600px;
}

.caption {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: -0.02em;
}

.text-link {
    cursor: pointer;
    border-bottom: 1px solid var(--border-hairline);
    transition: border-color 0.2s;
}

.text-link:hover {
    border-color: var(--text-carbon);
}

/* --- COMPONENTS --- */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-card);
    padding: 24px;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--border-hover);
}

.btn {
    background: transparent;
    border: 1px solid var(--border-hairline);
    color: var(--text-carbon);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    border-color: var(--text-carbon);
    background: #fff;
}

.btn-primary {
    background: var(--text-carbon);
    color: #fff;
    border-color: var(--text-carbon);
}

.btn-primary:hover {
    background: #000;
}

/* --- LAYOUT --- */
.left-rail {
    width: 248px;
    background: var(--bg-surface);
    border-right: 1px solid rgba(11, 13, 16, 0.06);
    padding: 24px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.left-rail::-webkit-scrollbar { display: none; }

/* Nav items — defined in module CSS (employees.css, recruiting.css, etc.) */

.main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 48px;
    border-bottom: 0px solid transparent;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 0 48px 64px;
}

.content-width {
    max-width: 1000px;
    margin: 0 auto;
}

/* --- TABS --- */
.tab-nav {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid var(--border-hairline);
    margin-bottom: 32px;
}

.tab-btn {
    padding: 16px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    position: relative;
    font-weight: 500;
    text-decoration: none;
    /* For A tags acting as tabs */
    display: inline-block;
}

.tab-btn:hover {
    color: var(--text-carbon);
}

.tab-btn.active {
    color: var(--text-carbon);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-carbon);
}

/* --- TABLES --- */
.data-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
    margin-top: 16px;
}

.data-table th {
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-tertiary);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-hairline);
    font-family: var(--font-mono);
}

.data-table td {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-hairline);
    color: var(--text-carbon);
    font-size: 13px;
}

.data-table tr:hover td {
    background: var(--state-hover);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* --- UTILS --- */
.row-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
}

.pill {
    display: inline-flex;
    padding: 4px 10px;
    border: 1px solid var(--border-hairline);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

/* --- ANIMATIONS --- */
.fade-in {
    animation: fadeIn 0.4s var(--ease) forwards;
    opacity: 0;
    transform: translateY(4px);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- DRAWER (Legacy/optional support) --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.drawer-overlay.open {
    display: flex;
    opacity: 1;
    justify-content: flex-end;
}

.drawer {
    width: 440px;
    height: 100%;
    background: #fff;
    border-left: 1px solid var(--border-hairline);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.04);
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    display: flex;
    flex-direction: column;
}

.drawer-overlay.open .drawer {
    transform: translateX(0);
}

/* --- CALCULATOR --- */
.calc-box {
    background: var(--state-active);
    padding: 24px;
    border-radius: 12px;
}

.input-group {
    margin-bottom: 16px;
}

.input-text {
    width: 100%;
    border: 1px solid var(--border-hairline);
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 14px;
}

/* --- MONTH SELECTOR --- */
.month-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-hairline);
    align-items: center;
}

.year-drop {
    appearance: none;
    background: transparent;
    border: 1px solid var(--border-hairline);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-ui);
    font-size: 13px;
    cursor: pointer;
    color: var(--text-carbon);
    margin-right: 16px;
}

.month-pill {
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
}

.month-pill:hover {
    color: var(--text-carbon);
    background: var(--state-hover);
}

.month-pill.active {
    color: var(--text-carbon);
    background: #fff;
    border-color: var(--border-hairline);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}