/* ========================================================================
   Talent Intelligence Platform - Premium UI
   ======================================================================== */

/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Variables */
:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Primary palette */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;

    /* Sidebar */
    --sidebar-width: 264px;
    --sidebar-bg: #0f172a;
    --sidebar-border: rgba(255,255,255,0.06);
    --sidebar-text: #94a3b8;
    --sidebar-text-hover: #e2e8f0;
    --sidebar-active-bg: rgba(99,102,241,0.12);
    --sidebar-active-text: #a5b4fc;
    --sidebar-heading: #475569;

    /* Semantic */
    --success: #059669;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --warning-border: #fde68a;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;
    --info: #0284c7;
    --info-light: #f0f9ff;
    --info-border: #bae6fd;

    /* Neutrals */
    --white: #ffffff;
    --gray-25: #fcfcfd;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --gray-950: #030712;

    /* Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-ring: 0 0 0 3px rgba(79,70,229,0.15);

    /* Transitions */
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 250ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Theme-aware (replacements for hardcoded values) */
    --primary-shadow: rgba(79,70,229,0.3);
    --brand-gradient-from: #6366f1;
    --brand-gradient-to: #8b5cf6;
    --brand-text-accent: #a5b4fc;
    --sidebar-link-hover-bg: rgba(255,255,255,0.06);
    --sidebar-user-name-color: #e2e8f0;
    --auth-bg-from: #0f172a;
    --auth-bg-mid: #1e1b4b;
    --auth-bg-to: #312e81;
}

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font);
    font-size: 14px;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
    letter-spacing: -0.006em;
}

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

/* ======================== Sidebar ======================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-brand {
    padding: 24px 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--brand-gradient-from), var(--brand-gradient-to));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand .brand-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.sidebar-brand .brand-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--sidebar-user-name-color);
    letter-spacing: -0.02em;
}

.sidebar-brand .brand-text span {
    color: var(--brand-text-accent);
    font-weight: 500;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-heading {
    padding: 20px 12px 8px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-heading);
    user-select: none;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 450;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    position: relative;
    margin-bottom: 2px;
    text-decoration: none;
}

.sidebar-link:hover {
    background: var(--sidebar-link-hover-bg);
    color: var(--sidebar-text-hover);
    text-decoration: none;
}

.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    font-weight: 500;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary-500);
    border-radius: 0 3px 3px 0;
}

.sidebar-link .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.55;
}

.sidebar-link:hover .nav-icon,
.sidebar-link.active .nav-icon {
    opacity: 1;
}

.sidebar-link .nav-icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-user {
    padding: 16px 16px;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sidebar-user .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-gradient-from), var(--brand-gradient-to));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-user .user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--sidebar-user-name-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 11px;
    color: var(--sidebar-heading);
    text-transform: capitalize;
}

/* ======================== Main Content ======================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: var(--gray-50);
}

/* ======================== Topbar ======================== */
.topbar {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 0 32px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-left .page-title-bar {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-right .btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}

.topbar-right .btn-logout:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

/* Org Switcher (Super Admin) */
.org-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.org-switcher-select {
    padding: 5px 28px 5px 10px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    font-size: 13px;
    font-family: var(--font);
    color: var(--gray-700);
    cursor: pointer;
    max-width: 220px;
}
.org-switcher-select:focus {
    outline: none;
    border-color: var(--primary-500, var(--primary));
    box-shadow: var(--shadow-ring);
}

/* ======================== Content Area ======================== */
.content {
    padding: 28px 32px 40px;
}

/* Small-screen blocker — shown below 1300px */
.small-screen-blocker {
    display: none;
    position: fixed; inset: 0; z-index: 99999;
    background: #fff;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 40px;
}
.small-screen-blocker svg { color: var(--primary); margin-bottom: 16px; }
.small-screen-blocker h2 { font-size: 20px; margin-bottom: 8px; color: var(--gray-900); }
.small-screen-blocker p { color: var(--gray-500); font-size: 14px; max-width: 360px; line-height: 1.6; }
@media (max-width: 1299px) {
    .small-screen-blocker { display: flex; }
    .sidebar, .main-content { display: none; }
}

/* ======================== Page Header ======================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

/* ======================== Cards ======================== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 0;
    margin-bottom: 24px;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.card-body {
    padding: 24px;
}

.card-padded {
    padding: 24px;
}

.card-header {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: -0.01em;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-25);
}

/* Legacy: cards that have direct form children */
.card > form,
.card > .form-body {
    padding: 24px;
}

/* ======================== Stats Grid ======================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 24px;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.primary::before { background: linear-gradient(90deg, var(--primary), var(--primary-500)); }
.stat-card.success::before { background: linear-gradient(90deg, var(--success), #34d399); }
.stat-card.warning::before { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.stat-card.info::before { background: linear-gradient(90deg, var(--info), #38bdf8); }
.stat-card.danger::before { background: linear-gradient(90deg, var(--danger), #f87171); }

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 6px;
    font-weight: 450;
}

/* Dashboard Stats Strip */
.dash-stats {
    display: flex;
    gap: 0;
}

.dash-stat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    position: relative;
    transition: background 0.15s ease;
}

.dash-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 16px;
    bottom: 16px;
    width: 1px;
    background: var(--gray-200);
}

.dash-stat:hover {
    background: var(--gray-50);
}

