body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Offline mode color scheme - brown theme */
body.offline-mode {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%) !important;
}

body.offline-mode .header {
    color: #FFF8DC !important;
}

body.offline-mode .stat-card {
    background: rgba(160, 82, 45, 0.95) !important;
    color: #FFF8DC !important;
}

body.offline-mode .stat-card:hover {
    background: rgba(210, 105, 30, 0.95) !important;
}

body.offline-mode .stat-card.active {
    background: rgba(210, 105, 30, 0.98) !important;
    box-shadow: 0 0 3px rgba(255, 248, 220, 0.5);
}

body.offline-mode .card {
    background-color: #A0522D !important;
    border-color: #CD853F !important;
    color: #FFF8DC !important;
}

body.offline-mode .card-header {
    background-color: #D2691E !important;
    border-color: #CD853F !important;
    color: #FFF8DC !important;
}

body.offline-mode .card-body {
    background-color: #A0522D !important;
    color: #FFF8DC !important;
}

body.offline-mode .table {
    background-color: #A0522D !important;
    color: #FFF8DC !important;
}

body.offline-mode .table th {
    background-color: #D2691E !important;
    border-color: #CD853F !important;
    color: #FFF8DC !important;
}

body.offline-mode .table td {
    background-color: #A0522D !important;
    color: #FFF8DC !important;
}

body.offline-mode .table-striped tbody tr:nth-of-type(odd) td {
    background-color: #8B4513 !important;
}

body.offline-mode .text-muted {
    color: #F5DEB3 !important;
}

body.offline-mode h1, 
body.offline-mode h2, 
body.offline-mode h3, 
body.offline-mode h4, 
body.offline-mode h5, 
body.offline-mode h6 {
    color: #FFF8DC !important;
}

/* Offline banner styling to match brown theme */
body.offline-mode .alert-warning {
    background-color: #D2691E !important;
    border-color: #CD853F !important;
    color: #FFF8DC !important;
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.stat-card {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

.stat-card.active {
    background: rgba(255,255,255,0.98);
    box-shadow: 0 0 3px rgba(255,255,255,0.5);
}

.repo-health-section {
    border: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border-radius: 15px;
}

.repo-health-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.repo-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.repo-pill.warning {
    background: rgba(255, 193, 7, 0.15);
    color: #b58104;
}

.repo-pill.critical {
    background: rgba(220, 53, 69, 0.12);
    color: #c82333;
}

.repo-health-list {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
}

.repo-health-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

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

.repo-health-item .repo-meta {
    display: flex;
    flex-direction: column;
}

.repo-health-item .repo-name {
    font-weight: 600;
    font-size: 1rem;
}

.repo-health-item .repo-slug {
    font-size: 0.85rem;
    color: #6c757d;
}

.repo-health-item .repo-status-badge {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.repo-health-item .repo-time {
    font-size: 0.85rem;
    color: #6c757d;
}

.repo-error {
    margin-top: 6px;
    font-size: 0.75rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.healthy { color: #198754; }
.warning { color: #ffc107; }
.critical { color: #dc3545; }
.mia { color: #20c997; }
.dead { color: #6c757d; }
.historical { color: #0dcaf0; }

.host-card {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    margin-bottom: 20px;
    overflow: hidden;
}

/* Ensure hostname truncates properly without pushing status badge out */
.host-card h5 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.host-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.host-card.critical {
    border-left: 5px solid #dc3545;
    background: rgba(255,235,238,0.98);
}

.host-card.warning {
    border-left: 5px solid #ffc107;
}

.host-card.healthy {
    border-left: 5px solid #198754;
}

.host-card.dead {
    border-left: 5px solid #6c757d;
    background: rgba(108,117,125,0.1);
    opacity: 0.8;
}

.host-card.historical {
    border-left: 5px solid #0dcaf0;
    background: rgba(13,202,240,0.05);
}

.host-card.mia {
    border-left: 8px solid #20c997;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(240,255,250,0.98) 50%, rgba(230,255,245,0.98) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(32,201,151,0.2);
    border: 2px solid rgba(32,201,151,0.3);
}

.host-card.mia::before {
    content: "🌐";
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
    z-index: 1;
}

.host-card.mia::after {
    content: "📡";
    position: absolute;
    bottom: 15px;
    left: 20px;
    font-size: 1.5rem;
    opacity: 0.4;
    animation: float 2s ease-in-out infinite reverse;
    z-index: 1;
}

.host-card.mobile {
    border-left: 8px solid #fd7e14;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,248,220,0.98) 50%, rgba(255,235,205,0.98) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(253,126,20,0.2);
    border: 2px solid rgba(253,126,20,0.3);
}

.host-card.mobile::before {
    content: "🏝️";
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
    z-index: 1;
}

.host-card.mobile::after {
    content: "🦋";
    position: absolute;
    bottom: 15px;
    left: 20px;
    font-size: 1.5rem;
    opacity: 0.4;
    animation: float 2s ease-in-out infinite reverse;
    z-index: 1;
}

.host-card.outdated-macos {
    border-left: 6px solid #fd7e14;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,248,240,0.98) 50%, rgba(255,245,235,0.98) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(253,126,20,0.15);
    border: 1px solid rgba(253,126,20,0.25);
}

.host-card.outdated-macos::before {
    content: "";
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.7;
    animation: gentle-pulse 2s ease-in-out infinite;
    z-index: 1;
}

.host-card.outdated-macos::after {
    content: "🔧";
    position: absolute;
    bottom: 15px;
    left: 20px;
    font-size: 1.4rem;
    opacity: 0.5;
    animation: gentle-bounce 1.8s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 0.9; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

/* Update badge styling */
.badge.bg-warning {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    animation: gentle-pulse 2s ease-in-out infinite;
    background-color: #fd7e14 !important;
    border-color: #fd7e14 !important;
    color: white !important;
    font-weight: 500;
}

.badge.bg-warning i {
    margin-right: 2px;
}

/* Machine type badge styling */
.badge.bg-secondary {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    vertical-align: middle;
    line-height: 1.2;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.location {
    font-size: 0.9rem;
    color: #666;
}

.health-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}

.health-status.healthy {
    background: #d1e7dd;
    color: #0f5132;
}

.health-status.warning {
    background: #fff3cd;
    color: #856404;
}

.health-status.critical {
    background: #f8d7da;
    color: #721c24;
}

.health-status.dead {
    background: #e9ecef;
    color: #495057;
}

.health-status.historical {
    background: #cff4fc;
    color: #055160;
}

.health-status.mia {
    background: #fff3cd;
    color: #856404;
}

.last-seen {
    font-size: 0.8rem;
    color: #888;
    text-align: right;
    margin-top: 10px;
}

.critical-section {
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.critical-host-item {
    margin: 5px 0;
    padding: 8px;
    background: rgba(0,0,0,0.15);
    color: white;
    border-radius: 5px;
}

.mia-section {
    background: #20c997;
    color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.mia-host-item {
    margin: 5px 0;
    padding: 8px;
    background: rgba(0,0,0,0.15);
    color: white;
    border-radius: 5px;
}

.warning-section {
    background: #ffc107;
    color: #212529;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.warning-host-item {
    margin: 5px 0;
    padding: 8px;
    background: rgba(0,0,0,0.1);
    color: #212529;
    border-radius: 5px;
}

.historical-section {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.historical-section h3 {
    color: #333;
    border-bottom: 2px solid #0dcaf0;
    padding-bottom: 10px;
}

.loading {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    padding: 50px;
}

.error {
    background: rgba(220,53,69,0.9);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

