@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --navy: #16244e;
    --navy-dark: #0f1a3a;
    --blue: #0095ff;
    --blue-dark: #1c54e4;
    --ink: #1e293b;
}

* { font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif; }

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---------- Layout chrome ---------- */

.app-topbar {
    background: #fff;
    border-bottom: 1px solid #eef1f6;
    position: sticky;
    top: 0;
    z-index: 30;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 900;
    color: var(--navy);
    letter-spacing: -0.01em;
}

.app-brand .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    box-shadow: 0 0 0 4px rgba(0, 149, 255, 0.12);
}

.app-nav {
    display: inline-flex;
    gap: 2px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 0.75rem;
}

.app-nav a {
    padding: 0.5rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    transition: all 0.15s ease;
}

.app-nav a:hover { color: var(--navy); }
.app-nav a.active { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.7rem 1.4rem;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.7rem; border-radius: 0.6rem; }

.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px -4px rgba(0, 149, 255, 0.45); }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 6px 18px -4px rgba(28, 84, 228, 0.5); }

.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--blue-dark); }

.btn-secondary { background: #fff; color: #475569; border: 1.5px solid #e2e8f0; }
.btn-secondary:hover:not(:disabled) { background: #f8fafc; border-color: #cbd5e1; }

.btn-ghost { background: transparent; color: var(--blue-dark); padding-left: 0.25rem; padding-right: 0.25rem; }
.btn-ghost:hover:not(:disabled) { text-decoration: underline; }

.btn-danger-ghost { background: transparent; color: #e11d48; padding-left: 0.25rem; padding-right: 0.25rem; }
.btn-danger-ghost:hover:not(:disabled) { text-decoration: underline; }

/* ---------- Cards & surfaces ---------- */

.surface-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -20px rgba(15, 23, 42, 0.15);
}

.eyebrow {
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

/* ---------- Form elements ---------- */

.form-input {
    width: 100%;
    padding: 0.7rem 0.95rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    background: #fff;
    transition: all 0.15s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(0, 149, 255, 0.12);
}

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

.field-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

/* ---------- Star rating ---------- */

.star-rating-btn {
    color: #d8dee9;
    transition: transform 0.15s ease, color 0.15s ease;
    cursor: pointer;
}
.star-rating-btn:hover { transform: scale(1.18); color: #fcd34d; }
.star-rating-btn.active { color: #f59e0b; }

/* ---------- Badges / pills ---------- */

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.72rem;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
}

/* ---------- Toasts ---------- */

#ui-toast-stack {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: min(24rem, calc(100vw - 2rem));
}

.ui-toast {
    background: var(--navy);
    color: #fff;
    padding: 0.9rem 1.1rem;
    border-radius: 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    animation: ui-toast-in 0.25s ease;
}

.ui-toast.error { background: #be123c; }
.ui-toast.success { background: #047857; }

@keyframes ui-toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Modal (confirm / prompt) ---------- */

#ui-modal-root {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

#ui-modal-root.open { display: flex; }

.ui-modal-box {
    background: #fff;
    border-radius: 1.5rem;
    max-width: 26rem;
    width: 100%;
    padding: 1.75rem;
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.4);
    animation: ui-modal-in 0.18s ease;
}

@keyframes ui-modal-in {
    from { opacity: 0; transform: scale(0.96) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