.dash-stat:first-child:hover { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.dash-stat:last-child:hover { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }

.dash-stat__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-stat__icon--primary { background: var(--primary-light); color: var(--primary); }
.dash-stat__icon--success { background: var(--success-light); color: var(--success); }
.dash-stat__icon--warning { background: var(--warning-light); color: var(--warning); }
.dash-stat__icon--info { background: var(--info-light); color: var(--info); }

.dash-stat__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-stat__value {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.dash-stat__label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 450;
    line-height: 1.3;
}

.dash-stat__sub {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
    margin-left: auto;
    white-space: nowrap;
    background: var(--gray-50);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
}

/* ======================== Tables ======================== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 12px 24px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-500);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

th.sortable { cursor: pointer; user-select: none; }
th.sortable a { color: var(--gray-500); text-decoration: none; display: flex; align-items: center; gap: 4px; }
th.sortable a:hover { color: var(--gray-800); }
th.sortable.sorted { background: var(--gray-100); color: var(--gray-800); }
th.sortable.sorted a { color: var(--gray-800); font-weight: 700; }
.sort-arrow { font-size: 10px; line-height: 1; }

td {
    padding: 14px 24px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13.5px;
    color: var(--gray-700);
}

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

tbody tr {
    transition: background var(--transition);
}

tbody tr:hover td {
    background: var(--gray-50);
}

td a {
    font-weight: 500;
}

/* ======================== Forms ======================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-size: 13px;
}

.form-control {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    color: var(--gray-800);
    background: var(--white);
    transition: all var(--transition);
    line-height: 40px;
    box-sizing: border-box;
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:hover {
    border-color: var(--gray-400);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-ring);
}

textarea.form-control {
    height: auto;
    min-height: 100px;
    padding: 10px 14px;
    line-height: 1.5;
    resize: vertical;
}

/* Custom styled select */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

select.form-control:focus {
    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='%234f46e5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-error {
    color: var(--danger);
    font-size: 12px;
    margin-top: 6px;
}

.form-hint {
    color: var(--gray-400);
    font-size: 12px;
    margin-top: 6px;
}

/* ======================== Buttons ======================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 1px 2px var(--primary-shadow);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 2px 4px var(--primary-shadow); color: var(--white); }

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--gray-800); }

.btn-success { background: var(--success); color: var(--white); box-shadow: 0 1px 2px rgba(5,150,105,0.3); }
.btn-success:hover { background: #047857; color: var(--white); }

.btn-danger { background: var(--danger); color: var(--white); box-shadow: 0 1px 2px rgba(220,38,38,0.3); }
.btn-danger:hover { background: #b91c1c; color: var(--white); }

.btn-warning { background: var(--warning); color: var(--white); box-shadow: 0 1px 2px rgba(217,119,6,0.3); }
.btn-warning:hover { background: #b45309; color: var(--white); }

.btn-ghost { background: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }

.btn svg { width: 16px; height: 16px; }

/* ======================== Badges ======================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-blue { background: var(--primary-50); color: var(--primary-700); }
.badge-yellow { background: var(--warning-light); color: #92400e; border: 1px solid var(--warning-border); }
.badge-purple { background: #f5f3ff; color: #6d28d9; }
.badge-orange { background: #fff7ed; color: #c2410c; }
.badge-green { background: var(--success-light); color: #065f46; border: 1px solid var(--success-border); }
.badge-red { background: var(--danger-light); color: #991b1b; border: 1px solid var(--danger-border); }
.badge-primary { background: var(--primary); color: var(--white); }

/* Inline Stage Dropdown */
.stage-select {
    appearance: none; -webkit-appearance: none;
    border: 1px solid transparent; border-radius: 9999px;
    font-size: 12px; font-weight: 500; cursor: pointer;
    padding: 4px 26px 4px 10px; line-height: 1.4;
    background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    transition: border-color 0.15s, box-shadow 0.15s;
}
.stage-select:hover { border-color: var(--gray-300); }
.stage-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-50); }
.stage-select.stage-applied { background-color: var(--gray-100); color: var(--gray-600); }
.stage-select.stage-ai_shortlisted { background-color: var(--primary-50); color: var(--primary-700); }
.stage-select.stage-hr_screening { background-color: var(--warning-light); color: #92400e; }
.stage-select.stage-technical_round_1,
.stage-select.stage-technical_round_2 { background-color: #f5f3ff; color: #6d28d9; }
.stage-select.stage-offer { background-color: #fff7ed; color: #c2410c; }
.stage-select.stage-hired { background-color: var(--success-light); color: #065f46; }
.stage-select.stage-rejected { background-color: var(--danger-light); color: #991b1b; }
.stage-select.saving { opacity: 0.6; pointer-events: none; }

/* ======================== Tags ======================== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--primary-50);
    color: var(--primary-700);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--primary-200);
}

.tag .tag-remove {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    margin-left: 2px;
    opacity: 0.5;
    transition: opacity var(--transition);
}

.tag .tag-remove:hover { opacity: 1; }

.tag-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    min-height: 44px;
    cursor: text;
    transition: all var(--transition);
    background: var(--white);
}

.tag-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-ring);
}

.tag-input-wrapper input {
    border: none;
    outline: none;
    flex: 1;
    min-width: 140px;
    font-size: 14px;
    font-family: var(--font);
    color: var(--gray-800);
    background: transparent;
}

.tag-input-wrapper input::placeholder { color: var(--gray-400); }

/* ======================== Alerts ======================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 450;
}

.alert-success { background: var(--success-light); color: #065f46; border: 1px solid var(--success-border); }
.alert-error { background: var(--danger-light); color: #991b1b; border: 1px solid var(--danger-border); }
.alert-info { background: var(--info-light); color: #075985; border: 1px solid var(--info-border); }

.alert .alert-close {
    cursor: pointer;
    font-size: 18px;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    transition: opacity var(--transition);
    padding: 0;
    line-height: 1;
}
.alert .alert-close:hover { opacity: 1; }

/* ======================== Modal ======================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 0;
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    font-size: 17px;
    font-weight: 600;
    padding: 24px 24px 0;
    color: var(--gray-900);
}

.modal-body { padding: 20px 24px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-25);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ======================== Pagination ======================== */
.pagination {
    display: flex;
    gap: 4px;
    margin-top: 16px;
    justify-content: center;
    padding: 16px 24px;
}

.pagination a, .pagination span {
    padding: 7px 13px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--gray-600);
    background: var(--white);
    transition: all var(--transition);
    font-weight: 450;
}

.pagination a:hover { background: var(--gray-50); text-decoration: none; border-color: var(--gray-300); }
.pagination .active span { background: var(--primary); color: var(--white); border-color: var(--primary); }
.pagination .disabled span { color: var(--gray-300); background: var(--gray-50); }

/* ======================== Score Display ======================== */
.score { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.score.high { color: var(--success); }
.score.medium { color: var(--warning); }
.score.low { color: var(--danger); }

/* ======================== Pipeline Bar ======================== */
.pipeline-bar {
    display: flex;
    gap: 2px;
    height: 28px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 8px 0;
}

.pipeline-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 30px;
}

/* ======================== Auth Layout ======================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--auth-bg-from) 0%, var(--auth-bg-mid) 50%, var(--auth-bg-to) 100%);
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='g' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='30' cy='30' r='0.8' fill='rgba(255,255,255,0.03)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23g)'/%3E%3C/svg%3E");
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 90%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.auth-card h1 { font-size: 24px; font-weight: 700; margin-bottom: 6px; color: var(--gray-900); letter-spacing: -0.03em; }
.auth-card > p { color: var(--gray-500); margin-bottom: 28px; font-size: 14px; }

/* ======================== Profile Hero ======================== */
.profile-hero {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-hero .avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand-gradient-from), var(--brand-gradient-to));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.profile-hero .profile-info { flex: 1; min-width: 0; }

.profile-hero .profile-info h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.025em;
    margin-bottom: 6px;
}

.profile-hero .profile-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-hero .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--gray-500);
    font-weight: 450;
}

