/* ==========================================================
   TourDesk – Design System
   ========================================================== */
:root {
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --r-xs: 8px;
    --r-sm: 12px;
    --r: 16px;
    --r-lg: 22px;
    --ease: cubic-bezier(.2, .8, .2, 1);

    --c-teal: #0ea5b7;
    --c-blue: #2563eb;
    --c-indigo: #4f46e5;
    --c-orange: #f97316;
    --c-rose: #e11d48;
    --c-green: #16a34a;
    --c-amber: #d97706;
    --c-violet: #7c3aed;

    --grad-primary: linear-gradient(135deg, #0ea5b7 0%, #2563eb 100%);
    --grad-warm: linear-gradient(135deg, #fb923c 0%, #e11d48 100%);
    --grad-green: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --grad-violet: linear-gradient(135deg, #a78bfa 0%, #6d28d9 100%);
    --grad-amber: linear-gradient(135deg, #fcd34d 0%, #d97706 100%);
    --grad-slate: linear-gradient(135deg, #94a3b8 0%, #334155 100%);
    --grad-sky: linear-gradient(135deg, #7dd3fc 0%, #0369a1 100%);
    --grad-pink: linear-gradient(135deg, #f9a8d4 0%, #be185d 100%);
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f2f5fa;
    --bg-accent: radial-gradient(1200px 600px at 100% -10%, rgba(14, 165, 183, .10), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(37, 99, 235, .08), transparent 60%);
    --surface: #ffffff;
    --surface-2: #f6f8fc;
    --surface-3: #eef2f8;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --primary: #0b8a9b;
    --primary-strong: #086b78;
    --primary-soft: rgba(14, 165, 183, .12);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, .1);
    --success: #16a34a;
    --success-soft: rgba(22, 163, 74, .12);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, .12);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -10px rgba(15, 23, 42, .12);
    --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .28);
    --glass: rgba(255, 255, 255, .72);
    --input-bg: #ffffff;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #070b16;
    --bg-accent: radial-gradient(1200px 600px at 100% -10%, rgba(14, 165, 183, .16), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(79, 70, 229, .14), transparent 60%);
    --surface: #0f1626;
    --surface-2: #131c30;
    --surface-3: #1a2540;
    --border: #1f2b45;
    --border-strong: #2c3b5c;
    --text: #e7edf7;
    --text-2: #c3cede;
    --muted: #8b9ab3;
    --primary: #22c3d6;
    --primary-strong: #67e8f9;
    --primary-soft: rgba(34, 195, 214, .14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, .14);
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, .14);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, .14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, .75);
    --glass: rgba(10, 15, 28, .72);
    --input-bg: #0b1222;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg-accent), var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    transition: background-color .3s var(--ease), color .3s var(--ease);
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
img { max-width: 100%; }
code { font-size: .88em; background: var(--surface-3); padding: .1em .4em; border-radius: 6px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0 !important; }
.mt { margin-top: 1rem; }
.mt-lg { margin-top: 1.75rem; }
.mb { margin-bottom: 1rem; }
.gap { gap: .6rem; }
.flex { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.ico { width: 1.25em; height: 1.25em; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 999; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ---------- Topbar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: var(--glass);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: .65rem 1.25rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--text); min-width: 0; }
.brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; flex: 0 0 auto; }
img.brand-mark { background: #fff; padding: 3px; box-shadow: var(--shadow-sm); }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.topnav { display: flex; gap: .25rem; margin-left: auto; }
.topnav-link { display: flex; align-items: center; gap: .45rem; padding: .5rem .8rem; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .9rem; transition: background .2s, color .2s; }
.topnav-link:hover { background: var(--primary-soft); color: var(--primary); }
.topnav-link .ico { width: 18px; height: 18px; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.user-chip { display: flex; align-items: center; gap: .5rem; padding: .25rem .7rem .25rem .25rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: var(--grad-primary); }
.user-name { font-weight: 600; font-size: .85rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
    width: 40px; height: 40px; display: inline-grid; place-items: center;
    border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
    cursor: pointer; transition: transform .15s var(--ease), background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); }
.icon-btn .ico { width: 20px; height: 20px; }
html[data-theme="light"] .theme-ico-dark, html[data-theme="dark"] .theme-ico-light { display: none; }
.theme-ico-light, .theme-ico-dark { display: grid; place-items: center; }

/* ---------- Layout ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head-main { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.page-head h1 { font-size: clamp(1.35rem, 2.6vw, 1.85rem); font-weight: 800; margin: 0; }
.page-sub { color: var(--muted); margin: .2rem 0 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.back-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); flex: 0 0 auto; transition: .2s var(--ease); box-shadow: var(--shadow-sm); }
.back-btn:hover { transform: translateX(-2px); color: var(--primary); border-color: var(--primary); }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .15rem; font-size: .8rem; color: var(--muted); margin-bottom: .15rem; }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--primary); }
.crumbs .ico { width: 14px; height: 14px; opacity: .6; }
.app-footer { max-width: 1240px; margin: 0 auto; padding: 1.25rem; display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 1.35rem; }
.card + .card { margin-top: 1.1rem; }
.card-title { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; font-weight: 750; margin-bottom: 1rem; }
.card-title .ico { color: var(--primary); }
.card-sub { color: var(--muted); font-size: .88rem; margin-top: -.6rem; margin-bottom: 1rem; }
.section-title { font-size: 1.05rem; font-weight: 800; margin: 2rem 0 .9rem; display: flex; align-items: center; gap: .5rem; }

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .62rem 1.05rem; font: inherit; font-weight: 650; font-size: .9rem; line-height: 1.2;
    color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd); border-radius: 12px;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s, filter .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--btn-fg); border-color: var(--border-strong); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .ico { width: 18px; height: 18px; }
.btn-primary { --btn-bg: var(--grad-primary); --btn-fg: #fff; --btn-bd: transparent; background: var(--grad-primary); box-shadow: 0 8px 20px -8px rgba(14, 165, 183, .7); }
.btn-primary:hover { filter: brightness(1.06); border-color: transparent; box-shadow: 0 12px 26px -10px rgba(37, 99, 235, .7); }
.btn-warm { background: var(--grad-warm); --btn-fg: #fff; --btn-bd: transparent; box-shadow: 0 8px 20px -8px rgba(225, 29, 72, .6); }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: transparent; }
.btn-danger:hover { filter: brightness(1.08); border-color: transparent; }
.btn-ghost { --btn-bg: transparent; }
.btn-soft { --btn-bg: var(--primary-soft); --btn-fg: var(--primary); --btn-bd: transparent; }
.btn-soft-danger { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-bd: transparent; }
.btn-success { --btn-bg: var(--success); --btn-fg: #fff; --btn-bd: transparent; }
.btn-success:hover { filter: brightness(1.08); }
.btn-warning { --btn-bg: var(--warning); --btn-fg: #fff; --btn-bd: transparent; }
.btn-warning:hover { filter: brightness(1.08); }
.btn-sm { padding: .42rem .7rem; font-size: .82rem; border-radius: 10px; }
.btn-sm .ico { width: 16px; height: 16px; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { padding: .45rem; width: 36px; height: 36px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field > span:first-child, .field-label { font-weight: 650; font-size: .86rem; color: var(--text-2); }
.field .req { color: var(--danger); }
.hint { color: var(--muted); font-size: .78rem; }
.input, .select, .textarea {
    width: 100%; font: inherit; font-size: .95rem; color: var(--text);
    background: var(--input-bg); border: 1.5px solid var(--border); border-radius: 12px;
    padding: .68rem .85rem; transition: border-color .2s, box-shadow .2s, background .2s; min-height: 46px;
}
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .75; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.input[readonly] { background: var(--surface-2); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.4rem; }
input[type="date"].input, input[type="datetime-local"].input { min-height: 46px; }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .input { flex: 1; }
.input-group .input:not(:last-child) { padding-right: 3rem; }
.input-addon { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.input-addon:hover { color: var(--primary); background: var(--primary-soft); }
.input-addon .ico { width: 20px; height: 20px; }
.input-prefix { position: relative; }
.input-prefix > b { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; font-size: .9rem; pointer-events: none; }
.input-prefix .input { padding-left: 2.6rem; }
.input-suffix { position: relative; }
.input-suffix > b { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; font-size: .85rem; pointer-events: none; }
.input-suffix .input { padding-right: 3.2rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; font-size: .9rem; color: var(--text-2); }
.check input { width: 18px; height: 18px; accent-color: var(--primary); margin-top: 2px; flex: 0 0 auto; }
.form-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.total-preview { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1rem; border-radius: 12px; background: var(--primary-soft); color: var(--primary-strong); font-weight: 700; }
html[data-theme="dark"] .total-preview { color: var(--primary); }
.total-preview strong { font-size: 1.15rem; }
.file-drop { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border: 1.5px dashed var(--border-strong); border-radius: 12px; cursor: pointer; background: var(--surface-2); transition: .2s; }
.file-drop:hover { border-color: var(--primary); background: var(--primary-soft); }
.file-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop .ico { width: 26px; height: 26px; color: var(--primary); }
.file-drop small { display: block; color: var(--muted); }
.file-preview { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; font-size: .82rem; color: var(--muted); }
.file-preview img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.strength { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; background: var(--danger); transition: width .3s, background .3s; }
.hint.ok { color: var(--success); }
.hint.bad { color: var(--danger); }

/* ---------- Alerts / toasts ---------- */
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 14px; margin: 0 0 1rem; font-size: .9rem; border: 1px solid transparent; }
.alert .ico { margin-top: 1px; }
.alert-info { background: var(--primary-soft); color: var(--text-2); border-color: color-mix(in srgb, var(--primary) 25%, transparent); }
.alert-info .ico { color: var(--primary); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--text-2); }
.alert-warning .ico { color: var(--warning); }
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 200; display: flex; flex-direction: column; gap: .5rem; max-width: min(420px, calc(100vw - 2rem)); }
.toast { display: flex; align-items: center; gap: .7rem; padding: .85rem .9rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-weight: 600; font-size: .9rem; animation: toastIn .4s var(--ease); }
.toast-success .ico:first-child { color: var(--success); }
.toast-error .ico:first-child { color: var(--danger); }
.toast-info .ico:first-child { color: var(--primary); }
.toast span { flex: 1; }
.toast-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; display: grid; }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge .ico { width: 14px; height: 14px; }
.badge-upcoming { background: rgba(37, 99, 235, .12); color: #2563eb; }
.badge-ongoing { background: var(--warning-soft); color: var(--warning); }
.badge-done, .badge-success { background: var(--success-soft); color: var(--success); }
html[data-theme="dark"] .badge-upcoming { color: #93c5fd; }
.badge-soon { background: var(--grad-warm); color: #fff; }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-error { background: var(--danger-soft); color: var(--danger); }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; font-weight: 600; color: var(--text-2); }
.chip .ico { width: 15px; height: 15px; color: var(--primary); }
.chip-btn { cursor: pointer; transition: .2s; }
.chip-btn:hover, .chip-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chip-btn.active .ico, .chip-btn:hover .ico { color: #fff; }
.kbd { font-family: ui-monospace, monospace; background: var(--danger-soft); color: var(--danger); padding: .05rem .4rem; border-radius: 6px; }

/* ---------- Dashboard ---------- */
.hero {
    position: relative; overflow: hidden; border-radius: 26px; padding: 1.8rem; color: #fff;
    background: linear-gradient(120deg, rgba(8, 47, 73, .92), rgba(14, 116, 144, .78) 55%, rgba(37, 99, 235, .55)), url('../img/login-bg.webp') center 70% / cover;
    box-shadow: var(--shadow-lg); margin-bottom: 1.5rem;
}
.hero h2 { font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 800; margin-bottom: .3rem; }
.hero p { opacity: .9; margin: 0; max-width: 560px; }
.hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.2rem; flex-wrap: wrap; }
.hero .btn { --btn-bg: rgba(255, 255, 255, .16); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .3); backdrop-filter: blur(8px); }
.hero .btn:hover { --btn-bg: rgba(255, 255, 255, .26); }
.hero-date { font-size: .85rem; font-weight: 600; opacity: .85; display: flex; align-items: center; gap: .4rem; margin-bottom: .5rem; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); display: flex; gap: .85rem; align-items: center; min-width: 0; }
.stat-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.stat-ico .ico { width: 24px; height: 24px; }
.stat-label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.2rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > div:last-child { min-width: 0; }
.stat-value.pos { color: var(--success); }
.stat-value.neg { color: var(--danger); }

.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.menu-tile {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .9rem;
    padding: 1.35rem; border-radius: 22px; background: var(--surface); border: 1px solid var(--border);
    color: var(--text); box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
    isolation: isolate;
}
.menu-tile::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; border-radius: 50%; background: var(--tile-grad, var(--grad-primary)); opacity: .08; z-index: -1; transition: transform .4s var(--ease), opacity .3s; }
.menu-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; color: var(--text); }
.menu-tile:hover::after { transform: scale(1.35); opacity: .16; }
.menu-tile .tile-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: var(--tile-grad, var(--grad-primary)); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); transition: transform .3s var(--ease); }
.menu-tile:hover .tile-ico { transform: rotate(-6deg) scale(1.06); }
.menu-tile .tile-ico .ico { width: 28px; height: 28px; }
.menu-tile h3 { font-size: 1.05rem; font-weight: 800; margin: 0; }
.menu-tile p { color: var(--muted); font-size: .86rem; margin: 0; }
.menu-tile .tile-num { position: absolute; top: 1.1rem; right: 1.2rem; font-size: .78rem; font-weight: 800; color: var(--muted); opacity: .6; }
.menu-tile .tile-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: .82rem; font-weight: 700; color: var(--primary); }
.menu-tile .tile-meta .ico { width: 18px; height: 18px; transition: transform .25s; }
.menu-tile:hover .tile-meta .ico { transform: translateX(4px); }
.menu-tile.is-soon { opacity: .85; }
.menu-tile .badge-soon { position: absolute; top: 1rem; right: 1rem; }

