/* ==========================================================================
   SITUNEO v2 — Portal Klien
   Area login untuk CLIENT: artikel, laporan iklan, tagihan, dan dokumen.
   Berdiri sendiri (tidak bergantung style.css publik) agar tampilannya stabil.
   ========================================================================== */

:root {
    --p-bg:          #0F172A;
    --p-bg-soft:     #131E33;
    --p-card:        #1E293B;
    --p-card-hover:  #243349;
    --p-input:       #16223A;
    --p-border:      rgba(255, 255, 255, 0.08);
    --p-border-soft: rgba(255, 255, 255, 0.14);
    --p-text:        #E2E8F0;
    --p-text-soft:   #94A3B8;
    --p-text-dim:    #64748B;
    --p-primary:     #1E5C99;
    --p-primary-lt:  #3B82F6;
    --p-accent:      #D4AF37;
    --p-success:     #22C55E;
    --p-warning:     #F59E0B;
    --p-danger:      #EF4444;
    --p-info:        #38BDF8;
    --p-radius:      12px;
    --p-radius-sm:   8px;
}

* { box-sizing: border-box; }

body.portal-body {
    margin: 0;
    background: var(--p-bg);
    color: var(--p-text);
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--p-primary-lt); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.portal-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--p-border);
}
.portal-topbar-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.portal-brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.portal-brand img { height: 38px; width: auto; display: block; }
.portal-brand-text { font-size: 0.72rem; color: var(--p-text-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.portal-user { display: flex; align-items: center; gap: 0.75rem; }
.portal-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--p-primary), #0F3057);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.portal-user-meta { line-height: 1.25; min-width: 0; }
.portal-user-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.portal-user-sub { font-size: 0.72rem; color: var(--p-text-dim); }

/* ── Navigasi ───────────────────────────────────────────────────────────── */
.portal-nav {
    background: var(--p-bg-soft);
    border-bottom: 1px solid var(--p-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.portal-nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    gap: 0.25rem;
    white-space: nowrap;
}
.portal-nav a {
    display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.85rem 0.95rem;
    color: var(--p-text-soft);
    font-size: 0.875rem; font-weight: 500;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.portal-nav a:hover { color: var(--p-text); text-decoration: none; }
.portal-nav a.active { color: var(--p-accent); border-bottom-color: var(--p-accent); }

/* ── Layout ─────────────────────────────────────────────────────────────── */
.portal-main { max-width: 1140px; margin: 0 auto; padding: 1.75rem 1.25rem 4rem; }
.portal-page-head { margin-bottom: 1.5rem; }
.portal-page-head h1 { font-size: 1.5rem; margin: 0 0 0.3rem; font-weight: 700; }
.portal-page-head p { margin: 0; color: var(--p-text-soft); font-size: 0.92rem; }

.portal-card {
    background: var(--p-card);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    padding: 1.4rem;
    margin-bottom: 1.25rem;
}
.portal-card h2, .portal-card h3 { margin-top: 0; }
.portal-card-title {
    font-size: 1rem; font-weight: 700; margin: 0 0 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}

/* ── Kartu statistik ────────────────────────────────────────────────────── */
.portal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.portal-stat {
    background: var(--p-card);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    padding: 1.1rem 1.25rem;
    position: relative;
    overflow: hidden;
}
.portal-stat-label {
    font-size: 0.7rem; color: var(--p-text-dim);
    text-transform: uppercase; letter-spacing: 0.06em;
    display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.4rem;
}
.portal-stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.15; }
.portal-stat-sub { font-size: 0.75rem; color: var(--p-text-dim); margin-top: 0.25rem; }

/* ── Tabel ──────────────────────────────────────────────────────────────── */
.portal-table-wrap { overflow-x: auto; border-radius: var(--p-radius-sm); }
.portal-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.portal-table th {
    text-align: left; padding: 0.7rem 0.9rem;
    font-size: 0.72rem; color: var(--p-text-dim);
    text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
    border-bottom: 1px solid var(--p-border);
    white-space: nowrap;
}
.portal-table td { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--p-border); vertical-align: top; }
.portal-table tr:last-child td { border-bottom: none; }
.portal-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ── Badge ──────────────────────────────────────────────────────────────── */
.portal-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.2rem 0.6rem; border-radius: 999px;
    font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.pb-success { background: rgba(34,197,94,0.15);  color: var(--p-success); border: 1px solid rgba(34,197,94,0.3); }
.pb-warning { background: rgba(245,158,11,0.15); color: var(--p-warning); border: 1px solid rgba(245,158,11,0.3); }
.pb-danger  { background: rgba(239,68,68,0.15);  color: var(--p-danger);  border: 1px solid rgba(239,68,68,0.3); }
.pb-info    { background: rgba(56,189,248,0.15); color: var(--p-info);    border: 1px solid rgba(56,189,248,0.3); }
.pb-muted   { background: rgba(100,116,139,0.15);color: var(--p-text-soft);border: 1px solid rgba(100,116,139,0.3); }

/* ── Tombol ─────────────────────────────────────────────────────────────── */
.portal-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    padding: 0.65rem 1.15rem;
    border-radius: var(--p-radius-sm);
    font-size: 0.875rem; font-weight: 600;
    border: 1px solid transparent; cursor: pointer;
    text-decoration: none; transition: filter 0.15s, background 0.15s;
    font-family: inherit;
}
.portal-btn:hover { text-decoration: none; filter: brightness(1.12); }
.portal-btn-primary { background: var(--p-primary); color: #fff; }
.portal-btn-accent  { background: var(--p-accent);  color: #0F172A; }
.portal-btn-outline { background: transparent; color: var(--p-text-soft); border-color: var(--p-border-soft); }
.portal-btn-outline:hover { background: rgba(255,255,255,0.05); color: var(--p-text); }
.portal-btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.portal-btn-block { width: 100%; }

/* ── Form ───────────────────────────────────────────────────────────────── */
.portal-field { margin-bottom: 1.1rem; }
.portal-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--p-text-soft); margin-bottom: 0.4rem; }
.portal-input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    background: var(--p-input);
    border: 1px solid var(--p-border-soft);
    border-radius: var(--p-radius-sm);
    color: var(--p-text);
    font-size: 0.92rem;
    font-family: inherit;
}
.portal-input:focus { outline: none; border-color: var(--p-primary-lt); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.portal-input::placeholder { color: var(--p-text-dim); }

/* ── Alert ──────────────────────────────────────────────────────────────── */
.portal-alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--p-radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex; align-items: flex-start; gap: 0.6rem;
}
.portal-alert i { margin-top: 0.15rem; flex-shrink: 0; }
.pa-success { background: rgba(34,197,94,0.1);  color: var(--p-success); border: 1px solid rgba(34,197,94,0.25); }
.pa-danger  { background: rgba(239,68,68,0.1);  color: var(--p-danger);  border: 1px solid rgba(239,68,68,0.25); }
.pa-warning { background: rgba(245,158,11,0.1); color: var(--p-warning); border: 1px solid rgba(245,158,11,0.25); }
.pa-info    { background: rgba(56,189,248,0.08);color: var(--p-info);    border: 1px solid rgba(56,189,248,0.22); }

