/* =============================================================================
   TalentVelo - Extra stylesheet (loaded AFTER talentvelo.css on every page)
   -----------------------------------------------------------------------------
   Keeps all newer UI rules in one file so talentvelo.css stays untouched.

     1. Password "Show / Hide" button, caps-lock hint, password rules checklist
     2. Dismissible alerts, banners, loading buttons
     3. Login page polish (entrance animation, hero badges)
     4. Openings: filter bar, category / posted badges, skill picker
     5. Account settings page (mobile number + OTP, danger zone)
     6. Mobile view: bold bordered navigation, themed borders, bigger tap targets
   ============================================================================= */

/* 1. Password helpers --------------------------------------------------------- */
.tv-pw input { padding-right: 84px !important; }
.tv-pw button {
    right: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
    line-height: 1.2;
    color: var(--tv-accent-text);
    background: var(--tv-surface-2);
    border: 1px solid var(--tv-border);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tv-pw button:hover { color: #fff; background: var(--tv-primary-strong); border-color: var(--tv-primary-strong); }

.tv-caps-hint { margin-top: 2px; font-size: 12px; font-weight: 700; color: #F59E0B; }
.tv-caps-hint[hidden] { display: none; }

.tv-rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; margin: 8px 0 0; padding: 0; list-style: none; }
.tv-rules li { position: relative; padding-left: 20px; font-size: 12px; color: var(--tv-muted); }
.tv-rules li::before { content: "\25CB"; position: absolute; left: 0; top: 0; font-size: 12px; }
.tv-rules li.ok { color: #22C55E; font-weight: 700; }
.tv-rules li.ok::before { content: "\2713"; }
[data-theme="light"] .tv-rules li.ok { color: #15803D; }

/* 2. Alerts, banners, loading buttons ------------------------------------------ */
.tv-alert { position: relative; padding-right: 42px; animation: tv-fade-in 0.3s ease both; }
.tv-alert-close {
    position: absolute; top: 8px; right: 10px;
    width: 26px; height: 26px;
    font-size: 18px; line-height: 1;
    color: inherit; opacity: 0.7;
    background: transparent; border: 0; border-radius: 6px; cursor: pointer;
}
.tv-alert-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.tv-alert-hide { opacity: 0; transform: translateY(-4px); transition: opacity 0.35s, transform 0.35s; }
@keyframes tv-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.tv-banner { padding: 14px 16px; margin-bottom: 16px; font-size: 13.5px; line-height: 1.55; border: 1px solid; border-radius: 12px; }
.tv-banner-warn { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.5); color: #FBBF24; }
.tv-banner-ok   { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.45); color: #86EFAC; }
[data-theme="light"] .tv-banner-warn { color: #92400E; }
[data-theme="light"] .tv-banner-ok { color: #15803D; }
.tv-banner strong { font-weight: 800; }
.tv-badge-warn { background: rgba(245, 158, 11, 0.16); color: #F59E0B; border-color: rgba(245, 158, 11, 0.45); }
.tv-badge-ok   { background: rgba(34, 197, 94, 0.16); color: #22C55E; border-color: rgba(34, 197, 94, 0.45); }
[data-theme="light"] .tv-badge-warn { color: #B45309; }
[data-theme="light"] .tv-badge-ok { color: #15803D; }

.tv-btn.is-loading, .tv-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

/* 3. Login page polish ------------------------------------------------------------ */
.tv-auth { animation: tv-rise 0.55s ease both; }
@keyframes tv-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.tv-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tv-hero-badges span {
    padding: 6px 12px; font-size: 12px; font-weight: 700;
    color: #fff; background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px;
}
.tv-portal-tabs a { font-weight: 800; }
.tv-trust { margin-top: 14px; text-align: center; font-size: 12px; color: var(--tv-muted); }

/* 4. Openings ---------------------------------------------------------------------- */
.tv-filterbar { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-bottom: 14px; }
.tv-filterbar input, .tv-filterbar select {
    width: 100%; padding: 11px 14px;
    color: var(--tv-text); background: var(--tv-input-bg);
    border: 1px solid var(--tv-border); border-radius: 10px; outline: none;
}
.tv-filterbar input:focus, .tv-filterbar select:focus { border-color: var(--tv-primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.tv-job-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.tv-pill-cat { padding: 3px 12px; font-size: 12px; font-weight: 800; color: #fff; background: var(--tv-gradient); border-radius: 999px; }
.tv-posted { padding: 3px 12px; font-size: 12px; font-weight: 700; color: var(--tv-muted); background: var(--tv-surface); border: 1px solid var(--tv-border); border-radius: 999px; }
.tv-posted.fresh { color: #22C55E; border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.1); }
[data-theme="light"] .tv-posted.fresh { color: #15803D; }
.tv-skill-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.tv-skill-tag { padding: 2px 10px; font-size: 11.5px; font-weight: 700; color: var(--tv-accent-text); background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.28); border-radius: 999px; }

.tv-skill-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.tv-skill-chip { position: relative; cursor: pointer; }
.tv-skill-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.tv-skill-chip span {
    display: inline-block; padding: 7px 14px; font-size: 12.5px; font-weight: 700;
    color: var(--tv-muted); background: var(--tv-surface); border: 1.5px solid var(--tv-border); border-radius: 999px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tv-skill-chip:hover span { border-color: var(--tv-primary); }
.tv-skill-chip input:checked + span { color: #fff; background: var(--tv-primary-strong); border-color: var(--tv-primary-strong); }
.tv-skill-chip input:focus-visible + span { outline: 2px solid var(--tv-primary); outline-offset: 2px; }
.tv-field select { cursor: pointer; }
.tv-field .tv-count { text-align: right; font-size: 11.5px; color: var(--tv-muted); }

/* 5. Account settings -------------------------------------------------------------------- */
.tv-account-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 16px; background: var(--tv-surface-2); border: 1px solid var(--tv-border); border-radius: 12px; }
.tv-account-row strong { font-size: 17px; letter-spacing: 0.3px; }
.tv-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tv-inline .tv-field { flex: 1 1 220px; margin-bottom: 0; }
.tv-otp-input { font-size: 22px !important; font-weight: 800; letter-spacing: 8px; text-align: center; }
.tv-resend { font-size: 12.5px; color: var(--tv-muted); }
.tv-danger-zone { border-color: rgba(239, 68, 68, 0.35); }
.tv-danger-zone summary { cursor: pointer; font-weight: 800; color: var(--tv-muted); list-style: none; }
.tv-danger-zone summary::-webkit-details-marker { display: none; }
.tv-danger-zone summary::before { content: "\25B8  "; }
.tv-danger-zone[open] summary::before { content: "\25BE  "; }
.tv-danger-zone[open] summary { color: #FCA5A5; margin-bottom: 12px; }
[data-theme="light"] .tv-danger-zone[open] summary { color: #B91C1C; }

/* 6. Mobile view ---------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    /* menu button: clearly visible, themed border */
    .tv-burger { width: 46px; height: 46px; font-weight: 800; color: var(--tv-accent-text); background: var(--tv-surface); border: 2px solid var(--tv-primary); }
    /* opened menu: every tab is a bold, bordered, full-width button */
    .tv-menu { gap: 8px; padding: 14px 16px 18px; border-top: 3px solid var(--tv-primary); }
    .tv-menu .tv-link {
        display: flex; align-items: center; min-height: 48px; padding: 12px 16px;
        font-size: 15px; font-weight: 800; color: var(--tv-text);
        background: var(--tv-surface-2); border: 1.5px solid var(--tv-border); border-radius: 12px;
    }
    .tv-menu .tv-link:hover { background: rgba(59, 130, 246, 0.14); border-color: var(--tv-primary); }
    .tv-menu .tv-link.active { color: #fff; background: var(--tv-gradient); border-color: transparent; box-shadow: none; }
    .tv-menu .tv-link-admin { color: var(--tv-accent-text); }
    .tv-menu .tv-link-admin.active { color: #fff; }
    .tv-menu .tv-icon-btn { align-self: stretch; width: 100%; height: 46px; border-width: 1.5px; }
    .tv-menu .tv-btn { min-height: 46px; font-size: 15px; }
}

@media (max-width: 820px) {
    .tv-portal-tabs { gap: 6px; padding: 5px; border: 1.5px solid var(--tv-border); }
    .tv-portal-tabs a { padding: 12px 6px; font-size: 14px; font-weight: 800; color: var(--tv-text); background: var(--tv-surface); border: 1.5px solid var(--tv-border); }
    .tv-portal-tabs a.active { color: #fff; border-color: transparent; }
    .tv-hero-badges { display: none; }
}

@media (max-width: 720px) {
    .tv-card, .tv-profile-card, .tv-stat, .tv-side-card { border-width: 1.5px; }
    .tv-card, .tv-profile-card { border-top: 3px solid var(--tv-primary); }
    .tv-job-card, .tv-candidate, .tv-account-row { border-width: 1.5px; }
    .tv-btn { min-height: 44px; }
    .tv-btn-sm { min-height: 40px; }
    .tv-field input:not([type="checkbox"]):not([type="file"]):not([type="radio"]), .tv-field select, .tv-field textarea, .tv-filterbar input, .tv-filterbar select { min-height: 46px; font-size: 16px; }
    .tv-filterbar { grid-template-columns: minmax(0, 1fr); }
    .tv-rules { grid-template-columns: minmax(0, 1fr); }
    .tv-skill-chip span { padding: 9px 14px; }
    .tv-inline .tv-field { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .tv-auth, .tv-alert { animation: none; }
}
