/* =====================================================================
   Ansari Travel - admin panel and login page
   Loaded after bootstrap.css (v3) on the admin pages; the login page
   uses this file on its own.
   ===================================================================== */

:root {
    --navy: #0a2540;
    --navy-2: #0d3b5c;
    --accent: #10a56a;
    --accent-dark: #0b8a57;
    --accent-soft: #e6f6ee;
    --bg: #f2f5f9;
    --card: #ffffff;
    --line: #e4e9f0;
    --text: #1b2b3c;
    --muted: #6b7a8c;
    --danger: #c0392b;
    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 37, 64, .05), 0 6px 20px rgba(16, 37, 64, .06);
    --font: 'Poppins', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

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

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: #0b6bb8; }

/* ---------------------------------------------------------------------
   Password field with show / hide button (added by scripts/panel.js)
   --------------------------------------------------------------------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px !important; }
.pw-wrap input::-ms-reveal, .pw-wrap input::-ms-clear { display: none; }
.pw-eye {
    position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
    width: 36px; height: 34px; padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.pw-eye:hover { color: var(--navy); background: #eef2f7; }
.pw-eye:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pw-eye[aria-pressed="true"] { color: var(--accent-dark); }

/* =====================================================================
   LOGIN PAGE
   ===================================================================== */
.login-page { min-height: 100vh; display: flex; background: var(--card); }

