/**
 * ARTATALENT — Fluid Human-Centered Design System
 * Modern, refined, warm, professional HR software aesthetic
 */

:root {
    /* Layout Dimensions */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 78px;
    --topbar-height: 64px;

    /* Primary Accent Palette */
    --color-primary-50: #f0f9ff;
    --color-primary-100: #e0f2fe;
    --color-primary-200: #bae6fd;
    --color-primary-300: #7dd3fc;
    --color-primary-400: #38bdf8;
    --color-primary-500: #0ea5e9;
    --color-primary-600: #0284c7;
    --color-primary-700: #0369a1;
    --color-primary-800: #075985;
    --color-primary-900: #0c4a6e;

    /* Deep Navy & Slate */
    --color-navy-950: #060913;
    --color-navy-900: #0b1120;
    --color-navy-850: #0f172a;
    --color-navy-800: #131d35;
    --color-navy-700: #1e293b;
    --color-slate-600: #475569;
    --color-slate-500: #64748b;
    --color-slate-400: #94a3b8;
    --color-slate-300: #cbd5e1;
    --color-slate-200: #e2e8f0;
    --color-slate-100: #f1f5f9;
    --color-slate-50: #f8fafc;
    --color-white: #ffffff;

    /* Semantic Accents */
    --color-emerald: #10b981;
    --color-emerald-bg: #ecfdf5;
    --color-emerald-border: #a7f3d0;
    --color-emerald-text: #065f46;

    --color-amber: #f59e0b;
    --color-amber-bg: #fffbeb;
    --color-amber-border: #fde68a;
    --color-amber-text: #92400e;

    --color-rose: #f43f5e;
    --color-rose-bg: #fff1f2;
    --color-rose-border: #fecdd3;
    --color-rose-text: #9f1239;

    --color-indigo: #6366f1;
    --color-indigo-bg: #eef2ff;
    --color-indigo-border: #c7d2fe;
    --color-indigo-text: #3730a3;

    --color-purple: #8b5cf6;
    --color-purple-bg: #f5f3ff;
    --color-purple-border: #ddd6fe;
    --color-purple-text: #5b21b6;

    --color-teal: #14b8a6;
    --color-teal-bg: #f0fdfa;
    --color-teal-border: #99f6e4;
    --color-teal-text: #115e59;

    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Soft Realistic Shadows */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
    --shadow-glow: 0 4px 14px rgba(14, 165, 233, 0.25);

    /* Radius */
    --radius-xs: 0.35rem;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.75rem;
    --radius-full: 9999px;

    /* Transition & Dynamics */
    --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);

    /* Theme Base Defaults (Light) */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;
    --border-color: #e2e8f0;
    --border-card: rgba(226, 232, 240, 0.85);
    --border-input: #cbd5e1;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-subtle: #f8fafc;
    --bg-input: #ffffff;
    --bg-hover: #f1f5f9;
    --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
}

/* ====================================================
   DARK THEME VARIABLE OVERRIDES
   ==================================================== */
[data-theme="dark"] {
    --color-navy-950: #ffffff;
    --color-navy-900: #f8fafc;
    --color-navy-850: #e2e8f0;
    --color-navy-800: #cbd5e1;
    --color-navy-700: #94a3b8;
    --color-slate-600: #cbd5e1;
    --color-slate-500: #94a3b8;
    --color-slate-400: #64748b;
    --color-slate-300: #334155;
    --color-slate-200: #1e293b;
    --color-slate-100: #0f172a;
    --color-slate-50: #0a0f1d;
    --color-white: #ffffff;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;
    --border-color: rgba(255, 255, 255, 0.12);
    --border-card: rgba(255, 255, 255, 0.09);
    --border-input: rgba(255, 255, 255, 0.18);
    --bg-body: #070b14;
    --bg-card: #0d1527;
    --bg-card-subtle: #111a2e;
    --bg-input: #111a2e;
    --bg-hover: rgba(255, 255, 255, 0.06);
    --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"],
body[data-theme="dark"],
[data-theme="dark"] body {
    background-color: var(--bg-body);
    color: var(--text-main);
}

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

svg {
    max-width: 100%;
    vertical-align: middle;
}

/* Hard constraint: icons across the entire app NEVER expand or break layouts */
.header-banner-icon,
.topbar-user-avatar,
.btn-icon-round,
.hub-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

.header-banner-icon svg,
.page-header-banner svg:not(.btn svg),
.header-banner-left svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.hub-btn svg {
    width: 17px !important;
    height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.mobile-nav-item svg {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex-shrink: 0 !important;
}

.mobile-nav-center-btn svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    flex-shrink: 0 !important;
}

.topbar svg, 
.sidebar svg, 
.btn svg, 
.profile-menu-item svg, 
.quick-add-item svg, 
.notification-icon-box svg,
.topbar-profile-btn svg {
    max-width: 24px !important;
    max-height: 24px !important;
    flex-shrink: 0 !important;
}


/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.6);
}

html {
    font-size: 15px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--color-navy-850);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-navy-900);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; }
h4 { font-size: 0.95rem; font-weight: 600; }

p {
    color: var(--color-slate-500);
    line-height: 1.6;
}

a {
    color: var(--color-primary-600);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-primary-700);
}

/* Fluid Inputs & Controls */
.form-group {
    margin-bottom: 1.15rem;
}

label, .form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main, #334155);
    margin-bottom: 0.4rem;
}

label .required, .form-label .required {
    color: var(--color-rose);
    margin-left: 3px;
    font-weight: 700;
}

.form-text {
    font-size: 0.75rem;
    color: var(--text-muted, var(--color-slate-400));
    margin-top: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"],
input[type="file"],
select,
textarea,
.form-control {
    width: 100%;
    padding: 0.65rem 0.95rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--text-main, #0f172a);
    background-color: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    transition: var(--transition);
    outline: none;
    box-shadow: var(--shadow-xs);
}

input:hover,
select:hover,
textarea:hover,
.form-control:hover {
    border-color: var(--color-primary-400);
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus {
    border-color: var(--color-primary-500);
    background-color: var(--bg-input);
    box-shadow: 0 0 0 3.5px rgba(14, 165, 233, 0.2);
}

input::placeholder,
textarea::placeholder,
.form-control::placeholder {
    color: var(--text-muted, var(--color-slate-400));
    font-weight: 400;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 14px;
    padding-right: 2.35rem;
    cursor: pointer;
}

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

/* Checkbox & Radio */
.checkbox-label, .radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-navy-700);
    cursor: pointer;
    user-select: none;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--color-primary-600);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: var(--transition);
}

/* Fluid Buttons with Tactile Micro-Interactions */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    line-height: 1.25;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.38);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-main);
    border-color: var(--border-card);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--bg-hover);
    border-color: var(--color-primary-400);
    color: var(--color-primary-600);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}

.btn-danger:hover:not(:disabled) {
    background-color: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.28);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.28);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.38);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.775rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.8rem 1.6rem;
    font-size: 0.95rem;
    border-radius: var(--radius-lg);
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-slate-400); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
