/* ================================================================
   BoxHR – Helvetia Modern Design System
   "The Modern Archivist" — Editorial Precision Meets Violet Elegance
   ================================================================ */

/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ── Responsive System ────────────────────────────────────────── */
@import url('/assets/responsive.css');

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
    /* Brand / Primary */
    --brand-primary: #8B5CF6;
    --brand-primary-hover: #7C3AED;
    --brand-primary-pressed: #6D28D9;
    --brand-primary-light: #F5F3FF;
    --brand-primary-subtle: #EDE9FE;

    /* Surfaces */
    --surface: #FFFFFF;
    --surface-bg: #F8FAFC;
    --surface-hover: #F1F5F9;
    --surface-dark: #0F172A;

    /* Text */
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-on-primary: #FFFFFF;

    /* Semantic */
    --success: #10B981;
    --success-bg: #D1FAE5;
    --success-text: #065f46;
    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --warning-text: #92400e;
    --error: #EF4444;
    --error-bg: #FEE2E2;
    --error-text: #991b1b;
    --info: #8B5CF6;
    --info-bg: #F5F3FF;

    /* Geometry */
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Transitions */
    --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
    --duration: 0.2s;

    /* Z-Index Scale */
    --z-navbar: 30;
    --z-sidebar: 40;
    --z-dropdown: 50;
    --z-modal-overlay: 200;
    --z-modal: 210;
    --z-mobile-overlay: 999;
    --z-mobile-sidebar: 1000;
    --z-toast: 1050;
}

/* ── Base Typography ──────────────────────────────────────────── */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    font-weight: 700;
}

