/* App shell, offline, and error-state screens. */

:root {
    --app-shell-bg: #f8fafc;
    --app-shell-surface: #ffffff;
    --app-shell-text: #111827;
    --app-shell-muted: #64748b;
    --app-shell-border: #e5e7eb;
}

html {
    -webkit-tap-highlight-color: transparent;
}

@media (display-mode: standalone), (display-mode: fullscreen) {
    body {
        overscroll-behavior-y: contain;
        -webkit-touch-callout: none;
    }
}

[data-theme="dark"] {
    --app-shell-bg: #0f172a;
    --app-shell-surface: #111827;
    --app-shell-text: #f8fafc;
    --app-shell-muted: #94a3b8;
    --app-shell-border: #1f2937;
}

.app-state-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background:
        radial-gradient(circle at 20% 12%, rgba(52, 152, 219, 0.16), transparent 32rem),
        radial-gradient(circle at 90% 80%, rgba(233, 0, 82, 0.12), transparent 28rem),
        var(--app-shell-bg);
    color: var(--app-shell-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-state-card {
    width: min(100%, 460px);
    background: var(--app-shell-surface);
    border: 1px solid var(--app-shell-border);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    padding: 28px;
    text-align: center;
}

.app-state-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin: 0 auto 18px;
    border-radius: 18px;
}

.app-state-icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--primary-color, #3498db), var(--secondary-color, #2c3e50));
    color: #fff;
    font-size: 1.9rem;
}

.app-state-card h1 {
    margin: 0 0 10px;
    color: var(--app-shell-text);
    font-size: 1.7rem;
    line-height: 1.12;
}

.app-state-card p {
    margin: 0;
    color: var(--app-shell-muted);
    line-height: 1.6;
}

.app-state-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 22px;
}

.app-state-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--app-shell-border);
    text-decoration: none;
    color: var(--app-shell-text);
    font-weight: 800;
    background: var(--app-shell-surface);
}

.app-state-button.primary {
    color: #fff;
    background: var(--primary-color, #3498db);
    border-color: var(--primary-color, #3498db);
}

.app-state-meta {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--app-shell-border);
    color: var(--app-shell-muted);
    font-size: 0.82rem;
}

.about-system-section {
    text-align: center;
    padding: 40px 20px;
}

.about-system-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.about-system-title {
    margin-bottom: 10px;
}

.about-system-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.about-system-copy {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.about-benefits-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.about-benefit-card {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.about-benefit-card i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
}

.about-system-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}
