/* Reset und Basis-Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* Navigation */
nav {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    flex-shrink: 0;
}

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

.nav-brand {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-right span {
    color: white;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    overflow-y: auto;
    flex: 1;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    min-height: 36px;
    transition: box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    text-decoration: none;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

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

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

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

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

/* Login Box */
.login-box {
    max-width: 400px;
    margin: 3rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-box h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Form Box */
.form-box {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-box h2 {
    margin-bottom: 1.5rem;
}

/* Form Elemente */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    margin: 0;
    flex: 1;
    min-width: 200px;
}

/* Tabelle */
table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table thead {
    background-color: #2c3e50;
    color: white;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
}

table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

table tbody tr:hover {
    background-color: #e9ecef;
}

table td form {
    display: inline;
}

table td .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout mit Sidebar */
.layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #34495e;
    padding: 1.5rem 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar .menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar .menu li {
    margin: 0;
}

.sidebar .menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar .menu a:hover {
    background-color: #2c3e50;
    text-decoration: none;
}

.sidebar .menu a.active {
    background-color: #007bff;
    border-left: 4px solid #0056b3;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
    overflow-y: auto;
    min-width: 0;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.card-number {
    font-size: 3rem;
    font-weight: bold;
    color: #007bff;
    margin: 1rem 0;
}

.card-text {
    color: #6c757d;
    font-style: italic;
}

/* Dienste-Verwaltung */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.service-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e5e7eb;
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.service-header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.status-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

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

.status-exited {
    background-color: #6b7280;
    color: white;
}

.status-unknown,
.status-not.found {
    background-color: #f59e0b;
    color: white;
}

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

.status-inactive {
    background-color: #6b7280;
    color: white;
}

.service-info {
    padding: 1rem 1.25rem;
    background-color: #f9fafb;
}

.service-info p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #4b5563;
}

.service-info strong {
    color: #1f2937;
    min-width: 85px;
    font-weight: 600;
}

.service-actions {
    padding: 1rem 1.25rem;
    background: white;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.service-actions .btn {
    white-space: nowrap;
}

.service-info-box {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    max-width: 100%;
}

.service-info-box p {
    margin: 0.5rem 0;
    word-wrap: break-word;
}

/* Log-Viewer */
.log-viewer {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 100%;
}

.log-viewer pre {
    margin: 0;
    padding: 1.5rem;
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow: auto;
    height: calc(100vh - 330px);
    white-space: pre;
}

/* Domain-Detail Seite */
.domain-info-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #007bff;
}

.domain-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.domain-detail-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    cursor: pointer;
}

.domain-detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    border-color: #007bff;
}

.domain-detail-card.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.domain-detail-card .card-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.domain-detail-card h3 {
    margin: 0;
    font-size: 1rem;
    color: #2c3e50;
}

.domain-detail-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.domain-detail-card small {
    color: #9ca3af;
    font-size: 0.75rem;
    font-style: italic;
}
