/* ============================================================================
   Yatra — premium LIGHT UI theme
   A bright, colorful design system shared by every portal. Class names match
   the views exactly, so restyling here restyles the whole app at once. Vivid
   gradients pop against a clean light background.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap');

:root {
    --bg: #eef1f8;
    --bg2: #f8f9fd;
    --card: #ffffff;
    --card-solid: #ffffff;
    --stroke: rgba(15, 23, 42, .10);
    --accent: #6366f1;
    --accent2: #a855f7;
    --text: #1f2a44;
    --muted: #64748b;
    --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #d946ef 100%);
    --grad-cyan: linear-gradient(135deg, #06b6d4, #3b82f6);
    --grad-emerald: linear-gradient(135deg, #10b981, #22d3ee);
    --grad-amber: linear-gradient(135deg, #f59e0b, #f43f5e);
    --grad-pink: linear-gradient(135deg, #ec4899, #a855f7);
    --grad-violet: linear-gradient(135deg, #8b5cf6, #6366f1);
    --grad-sky: linear-gradient(135deg, #0ea5e9, #6366f1);
    --shadow: 0 14px 34px -18px rgba(30, 41, 89, .28);
    --radius: 16px;
    --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-head: 'Poppins', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        radial-gradient(900px 500px at 6% -8%, rgba(139, 92, 246, .16), transparent 60%),
        radial-gradient(1000px 600px at 100% 0%, rgba(56, 189, 248, .14), transparent 55%),
        radial-gradient(800px 700px at 50% 120%, rgba(236, 72, 153, .10), transparent 60%),
        linear-gradient(180deg, #f8f9fd, #eef1f8);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.01em; color: var(--text); }
a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: #4f46e5; }

::selection { background: rgba(139, 92, 246, .22); color: #3730a3; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #c7cede; border-radius: 20px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #aab4cc; background-clip: padding-box; }

/* ---------- Landing / hero / error ---------- */
.hero, .error-page {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 24px; text-align: center;
}
.hero__card {
    background: var(--card); border: 1px solid var(--stroke); border-radius: 22px; padding: 44px; max-width: 560px; width: 100%;
    box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.hero__card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad-primary); }