.profile-hero .meta-item svg {
    width: 15px;
    height: 15px;
    opacity: 0.6;
    flex-shrink: 0;
}

/* ======================== Action Bar ======================== */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-700);
    transition: all var(--transition);
    text-decoration: none;
    min-height: 44px;
    box-shadow: var(--shadow-xs);
    white-space: nowrap;
}

.action-btn:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--gray-800);
    transform: translateY(-1px);
}

.action-btn:active { transform: translateY(0); }

.action-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.65;
}

.action-btn.action-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 1px 3px var(--primary-shadow);
}
.action-btn.action-primary:hover {
    background: var(--primary-hover);
    color: white;
    box-shadow: 0 4px 8px var(--primary-shadow);
}
.action-btn.action-primary svg { opacity: 0.9; }

.action-btn.action-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
    box-shadow: 0 1px 3px rgba(5,150,105,0.3);
}
.action-btn.action-success:hover {
    background: #047857;
    color: white;
    box-shadow: 0 4px 8px rgba(5,150,105,0.3);
}
.action-btn.action-success svg { opacity: 0.9; }

.action-btn.action-danger {
    color: var(--danger);
    border-color: var(--danger-border);
    background: var(--white);
}
.action-btn.action-danger:hover {
    background: var(--danger-light);
    border-color: var(--danger);
}
.action-btn.action-danger svg { opacity: 0.8; }

.action-btn.action-warning {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
    box-shadow: 0 1px 3px rgba(217,119,6,0.3);
}
.action-btn.action-warning:hover {
    background: #b45309;
    color: white;
}
.action-btn.action-warning svg { opacity: 0.9; }

/* ======================== Card Header with Icon ======================== */
.card-header-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.card-header-icon svg {
    width: 18px;
    height: 18px;
    color: var(--primary-500);
    flex-shrink: 0;
}

/* ======================== Detail Sections ======================== */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-item label {
    font-size: 11.5px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.detail-item .value {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 500;
}

/* Detail list - row style with icons */
.detail-list {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--gray-100);
    gap: 12px;
}

.detail-row:last-child { border-bottom: none; }

.detail-row .row-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-row .row-icon svg {
    width: 18px;
    height: 18px;
    color: var(--gray-500);
}

.detail-row .row-content { flex: 1; min-width: 0; }

.detail-row .row-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 2px;
}

.detail-row .row-value {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 500;
}

/* ======================== Content Description ======================== */
.content-prose {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-700);
    white-space: pre-wrap;
}

.section-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label svg { width: 14px; height: 14px; opacity: 0.6; }

/* ======================== AI Analysis ======================== */
.ai-section {
    background: linear-gradient(135deg, var(--primary-50), #faf5ff);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 16px 0;
    border: 1px solid var(--primary-200);
}

.ai-section h3 {
    color: var(--primary-700);
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-score-hero {
    text-align: center;
    padding: 24px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-50), #faf5ff);
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-200);
}

.ai-score-hero .score {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.ai-score-hero .score-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 6px;
    font-weight: 500;
}

.ai-strengths-concerns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.ai-strengths-concerns .sc-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-strengths-concerns .sc-section h4 svg { width: 16px; height: 16px; }

.ai-strengths-concerns .sc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-strengths-concerns .sc-list li {
    font-size: 13px;
    color: var(--gray-600);
    padding: 5px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.ai-strengths-concerns .sc-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 7px;
    flex-shrink: 0;
}

.sc-section.strengths .sc-list li::before { background: var(--success); }
.sc-section.concerns .sc-list li::before { background: var(--warning); }

.skill-bar { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.skill-bar .label { min-width: 110px; font-size: 13px; font-weight: 500; color: var(--gray-700); }
.skill-bar .bar { flex: 1; height: 8px; background: var(--gray-200); border-radius: 9999px; overflow: hidden; }
.skill-bar .bar .fill { height: 100%; border-radius: 9999px; background: linear-gradient(90deg, var(--primary), var(--primary-500)); transition: width 0.5s ease; }
.skill-bar .percent { min-width: 40px; text-align: right; font-size: 13px; font-weight: 600; color: var(--gray-800); }

/* ======================== Table Action Buttons ======================== */
.table-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.table-actions .btn { min-height: 36px; padding: 6px 14px; }

/* ======================== Status Indicator ======================== */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.active { background: var(--success); box-shadow: 0 0 0 3px rgba(5,150,105,0.15); }
.status-dot.inactive { background: var(--gray-400); }

/* ======================== Upload Area ======================== */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
    background: var(--gray-25);
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.upload-area .upload-icon {
    color: var(--gray-400);
    margin-bottom: 8px;
}

.upload-area .upload-icon svg { width: 28px; height: 28px; }

/* ======================== AI Upload Area ======================== */
.ai-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gray-25);
}

.ai-upload-area:hover,
.ai-upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-50);
}

