:root {
    --dt-navy: #1b2a4a;
    --dt-navy-2: #24365c;
    --dt-orange: #e8772e;
    --dt-orange-dark: #cf6422;
    --dt-gold: #e0a526;
    --dt-bg: #eef1f6;
    --dt-card: #ffffff;
    --dt-ink: #1b2a4a;
    --dt-muted: #6b7585;
    --dt-line: #e3e7ef;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(27, 42, 74, .06), 0 1px 3px rgba(27, 42, 74, .08);
    --shadow-md: 0 6px 20px rgba(27, 42, 74, .10);
    --shadow-lg: 0 18px 50px rgba(27, 42, 74, .22);
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--dt-ink);
    background: var(--dt-bg);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 110px;
}
h1, h2, h3, .brand-name, .stat-num { font-family: 'Poppins', 'Inter', sans-serif; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.brand {
    background: linear-gradient(135deg, var(--dt-navy), var(--dt-navy-2));
    box-shadow: var(--shadow-md);
    position: sticky; top: 0; z-index: 40;
}
.brand-inner { display: flex; align-items: center; gap: 16px; height: 76px; }
.brand-logo { height: 46px; width: auto; }
.brand-title { display: flex; flex-direction: column; }
.brand-name { color: #fff; font-weight: 700; font-size: 20px; letter-spacing: .2px; }

.main { padding-top: 26px; }

.panel {
    background: var(--dt-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--dt-line);
}

/* Trip panel */
.trip-panel {
    display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
    padding: 26px 28px; margin-bottom: 22px;
}
.trip-heading { margin: 0 0 16px; font-size: 22px; color: var(--dt-navy); }
.trip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin: 0; }
.trip-grid > div { margin: 0; }
.trip-grid dt { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--dt-muted); font-weight: 600; }
.trip-grid dd { margin: 3px 0 0; font-size: 16px; font-weight: 600; color: var(--dt-navy); }
.trip-dest { grid-column: 1 / -1; }
.trip-video video { width: 100%; border-radius: 12px; background: #000; box-shadow: var(--shadow-sm); aspect-ratio: 16 / 9; }
.video-cap { margin: 8px 2px 0; font-size: 13px; color: var(--dt-muted); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.stat {
    background: var(--dt-card); border: 1px solid var(--dt-line);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 16px 10px; text-align: center;
}
.stat-num { font-size: 26px; font-weight: 800; color: var(--dt-navy); line-height: 1.1; }
.stat-seats .stat-num { color: var(--dt-orange); }
.stat-seats .stat-num.over { color: #d23b3b; }
.stat-label { margin-top: 6px; font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--dt-muted); font-weight: 600; }

/* Upload card (desktop only) */
.upload-card {
    display: flex; align-items: center; justify-content: space-between; gap: 28px;
    padding: 22px 28px; margin-bottom: 24px;
}
.upload-copy { max-width: 56%; }
.upload-copy h2 { margin: 0 0 6px; font-size: 18px; color: var(--dt-navy); }
.upload-copy p { margin: 0; font-size: 14px; color: var(--dt-muted); line-height: 1.5; }
.upload-action { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.btn-upload {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, var(--dt-navy), var(--dt-navy-2));
    color: #fff; border: none; cursor: pointer;
    font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 16px;
    padding: 16px 30px; min-width: 230px; justify-content: center;
    border-radius: 12px; box-shadow: var(--shadow-md);
    transition: transform .16s var(--ease-out), box-shadow .16s var(--ease-out);
}
.btn-upload:hover { box-shadow: var(--shadow-lg); }
.btn-upload:active { transform: scale(.97); }
.btn-upload[disabled] { opacity: .7; cursor: default; }
.upload-hint { margin: 0; font-size: 12px; color: var(--dt-muted); min-height: 16px; }

/* Rooms header */
.rooms-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 16px; gap: 12px; flex-wrap: wrap; }
.rooms-head h2 { margin: 0; font-size: 20px; color: var(--dt-navy); }
.rooms-add { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn {
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px;
    border-radius: 10px; padding: 10px 16px; cursor: pointer; border: 1px solid transparent;
    transition: transform .16s var(--ease-out), background .16s var(--ease-out), box-shadow .16s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn-outline { background: transparent; border-color: var(--dt-navy); color: var(--dt-navy); }
.btn-outline:hover { background: rgba(27,42,74,.06); }
.btn-primary { background: var(--dt-orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--dt-orange-dark); }
.btn-ghost { background: #fff; border-color: var(--dt-line); color: var(--dt-navy); }
.btn-ghost:hover { background: #f4f6fb; }

/* Room cards */
.rooms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.room {
    background: var(--dt-card); border: 1px solid var(--dt-line);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 18px 14px;
}
.room-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.room-title { font-family: 'Poppins'; font-weight: 600; color: var(--dt-navy); font-size: 16px; }
.room-type-pill { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--dt-orange); font-weight: 700; }
.room-del { background: none; border: none; color: var(--dt-muted); cursor: pointer; font-size: 13px; }
.room-del:hover { color: #d23b3b; }
.seat { border-top: 1px dashed var(--dt-line); padding: 12px 0 4px; }
.seat:first-of-type { border-top: none; }
.seat-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.seat-row .field { flex: 1; }
.field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--dt-muted); font-weight: 600; margin-bottom: 3px; }
.field input {
    width: 100%; padding: 9px 11px; border: 1px solid var(--dt-line); border-radius: 9px;
    font-size: 14px; font-family: inherit; color: var(--dt-ink); background: #fbfcfe;
    transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.field input:focus { outline: none; border-color: var(--dt-orange); box-shadow: 0 0 0 3px rgba(232,119,46,.15); background: #fff; }
.leader { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--dt-navy); cursor: pointer; white-space: nowrap; padding-top: 18px; }
.leader input { accent-color: var(--dt-gold); width: 16px; height: 16px; }
.room-opts { display: flex; gap: 18px; margin-top: 8px; flex-wrap: wrap; }
.opt { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--dt-navy); cursor: pointer; font-weight: 500; }
.opt input { accent-color: var(--dt-orange); width: 16px; height: 16px; }
.saved-badge { font-size: 11px; color: #2e9e6b; font-weight: 600; opacity: 0; transition: opacity .2s var(--ease-out); }
.saved-badge.show { opacity: 1; }

.empty { text-align: center; color: var(--dt-muted); padding: 30px 0 10px; font-size: 15px; }

/* Action bar */
.actionbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 35;
    background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
    border-top: 1px solid var(--dt-line); box-shadow: 0 -4px 18px rgba(27,42,74,.08);
}
.actionbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 12px; }
.actionbar-btns { display: flex; gap: 10px; }
.save-status { font-size: 13px; color: var(--dt-muted); }

/* Dottie */
.dottie-launcher {
    position: fixed; right: 22px; bottom: 92px; z-index: 45;
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, var(--dt-orange), var(--dt-gold));
    color: #fff; border: none; cursor: pointer; border-radius: 999px;
    padding: 12px 20px 12px 14px; font-family: 'Poppins'; font-weight: 600; font-size: 15px;
    box-shadow: var(--shadow-lg);
    transition: transform .16s var(--ease-out);
}
.dottie-launcher:active { transform: scale(.97); }
.dottie-orb, .dottie-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, #ffe3c2 40%, var(--dt-orange) 100%);
    box-shadow: 0 0 0 4px rgba(255,255,255,.25);
    display: inline-block;
}
.dottie-orb.listening { animation: pulse 1.2s var(--ease-out) infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(255,255,255,.25);} 50% { box-shadow: 0 0 0 9px rgba(255,255,255,.10);} }

