/* Portal clienti MM Data Gaz — stiluri proprii, independente de tema aplicatiei interne. */
:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #d9dee6;
    --primary: #185fa5;
    --primary-hover: #134b84;
    --primary-text: #ffffff;
    --danger-bg: #fdecec;
    --danger-text: #8a1c1c;
    --success-bg: #e8f6ee;
    --success-text: #14532d;
    --info-bg: #e8f0fb;
    --info-text: #1e3a8a;
    --focus: #2b7de0;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f141b;
        --surface: #18202b;
        --text: #e6ebf2;
        --muted: #9aa6b6;
        --border: #2b3645;
        --primary: #4d9aea;
        --primary-hover: #7ab4f0;
        --primary-text: #0b1220;
        --danger-bg: #3b1d1d;
        --danger-text: #f4b4b4;
        --success-bg: #17301f;
        --success-text: #a7e3bd;
        --info-bg: #17263f;
        --info-text: #b6cdf5;
        --focus: #7ab4f0;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.wrap {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.wrap.wide { max-width: 960px; }

.brand {
    text-align: center;
    font-weight: 700;
    letter-spacing: .04em;
    font-size: 1.25rem;
    color: var(--primary);
    margin: 8px 0 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 18px;
}

h1 { font-size: 1.25rem; margin: 0 0 6px; }
.lead { color: var(--muted); margin: 0 0 18px; font-size: .95rem; }

label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .95rem; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }

input[type=text], input[type=email], input[type=password] {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 1rem;
}

input:focus, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 12px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: var(--primary-text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

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

.btn.secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
    width: auto;
    margin: 0;
    padding: 8px 14px;
}

.alert { border-radius: 8px; padding: 12px 14px; margin: 0 0 16px; font-size: .95rem; }
.alert.error { background: var(--danger-bg); color: var(--danger-text); }
.alert.success { background: var(--success-bg); color: var(--success-text); }
.alert.info { background: var(--info-bg); color: var(--info-text); }

.links { text-align: center; margin-top: 18px; font-size: .95rem; }
.links a { color: var(--primary); }
.links span { display: block; margin-top: 8px; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.topbar .who { min-width: 0; }
.topbar .who strong { display: block; overflow-wrap: anywhere; }
.topbar .who small { color: var(--muted); }
.topbar form { margin: 0; }

/* ---------- pagini dupa autentificare ---------- */
.tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin: 0 0 16px;
    border-bottom: 1px solid var(--border);
}

.tabs a {
    padding: 10px 14px;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-weight: 600;
}

.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }

.card + .card { margin-top: 16px; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
.count { color: var(--muted); font-weight: 400; font-size: .9rem; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .label { color: var(--muted); font-size: .9rem; }
.stat .value { font-size: 1.75rem; font-weight: 700; }
.stat .value.bad { color: var(--danger-text); }
.stat .value.ok { color: var(--success-text); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge.ok { background: var(--success-bg); color: var(--success-text); }
.badge.warn { background: var(--info-bg); color: var(--info-text); }
.badge.bad { background: var(--danger-bg); color: var(--danger-text); }

.link { color: var(--primary); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.inv { display: block; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: .9rem; }
.pager a { color: var(--primary); text-decoration: none; font-weight: 600; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 16px; }
