/* Shared identity and mobile dashboard. Loaded after legacy page styles. */
:root { --portal-ink: #153d35; --portal-muted: #63786f; --portal-green: #176653; --portal-paper: #f3f6f1; }
.login-page, .dashboard-page { color: var(--portal-ink); background: var(--portal-paper); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.login-page *, .dashboard-page *, .login-page *::before, .dashboard-page *::before, .login-page *::after, .dashboard-page *::after { box-sizing: border-box; }
body.login-page { min-height: 100vh; min-height: 100dvh; height: auto; padding: 36px 20px; background: radial-gradient(ellipse at 20% 0%, #dcebdd, transparent 65%), var(--portal-paper); }
.login-wrapper { max-width: 400px; margin: auto; gap: 28px; }
.login-container { width: 100%; max-width: 400px; border: 1px solid #dfe8df; border-radius: 24px; padding: 28px; box-shadow: 0 16px 50px #173e3510; }
.login-container .input-group { border: 1px solid #d9e4dc; background: #f7f9f6; border-radius: 12px; min-height: 52px; padding: 12px; }
.login-container .input-group:focus-within { border-color: var(--portal-green); box-shadow: 0 0 0 3px #17665318; }
.login-container .input-group i { color: var(--portal-green); }
.login-container .btn { background: var(--portal-green); color: white; border-radius: 12px; min-height: 48px; font-weight: 650; }
.login-container .tab-button { color: var(--portal-muted); background: #edf3ed; border-radius: 12px; }
.login-container .tab-button.active { background: #d8eddf; color: #134c3d; }
.login-container .signup-link a { color: var(--portal-green); }
.dashboard-page #android-bar { height: calc(58px + env(safe-area-inset-top)); padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: #f3f6f1f5; color: var(--portal-ink); border-bottom: 1px solid #dce6dc; }
.dashboard-page #menu-toggle { color: var(--portal-ink); min-height: 44px; }
.dashboard-page .dashboard-content { max-width: 1000px; margin-top: calc(70px + env(safe-area-inset-top)) !important; padding: 0 20px 150px; }
.connection-banner { display: flex; align-items: center; gap: 10px; padding: 13px 16px; margin-bottom: 24px; border: 1px solid #e4d9bd; border-radius: 14px; background: #fff9eb; font-size: 13px; color: #775317; }
.connection-banner::before { content: ''; width: 7px; height: 7px; background: currentColor; border-radius: 50%; flex-shrink: 0; }
.connection-banner[data-state="ready"] { background: #e5f1e6; color: #215e43; border-color: #cfe3d2; }
.connection-banner span { flex: 1; }
.connection-banner button, .connection-banner a { font: inherit; color: inherit; background: none; border: 0; text-decoration: underline; min-height: 32px; }
.dashboard-page .cameras-grid { padding: 0; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-page .camera-item { max-width: none; border-radius: 18px; background: #e5ede8; box-shadow: 0 4px 16px #153d3510; border: 1px solid #d3dfd5; position: relative; }
.dashboard-page .camera-item img { border-radius: 0; }
.camera-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 28px 14px 12px; color: white; background: linear-gradient(transparent, #102e29d9); font-size: 13px; pointer-events: none; }
.camera-skeleton { aspect-ratio: 16/9; border-radius: 18px; background: #e5ede8; display: grid; place-items: center; color: #63786f; font-size: 14px; }
.dashboard-page .sticky-footer { width: min(560px, calc(100% - 24px)); left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); border: 1px solid #dce6dc; border-radius: 24px; background: #fffffff5; box-shadow: 0 12px 40px #173e351c; padding: 8px; }
.dashboard-page .footer-buttons { padding: 0; gap: 6px; }
.dashboard-page .footer-btn { flex: 1; height: 66px; width: auto; flex-direction: column; gap: 6px; border-radius: 16px; color: #4e685c; }
.dashboard-page .footer-btn i { font-size: 20px; }
.footer-label { font-size: 11px; font-weight: 600; line-height: 1.15; }
.dashboard-page #btn-unlock { flex: 1.65; background: var(--portal-green); color: white; }
.dashboard-page #btn-unlock:disabled { background: #e3ebe4; color: #586f61; opacity: 1; }
.dashboard-page #btn-unlock:disabled i { color: inherit; }
.dashboard-page #btn-unlock:not(:disabled) i { color: white; }
.dashboard-page #offline-indicator { display: none !important; }
.dashboard-page .nav-menu { top: calc(70px + env(safe-area-inset-top)); }
.dashboard-page .settings-menu { bottom: calc(110px + env(safe-area-inset-bottom)); }
button:focus-visible, a:focus-visible { outline: 3px solid #328575; outline-offset: 4px; }
[hidden] { display: none !important; }
@media (max-width: 600px) { .dashboard-page .cameras-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

.login-container .tab-container { position: static; margin-top: 20px; gap: 8px; border-radius: 12px; background: none; }
.login-container .tab-button.active { border-bottom-color: var(--portal-green); }

.dashboard-page .dashboard-content { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
body.ios-fullscreen-active .dashboard-content { margin-top: 0 !important; height: auto; min-height: 100vh; min-height: 100dvh; padding-top: max(20px, env(safe-area-inset-top)); }
#ios-exit-fullscreen-btn { right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); width: auto; min-width: 60px; border-radius: 14px; }
@media (max-height: 500px) and (orientation: landscape) {
    .dashboard-page .footer-btn { height: 48px; }
    .dashboard-page .dashboard-content { padding-bottom: 100px; }
    .dashboard-page .sticky-footer { bottom: max(6px, env(safe-area-inset-bottom)); }
}

/* Keep the original animated building identity; the dashboard starts with cameras. */
.login-wrapper > svg { display: block; width: min(280px, 100%); height: auto; flex-shrink: 0; }
.login-wrapper { gap: 12px; }
.dashboard-page #android-bar { gap: 10px; padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); background: #1a1a1a; color: white; border-bottom: 0; }
.dashboard-page #current-time { font-size: 13px; flex-shrink: 0; }
.dashboard-page #door-status:empty { display: none; }
.dashboard-page #menu-toggle { color: white; padding: 6px; flex-shrink: 0; }
.header-weather { display: flex; align-items: center; justify-content: center; gap: 9px; flex: 1; min-width: 0; }
.header-weather > i { font-size: 22px; color: #ffd166; flex-shrink: 0; }
.header-weather-info { min-width: 0; }
.header-weather-summary { display: flex; align-items: baseline; gap: 8px; }
.header-weather #weather-condition { color: #eee; font-size: 12px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.header-weather #weather-temp { color: white; font-size: 16px; line-height: 1.2; white-space: nowrap; }
.header-weather-details { display: flex; gap: 12px; margin-top: 3px; color: #d5dce5; white-space: nowrap; }
.header-weather #weather-humidity, .header-weather #weather-wind { font-size: 12px; color: inherit; }
.header-weather-details i { font-size: 10px; }
.connection-banner[data-state="ready"] { display: none; }
@media (max-width: 360px) {
    .dashboard-page #android-bar { gap: 6px; }
    .header-weather { gap: 6px; }
    .header-weather #weather-condition { max-width: 78px; }
    .header-weather-details { gap: 8px; }
}