.ai-upload-area .upload-loading,
.ai-upload-area .upload-success {
    pointer-events: none;
}

.ai-upload-area.loading {
    cursor: default;
    border-color: var(--primary-200);
    background: var(--primary-50);
}

.ai-upload-area.success {
    cursor: default;
    border-color: var(--success-border);
    background: var(--success-light);
}

/* ======================== Sprint Spreadsheet Upload ======================== */
.sprint-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gray-25);
}
.sprint-upload-area:hover,
.sprint-upload-area.drag-over {
    border-color: var(--primary);
    background: var(--primary-50);
}
.sprint-upload-area svg { color: var(--gray-400); }
.sprint-upload-area:hover svg,
.sprint-upload-area.drag-over svg { color: var(--primary); }

.sprint-file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}
.sprint-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.sprint-file-item svg { color: var(--primary); flex-shrink: 0; }
.sprint-file-name { font-weight: 500; color: var(--gray-700); }
.sprint-file-size { color: var(--gray-500); font-size: 12px; margin-left: auto; }
.sprint-file-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
    margin-left: 8px;
}
.sprint-file-remove:hover { color: var(--red-600); }

.sprint-sheets-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sprint-sheet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
}
.sprint-sheet-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sprint-sheet-info svg { color: var(--primary); flex-shrink: 0; }
.sprint-sheet-name { font-weight: 500; font-size: 13.5px; color: var(--gray-700); display: block; }
.sprint-sheet-meta { font-size: 12px; color: var(--gray-500); display: block; margin-top: 2px; }
.sprint-sheet-actions { display: flex; align-items: center; gap: 8px; }

/* ======================== Bulk File Upload ======================== */
.bulk-file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    max-height: 400px;
    overflow-y: auto;
}
.bulk-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
.bulk-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 28px;
    background: var(--primary-100);
    color: var(--primary);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.bulk-file-name { font-weight: 500; color: var(--gray-700); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-file-size { color: var(--gray-500); font-size: 12px; flex-shrink: 0; }
.bulk-file-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0 4px;
    flex-shrink: 0;
}
.bulk-file-remove:hover { color: var(--red-600); }
.bulk-file-count {
    margin-top: 12px;
    padding: 8px 14px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
}

/* ======================== Candidate Search Typeahead ======================== */
.candidate-search-wrap { position: relative; }
.candidate-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--gray-300);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
}
.candidate-search-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
}
.candidate-search-item:last-child { border-bottom: none; }
.candidate-search-item:hover { background: var(--primary-50); }
.candidate-search-name { font-weight: 600; font-size: 14px; color: var(--gray-800); }
.candidate-search-meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.candidate-search-empty { padding: 12px 14px; color: var(--gray-500); font-size: 13px; text-align: center; }

.selected-candidate-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius);
    margin-bottom: 16px;
}
.selected-candidate-name { font-weight: 600; font-size: 14px; color: var(--gray-800); }
.selected-candidate-meta { font-size: 12px; color: var(--gray-500); margin-top: 2px; }

/* ======================== Apply to Jobs List ======================== */
.apply-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
}
.apply-job-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.apply-job-option:hover { background: var(--primary-50); border-color: var(--primary-200); }
.apply-job-option input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--primary); }
.apply-job-title { font-weight: 500; font-size: 14px; color: var(--gray-700); flex: 1; }

.spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ======================== Notes Block ======================== */
.notes-block {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 16px;
    border-left: 3px solid var(--primary-200);
    margin-top: 12px;
}

.notes-block p {
    font-size: 13.5px;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* ======================== KPI / Stat Cards ======================== */
.kpi-row { display: flex; gap: 16px; flex-wrap: wrap; }
.kpi-card { flex: 1; min-width: 120px; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 16px 20px; }
.kpi-value { font-size: 28px; font-weight: 700; color: var(--gray-900); line-height: 1.1; }
.kpi-label { font-size: 12px; color: var(--gray-500); margin-top: 4px; font-weight: 500; }

/* ======================== Filter Bar ======================== */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar form { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; width: 100%; }
select.form-control.filter-select {
    width: 100px !important;
    min-width: 0 !important;
    flex: 0 0 100px !important;
    height: 36px !important;
    font-size: 13px !important;
    padding: 0 24px 0 8px !important;
    line-height: 36px !important;
    box-sizing: border-box !important;
    background-position: right 4px center !important;
    background-size: 13px !important;
}
input.form-control.filter-input {
    flex: 1 1 auto !important;
    min-width: 150px !important;
    width: auto !important;
    height: 36px !important;
    font-size: 13px !important;
    padding: 0 10px !important;
    line-height: 36px !important;
    box-sizing: border-box !important;
}
button.btn.filter-btn {
    height: 36px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    line-height: 36px !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* ======================== Empty State ======================== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray-400);
}

.empty-state svg {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state p { font-size: 15px; font-weight: 450; }
.empty-state .empty-hint { font-size: 13px; margin-top: 6px; }

/* ======================== Star Rating ======================== */
.star-rating {
    display: inline-flex;
    gap: 2px;
    color: var(--warning);
}

.star-rating svg { width: 16px; height: 16px; }
.star-rating .empty { color: var(--gray-300); }

/* ======================== Utilities ======================== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-muted { color: var(--gray-500); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.divider { height: 1px; background: var(--gray-200); margin: 20px 0; }

/* ======================== Custom Dropdown ======================== */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown select.form-control {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

.dropdown-trigger {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    color: var(--gray-800);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all var(--transition);
    line-height: 1.5;
    min-height: 42px;
    user-select: none;
}

.dropdown-trigger:hover {
    border-color: var(--gray-400);
}

.dropdown-trigger.open {
    border-color: var(--primary);
    box-shadow: var(--shadow-ring);
}

.dropdown-trigger-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-trigger-text.placeholder {
    color: var(--gray-400);
}

.dropdown-trigger-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    transition: transform var(--transition);
}

.dropdown-trigger.open .dropdown-trigger-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 200;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 200ms ease, opacity 150ms ease, transform 150ms ease;
    pointer-events: none;
}

