/* OptiRH - Premium SaaS Theme v3 */
:root {
    /* Brand Colors - Lucca Inspired (Deep Violet/Blue) */
    --primary-bg: #2b2e4a;
    /* Sidebar Dark */
    --primary-accent: #7c5dfa;
    /* Vivid Purple */
    --primary-accent-hover: #6046bd;

    --secondary-bg: #f8f8fb;
    /* Main background - very light blue-grey */
    --surface-white: #ffffff;

    /* Text Colors */
    --text-primary: #1e2139;
    /* Dark Blue-Black */
    --text-secondary: #7e88c3;
    /* Muted Purple-Grey */
    --text-on-dark: #dfe3fa;

    /* Semantic Status Colors */
    --status-approved-bg: #33d69f;
    /* Green */
    --status-approved-bg-sub: rgba(51, 214, 159, 0.1);
    --status-approved-text: #1f8b68;

    --status-pending-bg: #ff8f00;
    /* Orange */
    --status-pending-bg-sub: rgba(255, 143, 0, 0.1);
    --status-pending-text: #b56e0d;

    --status-rejected-bg: #ec5757;
    /* Red */
    --status-rejected-bg-sub: rgba(236, 87, 87, 0.1);
    --status-rejected-text: #cf4b4b;

    /* Metrics */
    --sidebar-width: 240px;
    /* Slightly thinner */
    --radius-l: 10px;
    /* Reduced from 12px */
    --radius-m: 6px;
    /* Reduced from 8px */
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.04);
    /* Softer shadow */
}

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: #f3f4f8;
    /* Slightly cooler grey */
    color: var(--text-primary);
    line-height: 1.4;
    /* Tighter line height */
    font-size: 14px;
    /* Base size reduced from default 16px */
    height: 100vh;
    display: flex;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

/* === SIDEBAR === */
.sidebar {
    width: 200px;
    /* Reduced from 240px */
    background: #1e1e2d;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

.sidebar-header {
    height: 50px;
    /* Reduced from 64px */
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* User Profile Badge */
.user-badge {
    margin-top: auto;
    padding: 0.8rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.user-badge-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    background: var(--primary-accent);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Navigation Links */
.nav-menu {
    padding: 1rem 0.5rem;
    flex: 1;
}

.nav-section-label {
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.5px;
    color: #565674;
    margin-bottom: 0.5rem;
    /* Increased slightly for better label spacing */
    margin-top: 1.8rem;
    /* Increased from 1rem to add more separation */
    padding-left: 0.5rem;
    font-weight: 700;
}

.nav-section-label:first-child {
    margin-top: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.4rem 0.6rem;
    color: #a2a3b7;
    border-radius: 4px;
    margin-bottom: 2px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.1s ease-in-out;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}

.nav-link.active {
    background: var(--primary-accent);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(124, 93, 250, 0.2);
}


/* === MAIN CONTENT === */
.main-layout {
    flex: 1;
    padding: 1.5rem 2.5rem;
    overflow-y: auto;
}

/* Page Headers - tighter */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Center aligned vertical */
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 1.5rem;
    /* Smaller title */
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* === COMPONENTS === */
.card {
    background: var(--surface-white);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
    /* Reduced padding */
    margin-bottom: 1.5rem;
    border: 1px solid #eef0f6;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    /* Reduced from 0.8rem 1.5rem */
    border-radius: 6px;
    /* Pill shape is nice, but slightly rectangular is more "Aiceptional" like */
    font-weight: 600;
    font-size: 0.8rem;
    /* Reduced from 0.85rem */
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--primary-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(124, 93, 250, 0.2);
}

.btn-secondary {
    background: white;
    /* Changed from grey to white with border for crispness */
    border: 1px solid #e2e8f0;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Form Inputs - High quality feel */
.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    /* Smaller label */
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    /* Reduced padding */
    border-radius: 6px;
    border: 1px solid #e0e2e6;
    /* Lighter border */
    font-family: inherit;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(124, 93, 250, 0.1);
}

/* === CALENDAR GRID === */
/* This was missing/broken before */
.calendar-wrapper {
    background: white;
    border-radius: var(--radius-l);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 0.5rem;
}

.cal-header span {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem;
}

.cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 45px;
    /* Fixed height cells */
    gap: 4px;
}

.cal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: 0.1s;
    user-select: none;
}

.cal-day:hover:not(.empty) {
    background: #f3f4f6;
    color: var(--primary-accent);
}

.cal-day.empty {
    cursor: default;
}

/* Selection States */
.cal-day.selected-start {
    background: var(--primary-accent);
    color: white;
    border-radius: 6px 0 0 6px;
}

.cal-day.selected-end {
    background: var(--primary-accent);
    color: white;
    border-radius: 0 6px 6px 0;
}

/* If single day selected */
.cal-day.selected-single {
    background: var(--primary-accent);
    color: white;
    border-radius: 6px;
}

.cal-day.in-range {
    background: rgba(124, 93, 250, 0.1);
    /* Light Purple */
    color: var(--primary-accent);
    border-radius: 0;
}

/* Event Dots */
.has-dot::after {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--status-approved-bg);
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
}

/* === TYPE SELECTOR (Pill Buttons) === */
.type-radios {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.type-label {
    cursor: pointer;
    border: 1px solid #dfe3fa;
    background: white;
    padding: 0.6rem 1.2rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.2s;
}

.type-radio-input:checked+.type-label {
    border-color: var(--primary-accent);
    background: rgba(124, 93, 250, 0.05);
    /* very light purple */
    color: var(--primary-accent);
}

/* TABLE STYLES */
.tbl {
    width: 100%;
    border-collapse: collapse;
}

.tbl th {
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tbl td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    font-weight: 600;
}

.tbl tr:last-child td {
    border-bottom: none;
}

/* BADGES */
.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-approved {
    background: var(--status-approved-bg-sub);
    color: var(--status-approved-text);
}

.status-pending {
    background: var(--status-pending-bg-sub);
    color: var(--status-pending-text);
}

.status-rejected {
    background: var(--status-rejected-bg-sub);
    color: var(--status-rejected-text);
}

/* STATS CARDS (Dashboard) */
.stat-card {
    background: white;
    padding: 1.5rem;
    /* Reduced from 2rem */
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
    position: relative;
    border: 1px solid #eef0f6;
}

/* Removed the ::after gradient for cleaner look */

.stat-value {
    font-size: 2rem;
    /* Reduced from 2.5rem */
    font-weight: 700;
    /* Slightly less heavy */
    color: var(--text-primary);
    margin: 0.25rem 0;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Login Page specific override */
body.login-page {
    display: block !important;
}

.login-wrap {
    background: #1e2139;
    /* Dark */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    /* Ensure full width */
}