/* ── Kosong ─────────────────────────────────────────────────────────────── */
.portal-empty { text-align: center; padding: 3rem 1rem; color: var(--p-text-dim); }
.portal-empty i { font-size: 2.75rem; display: block; margin-bottom: 0.85rem; opacity: 0.35; }
.portal-empty p { margin: 0; font-size: 0.92rem; }

/* ── Halaman login ──────────────────────────────────────────────────────── */
.portal-auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 1.25rem;
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(30,92,153,0.22), transparent 60%),
        radial-gradient(700px 400px at 100% 100%, rgba(212,175,55,0.10), transparent 55%),
        var(--p-bg);
}
.portal-auth-card {
    width: 100%; max-width: 420px;
    background: var(--p-card);
    border: 1px solid var(--p-border);
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.portal-auth-logo { text-align: center; margin-bottom: 1.5rem; }
.portal-auth-logo img { height: 52px; width: auto; }
.portal-auth-card h1 { font-size: 1.25rem; text-align: center; margin: 0 0 0.35rem; }
.portal-auth-card .sub { text-align: center; color: var(--p-text-soft); font-size: 0.875rem; margin: 0 0 1.75rem; }

/* ── Grid isi ───────────────────────────────────────────────────────────── */
.portal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.portal-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.portal-split  { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1.25rem; align-items: start; }

/* ── Galeri screenshot ──────────────────────────────────────────────────── */
.portal-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.75rem; }
.portal-shot {
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius-sm);
    overflow: hidden;
    display: block;
    background: var(--p-input);
}
.portal-shot img { width: 100%; height: 110px; object-fit: cover; display: block; }
.portal-shot:hover { border-color: var(--p-primary-lt); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.portal-footer {
    border-top: 1px solid var(--p-border);
    padding: 1.5rem 1.25rem;
    text-align: center;
    color: var(--p-text-dim);
    font-size: 0.8rem;
}
.portal-footer a { color: var(--p-text-soft); }

/* ── Responsif ──────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
    .portal-split, .portal-grid-2, .portal-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .portal-main { padding: 1.25rem 1rem 3rem; }
    .portal-topbar-inner { padding: 0.75rem 1rem; }
    .portal-nav-inner { padding: 0 1rem; }
    .portal-user-meta { display: none; }
    .portal-page-head h1 { font-size: 1.25rem; }
    .portal-card { padding: 1.1rem; }
}