.dropdown-menu.open {
    max-height: 280px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    overflow-y: auto;
}

.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.dropdown-search {
    position: sticky;
    top: 0;
    padding: 8px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    z-index: 1;
}

.dropdown-search input {
    width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 13px;
    font-family: var(--font);
    color: var(--gray-800);
    outline: none;
    transition: border-color var(--transition);
}

.dropdown-search input::placeholder {
    color: var(--gray-400);
}

.dropdown-search input:focus {
    border-color: var(--primary);
}

.dropdown-option {
    padding: 9px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
    transition: background var(--transition), color var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-option:first-child:not(.dropdown-search ~ .dropdown-option) {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dropdown-option:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.dropdown-option:hover,
.dropdown-option.highlighted {
    background: var(--primary-50);
    color: var(--gray-900);
}

.dropdown-option.selected {
    color: var(--primary);
    font-weight: 500;
    background: var(--primary-50);
}

.dropdown-option.selected::after {
    content: '';
    margin-left: auto;
    width: 16px;
    height: 16px;
    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='%234f46e5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.dropdown-option.hidden {
    display: none;
}

.dropdown-no-results {
    padding: 12px 14px;
    color: var(--gray-400);
    font-size: 13px;
    text-align: center;
}

/* Dropdown inside modals needs higher z-index */
.modal .dropdown-menu {
    z-index: 300;
}

/* Dropdown opening upward when near bottom */
.custom-dropdown.dropup .dropdown-menu {
    top: auto;
    bottom: calc(100% + 4px);
}

/* ======================== Tabs ======================== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 24px;
}

.tab {
    padding: 12px 20px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font);
}

.tab:hover {
    color: var(--gray-700);
    background: var(--gray-50);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.tab.active svg {
    opacity: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ======================== Signal Bars ======================== */
.signal-bar {
    width: 80px;
    height: 6px;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}

.signal-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease;
}

/* ======================== Spinner ======================== */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ======================== Responsive ======================== */
@media (max-width: 1024px) {
    .form-row { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .ai-strengths-concerns { grid-template-columns: 1fr; }
    .action-bar { gap: 8px; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; }
    .content { padding: 20px 16px; }
    .topbar { padding: 0 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .dash-stats { flex-wrap: wrap; }
    .dash-stat { flex: 1 1 45%; min-width: 140px; }
    .dash-stat:not(:last-child)::after { display: none; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .profile-hero { flex-direction: column; align-items: stretch; }
    .action-bar { flex-direction: column; }
    .action-btn { justify-content: center; }
}

/* ========================================================================
   Scoring Rules
   ======================================================================== */
.scoring-accuracy-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.accuracy-stat { text-align: center; padding: 16px; background: var(--gray-50); border-radius: 10px; border: 1px solid var(--gray-200); }
.accuracy-value { font-size: 28px; font-weight: 700; color: var(--gray-900); }
.accuracy-label { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.accuracy-hint { font-size: 11px; color: var(--primary); margin-top: 4px; font-weight: 500; }
.scoring-info-box {
    display: flex; align-items: center; gap: 8px; padding: 12px 16px;
    background: var(--blue-50, #eff6ff); border: 1px solid var(--blue-200, #bfdbfe);
    border-radius: 8px; font-size: 13px; color: var(--blue-700, #1d4ed8);
}
.scoring-category { }
.scoring-category-title { font-size: 15px; font-weight: 600; color: var(--gray-900); margin: 0 0 4px; }
.scoring-category-desc { font-size: 13px; color: var(--gray-500); margin: 0 0 16px; }
.scoring-rule-row {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    padding: 12px 0; border-bottom: 1px solid var(--gray-100);
}
.scoring-rule-row:last-child { border-bottom: none; }
.scoring-rule-info { flex: 1; min-width: 0; }
.scoring-rule-label { font-size: 14px; font-weight: 500; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.scoring-rule-desc { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.scoring-rule-slider { display: flex; align-items: center; gap: 10px; flex-shrink: 0; width: 220px; }
.weight-slider {
    -webkit-appearance: none; appearance: none; width: 160px; height: 6px;
    background: var(--gray-200); border-radius: 3px; outline: none; cursor: pointer;
}
.weight-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 18px; height: 18px;
    background: var(--primary); border-radius: 50%; cursor: pointer;
    border: 2px solid white; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.weight-slider:disabled { opacity: 0.3; cursor: not-allowed; }
.weight-slider:disabled::-webkit-slider-thumb { background: var(--gray-400); }
.weight-value { font-size: 13px; font-weight: 600; color: var(--gray-700); min-width: 36px; text-align: right; }
.scoring-normalize-hint { font-size: 12px; color: var(--gray-500); }

/* Toggle switch */
.scoring-toggle { background: none; border: none; cursor: pointer; padding: 0; display: inline-flex; align-items: center; }
.toggle-track {
    width: 32px; height: 18px; background: var(--gray-300); border-radius: 9px;
    position: relative; transition: background 0.2s;
}
.scoring-toggle.active .toggle-track { background: var(--success); }
.toggle-thumb {
    width: 14px; height: 14px; background: white; border-radius: 50%;
    position: absolute; top: 2px; left: 2px; transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.scoring-toggle.active .toggle-thumb { transform: translateX(14px); }

/* Weight proportion bar */
.weight-proportion-bar {
    height: 24px; border-radius: 6px; overflow: hidden; display: flex;
    margin-bottom: 20px; background: var(--gray-100); border: 1px solid var(--gray-200);
}
.weight-bar-segment {
    height: 100%; transition: width 0.3s ease; position: relative;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 600; color: white; overflow: hidden; white-space: nowrap;
}

/* Star picker */
.star-picker { display: flex; align-items: center; gap: 4px; }
.star-btn {
    background: none; border: none; cursor: pointer; padding: 2px;
    color: var(--gray-300); transition: color 0.15s, transform 0.15s;
}
.star-btn svg { width: 24px; height: 24px; }
.star-btn:hover { transform: scale(1.15); }
.star-btn.active svg { fill: #f59e0b; stroke: #f59e0b; color: #f59e0b; }
.star-btn.hover svg { fill: #fbbf24; stroke: #fbbf24; color: #fbbf24; }
.star-picker-label { font-size: 12px; color: var(--gray-500); margin-left: 6px; }

/* Signal group labels on application show page */
.signal-group-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--gray-500); margin: 8px 0 6px; padding-bottom: 4px;
    border-bottom: 1px solid var(--gray-100);
}
.skill-bar .bar .quality-fill { background: linear-gradient(90deg, var(--info, #0ea5e9), var(--primary)); }

/* ======================== Application Chips ======================== */
.application-chips {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.application-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 12px;
    background: var(--gray-100); color: var(--gray-700);
    font-size: 12px; font-weight: 500; text-decoration: none;
    transition: all var(--transition); border: 1px solid var(--gray-200);
}
.application-chip:hover {
    background: var(--primary-light, #e0e7ff); border-color: var(--primary);
    color: var(--primary); text-decoration: none;
}
.chip-score {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 18px; border-radius: 9px;
    font-size: 10px; font-weight: 700; color: white; padding: 0 4px;
}
.chip-score.high { background: var(--success); }
.chip-score.medium { background: var(--warning); }
.chip-score.low { background: var(--danger); }

/* ======================== Expandable Rows ======================== */
.expandable-row td { padding: 0 !important; border-top: none !important; }
.inline-analysis-panel {
    padding: 20px 24px; background: var(--gray-50);
    border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200);
}
.expand-toggle svg { transition: transform 0.2s ease; }
.expand-toggle.expanded svg { transform: rotate(180deg); }
/* Chevron-right icon in resource match rows rotates 90° to point down when expanded */
.expand-toggle .expand-icon { transition: transform 0.2s ease; }
.expand-toggle.expanded .expand-icon { transform: rotate(90deg); }

/* Compact AI score hero for inline analysis */
.ai-score-hero-compact { padding: 12px 0; }
.ai-score-hero-compact .score {
    font-size: 28px; width: 56px; height: 56px;
    margin: 0 auto; display: flex; align-items: center; justify-content: center;
}

/* ======================== Compare Toolbar ======================== */
.compare-toolbar {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; background: var(--primary-light, #e0e7ff);
    border: 1px solid var(--primary); border-radius: var(--radius);
    margin-bottom: 16px; font-size: 13px; font-weight: 500; color: var(--primary);
}
.compare-checkbox { cursor: pointer; width: 16px; height: 16px; }

/* ======================== Comparison Grid ======================== */
.comparison-grid {
    display: grid; gap: 0;
}
.comparison-column {
    border-right: 1px solid var(--gray-200); padding: 16px; min-width: 200px;
}
.comparison-column:last-child { border-right: none; }
.comparison-header {
    text-align: center; padding-bottom: 12px; margin-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}
.comparison-header .candidate-name { font-size: 15px; font-weight: 600; color: var(--gray-800); }
.comparison-header .candidate-score {
    font-size: 28px; font-weight: 700; margin: 8px 0 4px;
}
.comparison-header .candidate-score.high { color: var(--success); }
.comparison-header .candidate-score.medium { color: var(--warning); }
.comparison-header .candidate-score.low { color: var(--danger); }
.comparison-header .candidate-recommendation {
    font-size: 12px; font-weight: 500; color: var(--primary);
    text-transform: capitalize;
}
.comparison-section { margin-bottom: 14px; }
.comparison-section h5 {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--gray-500); margin-bottom: 6px;
}
.comparison-bar {
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px;
}
.comparison-bar .bar-label { width: 80px; color: var(--gray-600); flex-shrink: 0; }
.comparison-bar .bar-track {
    flex: 1; height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden;
}
.comparison-bar .bar-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--primary-light, #818cf8), var(--primary));
}
.comparison-bar .bar-value { width: 32px; text-align: right; font-weight: 600; color: var(--gray-700); }
.comparison-list { list-style: none; padding: 0; margin: 0; }
.comparison-list li {
    font-size: 12px; color: var(--gray-700); padding: 3px 0;
    padding-left: 14px; position: relative;
}
.comparison-list li::before {
    content: ''; position: absolute; left: 0; top: 9px;
    width: 6px; height: 6px; border-radius: 50%;
}
.comparison-list.strengths li::before { background: var(--success); }
.comparison-list.concerns li::before { background: var(--warning); }

/* ======================== AI Analysis Progress ======================== */
.ai-progress {
    padding: 32px 24px; text-align: center;
}
.ai-progress-spinner {
    margin-bottom: 16px;
}
.ai-progress-spinner .spinner {
    width: 40px; height: 40px; border: 3px solid var(--gray-200);
    border-top-color: var(--primary); border-radius: 50%;
    animation: ai-spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-progress-bar {
    height: 6px; background: var(--gray-200); border-radius: 3px;
    overflow: hidden; margin: 0 auto; max-width: 300px;
}
.ai-progress-fill {
    height: 100%; background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: 3px; width: 0%; transition: width 0.8s ease;
}
.ai-progress-phase {
    margin-top: 12px; font-size: 13px; color: var(--gray-500);
}
.ai-progress-percent {
    font-size: 24px; font-weight: 700; color: var(--gray-700);
    margin-bottom: 12px;
}

/* Inline progress for table rows */
.ai-inline-progress {
    display: inline-flex; align-items: center; gap: 8px; font-size: 12px;
    color: var(--gray-500); margin-left: 8px;
}
.ai-inline-progress .mini-bar {
    width: 60px; height: 4px; background: var(--gray-200); border-radius: 2px;
    overflow: hidden;
}
.ai-inline-progress .mini-fill {
    height: 100%; background: var(--primary); border-radius: 2px;
    transition: width 0.6s ease;
}
.ai-inline-progress .mini-text {
    white-space: nowrap;
}

/* Button analyzing state */
.ai-analyze-btn.analyzing {
    opacity: 0.7; cursor: wait; pointer-events: none;
}
.ai-analyze-btn.analyzing .ai-btn-text::before {
    content: ''; display: inline-block; width: 14px; height: 14px;
    border: 2px solid currentColor; border-top-color: transparent;
    border-radius: 50%; animation: ai-spin 0.8s linear infinite;
    margin-right: 6px; vertical-align: middle;
}

/* Success flash animation on completion */
.ai-complete-flash {
    animation: aiFlashGreen 1s ease;
}
@keyframes aiFlashGreen {
    0% { background-color: rgba(16,185,129,0.12); }
    100% { background-color: transparent; }
}

@media (max-width: 768px) {
    .scoring-accuracy-grid { grid-template-columns: 1fr; }
    .scoring-rule-row { flex-direction: column; align-items: stretch; gap: 8px; }
    .scoring-rule-slider { width: 100%; }
    .weight-slider { flex: 1; }
    .comparison-grid { grid-template-columns: 1fr !important; }
    .comparison-column { border-right: none; border-bottom: 1px solid var(--gray-200); }
    .ai-progress-bar { max-width: 100%; }
}

/* ======================== Theme Selection Cards ======================== */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.theme-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 8px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    text-align: center;
    background: var(--white);
    font-family: var(--font);
}
.theme-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.theme-card-active {
    border-color: var(--primary);
    box-shadow: var(--shadow-ring);
}
.theme-preview {
    display: flex;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 6px;
    border: 1px solid var(--gray-100);
}
.theme-sidebar-swatch {
    width: 30%;
    height: 100%;
    padding: 8px 5px;
}
.theme-sidebar-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.theme-swatch-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-bottom: 2px;
}
.theme-swatch-line {
    height: 3px;
    border-radius: 2px;
    width: 80%;
    opacity: 0.6;
}
.theme-main-area {
    flex: 1;
    background: var(--gray-50);
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.theme-primary-bar {
    height: 8px;
    border-radius: 3px;
    width: 55%;
}
.theme-content-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.theme-line {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    width: 90%;
}
.theme-line.short { width: 60%; }
.theme-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-700);
    line-height: 1.2;
}
.theme-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Jira sync progress bar ────────────────────────────────────────────── */
.jira-sync-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 200px;
    max-width: 280px;
}
.jira-sync-progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}
.jira-sync-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.jira-sync-progress-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: var(--gray-600);
}
.jira-sync-pct {
    font-weight: 700;
    color: var(--primary);
    min-width: 32px;
}
.jira-sync-phase {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
npre { background: #1e293b; color: #e2e8f0; padding: 12px 16px; border-radius: 8px; font-size: 12.5px; font-family: 'Courier New', monospace; overflow-x: auto; margin: 10px 0; line-height: 1.6; }n.deploy-pane li { margin-bottom: 4px; }

/* ========================================================================
   Interview Room
   ======================================================================== */

/* Interview dashboard cards */
.interview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding: 16px; }
.interview-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 20px; position: relative; }
.interview-card--active { border-color: var(--success-border); background: var(--success-light); }
.interview-card__status { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--success); margin-bottom: 8px; }
.interview-card__candidate { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.interview-card__job { font-size: 13px; color: var(--gray-500); margin: 0 0 12px; }
.interview-card__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.interview-card__actions { display: flex; gap: 8px; }

/* Live dot */
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pulse-dot--live { background: var(--success); animation: pulse-glow 1.5s ease-in-out infinite; }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); } 50% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); } }

/* Employee search (create form) */
.employee-search-wrapper { position: relative; }
.employee-search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-md); max-height: 240px; overflow-y: auto; }
.employee-result-item { padding: 10px 14px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--gray-100); transition: background var(--transition); }
.employee-result-item:hover { background: var(--primary-light); }
.selected-interviewer { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--gray-50); border-radius: var(--radius); border: 1px solid var(--gray-200); }
.selected-interviewer__info { flex: 1; }
.selected-interviewer__info strong { display: block; }
.selected-interviewer__note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--warning); background: var(--warning-light); padding: 6px 10px; border-radius: var(--radius-sm); }

