/* ==========================================================================
   TalentFlow — Interview Platform Design System
   Shared styles for every page (login, CV submission, dashboard, HR setup,
   add job, and the live interview room).
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    --tf-primary: #0f9d58;
    --tf-primary-dark: #0b7a43;
    --tf-primary-light: #e8f7ef;
    --tf-accent: #1a73e8;

    --tf-ink: #10241b;
    --tf-body: #475467;
    --tf-muted: #8a95a5;

    --tf-surface: #ffffff;
    --tf-bg: #f4f7f6;
    --tf-border: #e4e9ee;

    --tf-danger: #d92d20;
    --tf-warning: #f79009;
    --tf-success: #0f9d58;

    --tf-radius-sm: 8px;
    --tf-radius: 14px;
    --tf-radius-lg: 20px;

    --tf-shadow-sm: 0 1px 2px rgba(16, 36, 27, 0.06);
    --tf-shadow: 0 4px 16px rgba(16, 36, 27, 0.08);
    --tf-shadow-lg: 0 18px 48px rgba(16, 36, 27, 0.12);
}

/* ---------- Base ---------- */
body {
    background-color: var(--tf-bg);
    color: var(--tf-body);
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--tf-ink);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--tf-primary-dark);
}

/* Legacy helper classes kept so existing markup keeps working. */
.indico-green {
    background-color: var(--tf-primary) !important;
}
.indico-text {
    color: var(--tf-primary) !important;
}

.tf-bg-soft {
    background-color: var(--tf-primary-light) !important;
}

/* ---------- Brand ---------- */
.tf-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--tf-ink);
    text-decoration: none;
}

.tf-brand:hover {
    color: var(--tf-ink);
}

.tf-brand__mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    background: linear-gradient(
        135deg,
        var(--tf-primary) 0%,
        var(--tf-primary-dark) 100%
    );
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(15, 157, 88, 0.32);
}

.tf-brand__name {
    font-size: 1.15rem;
    line-height: 1.1;
}

.tf-brand__sub {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--tf-muted);
}

/* Brand on a dark/coloured background */
.tf-brand--light,
.tf-brand--light:hover {
    color: #fff;
}
.tf-brand--light .tf-brand__mark {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}
.tf-brand--light .tf-brand__sub {
    color: rgba(255, 255, 255, 0.75);
}

/* ---------- Navbar ---------- */
.tf-navbar {
    background: var(--tf-surface);
    border-bottom: 1px solid var(--tf-border);
    box-shadow: var(--tf-shadow-sm);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.tf-navbar .nav-link {
    color: var(--tf-body);
    font-weight: 600;
    font-size: 0.94rem;
    border-radius: var(--tf-radius-sm);
    padding: 0.5rem 0.9rem !important;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.tf-navbar .nav-link:hover {
    background: var(--tf-primary-light);
    color: var(--tf-primary-dark);
}

.tf-navbar .nav-link.active {
    background: var(--tf-primary-light);
    color: var(--tf-primary-dark);
}

/* ---------- Cards ---------- */
.tf-card {
    background: var(--tf-surface);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    box-shadow: var(--tf-shadow-sm);
}

.tf-card--raised {
    box-shadow: var(--tf-shadow);
}

.tf-card__header {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--tf-border);
}

.tf-card__body {
    padding: 1.5rem;
}

/* ---------- Page header ---------- */
.tf-page-header {
    padding: 1.75rem 0 1.25rem;
}

.tf-page-title {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.tf-page-subtitle {
    color: var(--tf-muted);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ---------- Stat cards ---------- */
.tf-stat {
    background: var(--tf-surface);
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius);
    padding: 1.15rem 1.25rem;
    height: 100%;
    box-shadow: var(--tf-shadow-sm);
}

.tf-stat__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--tf-muted);
    margin-bottom: 0.35rem;
}

.tf-stat__value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--tf-ink);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.tf-stat__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: var(--tf-primary-light);
    color: var(--tf-primary-dark);
}

/* ---------- Forms ---------- */
.form-label {
    font-weight: 600;
    color: var(--tf-ink);
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    border-color: var(--tf-border);
    border-radius: var(--tf-radius-sm);
    padding: 0.6rem 0.85rem;
    color: var(--tf-ink);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--tf-primary);
    box-shadow: 0 0 0 4px rgba(15, 157, 88, 0.12);
}

.form-control::placeholder {
    color: #b3bcc8;
}

