/* assets/css/style.css */
/* MyHeartbeat - Professionelles Design */
/* Dunkel/Rot Theme - Business Look */

:root {
    --primary-color: #dc2626;      /* Kräftiges Rot */
    --primary-dark: #991b1b;       /* Dunkelrot */
    --primary-light: #fecaca;      /* Dezentes Hellrot */
    --header-bg: #1e293b;          /* Dunkles Slate-Blau */
    --header-accent: #334155;      /* Helleres Slate */
    --success-color: #16a34a;      /* Grün */
    --warning-color: #d97706;      /* Orange */
    --danger-color: #dc2626;       /* Rot */
    --text-color: #1e293b;         /* Dunkelgrau */
    --text-light: #64748b;         /* Mittelgrau */
    --bg-color: #f8fafc;           /* Sehr helles Grau */
    --card-bg: #ffffff;
    --border-color: #e2e8f0;       /* Dezente Borders */
}

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

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

/* ==================== HEADER - Professionell Dunkel ==================== */
.header {
    background: var(--header-bg);
    color: white;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
    line-height: 1;
    position: relative;
    display: inline-block;
    width: 40px;
    height: 28px;
}

.logo-icon::before,
.logo-icon::after {
    content: '❤';
    position: absolute;
    font-size: 24px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.logo-icon::before {
    left: 0;
    top: 0;
    z-index: 2;
}

.logo-icon::after {
    left: 12px;
    top: 0;
    opacity: 0.6;
    animation-delay: 0.2s;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .brand {
    font-size: 20px;
    font-weight: 700;
}

.logo-text .tagline {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.nav {
    display: flex;
    gap: 5px;
    align-items: center;
}

.nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.nav a:hover {
    color: white;
    background: var(--header-accent);
}

.nav a.active {
    color: white;
    background: var(--primary-color);
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.card h2, .card h3 {
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 14px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

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

.btn-success:hover {
    background: #15803d;
}

.btn-secondary {
    background: var(--header-bg);
    color: white;
}

.btn-secondary:hover {
    background: var(--header-accent);
}

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

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

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-block {
    display: block;
    width: 100%;
    justify-content: center;
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error, .alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #f0f9ff;
    color: #075985;
    border: 1px solid #bae6fd;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: white;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ==================== STATS GRID ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ef4444 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.25);
    transition: transform 0.2s;
}

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

.stat-number {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* ==================== TABLE ==================== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

/* ==================== LOGIN ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--header-bg) 0%, #0f172a 100%);
}

.login-box {
    background: white;
    padding: 45px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 420px;
}

.login-box h1 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.login-box h1 .logo-icon {
    width: 50px;
    height: 32px;
}

.login-box h1 .logo-icon::before,
.login-box h1 .logo-icon::after {
    font-size: 28px;
}

.login-box h2 {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 16px;
    font-weight: 400;
}

/* ==================== STATUS BADGES ==================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-warning {
    background: #fffbeb;
    color: #92400e;
}

.status-danger {
    background: #fef2f2;
    color: #991b1b;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* ==================== HEARTBEAT STATUS BOX ==================== */
.heartbeat-status-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.heartbeat-status-box.warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
}

.heartbeat-status-box.danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

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

.heartbeat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
}

.heartbeat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.heartbeat-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.heartbeat-item-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.heartbeat-item-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.heartbeat-item-sub {
    font-size: 13px;
    color: var(--success-color);
    margin-top: 3px;
}

/* ==================== PROGRESS BAR ==================== */
.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-fill.green { background: var(--success-color); }
.progress-fill.yellow { background: var(--warning-color); }
.progress-fill.red { background: var(--danger-color); }

/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
        height: auto;
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav a {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .logo-text .tagline {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .heartbeat-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20 { padding: 20px; }

/* ==================== FOOTER ==================== */
.footer {
    text-align: center;
    padding: 25px;
    color: var(--text-light);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* ==================== SETTINGS GRID ==================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.settings-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
}

.settings-card h3 {
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-color);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-value {
    background: var(--bg-color);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    border: 1px solid var(--border-color);
}

/* ==================== ACCOUNT INFO HEADER ==================== */
.account-info {
    background: linear-gradient(135deg, var(--header-bg) 0%, #334155 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.account-info h2 {
    margin: 0 0 15px 0;
    border: none;
    padding: 0;
    color: white;
}

.account-info p {
    margin: 8px 0;
    opacity: 0.9;
    font-size: 15px;
}
