/* Final Premium Design System */
:root {
    --primary: #10b981;
    --bg: #09090b;
    --side: #111113;
    --glass: rgba(24, 24, 27, 0.6);
    --border: rgba(255, 255, 255, 0.08);
    --text: #f4f4f5;
    --muted: #a1a1aa;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; display: flex; }

.sidebar { width: 260px; background: var(--side); height: 100vh; position: fixed; border-right: 1px solid var(--border); padding: 32px 16px; display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; font-family: 'Outfit'; font-weight: 800; font-size: 22px; }
.logo-icon { width: 30px; height: 30px; background: var(--primary); border-radius: 8px; }

nav a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; color: var(--muted); text-decoration: none; border-radius: 12px; margin-bottom: 4px; transition: 0.2s; }
nav a.active { background: rgba(16, 185, 129, 0.1); color: var(--primary); }
nav a:hover:not(.active) { background: rgba(255, 255, 255, 0.05); }

.main-content { flex: 1; margin-left: 260px; padding: 48px; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.header h1 { font-family: 'Outfit'; font-size: 32px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 48px; }
.stat-card { background: var(--glass); border: 1px solid var(--border); padding: 24px; border-radius: 20px; display: flex; justify-content: space-between; align-items: center; }
.stat-label { color: var(--muted); font-size: 14px; margin-bottom: 4px; display: block; }
.stat-icon { font-size: 24px; color: var(--primary); opacity: 0.8; }

.table-container { background: var(--glass); border: 1px solid var(--border); border-radius: 24px; padding: 24px; }
.table-header { margin-bottom: 24px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 12px; font-size: 12px; color: var(--muted); text-transform: uppercase; border-bottom: 1px solid var(--border); }
td { padding: 16px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
code { background: #000; padding: 4px 8px; border-radius: 6px; font-size: 12px; }

.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--primary); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.btn { padding: 10px 20px; border-radius: 10px; border: none; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #27272a; color: #fff; }
.btn-icon { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 16px; margin-left: 10px; }
.delete-btn:hover { color: #ef4444; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-content { background: #18181b; width: 500px; border-radius: 24px; border: 1px solid var(--border); padding: 32px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--muted); }
.form-group input, .form-group select { width: 100%; padding: 12px; background: #000; border: 1px solid var(--border); border-radius: 12px; color: #fff; outline: none; }
.checkbox-group { display: flex; gap: 10px; align-items: center; }
.checkbox-group input { width: auto; }

.toast { position: fixed; bottom: 40px; right: 40px; background: #18181b; padding: 16px 24px; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 10px 30px #000; transition: 0.5s; z-index: 2000; }

/* ── Modal shared ── */
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 20px; }

/* ── SSL cert badges ── */
.badge-le    { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.badge-muted { background: rgba(161,161,170,0.1); color: var(--muted); }

/* ── Let's Encrypt button (per row) ── */
.btn-le {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-right: 4px;
}
.btn-le:hover { background: rgba(59, 130, 246, 0.2); }

/* ── SSL Terminal Modal ── */
.ssl-modal-content {
    background: #18181b;
    width: 680px;
    max-width: 95vw;
    border-radius: 24px;
    border: 1px solid var(--border);
    padding: 32px;
}

.ssl-info-text { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 20px; }

/* macOS-style terminal chrome */
.terminal-header-bar {
    background: #1a1a1a;
    border-radius: 10px 10px 0 0;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #2a2a2a;
    border-bottom: none;
}
.terminal-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.terminal-dot.red    { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green  { background: #28c840; }
.terminal-title-bar  { flex: 1; text-align: center; font-size: 12px; color: #555; margin-left: -41px; }

/* Terminal output area */
.terminal-body {
    background: #0d0d0d;
    border: 1px solid #2a2a2a;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 16px;
    height: 360px;
    overflow-y: auto;
    margin-bottom: 4px;
    font-family: 'Courier New', 'Lucida Console', monospace;
    font-size: 13px;
    line-height: 1.6;
    scrollbar-width: thin;
    scrollbar-color: #333 #0d0d0d;
}

.terminal-body pre {
    color: #a8ff78;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
}
