:root {
    --primary-color: #2b7cee;
    /* Existing Blue */
    --stitch-primary: #2bee79;
    /* Stitch Green */
    --stitch-bg-light: #f6f8f7;
    --stitch-bg-dark: #102217;
    --stitch-card-dark: #193324;
    --stitch-red: #ff4d4d;
    --stitch-red-bg: #451a1a;
    --stitch-green: #2bee79;
    --stitch-green-bg: #133824;
    --stitch-amber: #f59e0b;
    /* Tailwind amber-500 approx */
    --stitch-amber-bg: #451a03;
    /* Tailwind amber-950 approx */

    --text-color: #f8fafc;
    /* User white/light text */
    --bg-color: #101822;
    /* User background-dark */
    --bg-light: #f6f7f8;
    --bg-dark: #101822;
    --border-color: #233348;
    --surface-color: #1e293b;
    /* User slate-800 */
    --surface-dark: #0f172a;
    /* User slate-900 */
    --text-secondary: #92a9c9;
    /* Stitch secondary text */
    --grid-gap: 1rem;

    /* Spacing Standards */
    --header-height: 65px;
    --content-max-width: 1200px;
    --page-padding: 32px;

    /* Font Families */
    --font-home: 'Lexend', sans-serif;
    --font-dash: 'Spline Sans', sans-serif;
    --font-admin: 'Space Grotesk', sans-serif;

    /* Default assignment (overridden by page scopes) */
    --font-display: var(--font-dash);
    --font-body: 'Noto Sans', sans-serif;
}

/* Page-Specific Font Scopes */
.landing-page {
    --font-display: var(--font-home);
}

.dashboard-container,
.facility-page-body {
    --font-display: var(--font-dash);
}