/* Labels / technical data */
.label-uppercase {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* ── Gradient Text ────────────────────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 40%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Glassmorphism ────────────────────────────────────────────── */
.glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Custom Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Primary Button ───────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    transition: all 0.25s var(--ease-out);
    box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.25), 0 2px 4px -1px rgba(139, 92, 246, 0.15);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.35), 0 4px 6px -2px rgba(139, 92, 246, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

/* ── Secondary Button ─────────────────────────────────────────── */
.btn-secondary {
    border: 1.5px solid #E2E8F0;
    background: white;
    border-radius: var(--radius);
    transition: all 0.2s var(--ease-out);
}

.btn-secondary:hover {
    background: var(--surface-bg);
    border-color: #CBD5E1;
}

/* ── Card Lift ────────────────────────────────────────────────── */
.hover-lift {
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(0, 0, 0, 0.05);
}

/* ── Premium Input Fields ─────────────────────────────────────── */
.input-premium {
    transition: all 0.25s var(--ease-out);
    background: var(--surface-bg);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
}

.input-premium:hover {
    background: var(--surface-hover);
    border-color: #CBD5E1;
}

.input-premium:focus {
    background: white;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    outline: none;
}

/* ================================================================
   TAILWIND BLUE → VIOLET OVERRIDES
   Intercepts Tailwind CDN classes globally so every page picks
   up the new violet primary without individual file edits.
   ================================================================ */

/* ── Backgrounds ──────────────────────────────────────────────── */
.bg-blue-50  { background-color: #F5F3FF !important; }
.bg-blue-100 { background-color: #EDE9FE !important; }
.bg-blue-200 { background-color: #DDD6FE !important; }
.bg-blue-500 { background-color: #8B5CF6 !important; }
.bg-blue-600 { background-color: #8B5CF6 !important; }
.bg-blue-700 { background-color: #7C3AED !important; }
.bg-blue-800 { background-color: #6D28D9 !important; }

.hover\:bg-blue-50:hover  { background-color: #F5F3FF !important; }
.hover\:bg-blue-100:hover { background-color: #EDE9FE !important; }
.hover\:bg-blue-600:hover { background-color: #7C3AED !important; }
.hover\:bg-blue-700:hover { background-color: #6D28D9 !important; }
.hover\:bg-blue-800:hover { background-color: #5B21B6 !important; }

/* ── Text ─────────────────────────────────────────────────────── */
.text-blue-400 { color: #A78BFA !important; }
.text-blue-500 { color: #8B5CF6 !important; }
.text-blue-600 { color: #8B5CF6 !important; }
.text-blue-700 { color: #7C3AED !important; }
.text-blue-800 { color: #6D28D9 !important; }

.hover\:text-blue-600:hover { color: #8B5CF6 !important; }
.hover\:text-blue-700:hover { color: #7C3AED !important; }
.hover\:text-blue-800:hover { color: #6D28D9 !important; }

/* ── Borders ──────────────────────────────────────────────────── */
.border-blue-500 { border-color: #8B5CF6 !important; }
.border-blue-600 { border-color: #8B5CF6 !important; }
.border-blue-700 { border-color: #7C3AED !important; }

/* ── Focus rings / borders (form inputs) ──────────────────────── */
.focus\:ring-blue-500:focus   { --tw-ring-color: rgba(139, 92, 246, 0.5) !important; }
.focus\:border-blue-500:focus { border-color: #8B5CF6 !important; }
.ring-blue-500                { --tw-ring-color: rgba(139, 92, 246, 0.5) !important; }

/* ── Divide ───────────────────────────────────────────────────── */
.divide-blue-500 > * + * { border-color: #8B5CF6 !important; }

/* ================================================================
   SHARED COMPONENTS — single source of truth, applied globally
   ================================================================ */

/* ── Card ─────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ── Danger Button ────────────────────────────────────────────── */
.btn-danger {
    background: var(--error);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease-out);
}
.btn-danger:hover  { background: #dc2626; }
.btn-danger:active { transform: scale(0.98); }

/* ── Standard padding for all btn-* classes ───────────────────── */
.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    white-space: nowrap;
}

/* ── Standard Form Input ──────────────────────────────────────── */
.form-input,
input[type="text"]:not(.no-global),
input[type="email"]:not(.no-global),
input[type="password"]:not(.no-global),
input[type="number"]:not(.no-global),
input[type="date"]:not(.no-global),
input[type="time"]:not(.no-global),
input[type="tel"]:not(.no-global),
textarea:not(.no-global),
select:not(.no-global) {
    transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.form-input:focus,
input[type="text"]:not(.no-global):focus,
input[type="email"]:not(.no-global):focus,
input[type="password"]:not(.no-global):focus,
input[type="number"]:not(.no-global):focus,
input[type="date"]:not(.no-global):focus,
input[type="time"]:not(.no-global):focus,
input[type="tel"]:not(.no-global):focus,
textarea:not(.no-global):focus,
select:not(.no-global):focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
    outline: none;
}

/* ── Status Badges ────────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.5;
}
/* Green — success states */
.status-badge.approved,
.status-badge.hired,
.status-badge.published,
.status-badge.clock-in  { background-color: var(--success-bg); color: var(--success-text); }
/* Yellow — warning / in-progress states */
.status-badge.pending,
.status-badge.reviewed,
.status-badge.break-start { background-color: var(--warning-bg); color: var(--warning-text); }
/* Red — rejected / closed states */
.status-badge.rejected,
.status-badge.closed,
.status-badge.clock-out { background-color: var(--error-bg); color: var(--error-text); }
/* Blue — informational states */
.status-badge.processed,
.status-badge.new,
.status-badge.break-end { background-color: #dbeafe; color: #1e40af; }
/* Violet — premium / interview states */
.status-badge.paid,
.status-badge.interview { background-color: var(--brand-primary-subtle); color: #5b21b6; }
/* Gray — neutral / open / draft states */
.status-badge.open,
.status-badge.draft,
.status-badge.cancelled { background-color: #f3f4f6; color: #1f2937; }

/* ── Toast ────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    background: var(--success);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: var(--z-toast);
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
    margin: 0 auto;
    font-size: 0.875rem;
    font-weight: 500;
}
@media (min-width: 640px) {
    .toast { left: auto; margin: 0; }
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ── Grid Utilities ───────────────────────────────────────────── */
/* Responsive 2-column grid — stays 2-col max (for modals/panels) */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 640px) {
    .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Page Header ──────────────────────────────────────────────── */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
@media (max-width: 640px) {
    .page-header {
        padding: 0.875rem 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .header-left {
        width: 100%;
        justify-content: space-between;
    }
    .header-actions { width: 100%; }
}