/* Interview Room — Topbar */
.ir-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--gray-900); color: var(--white); border-radius: var(--radius-md); margin-bottom: 16px; }
.ir-topbar__left { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ir-topbar__right { display: flex; align-items: center; gap: 16px; }
.ir-timer { font-family: 'Courier New', monospace; font-size: 18px; font-weight: 700; color: #22d3ee; letter-spacing: 1px; }

/* Interview Room — Layout */
.ir-layout { display: grid; grid-template-columns: 1fr 380px; gap: 16px; min-height: calc(100vh - 200px); }
.ir-left { display: flex; flex-direction: column; gap: 12px; }
.ir-right { display: flex; flex-direction: column; gap: 12px; }

/* Audio Controls */
.ir-audio-controls { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 14px 18px; }
.ir-audio-controls__row { display: flex; gap: 12px; margin-bottom: 10px; }
.ir-audio-btn { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border: 2px solid var(--gray-300); border-radius: var(--radius); background: var(--white); cursor: pointer; font-size: 13px; font-weight: 500; transition: all var(--transition); flex: 1; }
.ir-audio-btn:hover { border-color: var(--primary); }
.ir-audio-btn--on { border-color: var(--success); background: var(--success-light); color: var(--success); }
.ir-audio-btn--off { border-color: var(--gray-300); color: var(--gray-500); }

/* Interview mode toggle (1-on-1 / Panel) */
.ir-mode-toggle { display: inline-flex; border: 1px solid var(--gray-300); border-radius: var(--radius); overflow: hidden; }
.ir-mode-btn { padding: 4px 14px; font-size: 12px; font-weight: 600; border: none; background: var(--white); color: var(--gray-500); cursor: pointer; transition: all 0.15s; }
.ir-mode-btn:not(:last-child) { border-right: 1px solid var(--gray-300); }
.ir-mode-btn--active { background: var(--primary); color: var(--white); }
.ir-mode-btn:hover:not(.ir-mode-btn--active) { background: var(--gray-50); }

/* Transcript Panel */
.ir-transcript-panel { flex: 1; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); overflow: hidden; }
.ir-transcript-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--gray-200); font-size: 13px; background: var(--gray-50); }
.ir-transcript { flex: 1; overflow-y: auto; padding: 12px 16px; max-height: calc(100vh - 380px); }
.ir-transcript-empty { padding: 40px; text-align: center; font-size: 13px; }
.ir-transcript-entry { padding: 8px 0; border-bottom: 1px solid var(--gray-50); display: flex; gap: 10px; font-size: 13px; line-height: 1.5; }
.ir-transcript-entry__speaker { font-weight: 600; min-width: 80px; flex-shrink: 0; }
.ir-transcript-entry__speaker--you { color: var(--primary); }
.ir-transcript-entry__speaker--candidate { color: var(--success); }
.ir-transcript-entry__time { color: var(--gray-400); font-size: 11px; min-width: 50px; flex-shrink: 0; font-family: 'Courier New', monospace; }
.ir-transcript-entry__text { flex: 1; }
.ir-transcript-entry__text.ir-corrected { border-bottom: 1px dotted var(--info); }
.ir-interim { padding: 6px 16px; font-size: 13px; color: var(--gray-400); font-style: italic; border-top: 1px dashed var(--gray-200); }