.admin-body {
    --font-display: var(--font-admin);
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar for the whole app */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
    border: 2px solid var(--bg-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}


body {
    font-family: var(--font-display);
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
}

/* Utilities */
.flex {
    display: flex;
}

.flex-row {
    flex-direction: row;
}

/* Side Panel Utilities */
.panel-section-header {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.divider-horizontal {
    height: 1px;
    background-color: #324867;
    width: 100%;
}

/* General Utilities */
.w-full {
    width: 100%;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.font-medium {
    font-weight: 500;
}

.text-white {
    color: white;
}

.text-xxs {
    font-size: 0.625rem;
    /* 10px */
}

/* Web Components Layout Fix */
admin-sidebar,
admin-header,
admin-dashboard {
    display: contents;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}



.gap-4 {
    gap: 1rem;
}



.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-bold {
    font-weight: 700;
}



.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-slate-400 {
    color: #94a3b8;
}

.bg-surface {
    background-color: var(--surface-color);
}

.border-surface {
    border: 1px solid var(--border-color);
}

.overflow-hidden {
    overflow: hidden;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.object-cover {
    object-fit: cover;
}

.mix-blend-overlay {
    mix-blend-mode: overlay;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-40 {
    opacity: 0.4;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.blur-xl {
    filter: blur(24px);
}

.h-full {
    height: 100%;
}




.app-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

/* Premium UI Utilities */
.glass-panel {
    background: rgba(16, 34, 23, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
}

.hover-lift {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
}

/* Global Button Interaction */
button,
.btn,
.nav-item,
.action-button,
.card {
    transition-duration: 0.2s;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

button:active,
.btn:active,
.nav-item:active,
.action-button:active {
    transform: scale(0.98);
}


/* --- Shared Header Styles (Stitch Design System) --- */
.stitch-header {
    height: var(--header-height);
    background-color: var(--bg-dark);
    /* or surface-dark? */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    /* Consistent padding */
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Fallback for landing page specific overrides if needed, but try to use shared */

/* Custom Element Container */
landing-header,
dashboard-header {
    display: block;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
}


/* --- Content Container Standard --- */
.layout-content-container,
.landing-main,
.dashboard-main {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--page-padding);
    /* 32px standard */
    width: 100%;
    /* Ensure it doesn't collapse */
    min-height: calc(100vh - var(--header-height));
}

/* Ensure landing main doesn't have 0 padding */
.landing-main {
    padding-top: var(--page-padding);
}

/* Global resets handled in main.css */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Page specific body overrides */
.facility-page-body {
    background-color: var(--stitch-bg-light, #f6f8f7);
    color: var(--surface-dark, #0f172a);
    --primary-color: var(--stitch-primary, #2bee79);
    /* Override primary to Stitch Green */
}

:root.dark .facility-page-body {
    background-color: var(--stitch-bg-dark, #102217);
    color: white;
}

/* Used in owner.html - Do Not Remove */
.app-main {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    /* Map takes full space initially */
    height: 100vh;
    width: 100vw;
}

@media (min-width: 768px) {
    .app-main {
        grid-template-columns: 420px 1fr;
        grid-template-rows: 1fr;
        padding-top: 0;
        /* Override main.css padding for full-screen layout */
    }

    is-closed-search {
        grid-column: 1 / -1;
        grid-row: 1;
        z-index: 2000;
        position: absolute;
        top: 1rem;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
        max-width: 600px;
        pointer-events: none;
        /* Container passes clicks */
    }

    is-closed-list {
        grid-column: 1;
        grid-row: 1;
        overflow-y: auto;
        z-index: 1000;
        background: var(--color-bg);
        /* Use theme bg */
        padding: 5rem 1rem 1rem 1rem;
        /* Top padding for search bar space */
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    }

    /* Hide scrollbar for cleaner look */
    is-closed-list::-webkit-scrollbar {
        width: 6px;
    }

    is-closed-list::-webkit-scrollbar-thumb {
        background: var(--color-border);
        border-radius: 3px;
    }

    is-closed-map {
        grid-column: 1 / -1;
        /* stack map behind everything */
        grid-row: 1;
        z-index: 0;
    }

    /* On desktop, map is side-by-side */
    @media (min-width: 1024px) {
        .app-main {
            grid-template-columns: 450px 1fr;
        }

        is-closed-map {
            grid-column: 2;
        }
    }
}

/* Mobile layout */
@media (max-width: 767px) {
    .app-main {
        display: flex;
        flex-direction: column;
        padding: 0;
    }

    is-closed-search {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 2000;
    }

    is-closed-list {
        display: none;
        /* Hide list on mobile initially */
        position: absolute;
        top: 60px;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--color-bg);
        z-index: 1500;
        padding: 1rem;
        overflow-y: auto;
    }

    /* When list is active (handled by JS toggling class, if implemented) */
    is-closed-list.active {
        display: block;
    }

    is-closed-map {
        flex: 1;
        height: 100%;
    }
}

/* Sidebar Styles */
.sidebar {
    width: 16rem;
    /* w-64 */
    background-color: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 20;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    background-color: rgba(43, 124, 238, 0.2);
    /* primary/20 */
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    margin: 0;
}

.logo-subtext {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 400;
    margin: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover {
    background-color: var(--border-color);
    color: white;
}

.nav-item.active {
    background-color: rgba(43, 124, 238, 0.1);
    border: 1px solid rgba(43, 124, 238, 0.2);
    color: white;
}

.nav-item .nav-text {
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.avatar-container {
    position: relative;
    width: 2rem;
    height: 2rem;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background-size: cover;
    background-position: center;
    border: 1px solid #324867;
}

.avatar-container .status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0.625rem;
    height: 0.625rem;
    background-color: #22c55e;
    /* green-500 */
    border: 2px solid var(--bg-dark);
    border-radius: 9999px;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 400;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header Styles */
.top-header {
    height: 4rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.divider-vertical {
    height: 1.5rem;
    width: 1px;
    background-color: var(--border-color);
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #22c55e;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}


.status-text {
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    margin: 0;
}

.status-online {
    color: #22c55e;
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-container {
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    .search-container {
        display: block;
    }
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.search-input {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: white;
    font-size: 0.875rem;
    font-family: var(--font-display);
    /* Added to match Stitch */
    border-radius: 0.5rem;
    padding-left: 2.5rem;
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    width: 16rem;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.search-input::placeholder {
    color: #64748b;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.icon-button {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: colors 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background-color: var(--border-color);
    color: white;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    width: 6px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 9999px;
    border: 1px solid var(--bg-dark);
}

/* Dashboard Content */
.max-w-container {
    max-width: 1600px;
    margin: 0 auto;
}

.grid-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .grid-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card {
    background-color: var(--surface-color);
    border: 1px solid #324867;
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    align-items: start;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.stat-card:hover .stat-gradient {
    opacity: 1;
}

.stat-gradient {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 10;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-value-container {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.025em;
    line-height: 1;
}

.stat-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    min-height: 500px;
    margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 3fr 1fr;
    }
}

.map-container {
    background-color: var(--surface-color);
    border: 1px solid #324867;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel-card {
    background-color: var(--surface-color);
    border: 1px solid #324867;
    border-radius: 0.5rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
}

.action-button {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid #324867;
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
    text-align: left;
}

.action-button:hover {
    border-color: var(--primary-color);
}

.action-icon-box {
    background-color: var(--border-color);
    padding: 0.375rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-button:hover .action-icon-box {
    background-color: var(--primary-color);
}

.action-text-col {
    display: flex;
    flex-direction: column;
}

/* Table Styles */
.reports-table-container {
    background-color: var(--surface-color);
    border: 1px solid #324867;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.table-header {
    padding: 1rem;
    border-bottom: 1px solid #324867;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(35, 51, 72, 0.5);
}

.table-title {
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.reports-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.reports-table th {
    padding: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid #324867;
    background-color: #1a2433;
}

.reports-table td {
    padding: 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #324867;
}

.reports-table tr:last-child td {
    border-bottom: none;
}

/* Dashboard Component Specific Styles */
.bg-gradient-red {
    background: linear-gradient(to right, rgba(239, 68, 68, 0.05), transparent);
}

.bg-gradient-blue {
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent);
}

.bg-gradient-green {
    background: linear-gradient(to right, rgba(34, 197, 94, 0.05), transparent);
}

.text-red {
    color: #f87171;
}

.text-blue {
    color: #60a5fa;
}

.text-light-blue {
    color: #64748b;
}

.text-green {
    color: #4ade80;
}

.text-orange {
    color: #fb923c;
}

.text-yellow {
    color: #facc15;
}

.text-purple {
    color: #c084fc;
}

.badge-red {
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background-color: rgba(239, 68, 68, 0.1);
}

.badge-blue {
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    background-color: rgba(59, 130, 246, 0.1);
}

.badge-green {
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
    background-color: rgba(34, 197, 94, 0.1);
}

.badge-orange {
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.2);
    background-color: rgba(251, 146, 60, 0.1);
}

.badge-yellow {
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.2);
    background-color: rgba(250, 204, 21, 0.1);
}

.badge-purple {
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.2);
    background-color: rgba(192, 132, 252, 0.1);
}


.pill-badge {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.legend-container {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

.legend-item {
    background-color: rgba(17, 24, 34, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid #324867;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
}

.dot-red {
    background-color: #ef4444;
}

.dot-orange {
    background-color: #f97316;
}

.dot-blue {
    background-color: #3b82f6;
}

.dot-yellow {
    background-color: #eab308;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-chip-gap {
    gap: 0.375rem;
}

.text-mono {
    font-family: monospace;
}

.reports-table tr:hover {
    background-color: var(--border-color);
}

/* Component Fixes */
.relative {
    position: relative;
}

/* Emergency Button */
.btn-emergency {
    width: 100%;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(127, 29, 29, 0.1);
}

.btn-emergency:hover {
    background-color: #ef4444;
    color: white;
}

.btn-emergency .material-symbols-outlined {
    font-size: 1.125rem;
}

.btn-emergency:hover .material-symbols-outlined {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Table Actions */
.btn-table-action {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
    border: none;
    background: none;
    cursor: pointer;
}

.btn-table-action-primary {
    color: var(--primary-color);
}

.btn-table-action-primary:hover {
    color: white;
    background-color: #324867;
}

.btn-table-action-secondary {
    color: var(--text-secondary);
}

.btn-table-action-secondary:hover {
    color: white;
    background-color: #324867;
}

.btn-icon-action {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-action:hover {
    color: var(--primary-color);
}

.text-xxs {
    font-size: 0.625rem;
    /* 10px */
}

.text-xs {
    font-size: 0.75rem;
    /* 12px */
}

.text-sm {
    font-size: 0.875rem;
    /* 14px */
}

/* Font Utilities */
.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-md {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

/* Form element font reset (matches user intent better than *) */
input,
button,
textarea,
select {
    font-family: inherit;
}

/* Navigation Icons */
.nav-icon {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    color: var(--primary-color);
}

/* Map Overlay Styles */
.map-overlay-controls {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

.map-control-chip {
    background-color: rgba(17, 24, 34, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid #324867;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-background {
    flex: 1;
    width: 100%;
    height: 100%;
    background-color: #0b1016;
    position: relative;
    overflow: hidden;
}

.map-grid-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.4;
    background-image: radial-gradient(#324867 1px, transparent 1px);
    background-size: 20px 20px;
}

.map-pulse-effect {
    position: absolute;
    top: 33%;
    left: 25%;
    width: 8rem;
    height: 8rem;
    background-color: rgba(220, 38, 38, 0.3);
    border-radius: 9999px;
    filter: blur(24px);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.map-marker-dot {
    position: absolute;
    top: 33%;
    left: 25%;
    width: 1rem;
    height: 1rem;
    background-color: #ef4444;
    border-radius: 9999px;
    border: 2px solid white;
}

.map-image-overlay {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: overlay;
    opacity: 0.5;
    display: block;
}

.map-zoom-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 10;
}

.btn-map-control {
    background-color: #111822;
    border: 1px solid #324867;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-map-control:hover {
    background-color: #233348;
}

/* Utility classes for flex/gap often used */
.flex-1 {
    flex: 1 1 0%;
}

/* --- Stitch Dashboard Styles --- */

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--stitch-bg-dark);
    color: var(--text-color);
    font-family: var(--font-display);
}

.dashboard-main {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

@media (min-width: 640px) {
    .dashboard-main {
        padding: 2rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .dashboard-main {
        padding: 2rem 2.5rem;
    }
}

@media (min-width: 1024px) {
    .dashboard-main {
        padding: 2rem 2.5rem;
    }
}

.layout-content-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    width: 100%;
    /* max-width controlled by var(--content-max-width) normally, but let's ensure it matches design */
    max-width: var(--content-max-width);
    gap: 2rem;
}

/* Dashboard Header */
.stitch-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    border-bottom: 1px solid #234832;
    background-color: rgba(16, 34, 23, 0.95);
    /* stitch-bg-dark */
    backdrop-filter: blur(12px);
    padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
    .stitch-header {
        padding: 0.75rem 2.5rem;
    }
}

.header-logo-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    color: var(--stitch-primary);
}

.logo-text {
    display: none;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
}

@media (min-width: 768px) {
    .logo-text {
        display: block;
    }
}

.header-nav {
    display: none;
}

@media (min-width: 1024px) {
    .header-nav {
        display: flex;
        align-items: center;
        gap: 2.25rem;
    }
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover {
    color: white;
}

.nav-link.active {
    color: white;
    font-weight: 700;
    border-bottom: 2px solid var(--stitch-primary);
    padding-bottom: 0.125rem;
}

.header-actions {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .header-actions {
        gap: 2rem;
    }
}

.search-label {
    display: none;
    flex-direction: column;
    min-width: 10rem;
    height: 2.5rem;
    max-width: 16rem;
}


/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast-notification {
    pointer-events: auto;
    background-color: var(--surface-color);
    /* Fallback */
    background: rgba(16, 34, 23, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    font-weight: 500;
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(20px);
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-success {
    border-left: 4px solid #22c55e;
}

.toast-success .material-symbols-outlined {
    color: #22c55e;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error .material-symbols-outlined {
    color: #ef4444;
}

.search-wrapper {
    display: flex;
    width: 100%;
    flex: 1;
    align-items: stretch;
    border-radius: 0.75rem;
    height: 100%;
    background-color: #234832;
    transition: all 0.2s;
}

.search-wrapper:focus-within {
    box-shadow: 0 0 0 2px rgba(43, 238, 121, 0.5);
}

.search-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 1rem;
    color: #92c9a8;
}

.search-input-field {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: white;
    outline: none;
    padding: 0 0.75rem;
    font-size: 0.875rem;
}

.search-input-field::placeholder {
    color: #92c9a8;
}

.add-btn {
    display: flex;
    min-width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 9999px;
    background-color: var(--stitch-primary);
    color: #112218;
    border: none;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s;
}

.add-btn:hover {
    background-color: #22d168;
}

@media (min-width: 768px) {
    .add-btn {
        min-width: 5.25rem;
        padding: 0 1rem;
    }
}

.profile-pic {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Dashboard Hero */
.hero-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.greeting-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.greeting-title {
    font-size: 1.875rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.033em;
    color: white;
    margin: 0;
}

@media (min-width: 768px) {
    .greeting-title {
        font-size: 3rem;
    }
}

.weather-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #92c9a8;
}

.weather-text {
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
}

/* Alert Banner */
.alert-banner {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.alert-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s;
}

.alert-banner:hover .alert-bg {
    transform: scale(1.05);
}

.alert-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(69, 26, 26, 0.9), rgba(16, 34, 23, 0.6));
}

.alert-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .alert-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 2rem;
    }
}

.alert-text-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 42rem;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    color: #f87171;
    /* red-400 */
    font-size: 1.875rem;
}

.alert-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

@media (min-width: 768px) {
    .alert-title {
        font-size: 1.875rem;
    }
}

.alert-description {
    color: #fee2e2;
    /* red-100 */
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.625;
    margin: 0;
}

.alert-btn {
    white-space: nowrap;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.alert-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Watchlist Grid */
.watchlist-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.watchlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.watchlist-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0;
}

.manage-btn {
    color: var(--stitch-primary);
    font-size: 0.875rem;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
}

.manage-btn:hover {
    text-decoration: underline;
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Watchlist Card */
.watchlist-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

/* Card Themes */
.card-closed {
    background-color: #2a1515;
    border: 1px solid rgba(127, 29, 29, 0.3);
}

.card-closed:hover {
    box-shadow: 0 10px 15px -3px rgba(127, 29, 29, 0.1);
}

.card-open {
    background-color: #132e22;
    border: 1px solid rgba(20, 83, 45, 0.3);
}

.card-open:hover {
    box-shadow: 0 10px 15px -3px rgba(20, 83, 45, 0.1);
}

.card-delayed {
    background-color: #2e2613;
    border: 1px solid rgba(120, 53, 15, 0.3);
}

.card-delayed:hover {
    box-shadow: 0 10px 15px -3px rgba(120, 53, 15, 0.1);
}

/* Card Content */
.card-body {
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.card-closed .card-category {
    color: #fecaca;
}

.card-open .card-category {
    color: #bbf7d0;
}

.card-delayed .card-category {
    color: #fde68a;
}

.card-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.25rem 0;
}

.status-badge-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-closed {
    background-color: #dc2626;
    color: white;
}

.badge-open {
    background-color: var(--stitch-primary);
    color: #112218;
    box-shadow: 0 0 10px rgba(43, 238, 121, 0.3);
}

.badge-delayed {
    background-color: var(--stitch-amber);
    color: #451a03;
}

.status-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.status-message {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.625;
}

.card-closed .status-message {
    color: rgba(254, 226, 226, 0.8);
}

.card-open .status-message {
    color: #92c9a8;
}

.card-delayed .status-message {
    color: rgba(254, 243, 199, 0.8);
}

.card-image {
    width: 6rem;
    height: 6rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    background-size: cover;
    background-position: center;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-width: 1px;
    border-top-style: solid;
}

.card-closed .card-footer {
    background-color: rgba(69, 26, 26, 0.3);
    border-color: rgba(127, 29, 29, 0.2);
}

.card-open .card-footer {
    background-color: #11291f;
    border-color: rgba(20, 83, 45, 0.2);
}

.card-delayed .card-footer {
    background-color: #261f10;
    border-color: rgba(120, 53, 15, 0.2);
}

.footer-text {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.6;
}

.card-closed .footer-text {
    color: #fecaca;
}

.card-open .footer-text {
    color: #92c9a8;
}

.card-delayed .footer-text {
    color: #fde68a;
}

.footer-link {
    font-size: 0.75rem;
    color: white;
    font-weight: 700;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Add Location Card */
.add-card-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background-color: transparent;
    border: 2px dashed #234832;
    padding: 2rem;
    min-height: 200px;
    cursor: pointer;
    transition: all 0.2s;
    height: 100%;
    width: 100%;
}

.add-card-btn:hover {
    border-color: rgba(43, 238, 121, 0.5);
    background-color: #193324;
}

.add-icon-circle {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background-color: #234832;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: background-color 0.2s;
}

.add-card-btn:hover .add-icon-circle {
    background-color: rgba(43, 238, 121, 0.2);
}

.add-icon-plus {
    font-size: 1.875rem;
    color: #92c9a8;
    transition: color 0.2s;
}

.add-card-btn:hover .add-icon-plus {
    color: var(--stitch-primary);
}

.add-text-main {
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
}

.add-text-sub {
    color: #92c9a8;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Utilities Helpers */
.text-red-400 {
    color: #f87171;
}

.text-\[20px\] {
    font-size: 20px;
}

.align-middle {
    vertical-align: middle;
}

.mr-1 {
    margin-right: 0.25rem;
}

/* Facility Header Styles */
.facility-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

@media (prefers-color-scheme: dark) {
    .facility-header {
        background-color: rgba(16, 24, 34, 0.95);
        border-color: #234832;
    }
}

:root.dark .facility-header {
    background-color: rgba(16, 34, 23, 0.95);
    border-color: #234832;
}

.header-container {
    margin: 0 auto;
    max-width: 80rem;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .header-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .header-container {
        padding: 0 2rem;
    }
}

.header-content {
    display: flex;
    height: 4.5rem;
    /* slightly larger than h-16 */
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background-color: #234832;
    padding: 0.5rem;
    color: white;
}

.facility-logo-icon {
    font-size: 24px;
}

.app-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.025em;
    color: var(--surface-dark);
}

:root.dark .app-title {
    color: white;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    background-color: #234832;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #2c5a3f;
}

.logout-icon {
    margin-right: 0.5rem;
    font-size: 20px;
}

/* Facility Status Form Styles */
.facility-status-card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(17, 24, 39, 0.05);
    /* ring-gray-900/5 */
    overflow: hidden;
}

:root.dark .facility-status-card {
    background-color: var(--stitch-card-dark, #162a1f);
    /* Fixed: Use Stitch color, not generic surface-dark */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-form {
    padding: 1.5rem;
}

@media (min-width: 640px) {
    .status-form {
        padding: 2rem;
    }
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.border-top {
    border-top: 1px solid #f3f4f6;
    /* gray-100 */
    padding-top: 1.5rem;
    margin-top: 2rem;
}

:root.dark .border-top {
    border-color: #234832;
}

.form-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    color: var(--surface-dark);
    margin-bottom: 0.5rem;
}

:root.dark .form-label {
    color: white;
}

.label-with-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .status-options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.status-option {
    position: relative;
    display: flex;
    cursor: pointer;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    /* gray-200 */
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

:root.dark .status-option {
    border-color: #326747;
}

.status-option:hover {
    background-color: #f9fafb;
    /* gray-50 */
}

:root.dark .status-option:hover {
    background-color: #1f3a2c;
}

/* Checked state styles would ideally be handled by :has() but for broad compatibility we might need JS or sibling selectors.
   The Stitch file uses tailwind group-has-[:checked].
   Here we can use input:checked + .status-content or :has if supported.
   Let's assume standard CSS :has is fine for modern browsers or fallback.
*/

.status-option:has(input:checked) {
    border-color: transparent;
    /* Specific box-shadows applied below per status */
}

/* Specific colors for checked states */
.status-option:has(input[value="OPEN"]:checked) {
    box-shadow: 0 0 0 2px var(--success-color, #22c55e);
    /* fallback if var not defined */
}

.status-option:has(input[value="DELAYED"]:checked) {
    box-shadow: 0 0 0 2px var(--warning-color, #eab308);
}

.status-option:has(input[value="CLOSED"]:checked) {
    background-color: var(--danger-color, #ef4444);
    border-color: var(--danger-color, #ef4444);
}

.status-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.status-icon {
    font-size: 2.25rem;
    /* text-4xl */
    color: #9ca3af;
    /* gray-400 */
}

:root.dark .status-icon {
    color: #92c9a8;
}

/* When checked */
.status-option:has(input:checked) .status-icon {
    color: inherit;
    /* Fallback */
}

.status-option:has(input[value="OPEN"]:checked) .status-icon {
    color: var(--success-color, #22c55e);
}

.status-option:has(input[value="CLOSED"]:checked) .status-icon {
    color: white;
}

.status-label {
    font-size: 1.125rem;
    /* text-lg */
    font-weight: 700;
    color: var(--surface-dark);
}

:root.dark .status-label {
    color: white;
}

:root.dark .status-option {
    border-color: #326747;
}

:root.dark .status-option:hover {
    background-color: #1f3a2c;
}

.status-option:has(input[value="CLOSED"]:checked) .status-label {
    color: white;
}

.input-wrapper {
    position: relative;
    margin-top: 0.5rem;
}

.input-icon-left {
    pointer-events: none;
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    align-items: center;
}

.input-icon-left span {
    color: #9ca3af;
    /* gray-400 */
}

:root.dark .input-icon-left span {
    color: #5c856e;
}

.form-textarea {
    display: block;
    width: 100%;
    border-radius: 0.75rem;
    border: 0;
    padding: 1rem;
    padding-left: 3rem;
    color: var(--surface-dark);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background-color: white;
    box-shadow: inset 0 0 0 1px #d1d5db;
    /* ring-1 ring-gray-300 */
    font-family: inherit;
    font-size: 1rem;
}

.form-textarea:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

:root.dark .form-textarea {
    background-color: #112218;
    color: white;
    box-shadow: inset 0 0 0 1px #326747;
}

:root.dark .form-textarea::placeholder {
    color: #5c856e;
}

:root.dark .form-textarea:focus {
    box-shadow: inset 0 0 0 2px var(--primary-color);
}

.form-hint {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    /* gray-500 */
}

:root.dark .form-hint {
    color: #92c9a8;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    padding-top: 1.5rem;
}

.btn-text {
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--surface-dark);
    cursor: pointer;
    transition: color 0.2s;
}

:root.dark .btn-text {
    color: white;
}

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

.btn-primary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--primary-color);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: #112218;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

@media (min-width: 640px) {
    .btn-primary {
        width: auto;
        min-width: 240px;
    }
}

.btn-primary:hover {
    background-color: #20bd60;
}

.btn-icon {
    font-size: 24px;
}

/* Facility Page Layout */
.facility-main {
    flex: 1;
    padding: 2rem 1rem;
}

@media (min-width: 640px) {
    .facility-main {
        padding: 3rem 1.5rem;
    }
}

.facility-content {
    margin: 0 auto;
    max-width: 56rem;
    /* max-w-4xl */
}

.page-heading {
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .page-heading {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.heading-title {
    font-size: 1.875rem;
    /* text-3xl */
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--surface-dark);
    line-height: 1;
}

@media (min-width: 640px) {
    .heading-title {
        font-size: 2.25rem;
        /* text-4xl */
    }
}

:root.dark .heading-title {
    color: white;
}

.heading-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
    /* slate-600 */
}

:root.dark .heading-meta {
    color: #92c9a8;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    background-color: rgba(239, 68, 68, 0.1);
    /* danger/10 */
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ef4444;
    /* danger */
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Recent Updates & Preview Grid */
.updates-grid {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .updates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.updates-card {
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background-color: rgba(249, 250, 251, 0.5);
    /* gray-50/50 */
    padding: 1.5rem;
}

:root.dark .updates-card {
    background-color: transparent;
    border-color: #234832;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    /* gray-500 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

:root.dark .card-title {
    color: #92c9a8;
}

.updates-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.update-item {
    display: flex;
    gap: 1rem;
}

.update-icon-wrapper {
    flex: none;
}

.update-icon-circle {
    display: flex;
    height: 2rem;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
}

.circle-danger {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.circle-warning {
    background-color: rgba(234, 179, 8, 0.2);
    color: #eab308;
}

.update-content {
    display: flex;
    flex-direction: column;
}

.update-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--surface-dark);
}

:root.dark .update-text {
    color: white;
}

.update-meta {
    font-size: 0.75rem;
    color: #6b7280;
    /* gray-500 */
}

:root.dark .update-meta {
    color: #9ca3af;
    /* gray-400 */
}

/* Subscriber Preview Styles */
.subscriber-preview-box {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    padding: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

:root.dark .subscriber-preview-box {
    background-color: #112218;
    border-color: #326747;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.preview-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
}

:root.dark .preview-title {
    color: #9ca3af;
}

.preview-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.preview-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.preview-icon-box {
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    border-radius: 9999px;
    background-color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.preview-message-box {
    flex: 1;
}

.preview-msg-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--surface-dark);
    margin: 0;
}

:root.dark .preview-msg-title {
    color: white;
}

.preview-msg-body {
    font-size: 0.75rem;
    color: #4b5563;
    /* gray-600 */
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

:root.dark .preview-msg-body {
    color: #d1d5db;
    /* gray-300 */
}

/* Landing Page Styles */
.landing-page {
    background-color: var(--stich-bg-light, #f6f7f8);
    color: var(--surface-dark, #0f172a);
    font-family: 'Lexend', sans-serif;
    --primary-color: #137fec;
}

:root.dark .landing-page {
    background-color: var(--stitch-bg-dark, #102217);
    color: white;
}

/* Landing Header */
.landing-header {
    display: block;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--border-color, #e2e8f0);
}

:root.dark .landing-header {
    background-color: rgba(15, 23, 42, 0.8);
    border-bottom-color: var(--border-color, #1e293b);
}

.header-container {
    max-width: 80rem;
    /* 7xl */
    margin: 0 auto;
    padding: 0 1rem;
    height: 4rem;
    /* h-16 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (min-width: 640px) {
    .header-container {
        padding: 0 1.5rem;
        height: 5rem;
        /* h-20 */
    }
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.landing-header .logo-icon {
    font-size: 2rem;
    color: var(--primary-color, #137fec);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-family: 'Lexend', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--surface-dark, #0f172a);
    margin: 0;
}

:root.dark .logo-text {
    color: white;
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-signin {
    display: none;
    height: 2.5rem;
    padding: 0 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    color: #334155;
    /* slate-700 */
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-signin:hover {
    background-color: #f1f5f9;
    /* slate-100 */
}

:root.dark .btn-signin {
    color: #e2e8f0;
    /* slate-200 */
}

:root.dark .btn-signin:hover {
    background-color: #1e293b;
    /* slate-800 */
}

@media (min-width: 640px) {
    .btn-signin {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.btn-signup {
    height: 2.5rem;
    padding: 0 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    background-color: var(--primary-color, #137fec);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(19, 127, 236, 0.2);
    transition: background-color 0.2s;
    font-family: 'Lexend', sans-serif;
}

.btn-signup:hover {
    background-color: #2563eb;
    /* blue-600 */
}

/* Landing Hero */
.landing-hero {
    position: relative;
    padding: 3rem 1rem;
    overflow: hidden;
    min-height: calc(100vh - 5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .landing-hero {
        padding: 5rem 1rem;
    }
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.hero-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(64px);
    /* blur-3xl */
}

.blob-1 {
    top: 25%;
    left: -2.5rem;
    width: 18rem;
    height: 18rem;
    background-color: rgba(96, 165, 250, 0.1);
    /* blue-400/10 */
}

.blob-2 {
    bottom: 25%;
    right: -2.5rem;
    width: 24rem;
    height: 24rem;
    background-color: rgba(19, 127, 236, 0.05);
    /* primary/5 */
}

.hero-content {
    width: 100%;
    max-width: 56rem;
    /* 4xl */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

@media (min-width: 640px) {
    .hero-content {
        gap: 2.5rem;
    }
}

.hero-title {
    font-family: 'Lexend', sans-serif;
    font-size: 2.25rem;
    /* 4xl */
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.05em;
    color: var(--surface-dark, #0f172a);
}

:root.dark .hero-title {
    color: white;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 3rem;
        /* 5xl */
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.75rem;
        /* 6xl */
    }
}

.hero-title .highlight {
    color: var(--primary-color, #137fec);
    text-decoration: underline;
    text-decoration-thickness: 4px;
    text-underline-offset: 4px;
    text-decoration-color: rgba(191, 219, 254, 1);
    /* blue-200 */
}

:root.dark .hero-title .highlight {
    text-decoration-color: rgba(30, 58, 138, 0.5);
    /* blue-900/50 */
}

.hero-subtitle {
    font-size: 1.125rem;
    /* lg */
    line-height: 1.625;
    color: #64748b;
    /* slate-500 */
    max-width: 36rem;
    margin: 0 auto;
}

:root.dark .hero-subtitle {
    color: #94a3b8;
    /* slate-400 */
}

@media (min-width: 640px) {
    .hero-subtitle {
        font-size: 1.25rem;
        /* xl */
    }
}

/* Landing Search Bar */
.landing-search-container {
    width: 100%;
    max-width: 42rem;
    /* 2xl */
}

.landing-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 3.5rem;
    /* h-14 */
    border-radius: 9999px;
    background-color: white;
    border: 1px solid var(--border-color, #e2e8f0);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    /* shadow-xl */
    transition: all 0.3s;
}

:root.dark .landing-search-bar {
    background-color: #1e293b;
    /* slate-800 */
    border-color: #334155;
    /* slate-700 */
    box-shadow: none;
}

.landing-search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(19, 127, 236, 0.2);
}

@media (min-width: 640px) {
    .landing-search-bar {
        height: 4rem;
        /* h-16 */
    }
}

.search-icon-wrapper {
    padding-left: 1.25rem;
    color: #94a3b8;
    /* slate-400 */
    display: flex;
    align-items: center;
    pointer-events: none;
}

@media (min-width: 640px) {
    .search-icon-wrapper {
        padding-left: 1.5rem;
    }
}

.landing-search-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--surface-dark, #0f172a);
    font-size: 1rem;
    padding: 0 1rem;
    outline: none;
    font-family: 'Lexend', sans-serif;
}

:root.dark .landing-search-input {
    color: white;
}

.landing-search-input::placeholder {
    color: #94a3b8;
    /* slate-400 */
}

@media (min-width: 640px) {
    .landing-search-input {
        font-size: 1.125rem;
        /* lg */
    }
}

.search-btn-wrapper {
    padding-right: 0.5rem;
}

.search-btn {
    height: 2.5rem;
    /* h-10 */
    padding: 0 1.5rem;
    background-color: var(--primary-color, #137fec);
    color: white;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #2563eb;
    /* blue-600 */
}

@media (min-width: 640px) {
    .search-btn {
        height: 3rem;
        /* h-12 */
        padding: 0 2rem;
        font-size: 1rem;
    }
}

/* Hero Actions */
.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.location-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    color: var(--primary-color);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.location-btn:hover {
    background-color: rgba(19, 127, 236, 0.05);
}

:root.dark .location-btn:hover {
    background-color: rgba(19, 127, 236, 0.1);
}

.location-btn .icon {
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.location-btn:hover .icon {
    transform: scale(1.1);
}

.location-btn .text {
    font-weight: 700;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .location-btn .text {
        font-size: 1rem;
    }
}

/* Social Proof */
.social-proof {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    border: 1px solid #f1f5f9;
    /* slate-100 */
    backdrop-filter: blur(4px);
}

:root.dark .social-proof {
    background-color: rgba(30, 41, 59, 0.6);
    border-color: rgba(51, 65, 85, 0.5);
    /* slate-700/50 */
}

@media (min-width: 640px) {
    .social-proof {
        flex-direction: row;
        gap: 1rem;
    }
}

.avatar-group {
    display: flex;
    margin-left: 0.75rem;
    /* offset for negative space */
}

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-size: cover;
    background-position: center;
    border: 2px solid white;
    margin-left: -0.75rem;
    background-color: #e2e8f0;
}

:root.dark .avatar {
    border-color: #1e293b;
    /* slate-800 */
    background-color: #334155;
}

.avatar-more {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: #f1f5f9;
    /* slate-100 */
    border: 2px solid white;
    margin-left: -0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    /* slate-600 */
}

:root.dark .avatar-more {
    background-color: #334155;
    /* slate-700 */
    border-color: #1e293b;
    color: #cbd5e1;
    /* slate-300 */
}

.social-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    /* slate-600 */
    margin: 0;
}

:root.dark .social-text {
    color: #cbd5e1;
    /* slate-300 */
}

.social-text .bold {
    font-weight: 700;
    color: var(--surface-dark, #0f172a);
}

:root.dark .social-text .bold {
    color: white;
}

/* Landing Footer */
.landing-footer {
    display: block;
    width: 100%;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color, #e2e8f0);
    background-color: white;
}

:root.dark .landing-footer {
    border-color: #1e293b;
    /* slate-800 */
    background-color: #0f172a;
    /* slate-900 */
}

.footer-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 1.5rem;
    }
}

.footer-container .copyright {
    color: #64748b;
    /* slate-500 */
    font-size: 0.875rem;
    /* sm */
    margin: 0;
}

:root.dark .footer-container .copyright {
    color: #94a3b8;
    /* slate-400 */
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #475569;
    /* slate-600 */
    font-size: 0.875rem;
    /* sm */
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

:root.dark .footer-links a {
    color: #cbd5e1;
    /* slate-300 */
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Search Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 5000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
}

.modal-overlay.hidden {
    display: none;
}

.modal-container {
    background-color: var(--surface-color);
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-dark);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    transition: all 0.2s;
}

.close-btn:hover {
    background-color: var(--border-color);
    color: white;
}

.modal-search-box {
    padding: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.modal-search-box input {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1rem 1rem 3rem;
    font-size: 1rem;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

.modal-search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.modal-search-box .search-icon {
    position: absolute;
    left: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.modal-results {
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--surface-color);
    min-height: 200px;
}

.empty-search-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--text-secondary);
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.15s;
}

.search-result-item:hover {
    background-color: var(--bg-dark);
}

.result-info {
    flex: 1;
    min-width: 0;
    margin-right: 1rem;
}

.result-name {
    font-weight: 500;
    color: white;
    margin-bottom: 0.25rem;
}

.result-address {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.track-btn:hover:not(:disabled) {
    background-color: #1a6bd8;
}

.track-btn.tracked {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
    cursor: default;
}

.track-btn:disabled {
    cursor: default;
    opacity: 0.8;
}

.hidden {
    display: none !important;
}

/* Watchlist Card Component */
watchlist-card {
    display: block;
}

.watchlist-card {
    background-color: white;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

:root.dark .watchlist-card {
    background-color: var(--stitch-card-dark, #193324);
    border-color: #234832;
}

.watchlist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

/* Status Border Indicators */
.watchlist-card.card-open {
    border-left: 4px solid var(--stitch-green);
}

.watchlist-card.card-closed {
    border-left: 4px solid var(--stitch-red);
}

.watchlist-card.card-delayed {
    border-left: 4px solid var(--stitch-amber);
}

.card-body {
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--surface-dark);
    margin: 0.25rem 0;
}

:root.dark .card-title {
    color: white;
}

.status-badge-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Distinct Status Badges */
.badge-open {
    background-color: rgba(43, 238, 121, 0.1);
    color: var(--stitch-green);
    border-color: rgba(43, 238, 121, 0.2);
}

.badge-closed {
    background-color: rgba(255, 77, 77, 0.1);
    color: var(--stitch-red);
    border-color: rgba(255, 77, 77, 0.2);
}

.badge-delayed {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--stitch-amber);
    border-color: rgba(245, 158, 11, 0.2);
}

.status-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.status-message {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

:root.dark .status-message {
    color: #94a3b8;
}

.card-image {
    width: 6rem;
    height: 6rem;
    border-radius: 0.75rem;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

:root.dark .card-footer {
    background-color: rgba(0, 0, 0, 0.2);
}

.footer-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.footer-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--stitch-green);
    text-decoration: underline;
}

/* Remove Button */
.remove-btn {
    opacity: 0.6;
    transition: opacity 0.2s;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
}

.remove-btn:hover {
    opacity: 1;
    background-color: rgba(255, 77, 77, 0.1);
    color: var(--stitch-red);
}


/* --- Emergency Mode Overrides --- */
body.emergency-mode {
    --primary-color: #ef4444;
    /* Red-500 */
    --bg-dark: #2a0a0a;
    /* Dark Red tint */
    --surface-color: #451a1a;
    --border-color: #7f1d1d;
}

body.emergency-mode .app-header,
body.emergency-mode .sidebar {
    background-color: #1a0505;
    border-color: #7f1d1d;
}

/* Alert Banner Animation */
@keyframes flash-red {

    0%,
    100% {
        background-color: rgba(239, 68, 68, 0.1);
    }

    50% {
        background-color: rgba(239, 68, 68, 0.3);
    }
}

.emergency-banner {
    background-color: #ef4444;
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: flash-red 2s infinite;
    /* Actually flash the bg of the banner container if we want, or just the banner itself */
}

/* Status Colors used in JS */
:root {
    --color-open: #22c55e;
    --color-closed: #ef4444;
    --color-delayed: #f59e0b;
    --color-unknown: #94a3b8;
}

/* --- New Semantic Classes for Components (replacing Tailwind) --- */

/* Search Bar Styles */
.search-wrapper-styled {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-styled {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.25rem;
    z-index: 10;
}

.search-input-styled {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    /* full rounded */
    padding-left: 2.5rem;
    /* space for icon */
    padding-right: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    color: white;
    width: 16rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    outline: none;
    font-family: inherit;
}

.search-input-styled:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
}

.user-avatar-styled {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: linear-gradient(to bottom right, #3b82f6, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Settings Modal Semantic Styles */
.settings-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
    display: none;
    /* Hidden by default */
}

.settings-modal-overlay.active {
    opacity: 1;
}

.settings-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 100%;
    max-width: 28rem;
    /* max-w-md */
    background-color: #1a1f2e;
    /* dark modal bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    /* rounded-2xl */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: all 0.3s;
}

.settings-modal-overlay.active .settings-modal-content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.settings-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.settings-close-btn {
    padding: 0.5rem;
    border-radius: 9999px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
}

.settings-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.settings-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    /* slate-400 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.settings-account-card {
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
}

.row-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
}

.synced-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.sign-out-btn {
    width: 100%;
    margin-top: 1rem;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sign-out-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.settings-footer {
    text-align: center;
    padding-top: 0.5rem;
}

.version-text {
    font-size: 0.625rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

.hidden {
    display: none !important;
}


/* --- New Utilities for Facility Details Page (Migration support) --- */

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.max-w-2xl {
    max-width: 42rem;
    /* 672px */
}

.max-w-md {
    max-width: 28rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.h-48 {
    height: 12rem;
}

.h-8 {
    height: 2rem;
}

.w-8 {
    width: 2rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.bg-white {
    background-color: white;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-gray-200 {
    background-color: #e5e7eb;
}

.bg-blue-600 {
    background-color: #2563eb;
}

.bg-cover {
    background-size: cover;
}

.bg-center {
    background-position: center;
}

.bg-gradient-to-t {
    background-image: linear-gradient(to top, var(--tw-gradient-stops));
}

.from-black\/60 {
    --tw-gradient-from: rgb(0 0 0 / 0.6);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(0 0 0 / 0));
}

.to-transparent {
    --tw-gradient-to: transparent;
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.bg-white\/20 {
    background-color: rgb(255 255 255 / 0.2);
}

.border-gray-100 {
    border-color: #f3f4f6;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-white\/20 {
    border-color: rgb(255 255 255 / 0.2);
}

.border-b-2 {
    border-bottom-width: 2px;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.font-semibold {
    font-weight: 600;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-800 {
    color: #1f2937;
}

.text-green-500 {
    color: #22c55e;
}

.text-red-400 {
    color: #f87171;
}

.text-red-500 {
    color: #ef4444;
}

.hover\:text-primary:hover {
    color: var(--primary-color);
}

.hover\:underline:hover {
    text-decoration: underline;
}

.hover\:bg-gray-200:hover {
    background-color: #e5e7eb;
}

.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.ml-4 {
    margin-left: 1rem;
}

.pt-6 {
    padding-top: 1.5rem;
}

.pb-6 {
    padding-bottom: 1.5rem;
}

.p-2\.5 {
    padding: 0.625rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.space-y-4> :not([hidden])~ :not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}

.border-t {
    border-top-width: 1px;
}

/* Spinner Animation */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive & Dark Mode */
@media (min-width: 640px) {
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sm\:h-64 {
        height: 16rem;
    }

    .sm\:text-3xl {
        font-size: 1.875rem;
    }
}

:root.dark .dark\:bg-gray-700 {
    background-color: #374151;
}

:root.dark .dark\:bg-gray-800 {
    background-color: #1f2937;
}

:root.dark .dark\:border-gray-700 {
    border-color: #374151;
}

:root.dark .dark\:border-gray-600 {
    border-color: #4b5563;
}

:root.dark .dark\:text-gray-300 {
    color: #d1d5db;
}

:root.dark .dark\:text-gray-400 {
    color: #9ca3af;
}

:root.dark .dark\:hover\:bg-gray-600:hover {
    background-color: #4b5563;
}

:root.dark .dark\:hover\:bg-gray-700:hover {
    background-color: #374151;
}

:root.dark .dark\:bg-green-900\/30 {
    background-color: rgb(20 83 45 / 0.3);
}

:root.dark .dark\:text-green-400 {
    color: #4ade80;
}

:root.dark .dark\:bg-red-900\/30 {
    background-color: rgb(127 29 29 / 0.3);
}

:root.dark .dark\:text-red-400 {
    color: #f87171;
}