/* StatusRadar.dev - Modern Dark Theme */

:root {
    /* Dark color palette */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #0d1117;
    --bg-hover: #30363d;

    /* Border colors */
    --border-primary: #30363d;
    --border-secondary: #21262d;

    /* Text colors */
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --text-bright: #f0f6fc;

    /* Brand colors */
    --brand-primary: #7c3aed;
    --brand-secondary: #6366f1;
    --brand-gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 50%, #06b6d4 100%);

    /* Status colors */
    --status-success: #3fb950;
    --status-danger: #f85149;
    --status-warning: #d29922;
    --status-info: #58a6ff;

    /* Component colors */
    --input-bg: #0d1117;
    --input-border: #30363d;
    --input-focus: #6366f1;
    --btn-hover: #1f2937;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-bright);
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: var(--brand-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--brand-primary);
}

/* Navbar */
.navbar {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    color: var(--text-bright) !important;
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
}

.navbar-nav .nav-link:hover {
    color: var(--text-bright) !important;
    background-color: var(--bg-hover);
}

.navbar-nav .nav-link.active {
    color: var(--text-bright) !important;
    background-color: var(--bg-hover);
}

/* Cards */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-header {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-bright);
    font-weight: 600;
}

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

/* Forms */
.form-control, .form-select {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background-color: var(--bg-secondary);
    border-color: var(--input-focus);
    color: var(--text-bright);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--text-muted);
}

/* Buttons */
.btn {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.625rem 1.25rem;
}

.btn-outline-secondary {
    background: transparent;
    color: #71717A;
    border: 1px solid #27272A;
}

.btn-outline-secondary:hover {
    background: #27272A;
    color: #E4E4E7;
    border-color: #3F3F46;
    transform: none;
}

.btn-primary {
    background: var(--brand-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
    color: var(--text-bright);
}

.btn-success {
    background-color: var(--status-success);
    color: white;
}

.btn-danger {
    background-color: var(--status-danger);
    color: white;
}

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

.btn-outline-primary:hover {
    background-color: var(--brand-primary);
    color: white;
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.bg-success {
    background-color: var(--status-success) !important;
}

.bg-danger {
    background-color: var(--status-danger) !important;
}

.bg-warning {
    background-color: var(--status-warning) !important;
}

.bg-info {
    background-color: var(--status-info) !important;
}

/* Tables */
.table {
    color: var(--text-primary);
    border-color: var(--border-primary);
}

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

.table tbody tr {
    border-color: var(--border-primary);
}

.table tbody tr:hover {
    background-color: var(--bg-hover);
}

/* Alerts */
.alert {
    border: 1px solid;
    border-radius: 0.5rem;
}

.alert-success {
    background-color: rgba(63, 185, 80, 0.1);
    border-color: var(--status-success);
    color: var(--status-success);
}

.alert-danger {
    background-color: rgba(248, 81, 73, 0.1);
    border-color: var(--status-danger);
    color: var(--status-danger);
}

.alert-warning {
    background-color: rgba(210, 153, 34, 0.1);
    border-color: var(--status-warning);
    color: var(--status-warning);
}

.alert-info {
    background-color: rgba(88, 166, 255, 0.1);
    border-color: var(--status-info);
    color: var(--status-info);
}

/* Dropdown */
.dropdown-menu {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-bright);
}

.dropdown-divider {
    border-color: var(--border-primary);
}

/* Modal */
.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
}

.modal-header {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.modal-footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-primary);
}

/* Footer */
footer {
    background-color: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-primary);
    color: var(--text-secondary);
    margin-top: auto;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Status indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

.status-indicator.up {
    background-color: var(--status-success);
}

.status-indicator.down {
    background-color: var(--status-danger);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 currentColor;
    }
    70% {
        box-shadow: 0 0 0 10px transparent;
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

/* Dashboard stats - Monochrome Design 2025 */
.stat-card {
    background: #141417;
    border: 1px solid #27272A;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    border-color: #3F3F46;
}

/* Utilities */
.text-muted {
    color: var(--text-muted) !important;
}

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

.bg-dark {
    background-color: var(--bg-secondary) !important;
}

.border-top {
    border-top-color: var(--border-primary) !important;
}

/* Loading animation */
.spinner-border {
    color: var(--brand-primary);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* Dashboard Redesign */
/* dashboard-container removed - using Bootstrap container for consistent width */

.greeting-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #8b949e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.health-score {
    font-weight: 700;
    font-size: 1.1rem;
}

.health-score.excellent {
    color: #10b981;
}

.health-score.good {
    color: #f59e0b;
}

.health-score.needs-attention {
    color: #ef4444;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Removed gradient classes - using monochrome design */

.stat-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
}

.stat-icon {
    font-size: 2rem;
    color: #71717A;
}

.stat-icon.status-up {
    color: #10B981;
}

.stat-icon.status-down {
    color: #EF4444;
}

.stat-details {
    flex: 1;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-label {
    color: #A1A1AA;
    font-size: 0.85rem;
    margin: 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-meta {
    margin-top: 0.5rem;
    color: #71717A;
    font-size: 0.8rem;
}

.stat-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: #A1A1AA;
}

.stat-badge.alert {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Uptime Bar - Removed to maintain consistent card heights */

/* Sparkline */
.sparkline {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 30px;
    margin-top: 0.5rem;
}

.sparkline-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.sparkline-bar:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Pulse Animations */
@keyframes pulse-success {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
}

@keyframes pulse-danger {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

.pulse-animation {
    animation: pulse-success 2s infinite;
}

.pulse-danger {
    animation: pulse-danger 2s infinite;
}

/* Chart Cards */
.chart-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 1rem;
    transition: box-shadow 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Quick Stats */
.quick-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-primary);
}

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

.quick-stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.quick-stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

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

/* Monitor Cards - Clickable Design */
.monitor-card-link {
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease;
}

.monitor-card-link:hover {
    transform: translateY(-3px);
}

.monitor-card-link:hover .monitor-card {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: #3F3F46;
}

.monitor-card {
    background: #141417;
    border: 1px solid #27272A;
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

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

.monitor-card.status-down {
    border-left: 3px solid #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.monitor-card.status-pending {
    border-left: 3px solid #6b7280;
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

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

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6b7280;
    position: relative;
}

.status-dot.pulse-success {
    background: #10b981;
    animation: pulse-success 2s infinite;
}

.status-dot.pulse-danger {
    background: #ef4444;
    animation: pulse-danger 2s infinite;
}

.monitor-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #FFFFFF;
}

.monitor-url {
    color: #71717A;
    font-size: 0.8rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monitor-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    font-size: 0.7rem;
    color: #A1A1AA;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.monitor-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-bar {
    height: 3px;
    background: var(--border-primary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.metric-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 1s ease;
}

.monitor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-primary);
}

.last-check {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

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

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

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

.incident-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
    border: 1px solid var(--border-primary);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Incidents Timeline */
.incidents-timeline {
    position: relative;
}

.incident-link {
    text-decoration: none;
    display: block;
}

.incident-item {
    position: relative;
    padding: 1rem;
    background: #141417;
    border: 1px solid #27272A;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.incident-link:hover .incident-item {
    background: #1C1C1F;
    border-color: #3F3F46;
    transform: translateX(5px);
}

.incident-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.incident-title {
    font-weight: 600;
    color: #FFFFFF;
}

.incident-status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.incident-status-badge.active {
    background: rgba(245, 158, 11, 0.2);
    color: #F59E0B;
}

.incident-status-badge.resolved {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.incident-details {
    color: #71717A;
    display: block;
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

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

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

    .greeting-title {
        font-size: 1.5rem;
    }
}