.badge {
    display: inline-block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
    font-weight: 700; color: #fff; border-radius: 999px; padding: 5px 14px; margin-bottom: 16px;
    background: var(--grad-primary); box-shadow: 0 8px 20px -8px rgba(139, 92, 246, .6);
}
h1 { margin: 8px 0; font-size: 2.5rem; }
.lead { color: var(--text); font-size: 1.1rem; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.facts li { display: flex; justify-content: space-between; background: #f4f6fc; border: 1px solid var(--stroke); border-radius: 12px; padding: 11px 15px; }
.facts strong { color: var(--muted); font-weight: 600; }
.error-page__code { font-size: 5.5rem; font-weight: 800; font-family: var(--font-head); background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-page__debug { text-align: left; background: #eef2ff; color: #3730a3; padding: 16px; border-radius: 12px; max-width: 720px; overflow: auto; font-size: .85rem; border: 1px solid var(--stroke); }

/* ---------- Panels / cards ---------- */
.panel {
    background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius);
    padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.panel h2 { margin: 0 0 14px; font-size: 1.08rem; }
a.panel { color: inherit; display: block; position: relative; overflow: hidden; }
a.panel::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad-primary); opacity: 0; transition: opacity .18s ease; }
a.panel:hover { transform: translateY(-4px); box-shadow: 0 26px 44px -22px rgba(99, 102, 241, .5); border-color: rgba(139, 92, 246, .4); }
a.panel:hover::before { opacity: 1; }

.flash { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 500; }
.flash--err, .errbox { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.errbox ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Toolbar / inputs ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inp { padding: 10px 12px; border-radius: 10px; border: 1px solid #d5dbe8; background: #fff; color: var(--text); font-family: inherit; font-size: .92rem; transition: border-color .15s ease, box-shadow .15s ease; }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .18); }
.inp::placeholder { color: #9aa6bd; }
.inp--sm { padding: 7px 10px; font-size: .85rem; }
label.fld { display: grid; gap: 6px; margin-bottom: 14px; }
label.fld > span { font-size: .82rem; color: var(--muted); font-weight: 500; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th, .tbl td { text-align: left; padding: 12px 13px; border-bottom: 1px solid var(--stroke); }
.tbl th { color: #475569; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; background: #f3f5fb; }
.tbl tbody tr { transition: background .12s ease; }
.tbl tbody tr:hover td { background: rgba(99, 102, 241, .06); }
.tbl-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--stroke); }

/* ---------- Pills ---------- */
.pill { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: capitalize; color: #fff; }
.pill--active { background: linear-gradient(135deg, #059669, #10b981); }
.pill--suspended { background: linear-gradient(135deg, #e11d48, #f43f5e); }
.pill--pending { background: linear-gradient(135deg, #d97706, #f59e0b); }
.pill--inactive { background: #e2e8f0; color: #475569; }
.pill--sys { background: linear-gradient(135deg, #2563eb, #6366f1); }

/* ---------- Buttons ---------- */
.btn-sm { display: inline-block; padding: 8px 15px; border-radius: 10px; background: var(--grad-primary); color: #fff; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font-size: .83rem; box-shadow: 0 10px 20px -12px rgba(139, 92, 246, .7); transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.btn-sm:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 26px -14px rgba(139, 92, 246, .85); color: #fff; }
.btn-sm:active { transform: translateY(0); }
.btn-sm.ghost { background: #eef1fb; border: 1px solid #d5dbe8; color: #4338ca; box-shadow: none; }
.btn-sm.ghost:hover { background: #e4e8f8; color: #4338ca; }
.btn-sm.danger { background: linear-gradient(135deg, #e11d48, #b91c1c); color: #fff; box-shadow: 0 10px 20px -12px rgba(225, 29, 72, .7); }
.btn-sm[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { display: block; width: 100%; text-align: center; padding: 13px; border: 0; border-radius: 12px; background: var(--grad-primary); color: #fff; font-weight: 700; cursor: pointer; font-size: 1rem; box-shadow: 0 14px 28px -14px rgba(139, 92, 246, .7); transition: transform .15s ease, filter .15s ease; }
.btn-block:hover { transform: translateY(-2px); filter: brightness(1.06); }

/* ---------- Pager ---------- */
.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span { padding: 7px 12px; border-radius: 9px; border: 1px solid #d5dbe8; color: #475569; text-decoration: none; font-size: .85rem; transition: all .15s ease; background: #fff; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .on { background: var(--grad-primary); color: #fff; border-color: transparent; font-weight: 700; }

/* ---------- KPI cards — each one a different vivid gradient ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi {
    position: relative; overflow: hidden; border: 0; border-radius: var(--radius); padding: 20px 20px 22px;
    color: #fff; box-shadow: 0 16px 34px -18px rgba(99, 102, 241, .5); transition: transform .18s ease, box-shadow .18s ease;
    background: var(--grad-violet);
}
.kpi:hover { transform: translateY(-4px); box-shadow: 0 24px 44px -20px rgba(99, 102, 241, .6); }
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.kpi .n { font-size: 1.95rem; font-weight: 800; font-family: var(--font-head); color: #fff; line-height: 1.1; position: relative; }
.kpi .l { color: rgba(255, 255, 255, .9); font-size: .82rem; font-weight: 500; margin-top: 2px; position: relative; }
.kpi:nth-child(6n+1) { background: var(--grad-violet); }
.kpi:nth-child(6n+2) { background: var(--grad-cyan); }
.kpi:nth-child(6n+3) { background: var(--grad-emerald); }
.kpi:nth-child(6n+4) { background: var(--grad-amber); }
.kpi:nth-child(6n+5) { background: var(--grad-pink); }
.kpi:nth-child(6n+6) { background: var(--grad-sky); }

/* ---------- Permissions grid ---------- */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.perm-grid label { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: #475569; background: #f4f6fc; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--stroke); }
.perm-group { margin-bottom: 16px; }
.perm-group h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0 0 8px; }

.muted { color: var(--muted); }

/* ---------- Notification bell ---------- */
.bell { position: relative; text-decoration: none; font-size: 1.2rem; line-height: 1; }
.bell__dot { position: absolute; top: -8px; right: -10px; background: linear-gradient(135deg, #f43f5e, #ec4899); color: #fff; font-size: .65rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 4px 10px -2px rgba(244, 63, 94, .6); }

/* ---------- Support / message threads ---------- */
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { background: #f7f9fd; border: 1px solid var(--stroke); border-radius: 12px; padding: 13px 15px; }
.msg--internal { border-color: rgba(217, 119, 6, .45); background: #fffbeb; }
.msg--mine { border-color: rgba(14, 165, 233, .45); background: #f0f9ff; }
.msg .meta { font-size: .75rem; color: var(--muted); margin-bottom: 6px; }

/* ---------- Nav active states across portals ---------- */
.admin__nav a.is-active,
.cust__nav a.on,
.pt__nav a.on { background: var(--grad-primary) !important; color: #fff !important; box-shadow: 0 10px 20px -12px rgba(139, 92, 246, .7); }

/* ---------- Welcome / hero banner (dashboards) ---------- */
.welcome {
    position: relative; overflow: hidden; border-radius: 20px; padding: 26px 28px; margin-bottom: 22px;
    color: #fff; background: var(--grad-primary); box-shadow: 0 22px 40px -22px rgba(139, 92, 246, .6);
}
.welcome::before { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.welcome::after { content: ''; position: absolute; right: 70px; bottom: -80px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.welcome h1 { margin: 0 0 4px; font-size: 1.7rem; color: #fff; position: relative; }
.welcome p { margin: 0; color: rgba(255, 255, 255, .92); position: relative; max-width: 640px; }
.welcome .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; position: relative; }
.welcome .chip { background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 6px 13px; font-size: .82rem; font-weight: 600; text-decoration: none; }

.kpi .ic { position: relative; font-size: 1.35rem; display: inline-flex; margin-bottom: 8px; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: rgba(255, 255, 255, .22); }

.section-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 1.15rem; margin: 4px 0 14px; }
.section-title::before { content: ''; width: 5px; height: 20px; border-radius: 3px; background: var(--grad-primary); }

/* ---------- Service tiles ---------- */
.svc-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    text-align: center; padding: 24px 16px; border-radius: var(--radius); color: #fff !important;
    text-decoration: none; box-shadow: var(--shadow); position: relative; overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.svc-tile::after { content: ''; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.svc-tile:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 26px 44px -20px rgba(99, 102, 241, .6); color: #fff; }
.svc-tile__ic { font-size: 2rem; position: relative; }
.svc-tile__label { font-weight: 700; font-family: var(--font-head); position: relative; }

/* ---------- Public listing pages (search results) ---------- */
.sec { max-width: 1200px; margin: 40px auto 0; padding: 0 5vw; }
.sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.sec__head h2 { font-size: 1.5rem; margin: 0; }
.sec__head p { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 26px 44px -20px rgba(99, 102, 241, .45); }
.card__media { height: 116px; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: #fff; }
.card__body { padding: 14px 16px; }
.card__title { font-weight: 700; }
.card__meta { color: var(--muted); font-size: .84rem; margin: 4px 0 10px; }
.price { font-family: var(--font-head); font-weight: 800; color: var(--accent); }
.search-bar { max-width: 1200px; margin: 26px auto 0; padding: 16px; background: var(--card); border: 1px solid var(--stroke); border-radius: 16px; box-shadow: var(--shadow); }
.search-bar form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.search-bar .fld { flex: 1 1 150px; margin: 0; }

/* ---------- Image gallery / thumbnails / avatars ---------- */
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.gallery__item { position: relative; margin: 0; border-radius: 13px; overflow: hidden; border: 1px solid var(--stroke); box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: #f4f6fc; }
.gallery__item.is-primary { border: 2px solid #8b5cf6; box-shadow: 0 12px 28px -14px rgba(139, 92, 246, .55); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__badge { position: absolute; left: 7px; top: 7px; background: linear-gradient(135deg, #8b5cf6, #d946ef); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; box-shadow: 0 6px 14px -6px rgba(139, 92, 246, .8); }
.gallery__acts { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 5px; opacity: 0; transition: opacity .15s ease; }
.gallery__item:hover .gallery__acts { opacity: 1; }
.gallery__acts .btn-sm { padding: 4px 9px; line-height: 1; }
@media (hover: none) { .gallery__acts { opacity: 1; } }

/* Thumbnail on list rows and cards */
.thumb { width: 54px; height: 40px; border-radius: 9px; object-fit: cover; border: 1px solid var(--stroke); background: #eef1f8; display: block; }
.thumb--lg { width: 100%; height: 100%; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Avatars */
.avatar { border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 12px -4px rgba(30, 41, 89, .4); background: #eef1f8; }
.avatar--sm { width: 34px; height: 34px; }
.avatar--lg { width: 92px; height: 92px; }
.avatar-fallback { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--grad-primary); color: #fff; font-weight: 700; font-family: var(--font-head); }
.avatar-fallback--sm { width: 34px; height: 34px; font-size: .9rem; }
.avatar-fallback--lg { width: 92px; height: 92px; font-size: 2rem; }

/* ---------- Responsive utilities & mobile refinements ---------- */
/* Fields inside wrapping flex rows grow but never overflow their row. */
label.fld { flex: 1 1 160px; min-width: 0; }

/* Reusable responsive column grids (replace inline 1fr 1fr / 1fr 1fr 1fr). */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
@media (max-width: 760px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* Tablet / phone */
@media (max-width: 760px) {
    .wrap { padding: 0 16px; }
    .welcome { padding: 20px 18px; }
    .welcome h1 { font-size: 1.35rem; }
    .welcome p { font-size: .92rem; }
    .kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
    .kpi .n { font-size: 1.6rem; }
    .panel { padding: 16px; }
    h1 { font-size: 1.7rem; }
    .sec, .cta-band, .site-footer__grid, .search-bar { padding-left: 16px; padding-right: 16px; }
    .search-row .btn-block, .btn-block { width: 100%; }
}

/* Small phones */
@media (max-width: 430px) {
    .kpis { grid-template-columns: 1fr; }
    .btn-sm { padding: 9px 13px; }           /* comfortable tap targets */
    .tbl th, .tbl td { padding: 9px 10px; }
    .admin__main { padding: 16px 14px !important; }
    .cust__wrap, .pt__wrap, .op__wrap { padding: 16px 14px; }
    .nav { padding: 12px 16px; }
}

/* Make buttons and inputs easy to tap everywhere on touch devices. */
@media (hover: none) and (pointer: coarse) {
    .btn-sm, button, .inp, select { min-height: 42px; }
    .btn-sm { display: inline-flex; align-items: center; }
}