.login-brand {
    position: relative; overflow: hidden; flex: 1 1 52%;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 48px 56px; color: #fff;
    background: linear-gradient(145deg, #071d34 0%, #0b3e56 58%, #0e6f63 100%);
}
.login-brand:before, .login-brand:after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.login-brand:before { width: 520px; height: 520px; right: -190px; top: -170px; background: rgba(77, 224, 148, .10); }
.login-brand:after { width: 380px; height: 380px; left: -140px; bottom: -150px; border: 60px solid rgba(255, 255, 255, .045); }

.brand-lockup { position: relative; display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.brand-mark {
    flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
    font-size: 21px; color: #fff; background: linear-gradient(135deg, #19c37d, #0b8a57);
    box-shadow: 0 8px 20px rgba(11, 138, 87, .35);
}
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: .2px; line-height: 1.15; }
.brand-name small { display: block; font-size: 11.5px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; color: #9fc3d6; margin-top: 3px; }

.login-pitch { position: relative; max-width: 470px; }
.login-pitch h1 { margin: 0 0 16px; font-size: 38px; line-height: 1.18; font-weight: 700; letter-spacing: -.5px; }
.login-pitch h1 span { color: #5fe3a1; }
.login-pitch p { margin: 0 0 28px; font-size: 15.5px; color: #c4d6e2; }
.login-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.login-points li { display: flex; align-items: center; gap: 13px; font-size: 14.5px; color: #e4eef4; }
.login-points i {
    flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .09); color: #5fe3a1; font-size: 15px;
}
.login-foot { position: relative; font-size: 12.5px; color: #8fb0c2; }

.login-side {
    flex: 1 1 48%; display: flex; align-items: center; justify-content: center;
    padding: 40px 24px; background: var(--card);
}
.login-card { width: 100%; max-width: 400px; }
.login-logo { display: block; max-width: 250px; height: auto; margin: 0 0 34px; }
.login-card h2 { margin: 0 0 6px; font-size: 28px; font-weight: 700; color: var(--navy); letter-spacing: -.3px; }
.login-sub { margin: 0 0 28px; color: var(--muted); font-size: 14.5px; }

.login-field { margin-bottom: 18px; }
.login-field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--text); }
.login-input { position: relative; }
.login-input > i.field-icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    color: #94a3b4; font-size: 15px; pointer-events: none; z-index: 1;
}
.login-input input {
    width: 100%; height: 50px; padding: 0 16px 0 44px;
    font: inherit; font-size: 15px; color: var(--text);
    background: #f7f9fc; border: 1.5px solid var(--line); border-radius: 12px; outline: 0;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-input input::placeholder { color: #a3afbd; }
.login-input input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(16, 165, 106, .14); }

.login-error {
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 12px 14px;
    border-radius: 11px; background: #fdecea; color: #a5281c; border: 1px solid #f6c9c4; font-size: 13.5px; font-weight: 500;
}
.login-error:before { content: "\f06a"; font-family: FontAwesome; font-size: 16px; }

.login-btn {
    width: 100%; height: 52px; margin-top: 6px; border: 0; border-radius: 12px; cursor: pointer;
    font: inherit; font-size: 15.5px; font-weight: 600; letter-spacing: .2px; color: #fff;
    background: linear-gradient(135deg, #14b877, #0b8a57);
    box-shadow: 0 10px 22px rgba(11, 138, 87, .28);
    transition: transform .12s, box-shadow .12s, filter .12s;
}
.login-btn:hover { filter: brightness(1.05); box-shadow: 0 12px 26px rgba(11, 138, 87, .34); }
.login-btn:active { transform: translateY(1px); }
.login-btn:focus-visible { outline: 3px solid rgba(16, 165, 106, .4); outline-offset: 2px; }

.login-help { margin: 22px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.login-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13.5px; font-weight: 600; color: var(--navy-2); text-decoration: none; }
.login-back:hover { color: var(--accent-dark); }
.login-links { text-align: center; }

@media (max-width: 900px) {
    .login-brand { display: none; }
    .login-side { background: linear-gradient(180deg, #eef3f8, #fff 46%); align-items: flex-start; padding-top: 56px; }
    .login-card { background: #fff; padding: 30px 24px; border-radius: 18px; box-shadow: var(--shadow); }
    .login-logo { margin-left: auto; margin-right: auto; }
    .login-card h2, .login-sub { text-align: center; }
}

/* =====================================================================
   ADMIN LAYOUT
   ===================================================================== */
.app { min-height: 100%; }

.side {
    position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: 250px;
    display: flex; flex-direction: column; overflow-y: auto;
    color: #c8d6e2; background: linear-gradient(185deg, #0a2540 0%, #0b3049 60%, #0c3f52 100%);
}
.side .brand-lockup { padding: 22px 22px 20px; }
.side .brand-lockup:hover, .side .brand-lockup:focus { color: #fff; text-decoration: none; }
.side .brand-mark { width: 40px; height: 40px; border-radius: 11px; font-size: 18px; }
.side .brand-name { font-size: 16.5px; }
.side .brand-name small { font-size: 10.5px; }

.side-nav { padding: 6px 14px 20px; flex: 1; }
.side-label { display: block; margin: 20px 10px 8px; font-size: 10.5px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #6f8ca3; }
.side-nav a {
    position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 3px; padding: 11px 12px;
    border-radius: 10px; color: #c8d6e2; font-size: 14px; font-weight: 500; text-decoration: none;
    transition: background .12s, color .12s;
}
.side-nav a i { width: 20px; text-align: center; font-size: 16px; color: #7f9db3; transition: color .12s; }
.side-nav a:hover, .side-nav a:focus { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.side-nav a:hover i { color: #fff; }
.side-nav a.is-active { background: rgba(25, 195, 125, .16); color: #fff; font-weight: 600; }
.side-nav a.is-active i { color: #4de094; }
.side-nav a.is-active:before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #2fd48d; }
.side-foot { padding: 14px 24px 18px; font-size: 11.5px; color: #6f8ca3; border-top: 1px solid rgba(255, 255, 255, .07); }

.main { margin-left: 250px; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 30; height: 64px; padding: 0 28px;
    display: flex; align-items: center; gap: 14px;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.side-toggle {
    display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--navy); font-size: 17px; cursor: pointer;
}
.topbar-title { font-size: 15px; font-weight: 600; color: var(--muted); }
.topbar-title b { color: var(--navy); font-weight: 600; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 11px; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
    font-weight: 700; font-size: 15px; color: #fff; background: linear-gradient(135deg, #19c37d, #0b6bb8);
}
.topbar-user .who { line-height: 1.25; }
.topbar-user .who b { display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.topbar-user .who small { font-size: 10.5px; font-weight: 600; letter-spacing: 1px; color: var(--muted); }
.btn-logout {
    margin-left: 6px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
    border: 1px solid var(--line); color: var(--muted); font-size: 16px; text-decoration: none;
}
.btn-logout:hover, .btn-logout:focus { color: var(--danger); border-color: #f1c4bf; background: #fff5f4; text-decoration: none; }

.content { flex: 1; padding: 26px 28px 40px; }
#page-wrapper, #page-inner { margin: 0; padding: 0; background: none; min-height: 0; }

.side-backdrop { display: none; }

@media (max-width: 991px) {
    .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
    .main { margin-left: 0; }
    .side-toggle { display: inline-grid; place-items: center; }
    .topbar { padding: 0 16px; }
    .content { padding: 18px 14px 32px; }
    .topbar-user .who { display: none; }
    body.side-open .side { transform: none; }
    body.side-open .side-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(10, 37, 64, .45); }
}

/* ---------------------------------------------------------------------
   Page heading (the first row of every page) and typography
   --------------------------------------------------------------------- */
#page-inner > .row:first-child { margin-bottom: 18px; }
#page-inner > hr { display: none; }
h2 { margin: 0 0 4px; font-size: 24px; font-weight: 700; letter-spacing: -.3px; color: var(--navy); }
h5 { margin: 0; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--muted); }
p { margin: 0 0 10px; }
.text-muted { color: var(--muted); }
small, .small { font-size: 12px; }

/* ---------------------------------------------------------------------
   Cards (Bootstrap panels)
   --------------------------------------------------------------------- */
.panel { margin-bottom: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.panel-default > .panel-heading {
    padding: 15px 20px; background: #fff; border-bottom: 1px solid var(--line);
    font-size: 15px; font-weight: 600; color: var(--navy);
}
.panel-body { padding: 20px; }
.panel-footer { padding: 12px 20px; background: #f8fafc; border-top: 1px solid var(--line); }
.panel .badge, .panel-default > .panel-heading .badge { margin-left: 6px; padding: 4px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.narrow-card { max-width: 520px; }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
label { margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: #3a4a5c; }
.req:after { content: " *"; color: var(--danger); }
.form-control {
    height: 42px; padding: 8px 13px; font-size: 14px; color: var(--text);
    background: #fff; border: 1.5px solid var(--line); border-radius: 10px; box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(16, 165, 106, .13); }
.form-control[disabled], .form-control[readonly] { background: #f3f6f9; color: var(--muted); }
.form-control::placeholder { color: #a3afbd; }
select.form-control { padding-right: 8px; }
.form-section .form-group { min-height: 78px; margin-bottom: 8px; }
.form-actions { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-actions .btn { margin-right: 8px; }
.checkbox label { font-weight: 500; font-size: 14px; color: var(--text); }
.checkbox input[type=checkbox] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); }

.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 16px; }
.filter-bar .form-control { width: auto; min-width: 150px; }
.filter-bar .search-box { flex: 1 1 280px; max-width: 420px; }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn { padding: 9px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: background .12s, border-color .12s, box-shadow .12s, color .12s; }
.btn:focus, .btn:active:focus { outline: 0; box-shadow: 0 0 0 4px rgba(16, 165, 106, .18); }
.btn .fa { margin-right: 6px; }

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

.btn-default, .btn-default:focus { color: var(--text); background: #fff; border-color: #d5dde7; }
.btn-default:hover, .btn-default:active, .btn-default:active:hover, .btn-default:active:focus { color: var(--navy); background: #f1f5f9; border-color: #c3cedb; }

.btn-success, .btn-success:focus { color: #fff; background: var(--navy); border-color: var(--navy); }
.btn-success:hover, .btn-success:active, .btn-success:active:hover, .btn-success:active:focus { color: #fff; background: #103456; border-color: #103456; }

/* Row actions inside tables: small, quiet, colour-coded */
.grid-actions { white-space: nowrap; }
.grid-actions .btn { margin: 2px 4px 2px 0; padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 600; box-shadow: none; }
.grid-actions .btn-primary, .grid-actions .btn-primary:hover, .grid-actions .btn-primary:focus { color: #0b5ea8; background: #edf5fd; border-color: #cfe3f7; }
.grid-actions .btn-success, .grid-actions .btn-success:hover, .grid-actions .btn-success:focus { color: #0b7a4e; background: #e9f8f0; border-color: #c3ebd7; }
.grid-actions .btn-warning, .grid-actions .btn-warning:hover, .grid-actions .btn-warning:focus { color: #8a5a00; background: #fff6e2; border-color: #fbe2ae; }
.grid-actions .btn-danger, .grid-actions .btn-danger:hover, .grid-actions .btn-danger:focus { color: #b3261a; background: #fdeeed; border-color: #f6cfcb; }
.grid-actions .btn-info, .grid-actions .btn-info:hover, .grid-actions .btn-info:focus { color: #fff; background: var(--navy); border-color: var(--navy); }
.grid-actions .btn:hover { filter: brightness(.95); }

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table-responsive { border: 0; margin-bottom: 0; }
.table { width: 100%; margin: 0; font-size: 13.5px; border: 0; }
.table > thead > tr > th, .table > tbody > tr > th {
    padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line); background: #f8fafc;
    font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.table > tbody > tr > td, .table > tfoot > tr > td { padding: 12px 16px; border: 0; border-top: 1px solid #eef2f6; vertical-align: middle; white-space: nowrap; }
.table-striped > tbody > tr:nth-of-type(odd) { background: transparent; }
.table-hover > tbody > tr:hover { background: #f7fafd; }
.table > tbody > tr:first-child > td { border-top: 0; }
.table a { font-weight: 600; text-decoration: none; }
.table a:hover { text-decoration: underline; }
.table .grid-actions a:hover { text-decoration: none; }
.table > tbody > tr.grid-pager > td, .table > tbody > tr.grid-pager:hover { background: #f8fafc; padding: 10px 16px; }
.grid-pager table { margin: 0 auto; }
.grid-pager table td { padding: 0 3px !important; border: 0 !important; background: none !important; }
.grid-pager table td a, .grid-pager table td span {
    display: inline-block; min-width: 32px; padding: 5px 9px; border-radius: 8px; text-align: center;
    font-weight: 600; font-size: 13px; color: var(--text); background: #fff; border: 1px solid var(--line);
}
.grid-pager table td span { color: #fff; background: var(--accent); border-color: var(--accent); }
.table > tbody > tr > td[colspan]:only-child { padding: 34px 16px; text-align: center; color: var(--muted); }

.label { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; line-height: 1; }
.label-success { color: #0b7a4e; background: #e3f6ec; }
.label-warning { color: #8a5a00; background: #fff1cf; }
.label-default { color: #5a6878; background: #e9eef4; }
td .label + small { display: block; margin-top: 4px; }

/* ---------------------------------------------------------------------
   Alerts
   --------------------------------------------------------------------- */
.alert { margin-bottom: 18px; padding: 13px 16px; border-radius: 11px; border: 1px solid transparent; border-left-width: 4px; font-size: 14px; font-weight: 500; }
.alert-success { color: #0b6b45; background: #e9f8f0; border-color: #bfe8d4; border-left-color: var(--accent); }
.alert-danger { color: #9f2419; background: #fdeeed; border-color: #f6cfcb; border-left-color: #d9483b; }
.alert-warning { color: #7a5000; background: #fff6e2; border-color: #fbe2ae; border-left-color: #f0a500; }
.alert-info { color: #0b4f86; background: #eaf4fd; border-color: #c7e0f7; border-left-color: #2b86d9; }
.alert .alert-link { color: inherit; text-decoration: underline; }

/* ---------------------------------------------------------------------
   Dashboard
   --------------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden; margin-bottom: 22px; padding: 28px 30px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
    border-radius: 16px; color: #fff; background: linear-gradient(120deg, #0a2540 0%, #0b3e56 55%, #0e7a66 100%);
    box-shadow: 0 14px 34px rgba(10, 37, 64, .22);
}
.hero:after { content: ""; position: absolute; right: -90px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: rgba(77, 224, 148, .12); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-date { display: inline-block; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: #8fd9b8; }
.hero h1 { margin: 0 0 6px; font-size: 27px; font-weight: 700; letter-spacing: -.4px; color: #fff; }
.hero p { margin: 0; color: #c4d6e2; font-size: 14.5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero .btn-primary, .hero .btn-primary:focus { background: #19c37d; border-color: #19c37d; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.hero .btn-primary:hover { background: #14ad6e; border-color: #14ad6e; }
.hero .btn-default, .hero .btn-default:focus { color: #fff; background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .28); }
.hero .btn-default:hover { color: #fff; background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .4); }

.stat {
    display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding: 20px;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
    color: inherit; text-decoration: none; transition: transform .12s, box-shadow .12s;
}
a.stat:hover, a.stat:focus { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16, 37, 64, .06), 0 12px 28px rgba(16, 37, 64, .10); color: inherit; text-decoration: none; }
.stat-icon { flex: none; width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; }
.stat-blue { color: #0b6bb8; background: #e6f1fb; }
.stat-amber { color: #b97400; background: #fff3d6; }
.stat-green { color: #0b8a57; background: #e3f6ec; }
.stat-violet { color: #6a4bd1; background: #eee9fd; }
.stat-num { display: block; font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.5px; color: var(--navy); }
.stat-label { display: block; margin-top: 3px; font-size: 13px; font-weight: 500; color: var(--muted); }

/* ---------------------------------------------------------------------
   Auto Fill WAFID: extension status and set-up help (Candidate Draft page)
   --------------------------------------------------------------------- */
.ext-status { font-size: 13px; font-weight: 600; }
.ext-status:before { font-family: FontAwesome; margin-right: 8px; }
.ext-ok { color: #0b7a4e; }
.ext-ok:before { content: "\f058"; }
.ext-off { color: #9f2419; }
.ext-off:before { content: "\f071"; }
.ext-help { margin-top: 8px; font-size: 13px; color: var(--text); }
.ext-help summary { cursor: pointer; font-weight: 600; color: #0b6bb8; }
.ext-help ol { margin: 10px 0 8px; padding-left: 20px; }
.ext-help li { margin-bottom: 5px; }
.ext-help p { margin: 0; color: var(--muted); }
.ext-help code { padding: 2px 6px; border-radius: 6px; background: #eef2f7; color: var(--navy); font-size: 12.5px; }
.ext-checking { color: var(--muted); }
.ext-checking:before { content: "\f110"; }
