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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.navbar-brand {
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-toggler {
    border-color: #475569;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.25);
}

.navbar-nav .nav-link {
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
    background: #334155;
    color: #e2e8f0;
}

.navbar-nav .nav-link.active {
    background: #3b82f6;
    color: white;
}

/* Container */
.container-fluid {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header h1 {
    font-size: 32px;
    color: #f1f5f9;
}

/* Stat Cards */
.stat-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #475569;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.stat-up {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #1e293b 0%, #064e3b 100%);
}

.stat-card.stat-down {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #1e293b 0%, #7f1d1d 100%);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
    display: block;
}

/* Monitor Cards - Single Line Design */
.monitors-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.monitor-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 12px 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.monitor-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.monitor-card.status-up {
    border-left: 3px solid #10b981;
}

.monitor-card.status-down {
    border-left: 3px solid #ef4444;
}

.monitor-card.status-unknown {
    border-left: 3px solid #64748b;
}

.monitor-row {
    display: flex;
    align-items: center;
    gap: 12px;
}


.monitor-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.monitor-name {
    font-size: 14px;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.2;
}

.monitor-url {
    font-size: 11px;
    color: #64748b;
    line-height: 1.2;
}

.monitor-metrics {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-badge-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.status-badge-compact.up {
    background: #10b981;
    color: white;
}

.status-badge-compact.down {
    background: #ef4444;
    color: white;
}

.status-badge-compact.unknown {
    background: #64748b;
    color: white;
}

/* Animated Status Indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.up {
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
    animation: pulse-up 2s ease-in-out infinite;
}

.status-indicator.up::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    animation: ripple 2s ease-out infinite;
}

.status-indicator.down {
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
    animation: pulse-down 1s ease-in-out infinite;
}

.status-indicator.unknown {
    background: #94a3b8;
}

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

@keyframes pulse-down {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* 24-Hour Check History - Compact Dots */
.check-boxes-compact {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.check-box {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.check-box.up {
    background: #10b981;
}

.check-box.down {
    background: #ef4444;
}

.check-box.unknown {
    background: #334155;
}

/* Content Cards */
.content-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 25px;
}

.content-card h2,
.content-card h3 {
    color: #f1f5f9;
}

/* Forms - Bootstrap Override */
.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.form-control,
.form-select {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
}

.form-control:focus,
.form-select:focus {
    background: #1e293b;
    border-color: #3b82f6;
    color: #e2e8f0;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.form-control::placeholder {
    color: #475569;
}

.form-check-input {
    background-color: #0f172a;
    border-color: #334155;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-check-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.form-text {
    font-size: 12px;
    color: #64748b;
}

.form-text a {
    color: #60a5fa;
    text-decoration: none;
}

.form-text a:hover {
    text-decoration: underline;
}

/* Buttons - Bootstrap Override */
.btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-secondary {
    background: #64748b;
    border-color: #64748b;
}

.btn-secondary:hover {
    background: #475569;
    border-color: #475569;
}

.btn-danger {
    background: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Manage Websites List */
.manage-website-item {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
}

.manage-website-item:hover {
    border-color: #3b82f6;
}

.manage-website-info {
    flex: 1;
}

.manage-website-name {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 4px;
}

.manage-website-url {
    font-size: 13px;
    color: #64748b;
}

.manage-website-actions {
    display: flex;
    gap: 8px;
}

/* Incidents */
.incident-item {
    background: #1e293b;
    border: 1px solid #334155;
    border-left: 4px solid #ef4444;
    border-radius: 8px;
    padding: 18px 20px;
    margin-bottom: 12px;
}

.incident-item.resolved {
    border-left-color: #10b981;
    opacity: 0.7;
}

.incident-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.incident-website {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
}

.incident-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.incident-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.incident-status.ongoing {
    background: #ef4444;
    color: white;
}

.incident-status.resolved {
    background: #10b981;
    color: white;
}

.incident-delete-btn {
    padding: 4px 10px;
    background: #64748b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.incident-delete-btn:hover {
    background: #ef4444;
}

.incident-details {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.incident-time {
    font-size: 12px;
    color: #64748b;
}

/* Footer */
.main-footer {
    background: #1e293b;
    border-top: 1px solid #334155;
    margin-top: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.footer-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #f1f5f9;
}

.footer-copyright {
    font-size: 14px;
    color: #94a3b8;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: #60a5fa;
}

/* Messages */
#form-message,
#settings-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}

#form-message.success,
#settings-message.success {
    display: block;
    background: #064e3b;
    color: #6ee7b7;
    border: 1px solid #10b981;
}

#form-message.error,
#settings-message.error {
    display: block;
    background: #7f1d1d;
    color: #fca5a5;
    border: 1px solid #ef4444;
}

/* Modal - Bootstrap Override */
.modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    color: #e2e8f0;
}

.modal-header {
    border-bottom-color: #334155;
}

.modal-title {
    color: #f1f5f9;
}

.modal-body h2,
.modal-body h3 {
    color: #f1f5f9;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Timeline */
.check-timeline {
    margin-top: 15px;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #334155;
    background: #0f172a;
    margin-bottom: 5px;
    border-radius: 6px;
}

.timeline-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 15px;
}

.timeline-status.up {
    background: #10b981;
}

.timeline-status.down {
    background: #ef4444;
}

.timeline-time {
    flex: 1;
    font-size: 13px;
    color: #94a3b8;
}

.timeline-response {
    font-size: 13px;
    color: #64748b;
    margin-right: 15px;
}

.timeline-code {
    font-size: 12px;
    color: #64748b;
}

/* Loading & Empty States */
.loading,
.empty-state {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-size: 14px;
}

/* Alert Description */
.alert-description {
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .monitor-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .monitor-main {
        flex: 1 1 100%;
        order: 2;
    }

    .monitor-icon {
        order: 1;
    }

    .monitor-metrics,
    .status-badge-compact,
    .check-boxes-compact {
        order: 3;
    }

    .manage-website-item {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .manage-website-actions {
        width: 100%;
    }

    .manage-website-actions .btn {
        flex: 1;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-nav {
        flex-wrap: wrap;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

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