.app-topbar {
    background: var(--surface);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-brand {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.navbar .nav-link {
    color: var(--ink);
    font-size: 14px;
}

.navbar .nav-link.active {
    color: var(--accent);
    font-weight: 600;
}

.navbar .nav-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

body[data-authenticated="0"] .auth-only {
    display: none !important;
}

body[data-authenticated="1"] .guest-only {
    display: none !important;
}

.app-main {
    padding: 24px 0 96px;
}

.app-header {
    padding: 16px 0 12px;
}

.app-title {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.badge-chip {
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.panel {
    background: var(--surface);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(15, 23, 42, 0.08);
    height: 100%;
}

.panel h5 {
    font-weight: 700;
}

.hint {
    font-size: 12px;
    color: var(--muted);
}

.output {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-size: 12px;
    min-height: 100px;
    white-space: pre-wrap;
}

.form-floating > label {
    color: var(--muted);
    left: 8px;
    padding: 0.75rem 0.75rem;
    pointer-events: none;
    width: 100%;
}

.form-floating > .form-control,
.form-floating > .form-select {
    padding: 1rem 0.75rem 0.25rem;
}

.form-floating > textarea.form-control {
    height: auto;
    min-height: 120px;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-outline-primary {
    border-color: var(--accent);
    color: var(--accent);
}

.section-title {
    font-weight: 700;
    margin-bottom: 12px;
}

.divider {
    height: 1px;
    background: rgba(15, 23, 42, 0.08);
    margin: 16px 0;
}

.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-around;
    padding: 8px 6px;
    z-index: 1030;
}

.app-bottom-nav .nav-link {
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.app-bottom-nav .nav-link i {
    font-size: 16px;
}

.app-bottom-nav .nav-link.active {
    color: var(--accent);
    font-weight: 600;
}

.app-bottom-nav .nav-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.empty-state {
    color: var(--muted);
    text-align: center;
    padding: 24px 12px;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    border-radius: 16px;
    display: grid;
    gap: 8px;
    place-items: center;
}

.empty-state i {
    font-size: 24px;
    color: var(--accent);
}

.app-loader {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.app-loader.is-active {
    display: flex;
}

.timeline-list {
    display: grid;
    gap: 12px;
}

.timeline-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px 14px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

a.timeline-card {
    color: inherit;
}

a.timeline-card:hover {
    background: rgba(15, 23, 42, 0.02);
}

.timeline-card .meta {
    color: var(--muted);
    font-size: 12px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(15, 23, 42, 0.08);
    color: var(--ink);
}

.status-pending {
    background: rgba(255, 152, 0, 0.18);
    color: #c2410c;
}

.status-processing {
    background: rgba(59, 130, 246, 0.16);
    color: #1d4ed8;
}

.status-done {
    background: rgba(16, 185, 129, 0.2);
    color: #047857;
}

.status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.camera-box {
    display: grid;
    gap: 12px;
}

.camera-preview {
    border: 1px dashed rgba(15, 23, 42, 0.2);
    border-radius: 16px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.02);
}

.media-preview {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.camera-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.validation-list {
    padding-left: 18px;
    color: #b91c1c;
}

.onboarding-panel {
    border: 1px dashed rgba(25, 118, 210, 0.3);
    background: rgba(25, 118, 210, 0.06);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
}

.datetime-time-wrapper {
    margin-top: 6px;
}

.datetime-time-wrapper .form-label {
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: rgba(15, 23, 42, 0.65);
}

.datetime-time-input {
    max-width: 180px;
}

@media (max-width: 576px) {
    .panel {
        padding: 16px;
    }
}