/* ---------- Trip list ---------- */
.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.search { position: relative; flex: 1 1 260px; }
.search .ico { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.search .input { padding-left: 2.7rem; }
.trip-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.1rem; }
.trip-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s var(--ease), box-shadow .25s; }
.trip-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.trip-card-top { padding: 1.1rem 1.2rem .9rem; position: relative; }
.trip-card-top::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--grad-primary); }
.trip-card.st-ongoing .trip-card-top::before { background: var(--grad-amber); }
.trip-card.st-done .trip-card-top::before { background: var(--grad-green); }
.trip-card h3 { font-size: 1.08rem; font-weight: 800; margin: .55rem 0 .15rem; }
.trip-client { display: flex; align-items: center; gap: .4rem; color: var(--text-2); font-weight: 600; font-size: .88rem; }
.trip-client .ico { width: 16px; height: 16px; color: var(--primary); }
.trip-date { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .85rem; margin-top: .35rem; }
.trip-date .ico { width: 16px; height: 16px; }
.trip-meta { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.2rem 1rem; }
.trip-card-foot { margin-top: auto; display: flex; gap: .5rem; padding: .85rem 1.2rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.trip-card-foot .btn-primary { margin-left: auto; }

/* ---------- Trip hub ---------- */
.trip-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 1.5rem; color: #fff; background: linear-gradient(125deg, #0b4f6c 0%, #0e7490 45%, #2563eb 100%); box-shadow: var(--shadow-lg); margin-bottom: 1.3rem; }
.trip-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%); }
.trip-hero h2 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 800; margin: .5rem 0 .25rem; }
.trip-hero .chip { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .25); color: #fff; }
.trip-hero .chip .ico { color: #fff; }
.trip-hero .badge { background: rgba(255, 255, 255, .2); color: #fff; }
.trip-hero-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.fleet-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }

.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ---------- Tables ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 750; background: var(--surface-2); padding: .8rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.clickable { cursor: pointer; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 800; background: var(--surface-2); border-bottom: 0; }
.table tfoot tr.grand td { font-size: 1.02rem; background: var(--primary-soft); color: var(--primary-strong); }
html[data-theme="dark"] .table tfoot tr.grand td { color: var(--primary); }
.table .td-title { font-weight: 700; }
.table .td-sub { color: var(--muted); font-size: .8rem; }
.row-actions { display: flex; gap: .35rem; justify-content: flex-end; }
.receipt-thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); display: block; }
.receipt-pdf { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); font-size: .65rem; font-weight: 800; }

