/* ============================================================
   T. N. Enterprises Job Portal — visual design system
   Palette: an official-document/seal aesthetic (navy + gold +
   warm paper), built for trust — candidates are paying fees and
   submitting personal documents here, so the tone stays serious
   and legible over flashy.
   ============================================================ */

:root {
    /* --- core palette --- */
    --navy-deep: #142a46;
    --navy: #1f3864;
    --navy-soft: #2c4a7c;
    --gold: #c0973b;
    --gold-soft: #e8d9b5;
    --paper: #f7f3ea;
    --surface: #ffffff;
    --vermilion: #a23b2e;
    --vermilion-dark: #832d22;
    --ink: #26241f;
    --ink-muted: #6b6455;
    --line: #ddd4bc;

    /* --- functional aliases (existing components use these) --- */
    --bg: var(--paper);
    --border: var(--line);
    --text: var(--ink);
    --muted: var(--ink-muted);
    --accent: var(--vermilion);
    --success: #2f6b3a;
    --success-bg: #e6f0e3;
    --error: var(--vermilion-dark);
    --error-bg: #f5e3df;
    --navy-dark: var(--navy-deep);

    --font-display: 'Zilla Slab', 'Noto Sans Devanagari', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', 'Noto Sans Devanagari', -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
}

.container { max-width: 980px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--font-display); color: var(--navy-deep); font-weight: 700; line-height: 1.2; }
h1 { font-size: 30px; margin: 0 0 12px; }
h2 { font-size: 21px; margin: 0 0 12px; }
h3 { font-size: 16px; }

/* ---------------- Masthead ---------------- */
.site-header {
    background: var(--navy-deep);
    color: #fff;
    border-bottom: 3px solid var(--gold);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 76px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}
.brand .emblem { color: var(--gold); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.3px; }
.brand-sub { font-size: 10.5px; letter-spacing: 2.5px; color: var(--gold-soft); text-transform: uppercase; margin-top: 2px; }

.lang-switch {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.lang-switch a { color: var(--gold-soft); text-decoration: none; padding: 4px 6px; border-radius: 4px; }
.lang-switch a.active { color: #fff; font-weight: 700; background: rgba(255,255,255,0.12); }
.lang-switch a:hover { color: #fff; }
.lang-switch span { color: rgba(255,255,255,0.3); }

.main-content { padding: 36px 20px 60px; min-height: 60vh; }

.site-footer {
    background: var(--navy-deep);
    color: var(--gold-soft);
    padding: 22px 0;
    font-size: 13px;
    text-align: center;
    margin-top: 40px;
}
.site-footer a { color: var(--gold-soft); }

/* ---------------- Hero (home page) ---------------- */
.hero {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 48px 32px;
    text-align: center;
    overflow: hidden;
    margin-bottom: 28px;
}
.hero-watermark {
    position: absolute;
    top: 50%; left: 50%;
    width: 480px; height: 480px;
    transform: translate(-50%, -50%);
    color: var(--navy-deep);
    opacity: 0.04;
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero .emblem { color: var(--gold); margin-bottom: 14px; }
.hero h1 { font-size: 32px; margin-bottom: 10px; }
.hero p.lede { font-size: 15.5px; color: var(--ink-muted); max-width: 520px; margin: 0 auto 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.trust-strip {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin: 26px 0 0;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-muted); font-weight: 500; }
.trust-item .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* ---------------- Section label ---------------- */
.section-label {
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------------- Notice cards (job listings) ---------------- */
.notice-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--navy);
    border-radius: 8px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.notice-card-body { flex: 1; min-width: 0; }
.notice-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--navy-deep); }
.notice-card .meta { font-size: 12.5px; color: var(--ink-muted); }
.notice-card .meta strong { color: var(--vermilion-dark); }
.empty-note { color: var(--ink-muted); font-size: 14px; padding: 20px 0; text-align: center; }

/* ---------------- Generic card ---------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}

/* ---------------- Forms ---------------- */
.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13.5px; color: var(--navy-deep); }
input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=date], input[type=number], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 14.5px;
    font-family: var(--font-body);
    background: #fff;
    color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(31, 56, 100, 0.12);
}
textarea { resize: vertical; min-height: 80px; }
.hint { color: var(--ink-muted); font-size: 12px; margin-top: 4px; }
.required { color: var(--vermilion); }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-block;
    background: var(--vermilion);
    color: #fff;
    border: none;
    padding: 12px 26px;
    border-radius: 6px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font-body);
    transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--vermilion-dark); }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); padding: 10.5px 24px; }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-danger { background: var(--vermilion-dark); }
