/* File: ./web/public/style.css */
/* Fixed: Keine Gradienten, Kreise mit Glow, einheitliche Boxen */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

:root {
    --bg-dark: #11111b;
    --bg-medium: #181825;
    --bg-light: #1e1e2e;
    --bg-widget: #24283b;
    --text-primary: #c0caf5;
    --text-secondary: #a9b1d6;
    --text-headings: #ffffff;
    --border-color: #414868;
    --accent-primary: #bb9af7;
    --accent-secondary: #7aa2f7;
    --success: #9ece6a;
    --error: #f7768e;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

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

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
}

/* --- Login-Seite --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
}

.login-box {
    background-color: var(--bg-light);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-out;
}

.logo {
    display: inline-block;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-weight: 800;
    font-size: 1.5rem;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    margin-bottom: 1rem;
}

.login-box h1 {
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-headings);
}

.login-box p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-medium);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 14px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all var(--transition-speed) ease;
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: -10px;
    left: 12px;
    font-size: 0.75rem;
    background-color: var(--bg-light);
    padding: 0 4px;
    color: var(--accent-secondary);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.2);
}

.login-form button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background-image: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.login-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* --- Dashboard --- */
.dashboard-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: var(--bg-medium);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.sidebar-header h2 {
    font-weight: 700;
    color: var(--text-headings);
}

.sidebar-nav {
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    position: relative;
}

.nav-item:hover {
    background-color: var(--bg-light);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--accent-secondary);
    color: white;
    font-weight: 600;
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    text-align: center;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.sidebar-footer a:hover {
    background-color: rgba(247, 118, 142, 0.1);
    color: var(--error);
}

.main-content {
    flex-grow: 1;
    overflow-y: auto;
    position: relative;
}

.content-section {
    display: none;
    padding: 2.5rem;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

.main-header h1 {
    font-weight: 800;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-headings);
}

.main-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.widget {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.widget h3 {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-headings);
}

.widget p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.form-group textarea {
    width: 100%;
    min-height: 150px;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-medium);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 1rem;
    resize: vertical;
    transition: all var(--transition-speed) ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.2);
}

.form-actions {
    margin-top: 1.5rem;
}

.form-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background-image: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.form-actions button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.form-actions button:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Toast / Benachrichtigungen --- */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success { background-color: var(--success); }
.toast-error { background-color: var(--error); }
.error-toast { background-color: var(--error); padding: 1rem; border-radius: 8px; margin-top: 1.5rem; }

/* --- Spinner --- */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Monitoring Styles (korrigiert) --- */
.monitoring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.monitoring-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.monitoring-card h3 {
    margin-top: 0;
    color: var(--text-headings);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    font-weight: 600;
}

.metrics-container {
    margin-top: 15px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 5px 0;
    font-size: 14px;
}

.metric-item .label {
    color: var(--text-secondary);
}

.metric-item .value {
    color: var(--text-primary);
    font-weight: 500;
}

.progress-container {
    margin: 15px 0;
}

.progress-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background-color: #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

.progress-bar {
    height: 100%;
    background-color: #44ff44;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* Sanfte Animation */
    border-radius: 10px;
    position: relative;
}

/* Alert Styles ohne Hintergrundfarbe */
.alert-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    margin: 5px 0;
    font-weight: 500;
}

.alert-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
}

.alert-success {
    background-color: #44ff44;
    box-shadow: 0 0 8px rgba(68, 255, 68, 0.6);
}

.alert-danger {
    background-color: #ff4444;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.6);
}

.alert-label {
    color: var(--text-secondary);
    flex-grow: 1;
}

.alert-status {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .monitoring-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* --- SSL Scanner Styles --- */
/* File: ./web/public/style.css */
/* Fixed: SSL-Tab mit Kreisen, Renew-Button, Refresh-Button */

/* --- SSL Scanner Styles --- */
.ssl-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: end;
}

.ssl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.ssl-header h3 {
    margin: 0;
    color: var(--text-headings);
}

.refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-medium);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.refresh-button:hover:not(:disabled) {
    background-color: var(--bg-light);
    border-color: var(--accent-secondary);
}

.refresh-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    color: var(--text-secondary);
    font-weight: 500;
}

.domain-select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-medium);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-width: 200px;
}

.scan-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background-image: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.scan-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.scan-button:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ssl-results-container {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.ssl-results-table h3 {
    padding: 1.5rem;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-headings);
}

.ssl-table {
    width: 100%;
    border-collapse: collapse;
}

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

.ssl-table th {
    background-color: var(--bg-medium);
    color: var(--text-headings);
    font-weight: 600;
}

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

.status {
    font-weight: 600;
}

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

.status-error {
    color: var(--error);
}

.subdomain a {
    color: var(--accent-secondary);
    text-decoration: none;
}

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

.ssl-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.ssl-icon.ssl-success {
    background-color: var(--success);
    box-shadow: 0 0 8px rgba(158, 206, 106, 0.6);
}

.ssl-icon.ssl-error {
    background-color: var(--error);
    box-shadow: 0 0 8px rgba(247, 118, 142, 0.6);
}

.expiry {
    font-weight: 500;
}

.expiry-ok {
    color: var(--success);
}

.expiry-warning {
    color: #ffaa00; /* Gelb statt Grün */
    font-weight: 600;
}

.action {
    text-align: center;
}

.renew-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-medium);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.renew-button:hover {
    background-color: var(--accent-secondary);
    color: white;
    border-color: var(--accent-secondary);
}

.no-ssl {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.ssl-table tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

button {
	font-family: 'Inter';
}
