:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --border: #334155;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 420px;
    padding: 2rem 1.5rem;
}

/* Landing hero */
.hero {
    text-align: center;
}

.brand {
    font-family: Arial, sans-serif;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    color: #fff;
}

.brand-sm {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.tagline {
    color: var(--muted);
    font-size: 1.125rem;
    margin: 0 0 2.5rem;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--surface);
}

.btn-google {
    background: #fff;
    color: #1f2937;
}

.btn-google:hover {
    background: #f3f4f6;
}

/* Flash messages */
.flash {
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid #7f1d1d;
    border-radius: 8px;
    background: rgba(127, 29, 29, 0.25);
    color: #fecaca;
    font-size: 0.875rem;
    text-align: center;
}

.flash p {
    margin: 0;
}

/* Auth cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.card h2 {
    margin: 0 0 1.5rem;
    font-size: 1.25rem;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.form input {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
}

.form input:focus {
    outline: none;
    border-color: var(--primary);
}

.form .btn {
    margin-top: 0.5rem;
}

.divider {
    margin: 1.25rem 0;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Auth pages: cross-link switch box */
.auth-switch {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.2rem;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Dashboard layout */
body.dashboard-page {
    display: block;
}

body.dashboard-page .container {
    max-width: none;
    padding: 0;
    min-height: 100vh;
}

.dashboard-main {
    min-height: 100vh;
    padding: 2rem;
}

.dashboard-footer {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
}

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

.btn-sm {
    display: inline-block;
    width: auto;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    cursor: pointer;
}

.btn-sm:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Tickets: dashboard grid (mobile-first) */
.dashboard-main {
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 5rem; /* espaço p/ o footer fixo */
}

.tickets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tickets-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.btn-inline {
    display: inline-block;
    width: auto;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
}

.tickets-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.ticket-info {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
}

.ticket-id {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
}

.ticket-title {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.ticket-date {
    color: var(--muted);
    font-size: 0.8rem;
}

.tickets-empty {
    color: var(--muted);
    text-align: center;
    padding: 2rem 0;
}

/* Tickets: create/edit form */
.ticket-form-wrap {
    max-width: 480px;
    margin: 0 auto;
}

.ticket-form-wrap h1 {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
}

.ticket-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
}

.ticket-meta dt {
    color: var(--muted);
}

.ticket-meta dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
}

.form textarea {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    resize: vertical;
}

.form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-actions .btn {
    margin-top: 0;
}

/* Sunrise walk: checkbox, minutes input and Send button on one line */
.sunrise-meta {
    font-size: 1.5rem;
}

.sunrise-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.sunrise-row input[type="number"] {
    width: 5rem;
    padding: 0.5rem 0.6rem;
}

.sunrise-row span {
    color: var(--muted);
    font-size: 0.875rem;
}

.sunrise-row .btn {
    margin-top: 0;
    width: auto;
    padding: 0.65rem 1.25rem;
}