.summary-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.1rem; }
.sum-card { padding: 1.1rem 1.2rem; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.sum-card .lbl { font-size: .8rem; color: var(--muted); font-weight: 650; }
.sum-card .val { font-size: 1.3rem; font-weight: 800; }
.sum-card.hl { background: var(--grad-primary); color: #fff; border-color: transparent; }
.sum-card.hl .lbl { color: rgba(255, 255, 255, .85); }
.sum-card.neg { background: var(--grad-warm); color: #fff; border-color: transparent; }
.sum-card.neg .lbl { color: rgba(255, 255, 255, .85); }

/* ---------- Timeline (rundown) ---------- */
.day-group { margin-bottom: 1.4rem; }
.day-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; }
.day-pill { background: var(--grad-primary); color: #fff; font-weight: 800; font-size: .78rem; padding: .3rem .75rem; border-radius: 999px; }
.day-head h3 { margin: 0; font-size: 1rem; font-weight: 750; }
.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: .55rem; top: .4rem; bottom: .4rem; width: 2px; background: linear-gradient(var(--primary), transparent); opacity: .35; }
.tl-item { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: .9rem 1rem; margin-bottom: .7rem; display: flex; gap: 1rem; align-items: flex-start; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.tl-item:hover { transform: translateX(3px); box-shadow: var(--shadow); }
.tl-item::before { content: ""; position: absolute; left: -1.38rem; top: 1.15rem; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.tl-time { min-width: 92px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; font-size: .92rem; }
.tl-body { flex: 1; min-width: 0; }
.tl-body h4 { margin: 0 0 .15rem; font-size: .98rem; font-weight: 750; }
.tl-body p { margin: .25rem 0 0; color: var(--muted); font-size: .86rem; white-space: pre-line; }
.tl-loc { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; color: var(--text-2); font-weight: 600; }
.tl-loc .ico { width: 15px; height: 15px; color: var(--c-orange); }

/* ---------- Clients ---------- */
.client-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.client-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .7rem; transition: transform .2s var(--ease), box-shadow .2s; }
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.client-top { display: flex; gap: .8rem; align-items: center; }
.client-avatar { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--grad-violet); flex: 0 0 auto; }
.client-avatar .ico { width: 24px; height: 24px; }
.client-card h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.client-info { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; color: var(--text-2); }
.client-info div { display: flex; align-items: flex-start; gap: .45rem; }
.client-info .ico { width: 16px; height: 16px; color: var(--muted); margin-top: 2px; }
.client-actions { display: flex; gap: .4rem; margin-top: auto; padding-top: .7rem; border-top: 1px dashed var(--border); }

/* ---------- Fleet repeater ---------- */
.repeater { display: flex; flex-direction: column; gap: .7rem; }
.repeater-row { display: grid; grid-template-columns: 1.4fr 1fr .6fr 1.2fr auto; gap: .6rem; align-items: end; padding: .85rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); animation: fadeUp .3s var(--ease); }
.repeater-row .field > span:first-child { font-size: .76rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .35rem; padding: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 1.2rem; overflow-x: auto; }
.tab { display: flex; align-items: center; gap: .45rem; padding: .6rem 1rem; border: 0; background: transparent; color: var(--text-2); font: inherit; font-weight: 650; font-size: .88rem; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.tab .ico { width: 18px; height: 18px; }
.tab.active { background: var(--grad-primary); color: #fff; box-shadow: 0 6px 16px -8px rgba(14, 165, 183, .8); }
.tab-panel { display: none; animation: fadeUp .3s var(--ease); }
.tab-panel.active { display: block; }
.img-upload { display: flex; gap: 1rem; align-items: center; }
.img-upload-preview { width: 96px; height: 96px; border-radius: 16px; border: 1px dashed var(--border-strong); background: var(--surface-2) repeating-conic-gradient(var(--surface-3) 0 25%, transparent 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; }
.img-upload-preview img { width: 100%; height: 100%; object-fit: contain; }
.img-upload-preview .ico { width: 32px; height: 32px; color: var(--muted); }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(640px, calc(100vw - 1.5rem)); width: 100%; color: var(--text); max-height: calc(100dvh - 1.5rem); }
.modal-sm { max-width: min(420px, calc(100vw - 1.5rem)); }
.modal-lg { max-width: min(920px, calc(100vw - 1.5rem)); }
.modal::backdrop { background: rgba(2, 6, 23, .55); backdrop-filter: blur(4px); }
.modal[open] { animation: modalIn .3s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: calc(100dvh - 1.5rem); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 1.08rem; font-weight: 800; }
.modal-body { padding: 1.2rem 1.3rem; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.3rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 22px 22px; flex-wrap: wrap; }
.modal-body .grid-2 + .grid-2 { margin-top: 1rem; }
.big-ico { width: 72px; height: 72px; margin: 0 auto 1rem; border-radius: 22px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.big-ico .ico { width: 36px; height: 36px; }
.big-ico.danger { background: var(--danger-soft); color: var(--danger); }
.big-ico.success { background: var(--success-soft); color: var(--success); }
.danger-box { display: flex; gap: .8rem; padding: 1rem; border-radius: 14px; background: var(--danger-soft); color: var(--text); margin-bottom: 1rem; }
.danger-box > .ico { color: var(--danger); width: 26px; height: 26px; }
.danger-box p { margin: .2rem 0 0; font-size: .86rem; color: var(--text-2); }
.receipt-body { display: grid; place-items: center; min-height: 300px; background: var(--surface-2); }
.receipt-body img { max-height: 70vh; border-radius: 12px; box-shadow: var(--shadow); }
.receipt-body iframe { width: 100%; height: 70vh; border: 0; border-radius: 12px; background: #fff; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 3rem 1.5rem; background: var(--surface); border: 1.5px dashed var(--border-strong); border-radius: 22px; }
.empty-ico { width: 80px; height: 80px; margin: 0 auto 1rem; border-radius: 26px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.empty-ico .ico { width: 40px; height: 40px; }
.empty h3 { font-size: 1.1rem; font-weight: 800; }
.empty p { color: var(--muted); max-width: 420px; margin: 0 auto 1.2rem; }

/* ---------- Upcoming list ---------- */
.upcoming { display: flex; flex-direction: column; gap: .6rem; }
.up-item { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: .2s var(--ease); }
.up-item:hover { transform: translateX(3px); border-color: var(--primary); color: var(--text); }
.up-date { width: 54px; height: 54px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); line-height: 1.05; flex: 0 0 auto; }
.up-date b { font-size: 1.2rem; font-weight: 800; }
.up-date small { font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.up-item .up-main { flex: 1; min-width: 0; }
.up-item h4 { margin: 0; font-size: .95rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-item p { margin: 0; color: var(--muted); font-size: .82rem; }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.login-visual { position: relative; overflow: hidden; background: #0b3a4a url('../img/login-bg.webp') center / cover; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 3rem; }
.login-visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 7, 18, .05) 0%, rgba(3, 7, 18, .25) 45%, rgba(3, 7, 18, .85) 100%); }
.login-visual > * { position: relative; }
.login-visual .quote { font-size: clamp(1.5rem, 2.8vw, 2.4rem); font-weight: 800; line-height: 1.2; max-width: 520px; text-shadow: 0 2px 20px rgba(0, 0, 0, .35); }
.login-visual .quote-sub { opacity: .85; margin-top: .6rem; max-width: 460px; }
.login-visual .floating { position: absolute; top: 2rem; left: 2rem; display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(10px); font-weight: 700; font-size: .85rem; }
.login-visual .floating .ico { width: 18px; height: 18px; }
.login-side { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 2rem 1.5rem; position: relative; background: var(--bg-accent), var(--bg); }
.login-card { width: 100%; max-width: 420px; }
.login-brand { text-align: center; margin-bottom: 1.8rem; }
.login-logo { width: 84px; height: 84px; border-radius: 24px; margin: 0 auto 1rem; display: block; object-fit: contain; box-shadow: var(--shadow-lg); animation: float 6s ease-in-out infinite; }
img.login-logo { background: #fff; padding: 6px; }
@keyframes float { 50% { transform: translateY(-6px); } }
.login-brand .web-name { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--primary); }
.login-brand h1 { font-size: 1.65rem; font-weight: 800; margin: .3rem 0 .25rem; }
.login-brand .slogan { color: var(--muted); font-style: italic; margin: 0; }
.login-form { display: flex; flex-direction: column; gap: 1rem; background: var(--surface); padding: 1.6rem; border-radius: 24px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.login-form h2 { font-size: 1.1rem; font-weight: 800; margin: 0; }
.login-form .input-icon { position: relative; }
.login-form .input-icon > .ico { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; pointer-events: none; z-index: 1; }
.login-form .input-icon .input { padding-left: 2.8rem; }
.login-theme { position: absolute; top: 1.2rem; right: 1.2rem; }
.login-foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 1.4rem; }

/* ---------- Install ---------- */
.install-page { min-height: 100vh; }
.install-bg { position: fixed; inset: 0; z-index: -1; background: radial-gradient(800px 400px at 0% 0%, rgba(14, 165, 183, .25), transparent 60%), radial-gradient(800px 400px at 100% 100%, rgba(37, 99, 235, .2), transparent 60%), var(--bg); }
.install-wrap { max-width: 760px; margin: 0 auto; padding: 2rem 1.1rem 3rem; }
.install-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.install-head > div { flex: 1; }
.install-head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.install-head p { margin: 0; color: var(--muted); }
.install-logo { width: 60px; height: 60px; border-radius: 18px; box-shadow: var(--shadow-lg); flex: 0 0 auto; }
.install-card { margin-bottom: 1.1rem; }
.install-card + .install-card { margin-top: 0; }
.step { width: 28px; height: 28px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--grad-primary); color: #fff; font-size: .85rem; font-weight: 800; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.checklist li { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: 12px; background: var(--surface-2); font-size: .86rem; font-weight: 600; }
.checklist li small { margin-left: auto; color: var(--muted); font-weight: 600; }
.checklist .dot { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.checklist .dot .ico { width: 16px; height: 16px; }
.checklist .ok .dot { background: var(--success-soft); color: var(--success); }
.checklist .fail .dot { background: var(--danger-soft); color: var(--danger); }
.checklist .warn .dot { background: var(--warning-soft); color: var(--warning); }
.install-foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 1.5rem; }

/* ---------- Coming soon ---------- */
.soon { text-align: center; padding: 4rem 1.5rem; border-radius: 26px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.soon .big-ico { width: 96px; height: 96px; border-radius: 30px; background: var(--grad-warm); color: #fff; }
.soon .big-ico .ico { width: 48px; height: 48px; animation: spinSlow 4s ease-in-out infinite; }
@keyframes spinSlow { 50% { transform: rotate(180deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .topnav-link span { display: none; }
}
@media (max-width: 900px) {
    .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { min-height: 260px; padding: 1.6rem; }
    .login-visual .quote { font-size: 1.4rem; }
    .login-visual .quote-sub { display: none; }
    .summary-cards { grid-template-columns: 1fr; }
    .repeater-row { grid-template-columns: 1fr 1fr; }
    .repeater-row .rep-del { grid-column: 1 / -1; }
    .user-name { display: none; }
    .user-chip { padding: .2rem; }
}
@media (max-width: 720px) {
    body { font-size: 14.5px; }
    .container { padding: 1rem .85rem 2.5rem; }
    .topbar-inner { padding: .55rem .85rem; gap: .5rem; }
    .topnav { display: none; }
    .topbar-actions { margin-left: auto; }
    .brand-text small { max-width: 150px; }
    .grid-2, .grid-3, .checklist { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .page-head { align-items: stretch; }
    .page-actions { width: 100%; justify-content: flex-start; }
    .menu-tile { padding: 1.1rem; gap: .65rem; }
    .menu-tile .tile-ico { width: 48px; height: 48px; border-radius: 15px; }
    .menu-tile p { display: none; }
    .menu-grid { gap: .8rem; }
    .stats, .stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .stat { padding: .8rem; gap: .6rem; flex-direction: column; align-items: flex-start; }
    .stat-ico { width: 38px; height: 38px; border-radius: 12px; }
    .stat-value { font-size: 1.02rem; }
    .trip-list, .client-list { grid-template-columns: 1fr; }
    .hero { padding: 1.3rem; border-radius: 22px; }
    .modal-card { border-radius: 20px; }
    .tl-item { flex-direction: column; gap: .3rem; }
    .app-footer { flex-direction: column; gap: .3rem; text-align: center; }
    .toasts { left: .75rem; right: .75rem; bottom: .75rem; max-width: none; }

    /* Responsive table -> cards */
    .table-cards thead { display: none; }
    .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
    .table-cards tbody tr { padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
    .table-cards td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
    .table-cards td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; font-weight: 650; text-align: left; flex: 0 0 auto; }
    .table-cards td.td-main { display: block; text-align: left; font-size: 1rem; padding-bottom: .4rem; }
    .table-cards td.td-main::before { display: none; }
    .table-cards td.td-actions::before { display: none; }
    .table-cards td.td-actions { justify-content: flex-end; padding-top: .6rem; }
    .table-cards td.num { text-align: right; }
    .table-cards tfoot, .table-cards tfoot tr { display: block; }
    .table-cards tfoot td { display: flex; justify-content: space-between; padding: .8rem 1rem; }
    .table-cards tfoot td.tf-spacer { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Trip hub 4-col grid & Syarat Ketentuan ---------- */
.menu-grid.menu-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.term-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.term-item { display: flex; align-items: flex-start; gap: .9rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); animation: fadeUp .3s var(--ease); }
.term-no { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; font-weight: 800; font-size: .88rem; color: #fff; background: var(--grad-pink); }
.term-text { flex: 1; min-width: 0; padding-top: .3rem; line-height: 1.6; }
.term-move { display: flex; gap: .35rem; }
.ico.rot-up { transform: rotate(-90deg); }
.ico.rot-down { transform: rotate(90deg); }
@media (max-width: 1080px) { .menu-grid.menu-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
    .term-item { flex-wrap: wrap; }
    .term-item .row-actions { width: 100%; justify-content: flex-end; }
}