/* =====================================================================
   ZoomRobot - Haupt-Stylesheet
   ===================================================================== */

:root {
    --brand: #1ba94c;
    --brand-dark: #148a3c;
    --brand-light: #e8f8ee;
    --danger: #e2434b;
    --danger-light: #fdecec;
    --warning: #f5a623;
    --warning-light: #fef6e7;
    --text-dark: #172b4d;
    --text-muted: #6b7c93;
    --border: #e3e8ee;
    --bg: #f7f9fb;
    --white: #ffffff;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(23, 43, 77, 0.06);
    --shadow-hover: 0 6px 20px rgba(23, 43, 77, 0.10);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; }

h1, h2, h3, h4 { color: var(--text-dark); line-height: 1.25; font-weight: 700; margin: 0 0 .5em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--text-muted); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14.5px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s ease;
    text-align: center;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-light); }
.btn-white { background: #fff; color: var(--brand); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c9333a; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-dark); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Top navigation ---------- */
.topnav {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topnav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--text-dark); }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); display: inline-block; box-shadow: 0 0 0 4px var(--brand-light); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-dark); font-weight: 500; }
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 64px; text-align: center; background: linear-gradient(180deg, #fff, var(--bg)); }
.hero h1 { max-width: 780px; margin: 0 auto .4em; }
.hero p.lead { max-width: 620px; margin: 0 auto 2em; font-size: 1.15rem; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .subnote { margin-top: 14px; font-size: 13px; }

/* ---------- Sections / cards ---------- */
.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}
.feature-card .icon {
    width: 46px; height: 46px; border-radius: 10px;
    background: var(--brand-light); color: var(--brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 14px;
}

/* ---------- Pricing ---------- */
.price-card { text-align: center; position: relative; }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow-hover); transform: scale(1.03); }
.price-card .badge-pop { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.price-card .amount { font-size: 2.4rem; font-weight: 800; margin: 10px 0; }
.price-card .amount span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.price-card ul { list-style: none; padding: 0; margin: 20px 0; text-align: left; }
.price-card ul li { padding: 6px 0; color: var(--text-dark); font-size: 14px; }
.price-card ul li::before { content: "✓ "; color: var(--brand); font-weight: 700; }

/* ---------- Footer ---------- */
footer { background: #172b4d; color: #b7c2d3; padding: 56px 0 28px; margin-top: 40px; }
footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
footer a { color: #b7c2d3; display: block; padding: 5px 0; }
footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-bottom { border-top: 1px solid #2c4066; margin-top: 40px; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--text-dark); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number],
input[type=search], input[type=date], input[type=datetime-local], select, textarea {
    width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14.5px; font-family: inherit; background: #fff; color: var(--text-dark);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.form-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row > * { flex: 1; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

.auth-box { max-width: 420px; margin: 60px auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.auth-box h1 { font-size: 1.6rem; text-align: center; }
.auth-box .subhead { text-align: center; margin-bottom: 24px; }
.auth-links { text-align: center; margin-top: 18px; font-size: 14px; }

/* ---------- Alerts / flash ---------- */
.alert { padding: 13px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: var(--brand-light); color: var(--brand-dark); border: 1px solid #b7e6c5; }
.alert-error { background: var(--danger-light); color: #a3272c; border: 1px solid #f4c1c3; }
.alert-info { background: #e7f1fd; color: #1a5c9e; border: 1px solid #bcdcfb; }
.alert-warning { background: var(--warning-light); color: #915b0a; border: 1px solid #f6dfa8; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px; font-size: 12.5px; font-weight: 700; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.badge-up { background: var(--brand-light); color: var(--brand-dark); }
.badge-up::before { background: var(--brand); }
.badge-down { background: var(--danger-light); color: #a3272c; }
.badge-down::before { background: var(--danger); }
.badge-paused { background: #eef0f3; color: var(--text-muted); }
.badge-paused::before { background: #9aa5b1; }
.badge-pending { background: var(--warning-light); color: #915b0a; }
.badge-pending::before { background: var(--warning); }

/* ---------- App shell (dashboard/admin) ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: 240px; background: #172b4d; color: #cbd6e8; flex-shrink: 0;
    padding: 20px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.app-sidebar .brand { color: #fff; padding: 0 22px 20px; border-bottom: 1px solid #2c4066; margin-bottom: 12px; }
.app-sidebar nav a {
    display: flex; align-items: center; gap: 10px; padding: 11px 22px; color: #cbd6e8; font-size: 14.5px; font-weight: 500;
    border-left: 3px solid transparent;
}
.app-sidebar nav a:hover { background: #1e3559; color: #fff; }
.app-sidebar nav a.active { background: #1e3559; color: #fff; border-left-color: var(--brand); }
.app-sidebar .nav-section { padding: 16px 22px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #6d81a3; }
.app-main { flex: 1; min-width: 0; }
.app-topbar {
    background: #fff; border-bottom: 1px solid var(--border); padding: 0 28px; height: 64px;
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10;
}
.app-content { padding: 28px; }
.app-topbar .user-menu { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.avatar-circle { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { font-size: 1.5rem; margin: 0; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
@media (max-width: 900px) { .stat-cards { grid-template-columns: 1fr 1fr; } }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .value { font-size: 1.9rem; font-weight: 800; }
.stat-card .label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-card.up .value { color: var(--brand); }
.stat-card.down .value { color: var(--danger); }

table.data-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
table.data-table th { text-align: left; background: var(--bg); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding: 12px 16px; border-bottom: 1px solid var(--border); }
table.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14.5px; vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover { background: #fafbfc; }

.monitor-row-name { font-weight: 600; }
.monitor-row-url { font-size: 12.5px; color: var(--text-muted); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tabs a { padding: 11px 18px; font-weight: 600; font-size: 14px; color: var(--text-muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

.pill-list { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { background: var(--bg); border: 1px solid var(--border); padding: 4px 12px; border-radius: 20px; font-size: 12.5px; }

.uptime-bars { display: flex; gap: 2px; align-items: flex-end; height: 40px; }
.uptime-bars .bar { flex: 1; background: var(--brand); border-radius: 2px; min-height: 4px; }
.uptime-bars .bar.down { background: var(--danger); }
.uptime-bars .bar.empty { background: #e3e8ee; }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(23,43,77,.5); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius); padding: 28px; max-width: 480px; width: 92%; max-height: 88vh; overflow-y: auto; }

.divider { height: 1px; background: var(--border); margin: 24px 0; }

code, pre { background: #f1f4f8; border-radius: 6px; padding: 2px 6px; font-size: 13px; }
pre { padding: 14px; overflow-x: auto; }
