/* dashboard.css - Live Camp Check-In Monitor Dashboard */

:root {
    --primary-color: #15803d; /* green-700 */
    --primary-hover: #166534;
    --primary-light: #f0fdf4;
    --primary-border: #bbf7d0;

    --secondary-color: #e11d48; /* rose-600 */
    --secondary-hover: #be123c;
    --secondary-light: #fff1f2;
    --secondary-border: #fecdd3;

    --slate-dark: #0f172a;
    --slate-bg: #1e293b;
    --slate-text: #334155;
    --slate-muted: #64748b;
    --bg-light: #f8fafc;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--slate-dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header */
header.app-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 2px solid rgba(21, 128, 61, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1.5rem;
}

.header-inner {
    max-width: 80rem; /* max-w-7xl */
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo-img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
}

.brand-title {
    font-size: 1.125rem;
    font-weight: 900;
    color: var(--slate-dark);
    margin: 0;
    line-height: 1.25;
}

.brand-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate-muted);
}

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

.badge-pill {
    background-color: #f1f5f9;
    color: #334155;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 1.6s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
}

.btn-outline-green {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-green:hover {
    background-color: var(--primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--slate-dark);
    border: 2px solid #cbd5e1;
}

.btn-ghost:hover {
    background-color: #f1f5f9;
}

/* Main Container */
.main-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
    flex: 1;
}

/* Title section helper styles */
.section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--slate-muted);
    letter-spacing: 0.05em;
}

.section-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--slate-dark);
    letter-spacing: -0.025em;
    margin-top: 0.25rem;
}

/* Metric Cards Pro Grid */
.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card-pro {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 2px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}

.metric-card-pro.card-green {
    border-color: var(--primary-light);
}

.metric-card-pro.card-red {
    border-color: var(--secondary-light);
}

.metric-card-pro.metric-card-pro-black {
    border-color: #e2e8f0;
    background-color: #fff;
}

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

.metric-label {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--slate-muted);
    letter-spacing: 0.025em;
}

.card-icon-box {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-box-green {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.icon-box-red {
    background-color: var(--secondary-light);
    color: var(--secondary-color);
}

.metric-value-huge {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: monospace;
    line-height: 1.1;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.metric-value-huge.text-primary-brand {
    color: var(--primary-color);
}

.metric-value-huge.text-secondary-brand {
    color: var(--secondary-color);
}

.metric-sub-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate-muted);
}

.badge-trend {
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
}

.trend-green {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-border);
}

.trend-red {
    background-color: var(--secondary-light);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-border);
}

.trend-slate {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* Toolbar */
.toolbar-card {
    background-color: #fff;
    border-radius: 1.5rem;
    padding: 1rem 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.toolbar-search {
    position: relative;
    max-width: 320px;
    width: 100%;
}

.toolbar-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-muted);
    font-size: 0.875rem;
}

.toolbar-search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    outline: none;
    transition: all 0.2s ease;
}

.toolbar-search-input:focus {
    border-color: var(--primary-color);
}

.toolbar-select {
    padding: 0.625rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.875rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-text);
    outline: none;
    cursor: pointer;
    background-color: #fff;
}

.toolbar-select:focus {
    border-color: var(--primary-color);
}

.view-switcher {
    display: flex;
    background-color: #f1f5f9;
    padding: 0.25rem;
    border-radius: 0.875rem;
}

.view-btn {
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: transparent;
    color: var(--slate-muted);
    transition: all 0.2s ease;
}

.view-btn.active {
    background-color: #fff;
    color: var(--slate-dark);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Layout Grid for Regions & Live Feed */
.dashboard-body-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

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

/* Regional Grid View */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: #fff;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 2px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card.card-green {
    border-color: var(--primary-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--slate-dark);
    margin-top: 0.25rem;
}

/* Table View */
.data-table-container {
    background-color: #fff;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.data-table th {
    background-color: #f8fafc;
    padding: 1rem 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--slate-muted);
    letter-spacing: 0.025em;
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

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

/* Live Stream Feed Panel */
.feed-card {
    background-color: #fff;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.feed-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    transition: background-color 0.2s ease;
}

.feed-item:hover {
    background-color: #f1f5f9;
}

.chip-direction {
    font-size: 0.625rem;
    font-weight: 900;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.chip-in {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-border);
}

.chip-out {
    background-color: var(--secondary-light);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-border);
}

.hidden {
    display: none !important;
}

/* Footer */
footer.app-footer {
    background-color: #020617;
    color: #fff;
    border-top: 4px solid var(--primary-color);
    padding: 2rem 1.5rem;
    margin-top: 3rem;
}

.footer-inner {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-box {
    height: 2.25rem;
    display: flex;
    align-items: center;
}

.brand-logo-footer {
    height: 1.75rem;
    object-fit: contain;
}

.footer-copy {
    font-size: 0.75rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0;
}

.footer-phone {
    font-size: 0.6875rem;
    color: #94a3b8;
    margin-top: 0.125rem;
    margin-bottom: 0;
}

.footer-subtitle {
    color: #94a3b8;
    font-family: monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.1em;
    margin: 0;
}

@media (min-width: 640px) {
    .footer-inner {
        flex-direction: row;
    }
}
