:root {
    --brand: #61862e;
    --brand-dark: #496820;
    --bg: #f4f7f2;
    --surface: #ffffff;
    --surface-soft: #f8faf7;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --danger: #b91c1c;
    --warning: #b45309;
    --success: #15803d;
    --info: #2563eb;
    --shadow: 0 18px 45px rgba(31, 41, 55, .08);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.login-screen {
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at top left, rgba(97,134,46,.20), transparent 30%),
        linear-gradient(135deg, #f6f9f3, #ecf4e6);
}
.login-card {
    width: min(100%, 480px);
    background: var(--surface);
    padding: 34px;
    border-radius: 26px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.7);
}
.brand-mark, .logo-box {
    display: inline-grid;
    place-items: center;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    border-radius: 15px;
}
.brand-mark { width: 64px; height: 64px; margin-bottom: 14px; }
.logo-box { width: 42px; height: 42px; flex: 0 0 auto; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.15; }
p { line-height: 1.55; }
.muted-text { color: var(--muted); }
.small { font-size: .86rem; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: #374151; font-weight: 650; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 11px 13px;
    font: inherit;
    background: #fff;
    color: var(--text);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: 3px solid rgba(97,134,46,.18);
    border-color: var(--brand);
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 13px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.button:hover { text-decoration: none; filter: brightness(.97); }
.button.primary { background: var(--brand); color: #fff; }
.button.secondary { background: rgba(97,134,46,.12); color: var(--brand-dark); }
.button.ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.demo-logins {
    display: grid;
    gap: 5px;
    margin-top: 18px;
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .9rem;
}
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 290px;
    padding: 22px 16px;
    background: #17210f;
    color: #eef7e9;
    overflow-y: auto;
}
.logo {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #fff;
    margin-bottom: 24px;
    padding: 8px;
    text-decoration: none;
}
.logo small { display: block; color: #bed3aa; font-size: .78rem; margin-top: 2px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a {
    display: flex;
    gap: 11px;
    align-items: center;
    color: #dcead3;
    padding: 11px 12px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 650;
}
.sidebar nav a:hover,
.sidebar nav a.active { background: rgba(255,255,255,.10); color: #fff; }
.sidebar nav a.active { box-shadow: inset 4px 0 0 var(--brand); }
.main { margin-left: 290px; padding: 24px; }
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 18px;
}
.eyebrow {
    color: var(--brand-dark);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 850;
    margin: 0 0 6px;
}
.topbar h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.user-chip, .pill {
    display: inline-grid;
    gap: 1px;
    padding: 9px 13px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-weight: 750;
}
.user-chip small { color: var(--muted); font-weight: 600; }
.customer-switch select { min-width: 210px; }
.content-panel { display: grid; gap: 18px; }
.alert {
    padding: 13px 16px;
    border-radius: 15px;
    margin: 0 0 18px;
    border: 1px solid transparent;
}
.alert.success { background: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.alert.danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.dashboard-hero,
.panel,
.metric,
.contract-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.dashboard-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 26px;
    background: linear-gradient(135deg, #ffffff, #f0f7eb);
}
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cards.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric {
    display: grid;
    gap: 6px;
    padding: 18px;
    color: var(--text);
    text-decoration: none;
    min-height: 130px;
}
.metric:hover { text-decoration: none; transform: translateY(-1px); }
.metric span { color: var(--muted); font-weight: 700; }
.metric strong { font-size: 2rem; }
.metric small { color: var(--muted); }
.metric.danger strong { color: var(--danger); }
.metric.success strong { color: var(--success); }
.panel { padding: 20px; min-width: 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.two.uneven { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td {
    text-align: left;
    padding: 13px 11px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
th {
    font-size: .78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}
td small { color: var(--muted); }
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: .78rem;
    font-weight: 850;
    background: #eff6ff;
    color: var(--info);
}
.badge.success { background: #dcfce7; color: var(--success); }
.badge.warning { background: #fef3c7; color: var(--warning); }
.badge.danger { background: #fee2e2; color: var(--danger); }
.badge.muted { background: #f3f4f6; color: var(--muted); }
.badge.info { background: #dbeafe; color: var(--info); }
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: 7px;
    background: #9ca3af;
}
.status-dot.green { background: #22c55e; }
.status-dot.yellow { background: #f59e0b; }
.status-dot.red { background: #ef4444; }
.status-dot.gray { background: #9ca3af; }
.timeline { display: grid; gap: 14px; }
.timeline-item { display: grid; grid-template-columns: 15px 1fr; gap: 12px; }
.timeline-item.read { opacity: .68; }
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-top: 6px;
    background: var(--info);
}
.dot.warning { background: var(--warning); }
.dot.danger { background: var(--danger); }
.dot.success { background: var(--success); }
.timeline-item p { margin: 4px 0; color: var(--muted); }
.timeline-item small { color: var(--muted); }
.quick-actions, .split { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sticky-form { align-self: start; position: sticky; top: 18px; }
.contract-card { padding: 20px; }
dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 700; }
.risk-list { display: grid; gap: 12px; }
.risk { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px; background: var(--surface-soft); border-radius: 16px; }
.risk-score { display: grid; place-items: center; background: #fee2e2; color: var(--danger); border-radius: 14px; font-weight: 900; font-size: 1.2rem; }
.risk p { margin: 4px 0 0; color: var(--muted); }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.module-toggle { display: flex; justify-content: space-between; gap: 12px; padding: 12px; background: var(--surface-soft); border-radius: 14px; }
.empty-state { padding: 42px; text-align: center; background: #fff; border-radius: 24px; box-shadow: var(--shadow); }
.error-box { overflow: auto; padding: 12px; background: #111827; color: #f9fafb; border-radius: 14px; }
@media (max-width: 1120px) {
    .cards, .cards.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.two, .grid.two.uneven { grid-template-columns: 1fr; }
    .sticky-form { position: static; }
}
@media (max-width: 820px) {
    .sidebar { position: static; width: auto; max-height: none; }
    .main { margin-left: 0; padding: 16px; }
    .topbar, .dashboard-hero { align-items: flex-start; flex-direction: column; }
    .topbar-actions { justify-content: flex-start; }
    .cards, .cards.compact, .module-grid { grid-template-columns: 1fr; }
    table { min-width: 650px; }
}

/* Plesk-Setup */
.setup-card { width: min(100%, 620px); }
.alert.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.check-row {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 650;
}
.check-row input { width: auto; }
code {
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(31, 41, 55, .08);
}
