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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    line-height: 1.6;
}

/* ------------------ Navbar ------------------ */
.navbar {
    background: rgba(35, 38, 58, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-container h1 {
    color: #ffffff;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #00d084;
}

/* ------------------ Container ------------------ */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

/* ------------------ Überschriften ------------------ */
h2 {
    margin-bottom: 30px;
    font-size: 2rem;
}

/* ------------------ Leerer Zustand ------------------ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(35, 38, 58, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ------------------ Buttons ------------------ */
.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #00d084 0%, #00a86b 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s;
    margin-top: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-small {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #ff4757 0%, #de3730 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* ------------------ Services & Karten ------------------ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

.service-card,
.service-item {
    background: linear-gradient(135deg, rgba(34, 38, 59, 0.8) 0%, rgba(28, 32, 50, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    width: 100%;
    max-width: 100%;
}

.service-card:hover,
.service-item:hover {
    transform: translateY(-2px);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.service-name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.status-badge {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.status-badge.online { background: #00d084; color: #00d084; }
.status-badge.offline { background: #ff4757; color: #ff4757; }
.status-badge.unknown { background: #6c757d; color: #6c757d; }

/* ------------------ Uptime ------------------ */
.uptime-badge {
    background: rgba(0, 208, 132, 0.15);
    border: 1px solid rgba(0, 208, 132, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    color: #00d084;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ------------------ Tabellen ------------------ */
table {
    width: 100%;
    background: rgba(35, 38, 58, 0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

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

/* ------------------ Formulare ------------------ */
.form-group { margin-bottom: 20px; }

label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}

select {
    background-color: rgba(35, 38, 58, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    appearance: none;
    cursor: pointer;
}

select option {
    background-color: rgba(35, 38, 58, 0.95);
    color: #fff;
    padding: 10px;
}

select:focus,
input:focus,
textarea:focus {
    outline: none;
    border-color: #00d084;
}

/* ------------------ Alerts ------------------ */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(0, 208, 132, 0.2);
    border: 1px solid rgba(0, 208, 132, 0.5);
    color: #00d084;
}

.alert-error {
    background: rgba(255, 71, 87, 0.2);
    border: 1px solid rgba(255, 71, 87, 0.5);
    color: #ff4757;
}

/* ------------------ Timeline & Detail-Balken ------------------ */
.timeline-bars,
.detail-timeline {
    display: flex;
    gap: 2px;
    height: 30px;
    overflow-x: hidden;
}

.timeline-bar,
.hourly-bar,
.detail-bar {
    flex: 1;
    min-width: 3px;
    border-radius: 2px;
    transition: all 0.2s;
}

.timeline-bar.online,
.hourly-bar.online,
.detail-bar.online { background-color: #00d084; }
.timeline-bar.offline,
.hourly-bar.offline,
.detail-bar.offline { background-color: #ff4757; }
.timeline-bar.unknown,
.hourly-bar.unknown,
.detail-bar.unknown { background-color: #333; }
.timeline-bar.partial,
.hourly-bar.partial,
.detail-bar.partial { background-color: #ffa500; }

.timeline-bar.hourly:hover,
.hourly-bar.partial:hover,
.detail-bar.partial:hover {
    opacity: 0.8;
    transform: scaleY(1.1);
    cursor: pointer;
}

/* ------------------ Modal ------------------ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: rgba(35,38,58,0.5);
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    color: rgba(255,255,255,0.7);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #fff;
}

/* ------------------ Stundenbeschriftung ------------------ */
.hour-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-top: 5px;
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 2px;
}
