/* Dashboard View */
.dashboard-view {
    padding: 0;
}

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

.dashboard-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
}

.dashboard-view-conatiner {
    overflow: hidden;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    cursor: pointer;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-card:nth-child(1) .metric-icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.metric-card:nth-child(2) .metric-icon {
    background: linear-gradient(135deg, #34d399, #10b981);
    color: white;
}

.metric-card:nth-child(3) .metric-icon {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white;
}

.metric-card:nth-child(4) .metric-icon {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white;
}

.metric-content {
    flex: 1;
    min-width: 0;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 500;
}

.metric-change.positive {
    color: #059669;
}

.metric-change.negative {
    color: #dc2626;
}

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

/* Dashboard Row */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-content {
    flex: 1;
    min-height: 0;
}

.chart-card {
    min-height: 300px;
}

/* Timeline Chart */
.timeline-chart {
    width: 100%;
    height: 200px;
}

.timeline-bar {
    fill: #3b82f6;
    transition: fill 0.2s;
}

.timeline-bar:hover {
    fill: #1e40af;
}

.timeline-label {
    fill: #6b7280;
    font-size: 10px;
}

/* Recent Activity */
.recent-activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item.clickable {
    cursor: pointer;
    padding: 0.75rem;
    margin: 0 -0.75rem;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease;
}

.activity-item.clickable:hover {
    background-color: var(--bg-hover);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-action {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.activity-item.clickable:hover .activity-action {
    opacity: 1;
}

.activity-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.activity-description {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.activity-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Alerts */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-warning {
    background: rgba(255, 251, 235, 0.1);
    border-left-color: #f59e0b;
}

.alert-info {
    background: rgba(240, 249, 255, 0.1);
    border-left-color: #3b82f6;
}

.alert-icon {
    flex-shrink: 0;
    color: inherit;
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.alert-message {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0.25rem 0 0;
    padding-left: 1.1rem;
}

.alert-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.alert-edit {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.alert-edit:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Business Views */
.business-view,
.view-container {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.view-header {
    flex-shrink: 0;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.view-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.view-title p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.view-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.view-controls {
    flex-shrink: 0;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    background: var(--bg-hover);
}

.search-controls {
    flex: 1;
    max-width: 400px;
}

.view-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 100;
}

.view-content {
    flex: 1;
    min-height: 0; /* Important: allows flex child to shrink for proper scrolling */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.table-container {
    flex: 1;
    overflow: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .view-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .view-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .view-options {
        justify-content: flex-start;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 280px;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 1rem;
    }

    .view-header {
        padding: 1rem;
    }

    .view-controls {
        padding: 1rem;
    }

    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
}

/* Dashboard Charts */
.timeline-chart {
    width: 100%;
    height: 200px;
}

.timeline-bar {
    fill: #3b82f6;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.timeline-bar:hover {
    opacity: 1;
}

.timeline-label {
    font-size: 10px;
    fill: #6b7280;
}

.promotion-types-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.type-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.type-color {
    width: 1rem;
    height: 1rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.type-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.type-name {
    font-weight: 500;
    color: var(--text-primary);
}

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

/* Recent Activity */
.recent-activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.activity-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.activity-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Alerts */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-item.alert-warning {
    background: rgba(255, 251, 235, 0.1);
    border-left-color: #f59e0b;
}

.alert-item.alert-info {
    background: rgba(240, 249, 255, 0.1);
    border-left-color: #3b82f6;
}

.alert-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-item.alert-warning .alert-icon {
    color: #f59e0b;
}

.alert-item.alert-info .alert-icon {
    color: #3b82f6;
}

.alert-content {
    flex: 1;
    min-width: 0;
}

.alert-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.alert-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
    padding-left: 1.1rem;
}

.alert-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Profile view */
.profile-view .view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pf-content {
    padding-left: 24px;
}

/* Header (no borders) */
.pf-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
}

.pf-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 26px;
    color: #fff;
    flex: 0 0 auto;
}

.pf-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pf-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.pf-email {
    color: var(--text-secondary);
    word-break: break-word;
}

.pf-badges {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.pf-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 9999px;
    background: var(--bg-active);
    color: var(--brand-dark);
    font-size: 12px;
}

/* Buttons */
.pf-edit-btn,
.pf-save-btn {
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color .15s ease;
    background: var(--brand-primary);
    color: #fff;
}

.pf-edit-btn:hover,
.pf-save-btn:hover {
    background: var(--brand-dark);
}

.pf-cancel-btn {
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color .15s ease;
    background: #dc2626;
    color: #fff;
}

.pf-cancel-btn:hover {
    background: #a81d1d;
}

/* Sections (no boxes/lines around sections) */
.pf-section {
    margin-top: 18px;
}

.pf-section-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

/* Key–value grid */
.pf-kv {
    padding: 0;
}

.pf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 32px;
}

.pf-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.pf-row:last-child {
    border-bottom: none;
}

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

.pf-value {
    color: var(--text-primary);
    word-break: break-word;
}

/* Color preview in view mode */
.pf-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 6px;
    border: 1px solid var(--border-color);
    vertical-align: middle;
}

/* Form controls (inputs, selects, textareas) */
.pf-control,
.pf-input,
.pf-value select,
.pf-textarea {
    width: 75%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    background-color: var(--bg-input);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pf-control:focus,
.pf-input:focus,
.pf-value select:focus,
.pf-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Select: remove native arrow, add custom */
.pf-value select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%23999' stroke-width='1.5' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2rem;
    /* room for arrow */
}

/* Color input: compact, not loud */
.pf-value input[type="color"] {
    height: 32px;
    width: 60px;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    cursor: pointer;
}

.pf-value input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.pf-value input[type="color"]::-webkit-color-swatch {
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Utility: edit action row spacing */
.pf-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* bulk.js */
.bulk-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background-color: var(--bg-body);
    overflow-y: auto;
}

.bulk-view.view-container {
    overflow-y: auto;
}

.bulk-blocks {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding: 4rem 2rem;
    flex-wrap: wrap;
}

/* layout */
#bulkContent {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.bulk-view .wizard-root {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

.bulk-view .wizard-body {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
}

/* table (legacy) */
.bulk-table-wrap {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.bulk-table {
    width: 100%;
    border-collapse: collapse;
}

.bulk-table th,
.bulk-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
}

.bulk-table thead th {
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-hover);
}

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

/* controls */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.bulk-actions .spacer {
    flex: 1;
}

.icon-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
}

.icon-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.searchable-select {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.searchable-input {
    padding: 0.5rem;
    font-size: 0.875rem;
}

.searchable-dropdown {
    max-height: 200px;
    overflow-y: auto;
}

.subview-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin: 8px 0 16px;
}

/* Events View */
.promotion-dropdown {
    width: clamp(300px, 40%, 600px);
    margin: 0 auto;
    font-size: 1.1rem;
    padding: 0.4rem 0;
}

/* 404 Not Found View */
.not-found-view {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 140px);
    background: radial-gradient(circle at center, #1a2e05 0%, #000000 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.not-found-content {
    text-align: center;
    z-index: 10;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

.wandering-yoda {
    position: absolute;
    width: 150px;
    height: 150px;
    z-index: 1;
    animation: x-axis 10s linear infinite alternate, y-axis 8s linear infinite alternate;
}

.wandering-yoda img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(132, 204, 22, 0.6));
    animation: rotate-yoda 20s linear infinite;
}

.error-code {
    font-size: 6rem;
    font-weight: 900;
    color: var(--brand-primary);
    text-shadow: 0 0 20px rgba(132, 204, 22, 0.3);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.error-msg {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.not-found-controls .btn {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    background: var(--brand-primary);
    color: #000;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.not-found-controls .btn:hover {
    background: var(--brand-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(132, 204, 22, 0.4);
}

@keyframes x-axis {
    0% { left: 0; }
    100% { left: calc(100% - 150px); }
}

@keyframes y-axis {
    0% { top: 0; }
    100% { top: calc(100% - 150px); }
}

@keyframes rotate-yoda {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   Server Status View
   ============================================ */
.server-status-view {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    min-height: calc(100vh - 60px);
}

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

.status-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-title i {
    font-size: 1.5rem;
    color: var(--brand-primary);
}

.status-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

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

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge-healthy {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge-degraded {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.status-timestamp {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.status-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.status-card-wide {
    grid-column: 1 / -1;
}

.status-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card-header);
}

.status-card-header i {
    color: var(--brand-primary);
    font-size: 1rem;
}

.status-card-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.status-card-body {
    padding: 1rem 1.25rem;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color-light);
}

.status-row:last-child {
    border-bottom: none;
}

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

.status-value {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: var(--font-mono, 'Monaco', 'Consolas', monospace);
}

.status-value-warning {
    color: #f59e0b;
    font-weight: 600;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator-good {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.status-indicator-warning {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.status-indicator-danger {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

/* Progress bar */
.status-progress {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    margin: 0.75rem 0;
    overflow: hidden;
}

.status-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.status-progress-good {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.status-progress-warning {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.status-progress-danger {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* WebSocket clients */
.ws-client-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.ws-client-list {
    font-size: 0.875rem;
}

.ws-client-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 60px;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ws-client-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 60px;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color-light);
    align-items: center;
}

.ws-client-row:last-child {
    border-bottom: none;
}

.ws-client-name {
    font-weight: 500;
    color: var(--text-primary);
}

.ws-client-id {
    color: var(--text-muted);
    font-family: var(--font-mono, 'Monaco', 'Consolas', monospace);
    font-size: 0.8rem;
}

.ws-client-time {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.ws-client-status {
    text-align: center;
}

.ws-client-status.alive i {
    color: #22c55e;
    font-size: 0.5rem;
}

.ws-client-status.dead i {
    color: #ef4444;
    font-size: 0.5rem;
}

.ws-no-clients {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.ws-no-clients i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Loading and error states */
.status-loading,
.status-error,
.status-access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-muted);
}

.status-loading i,
.status-error i,
.status-access-denied i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.status-error i {
    color: #f59e0b;
}

.status-access-denied i {
    color: #ef4444;
}

.status-error h2,
.status-access-denied h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Spinning animation for refresh button */
.btn-icon.spinning i {
    animation: spin 0.5s linear infinite;
}

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

/* Server Logs Section */
.logs-card {
    margin-top: 1.5rem;
}

.logs-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.logs-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
}

.logs-select:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.logs-autoscroll {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
}

.logs-autoscroll input {
    cursor: pointer;
}

.logs-content {
    max-height: 400px;
    overflow-y: auto;
    background: #1a1a2e;
    border-radius: 0 0 12px 12px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
}

.logs-pre {
    margin: 0;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-line {
    display: block;
    padding: 2px 0;
    color: #a0a0a0;
}

.log-line:hover {
    background: rgba(255, 255, 255, 0.05);
}

.log-time {
    color: #6b7280;
    margin-right: 0.5rem;
}

.log-level {
    font-weight: 600;
    margin-right: 0.5rem;
}

.log-info .log-level {
    color: #60a5fa;
}

.log-warn .log-level,
.log-warn {
    color: #fbbf24;
}

.log-error .log-level,
.log-error {
    color: #f87171;
}

.log-debug .log-level {
    color: #a78bfa;
}

.logs-loading,
.logs-empty,
.logs-error {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.logs-error {
    color: #f87171;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-sm i {
    font-size: 0.75rem;
}