/* Right Side Panels */
.ir-panel { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md); overflow: hidden; }
.ir-panel__header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--gray-200); font-size: 13px; font-weight: 600; background: var(--gray-50); }
.ir-panel__body { padding: 12px 14px; }

/* AI Questions List */
.ir-questions-list { max-height: 300px; }
.ir-question-card { padding: 10px; border: 1px solid var(--gray-200); border-radius: var(--radius); margin-bottom: 8px; font-size: 13px; }
.ir-question-card__header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ir-question-card__text { margin: 0 0 8px; line-height: 1.5; }
.ir-question-card__actions { display: flex; gap: 6px; }
.ir-question-card--asked { border-color: var(--info-border); background: var(--info-light); }
.ir-question-card--answered { border-color: var(--success-border); background: var(--success-light); }
.ir-question-card--skipped { opacity: 0.5; }

/* Evaluation display */
.ir-eval-card { padding: 12px; background: var(--gray-50); border-radius: var(--radius); margin-bottom: 8px; font-size: 13px; }
.ir-eval-card__score { font-size: 20px; font-weight: 700; }
.ir-eval-card__depth { display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; text-transform: uppercase; }

/* Summary transcript */
.ir-summary-transcript-entry { padding: 10px 0; border-bottom: 1px solid var(--gray-100); }
.ir-summary-transcript-entry--you .ir-summary-transcript-meta strong { color: var(--primary); }
.ir-summary-transcript-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.ir-summary-transcript-meta strong { font-size: 13px; }