.btn-danger:hover { background: #6b241b; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ---------------- Tables ---------------- */
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13.5px; }
th { background: var(--navy-deep); color: #fff; font-weight: 600; font-size: 12px; letter-spacing: 0.4px; text-transform: uppercase; }

/* ---------------- Badges ---------------- */
.badge { display: inline-block; padding: 3px 11px; border-radius: 12px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.3px; }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-closed { background: #f6ecd9; color: #8a6a1f; }
.badge-delivered { background: #e6e3dc; color: #4a4638; }
.badge-pending { background: var(--error-bg); color: var(--error); }
.badge-cancelled { background: #ecdede; color: #6b1a1a; }

/* ---------------- Alerts ---------------- */
.alert { padding: 13px 16px; border-radius: 6px; margin-bottom: 20px; font-size: 13.5px; border-left: 4px solid transparent; }
.alert-success { background: var(--success-bg); color: var(--success); border-left-color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); border-left-color: var(--error); }
.alert-info { background: #eaf0f8; color: #2c4a7c; border-left-color: var(--navy); }

/* ---------------- Dynamic form builder rows ---------------- */
.field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    background: #fbf9f4;
}
/* text inputs/selects stretch to fill space, but checkboxes must stay their
   natural small size — without this exclusion, checkboxes competed equally
   for flex space and squeezed the Field Label boxes down to unusable slivers
   whenever a row had several qualification-type checkboxes in it */
.field-row input:not([type="checkbox"]), .field-row select { flex: 1 1 140px; }
.field-row input[type="checkbox"] { flex: 0 0 auto; width: auto; }
.field-row .f-label, .field-row .f-label-hi { min-width: 170px; }
/* the qualification-type checkboxes block always drops to its own full-width
   line — without this it competed with the Field Label boxes on the same
   line and squeezed them down to unusable slivers */
.field-row .f-qual-opts { flex-basis: 100%; }

/* ---------------- Admin nav ---------------- */
nav.admin-nav { display: flex; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
nav.admin-nav a { color: var(--navy); text-decoration: none; font-weight: 600; font-size: 13.5px; }
nav.admin-nav a:hover { color: var(--vermilion); }

.fee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; }

/* ---------------- Auth pages (login/register) — aura background ---------------- */
.auth-wrap {
    min-height: calc(100vh - 76px - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
}
.aura-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}
.aura-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.28;
}
.aura-blob.b1 { width: 380px; height: 380px; background: var(--navy); top: -80px; left: -100px; animation: auraDrift1 16s ease-in-out infinite; }
.aura-blob.b2 { width: 320px; height: 320px; background: var(--gold); bottom: -100px; right: -80px; animation: auraDrift2 20s ease-in-out infinite; }
.aura-blob.b3 { width: 260px; height: 260px; background: var(--vermilion); top: 40%; right: 10%; opacity: 0.14; animation: auraDrift1 24s ease-in-out infinite reverse; }

@keyframes auraDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 20px) scale(1.08); }
}
@keyframes auraDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-25px, -15px) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
    .aura-blob { animation: none !important; }
}

.auth-card {
    position: relative;
    z-index: 1;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 36px 34px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px -20px rgba(20, 42, 70, 0.25);
    text-align: center;
}
.auth-card .emblem { color: var(--gold); margin-bottom: 14px; }
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card .auth-sub { color: var(--ink-muted); font-size: 13px; margin-bottom: 22px; }
.auth-card form { text-align: left; }
.auth-switch { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-muted); }
.auth-switch .btn-secondary { display: inline-block; margin-top: 10px; width: 100%; }

.captcha-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.captcha-img { border: 1px solid var(--line); border-radius: 6px; background: var(--paper); display: block; }
.captcha-refresh { font-size: 16px; padding: 6px 12px; line-height: 1; }

@media (max-width: 600px) {
    .header-inner { height: 64px; }
    .hero { padding: 34px 20px; }
    .hero h1 { font-size: 24px; }
    .auth-card { padding: 28px 22px; }
}
