:root {
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-muted: #6b7280;
    --primary: #000000;
    --premium: linear-gradient(135deg, #d4af37, #f3e5ab);
    --premium-text: #8c6b0a;
    --magic: linear-gradient(135deg, #6366f1, #a855f7);
    --border: #e5e7eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }
body { background: var(--bg-main); color: var(--text-primary); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
.mt-5 { margin-top: 5px; } .mt-10 { margin-top: 10px; } .mt-20 { margin-top: 20px; } 
.mb-5 { margin-bottom: 5px; } .mb-10 { margin-bottom: 10px; } .mb-20 { margin-bottom: 20px; }
.text-sm { font-size: 14px; } .text-muted { color: var(--text-muted); }
.flex-row { display: flex; align-items: center; } .gap-10 { gap: 10px; } .flex-1 { flex: 1; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.block { display: block; } .w-100 { width: 100%; }

.box-shadow { box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01); border-radius: 20px; background: var(--bg-card); padding: 25px; border: 1px solid rgba(255,255,255,0.5); }
.screen { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: 1000px; margin: 0 auto; padding: 0 20px; }

.logo { font-size: 36px; font-weight: 800; letter-spacing: -1px; }
.logo-small { font-size: 20px; font-weight: 800; }
.magic-text { background: var(--magic); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; }

/* Inputs & Buttons */
input, textarea { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 15px; outline: none; background: #fcfcfc; transition: 0.2s; }
input:focus, textarea:focus { border-color: var(--text-muted); }
textarea { resize: vertical; }

.btn-primary { width: 100%; padding: 14px; background: var(--primary); color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { width: 100%; padding: 14px; background: transparent; color: var(--primary); border: 1px solid var(--border); border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-magic { width: 100%; padding: 14px; background: var(--magic); color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-premium { padding: 10px 20px; background: var(--premium); color: var(--premium-text); border: none; border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4); }
.btn-text { background: none; border: none; color: var(--text-muted); font-weight: 600; cursor: pointer; }
.btn-icon { background: none; border: none; font-size: 24px; cursor: pointer; line-height: 1; }

/* Auth */
#auth-screen { justify-content: center; align-items: center; padding: 20px; }
.auth-box { width: 100%; max-width: 400px; text-align: center; }
.error { background: #fee2e2; color: #ef4444; padding: 10px; border-radius: 8px; margin-bottom: 15px; font-size: 14px; }

/* Header */
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: rgba(255,255,255,0.8); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border); }

/* Dashboard Cards */
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.trip-card { background: var(--bg-card); padding: 20px; border-radius: 20px; border: 1px solid var(--border); cursor: pointer; transition: 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.trip-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px rgba(0,0,0,0.05); border-color: var(--primary); }
.trip-card h3 { font-size: 22px; margin-bottom: 5px; }

/* Timeline (Zero Lag CSS) */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 30px; }
.tl-dot { position: absolute; left: -30px; top: 5px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-main); border: 2px solid var(--primary); display: flex; justify-content: center; align-items: center; font-size: 12px; z-index: 2; }
.tl-dot.premium { border-color: #d4af37; background: #fffdf5; }
.tl-content { background: var(--bg-card); padding: 20px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.tl-time { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 5px; display: block; }
.tl-title { font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.tl-desc { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.btn-del { position: absolute; top: 15px; right: 15px; background: none; border: none; color: #ef4444; font-size: 18px; cursor: pointer; opacity: 0.5; }
.btn-del:hover { opacity: 1; }

/* Modals */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 100; padding: 20px; }
.modal-content { width: 100%; max-width: 450px; }

/* Loader */
.loader { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ---- Enriquecido TravelSync ---- */
.flex-center { justify-content: center; align-items: center; padding: 20px; }
.auth-box { width: 100%; max-width: 380px; text-align: center; }
.btn-ghost { width: 100%; background: transparent; border: none; color: var(--text-muted); font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px; }
.btn-ghost:hover { color: var(--text-primary); text-decoration: underline; }
.app-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; background: var(--bg-card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.btn-icon { background: transparent; border: none; font-size: 24px; cursor: pointer; color: var(--text-primary); line-height: 1; }
.btn-text { background: transparent; border: none; color: var(--text-muted); font-weight: 600; cursor: pointer; font-size: 15px; }
.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding-bottom: 40px; }
.trip-card { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 20px; cursor: pointer; transition: .15s; box-shadow: 0 6px 16px -8px rgba(0,0,0,.08); }
.trip-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(0,0,0,.15); }
.trip-card h3 { margin: 6px 0 4px; font-size: 20px; }
.trip-badge { display: inline-block; font-size: 12px; font-weight: 700; color: #fff; background: var(--primary); padding: 3px 10px; border-radius: 20px; }
.btn-del-trip { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; border: none; background: #f3f4f6; color: #9ca3af; font-size: 16px; cursor: pointer; line-height: 1; }
.btn-del-trip:hover { background: #fee2e2; color: #dc2626; }
.countdown { background: var(--primary); color: #fff; border-radius: 18px; padding: 18px 22px; display: flex; flex-direction: column; gap: 2px; }
.cd-big { font-size: 22px; font-weight: 800; }
.cd-sub { font-size: 14px; opacity: .7; }
.smart-paste-card, .ideas-cta { background: var(--bg-card); border: 1px solid var(--border); border-radius: 18px; padding: 20px; }
.ideas-cta { box-shadow: 0 6px 16px -8px rgba(0,0,0,.06); }
select { width: 100%; padding: 14px; border: 1px solid var(--border); border-radius: 12px; font-size: 15px; background: #fcfcfc; font-family: inherit; }
.timeline { position: relative; padding-bottom: 60px; }
.tl-day { font-weight: 800; font-size: 15px; margin: 18px 0 10px; color: var(--text-primary); }
.tl-item { display: flex; gap: 14px; margin-bottom: 12px; align-items: flex-start; }
.tl-dot { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: #f3f4f6; flex-shrink: 0; }
.tl-dot.type-flight { background: #dbeafe; } .tl-dot.type-hotel { background: #fce7f3; }
.tl-dot.type-train { background: #dcfce7; } .tl-dot.type-car { background: #fef9c3; }
.tl-dot.type-activity { background: #ede9fe; }
.tl-content { position: relative; flex: 1; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.tl-time { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.tl-title { font-size: 16px; margin: 2px 0; }
.tl-desc { font-size: 13px; color: var(--text-muted); }
.btn-del { position: absolute; top: 8px; right: 10px; background: transparent; border: none; color: #cbd5e1; font-size: 18px; cursor: pointer; line-height: 1; }
.btn-del:hover { color: #dc2626; }
.tl-gap { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 12px 58px; padding: 8px 14px; border: 1px dashed var(--border); border-radius: 12px; font-size: 13px; color: var(--text-muted); }
.gap-idea { background: transparent; border: none; color: #6366f1; font-weight: 700; cursor: pointer; font-size: 13px; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal-content { width: 100%; max-width: 420px; max-height: 90vh; overflow-y: auto; }
.modal-actions { display: flex; flex-direction: column; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.ideas-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.idea-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; }
.idea-cat { display: inline-block; font-size: 11px; font-weight: 700; color: #6366f1; text-transform: uppercase; letter-spacing: .5px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px); background: #111827; color: #fff; padding: 12px 22px; border-radius: 30px; font-weight: 600; font-size: 14px; opacity: 0; transition: .3s; z-index: 100; }
.toast.on { transform: translateX(-50%) translateY(0); opacity: 1; }
.loader { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