.form-text,
.tf-hint {
    color: var(--tf-muted);
    font-size: 0.82rem;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: var(--tf-radius-sm);
    font-weight: 600;
}

.btn-tf-primary {
    background: var(--tf-primary);
    border: 1px solid var(--tf-primary);
    color: #fff;
    padding: 0.6rem 1.15rem;
    box-shadow: 0 2px 8px rgba(15, 157, 88, 0.24);
}

.btn-tf-primary:hover,
.btn-tf-primary:focus {
    background: var(--tf-primary-dark);
    border-color: var(--tf-primary-dark);
    color: #fff;
}

.btn-tf-outline {
    background: transparent;
    border: 1px solid var(--tf-border);
    color: var(--tf-ink);
    padding: 0.6rem 1.15rem;
}

.btn-tf-outline:hover {
    background: var(--tf-primary-light);
    border-color: var(--tf-primary);
    color: var(--tf-primary-dark);
}

/* ---------- Badges / pills ---------- */
.tf-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.tf-pill--neutral {
    background: #eef2f6;
    color: #475467;
}
.tf-pill--info {
    background: #e8f1fd;
    color: #1a56b8;
}
.tf-pill--success {
    background: #e6f6ee;
    color: #0b7a43;
}
.tf-pill--warning {
    background: #fdf1e0;
    color: #b45309;
}
.tf-pill--danger {
    background: #fdeceb;
    color: #b42318;
}

/* Score chip used in the dashboard table */
.tf-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.9rem;
}

.tf-score--high {
    background: #e6f6ee;
    color: #0b7a43;
}
.tf-score--mid {
    background: #fdf1e0;
    color: #b45309;
}
.tf-score--low {
    background: #fdeceb;
    color: #b42318;
}
.tf-score--none {
    background: #eef2f6;
    color: #8a95a5;
}

/* Avatar initials in the candidate table */
.tf-avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: var(--tf-primary-light);
    color: var(--tf-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
}

/* ---------- Tables ---------- */
.tf-table {
    margin: 0;
}

.tf-table thead th {
    background: #fafbfc;
    color: var(--tf-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--tf-border);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.tf-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--tf-border);
    vertical-align: middle;
    color: var(--tf-body);
    font-size: 0.92rem;
}

.tf-table tbody tr:last-child td {
    border-bottom: none;
}

.tf-table tbody tr:hover {
    background: #fafdfb;
}

/* ---------- Empty state ---------- */
.tf-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--tf-muted);
}

.tf-empty__icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.6rem;
    opacity: 0.6;
}

/* ---------- Auth / split layout ---------- */
.tf-auth {
    min-height: 100vh;
}

.tf-auth__aside {
    background: linear-gradient(
        150deg,
        var(--tf-primary-dark) 0%,
        var(--tf-primary) 55%,
        #14b866 100%
    );
    color: #fff;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.tf-auth__aside::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    bottom: -160px;
    right: -140px;
}

.tf-auth__feature {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 1;
}

.tf-auth__feature-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tf-auth__panel {
    padding: 2.5rem 1.25rem;
}

.tf-auth__card {
    width: 100%;
    max-width: 420px;
}

/* ---------- Stepper (CV submission) ---------- */
.tf-steps {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tf-step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tf-muted);
}

.tf-step__num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e9edf2;
    color: var(--tf-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
}

.tf-step--active {
    color: var(--tf-primary-dark);
}

.tf-step--active .tf-step__num {
    background: var(--tf-primary);
    color: #fff;
}

.tf-step__line {
    width: 34px;
    height: 2px;
    background: #e9edf2;
}

/* ---------- File dropzone ---------- */
.tf-dropzone {
    border: 1.5px dashed var(--tf-border);
    border-radius: var(--tf-radius);
    padding: 1.5rem;
    text-align: center;
    background: #fbfcfd;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}

.tf-dropzone:hover,
.tf-dropzone--active {
    border-color: var(--tf-primary);
    background: var(--tf-primary-light);
}

.tf-dropzone__icon {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 0.4rem;
}

/* ---------- Interview room ---------- */
.tf-room {
    min-height: 100vh;
    background:
        radial-gradient(
            1200px 500px at 50% -10%,
            rgba(15, 157, 88, 0.16),
            transparent 60%
        ),
        #0d1512;
    color: #e6ebe8;
}

.tf-room h1,
.tf-room h2,
.tf-room h3,
.tf-room h4,
.tf-room h5 {
    color: #fff;
}

.tf-room__bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.85rem 0;
}