/* Interview Outcome Buttons */
.ir-outcome-btn {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    width: 100%; padding: 24px 16px; border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg); background: #fff; cursor: pointer;
    transition: all 0.15s ease; text-align: center;
}
.ir-outcome-btn strong { font-size: 15px; }
.ir-outcome-btn span { font-size: 12px; color: var(--gray-500); }
.ir-outcome-btn--advance { color: #166534; }
.ir-outcome-btn--advance:hover { border-color: #16a34a; background: #f0fdf4; }
.ir-outcome-btn--waitlist { color: #92400e; }
.ir-outcome-btn--waitlist:hover { border-color: #f59e0b; background: #fffbeb; }
.ir-outcome-btn--reject { color: #991b1b; }
.ir-outcome-btn--reject:hover { border-color: #ef4444; background: #fef2f2; }

/* Outcome filters — segmented control style */
.ir-outcome-filters {
    display: flex; gap: 6px; flex-wrap: wrap;
    padding: 12px 0 16px; margin-bottom: 0;
}
.ir-outcome-filter {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--radius);
    font-size: 13px; font-weight: 500; font-family: inherit;
    color: var(--gray-600); background: #fff;
    border: 1px solid var(--gray-200); cursor: pointer;
    transition: all 0.15s ease;
}
.ir-outcome-filter:hover { border-color: var(--gray-300); background: var(--gray-50); }
.ir-outcome-filter--active {
    color: var(--primary); border-color: var(--primary);
    background: var(--primary-light); font-weight: 600;
}
.ir-outcome-filter--active:hover {
    background: var(--primary-light); border-color: var(--primary);
}
.ir-outcome-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.ir-outcome-filter__count {
    font-size: 11px; font-weight: 600;
    background: var(--gray-100); color: var(--gray-500);
    padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}
.ir-outcome-filter--active .ir-outcome-filter__count {
    background: var(--primary); color: #fff;
}

/* Action link — touch-friendly inline table action */
.action-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 16px; border-radius: var(--radius);
    font-size: 12.5px; font-weight: 600; font-family: inherit;
    color: var(--primary); background: var(--primary-light);
    border: 1px solid transparent;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: all 0.15s ease;
    min-height: 34px;
}
.action-link:hover {
    background: var(--primary); color: #fff;
    border-color: var(--primary); text-decoration: none;
    box-shadow: 0 1px 3px var(--primary-shadow);
}
.action-link:active { transform: translateY(1px); }
.action-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.action-link:hover svg { stroke: #fff; }

/* Secondary variant — for Edit / secondary actions alongside a primary action-link */
.action-link--secondary {
    color: var(--gray-600); background: var(--gray-50);
    border-color: var(--gray-200); font-weight: 500;
}
.action-link--secondary:hover {
    color: var(--gray-800); background: var(--gray-100);
    border-color: var(--gray-300); box-shadow: none;
}
.action-link--secondary:hover svg { stroke: var(--gray-800); }

/* Table name link — clickable record name, modern style (not blue hyperlink) */
.name-link {
    color: var(--gray-900); font-weight: 600;
    text-decoration: none; line-height: 1.3;
    border-bottom: 1px solid transparent;
    transition: all 0.15s ease;
}
.name-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
    text-decoration: none;
}

/* Clickable table rows */
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--gray-50); }

/* Schedule Interview Modal — employee search dropdown above modal content */
#scheduleInterviewModal .employee-search-results {
    z-index: 250;
}