.dottie-panel {
    position: fixed; right: 22px; bottom: 92px; z-index: 60;
    width: 380px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 130px);
    background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid var(--dt-line);
    transform-origin: bottom right;
    animation: pop .2s var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: scale(.95);} to { opacity: 1; transform: scale(1);} }
.dottie-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; background: linear-gradient(135deg, var(--dt-navy), var(--dt-navy-2)); color: #fff;
}
.dottie-id { display: flex; align-items: center; gap: 10px; }
.dottie-id small { display: block; opacity: .8; font-size: 12px; }
.dottie-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; line-height: 1; }
.dottie-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fc; }
.msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.msg.dottie { background: #fff; border: 1px solid var(--dt-line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--dt-navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--dt-muted); font-style: italic; }
.dottie-tools { display: flex; align-items: center; gap: 8px; padding: 10px 12px 0; }
.dottie-tools button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .16s var(--ease-out, cubic-bezier(0.23,1,0.32,1)), background .16s, color .16s; }
.dottie-tools button:active { transform: scale(.97); }
.dottie-upload { background: var(--dt-navy); color: #fff; border: 1px solid var(--dt-navy); }
.dottie-upload:hover { background: var(--dt-navy-2); }
.dottie-upload:disabled { opacity: .6; cursor: default; }
.dottie-input { display: flex; align-items: center; gap: 8px; padding: 10px 12px 12px; }
.dottie-input input { flex: 1; padding: 10px 12px; border: 1px solid var(--dt-line); border-radius: 10px; font-size: 14px; font-family: inherit; }
.dottie-input input:focus { outline: none; border-color: var(--dt-orange); box-shadow: 0 0 0 3px rgba(232,119,46,.15); }
.dottie-mic { background: #f4f6fb; border: 1px solid var(--dt-line); color: var(--dt-navy); }
.dottie-mic:hover { background: #e9edf6; }
.dottie-mic.listening { background: var(--dt-orange); color: #fff; border-color: var(--dt-orange); }
.dottie-send { background: var(--dt-orange); color: #fff; border: none; border-radius: 10px; padding: 0 16px; height: 40px; font-weight: 600; cursor: pointer; font-family: inherit; }
.dottie-send:active { transform: scale(.97); }
.dottie-mic-error { margin: 0; padding: 8px 14px; font-size: 12px; color: #d23b3b; background: #fff4f1; }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(27,42,74,.45); display: grid; place-items: center; padding: 20px; }
.modal-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; padding: 26px; max-height: 86vh; overflow-y: auto; }
.modal-card h2 { margin: 0 0 14px; color: var(--dt-navy); }
.review-body { font-size: 14px; }
.review-room { border: 1px solid var(--dt-line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.review-room h4 { margin: 0 0 4px; color: var(--dt-navy); font-size: 14px; }
.review-room p { margin: 2px 0; color: var(--dt-muted); }
.review-warnings { margin-top: 8px; }
.review-warnings .warn { background: #fff7e8; border: 1px solid #f3d899; color: #8a6212; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-actions.center { justify-content: center; }
.done-card { text-align: center; }
.done-check { width: 64px; height: 64px; border-radius: 50%; background: #e7f7ef; color: #2e9e6b; font-size: 34px; display: grid; place-items: center; margin: 0 auto 14px; }

/* Mobile */
@media (max-width: 760px) {
    .trip-panel { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
    .trip-grid { grid-template-columns: 1fr 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .stat-seats { grid-column: 1 / -1; }
    .rooms { grid-template-columns: 1fr; }
    .upload-card { display: none !important; } /* file upload is desktop/laptop only */
    .dottie-panel { right: 8px; left: 8px; width: auto; bottom: 86px; }
    .dottie-launcher { right: 14px; bottom: 86px; }
    .actionbar-inner { height: auto; padding: 12px 0; flex-direction: column; align-items: stretch; }
    .actionbar-btns { flex-direction: column; }
    .btn-primary, .btn-ghost { width: 100%; }
    body { padding-bottom: 170px; }
    .brand-inner { height: auto; min-height: 60px; padding: 12px 0; gap: 12px; }
    .brand-logo { height: 38px; }
    .brand-name { font-size: 17px; line-height: 1.25; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