.tf-room__panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--tf-radius-lg);
    backdrop-filter: blur(8px);
}

.tf-room__muted {
    color: #9fb0a8;
}

.tf-room .tf-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.92rem;
}

.tf-room .tf-info-row:last-child {
    border-bottom: none;
}

.tf-room .tf-info-row span:first-child {
    color: #9fb0a8;
}

.tf-room .tf-info-row span:last-child {
    color: #fff;
    font-weight: 600;
    text-align: right;
}

/* Video stage */
.tf-stage {
    position: relative;
    border-radius: var(--tf-radius-lg);
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 10;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.tf-stage video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1); /* mirror, like every video-call app */
}

.tf-stage__overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.9rem;
    gap: 0.5rem;
    pointer-events: none;
}

.tf-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(6px);
}

.tf-chip--rec {
    background: rgba(217, 45, 32, 0.9);
}

.tf-chip__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.tf-chip--rec .tf-chip__dot {
    background: #fff;
    animation: tf-blink 1.2s infinite;
}

@keyframes tf-blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.25;
    }
}

/* Countdown timer ring/label */
.tf-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 0.95rem;
}

.tf-timer--warn {
    background: rgba(247, 144, 9, 0.92);
}

.tf-timer--danger {
    background: rgba(217, 45, 32, 0.92);
}

/* Question bubble */
.tf-question {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--tf-primary);
    border-radius: var(--tf-radius);
    padding: 1.25rem 1.35rem;
    min-height: 104px;
    display: flex;
    align-items: center;
}

.tf-question__text {
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* Interviewer avatar with speaking animation */
.tf-interviewer {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.tf-interviewer__avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tf-primary), #14b866);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    position: relative;
}

.tf-interviewer--speaking .tf-interviewer__avatar::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(15, 157, 88, 0.6);
    animation: tf-ring 1.4s infinite;
}

@keyframes tf-ring {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }
    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

/* Mic button */
.mic-btn,
.tf-mic {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.9rem;
    border: 2px solid var(--tf-primary);
    background: rgba(15, 157, 88, 0.12);
    color: #fff;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.tf-mic:hover:not(:disabled) {
    background: var(--tf-primary);
    transform: translateY(-2px);
}

.tf-mic:disabled {
    opacity: 0.45;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

.tf-mic.recording {
    background: var(--tf-danger);
    border-color: var(--tf-danger);
    color: #fff;
    box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.6);
    animation: tf-pulse 1.6s infinite;
}

@keyframes tf-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.55);
    }
    70% {
        box-shadow: 0 0 0 22px rgba(217, 45, 32, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(217, 45, 32, 0);
    }
}

/* Progress bar for question count */
.tf-progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.tf-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--tf-primary), #21c97a);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* Requirement checklist on the pre-interview screen */
.tf-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.tf-check__icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    background: rgba(15, 157, 88, 0.2);
    color: #21c97a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* ---------- Modal ---------- */
.tf-modal .modal-content {
    border: none;
    border-radius: var(--tf-radius);
    overflow: hidden;
    box-shadow: var(--tf-shadow-lg);
}

.tf-modal .modal-header {
    background: var(--tf-surface);
    border-bottom: 1px solid var(--tf-border);
    padding: 1.15rem 1.5rem;
}

.tf-modal .modal-body {
    padding: 1.5rem;
}

.tf-modal .modal-footer {
    border-top: 1px solid var(--tf-border);
    padding: 1rem 1.5rem;
}

.tf-report-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
}

.tf-report-meta__item {
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius-sm);
    padding: 0.65rem 0.85rem;
    background: #fafbfc;
}

.tf-report-meta__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--tf-muted);
    margin-bottom: 0.15rem;
}

.tf-report-meta__value {
    color: var(--tf-ink);
    font-weight: 600;
    font-size: 0.92rem;
    word-break: break-word;
}

.tf-analysis {
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.65;
    background: #fafbfc;
    border: 1px solid var(--tf-border);
    border-radius: var(--tf-radius-sm);
    padding: 1rem 1.15rem;
    color: var(--tf-body);
}

/* ---------- Utilities ---------- */
.tf-divider {
    height: 1px;
    background: var(--tf-border);
    border: 0;
    margin: 1.25rem 0;
    opacity: 1;
}

.tf-sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

@media (max-width: 767.98px) {
    .tf-report-meta {
        grid-template-columns: 1fr;
    }
    .tf-auth__panel {
        padding: 2rem 1rem;
    }
}
