/* FlowPK — Techy Digital theme (dark navy/purple + gold) */
:root {
    --navy: #0c0f24;
    --purple: #1a1440;
    --card: #151a38;
    --card2: #1c2145;
    --border: #2b3160;
    --gold: #d99a1f;
    --gold-light: #f2c14e;
    --text: #e9ebf5;
    --muted: #9aa0c3;
    --danger: #e5484d;
    --green: #3fb96b;
    --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    color: var(--text);
    background: var(--navy);
    min-height: 100vh;
}
.bg {
    position: fixed; inset: 0; z-index: -1;
    background: radial-gradient(900px 500px at 15% -5%, #2a2160 0%, transparent 60%),
                radial-gradient(800px 500px at 90% 110%, #241a55 0%, transparent 55%),
                linear-gradient(180deg, #0c0f24 0%, #12153a 100%);
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 22px 18px 40px; }

/* top bar */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    background: rgba(21, 26, 56, .85); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 18px; margin-bottom: 22px;
    backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.brand em { font-style: normal; color: var(--gold); font-size: 13px; border: 1px solid var(--gold); border-radius: 20px; padding: 2px 10px; margin-left: 4px; }
.logo {
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: #20180a; font-weight: 800; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
}
.topbar nav { display: flex; gap: 6px; flex-wrap: wrap; }
.topbar nav a {
    color: var(--muted); text-decoration: none; font-size: 14px;
    padding: 8px 13px; border-radius: 9px; border: 1px solid transparent;
}
.topbar nav a:hover { color: var(--text); background: var(--card2); }
.topbar nav a.on { color: var(--gold-light); border-color: var(--gold); background: rgba(217,154,31,.08); }
.topbar nav a.logout { color: #ff9d9d; }
.topbar nav a.logout:hover { background: rgba(229,72,77,.12); color: #ffb3b3; }

/* cards & layout */
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px; margin-bottom: 20px;
}
.card h2 { font-size: 18px; margin-bottom: 14px; color: var(--gold-light); }
.card h3 { font-size: 15px; margin: 18px 0 10px; color: var(--text); }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stat {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    border-top: 3px solid var(--gold);
}
.stat .num { font-size: 30px; font-weight: 800; color: var(--gold-light); }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* tables */
.tbl-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--card2); color: var(--gold-light); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
tr:hover td { background: rgba(255,255,255,.02); }
tr:last-child td { border-bottom: none; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: #ff8f8f; font-weight: 700; }

/* badges */
.badge { display: inline-block; padding: 3px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.active { background: rgba(63,185,107,.15); color: #7ee2a8; border: 1px solid #3fb96b; }
.badge.disabled, .badge.cancelled { background: rgba(229,72,77,.12); color: #ff9d9d; border: 1px solid var(--danger); }
.badge.expired { background: rgba(217,154,31,.12); color: var(--gold-light); border: 1px solid var(--gold); }

/* forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 13px; font-size: 14px;
    background: #0f1330; border: 1px solid var(--border); border-radius: 9px; color: var(--text);
}
.field textarea { font-family: Consolas, monospace; font-size: 12.5px; min-height: 220px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }

/* buttons */
.btn {
    display: inline-block; padding: 11px 22px; font-size: 14px; font-weight: 700;
    color: #20180a; background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: none; border-radius: 10px; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { filter: brightness(1.08); }
.btn.big { padding: 16px 34px; font-size: 17px; border-radius: 12px; }
.btn-ghost {
    display: inline-block; padding: 8px 15px; font-size: 13px; font-weight: 600;
    color: var(--gold-light); background: transparent; border: 1px solid var(--gold);
    border-radius: 8px; cursor: pointer; text-decoration: none; margin: 2px;
}
.btn-ghost:hover { background: rgba(217,154,31,.12); }
.btn-danger {
    display: inline-block; padding: 8px 15px; font-size: 13px; font-weight: 600;
    color: #ff9d9d; background: transparent; border: 1px solid var(--danger);
    border-radius: 8px; cursor: pointer; text-decoration: none; margin: 2px;
}
.btn-danger:hover { background: rgba(229,72,77,.12); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.actions { white-space: nowrap; }
.inline-form { display: inline; }

/* alerts */
.alert { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.alert.ok { background: rgba(63,185,107,.12); border: 1px solid var(--green); color: #9fe8bd; }
.alert.err { background: rgba(229,72,77,.12); border: 1px solid var(--danger); color: #ffb3b3; }
.alert.warn { background: rgba(217,154,31,.12); border: 1px solid var(--gold); color: var(--gold-light); }

/* landing */
.hero { text-align: center; padding: 60px 20px 30px; }
.hero .logo { width: 72px; height: 72px; font-size: 28px; margin: 0 auto 18px; border-radius: 18px; }
.hero h1 { font-size: 34px; margin-bottom: 8px; }
.hero h1 span { color: var(--gold-light); }
.hero p { color: var(--muted); font-size: 15px; }
.login-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; max-width: 700px; margin: 26px auto; }
.login-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 34px 26px; text-align: center; text-decoration: none; color: var(--text);
    transition: transform .15s, border-color .15s;
}
.login-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.login-card .ic { font-size: 34px; margin-bottom: 12px; }
.login-card h2 { color: var(--gold-light); margin-bottom: 8px; font-size: 20px; }
.login-card p { color: var(--muted); font-size: 13.5px; }

/* auth pages */
.auth-box { max-width: 420px; margin: 60px auto; }
.auth-box .card { padding: 32px 30px; }
.auth-box h2 { text-align: center; margin-bottom: 6px; font-size: 22px; }
.auth-box .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 20px; }

/* member dashboard */
.credit-big {
    text-align: center; padding: 30px 10px;
    background: radial-gradient(400px 200px at 50% 0%, rgba(217,154,31,.18), transparent);
    border-radius: var(--radius);
}
.credit-big .num { font-size: 52px; font-weight: 800; color: var(--gold-light); }
.credit-big .lbl { color: var(--muted); font-size: 14px; margin-top: 4px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 26px; opacity: .8; }
.mt { margin-top: 16px; }
.center { text-align: center; }
.meta { color: var(--muted); font-size: 13px; }

@media (max-width: 640px) {
    .hero h1 { font-size: 26px; }
    .credit-big .num { font-size: 40px; }
    .topbar { flex-direction: column; align-items: flex-start; }
}

/* ============ MEMBER AREA REDESIGN ============ */
.m-hero {
    background: linear-gradient(135deg, #1c2145 0%, #151a38 60%, #1a1440 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px 28px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.m-hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(500px 220px at 85% 0%, rgba(217,154,31,.14), transparent 60%);
}
.m-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; position: relative; }
.m-eyebrow { color: var(--gold); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 6px; }
.m-hero h1 { font-size: 28px; margin-bottom: 12px; }
.m-pill {
    display: inline-block; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700;
    background: rgba(217,154,31,.15); color: var(--gold-light); border: 1px solid var(--gold); margin-right: 6px;
}
.m-pill.ghost { background: rgba(255,255,255,.05); color: var(--muted); border-color: var(--border); }
.m-pill.warn { background: rgba(229,72,77,.12); color: #ff9d9d; border-color: var(--danger); }
.m-credits { text-align: center; padding: 26px 10px 6px; position: relative; }
.m-credits-num {
    font-size: 64px; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.m-credits-lbl { color: var(--muted); font-size: 14px; margin-top: 6px; text-transform: uppercase; letter-spacing: 1.5px; }
.m-bar { height: 8px; background: rgba(255,255,255,.07); border-radius: 6px; margin: 16px auto 0; max-width: 420px; overflow: hidden; }
.m-bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transition: width .6s; }

.m-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.m-stat {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px 16px; text-align: center; transition: transform .15s, border-color .15s;
}
.m-stat:hover { transform: translateY(-2px); border-color: var(--gold); }
.m-stat-num { font-size: 32px; font-weight: 800; color: var(--text); }
.m-stat-num.m-small { font-size: 19px; line-height: 1.4; }
.m-stat-lbl { color: var(--muted); font-size: 12px; margin-top: 6px; text-transform: uppercase; letter-spacing: 1px; }

.m-tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.m-tariff {
    background: var(--card2); border: 1px solid var(--border); border-radius: 12px;
    padding: 18px; transition: transform .15s, border-color .15s;
}
.m-tariff:hover { transform: translateY(-2px); border-color: var(--gold); }
.m-tariff-name { font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.m-tariff-cost { font-size: 26px; font-weight: 800; color: var(--gold-light); margin-bottom: 4px; }
.m-tariff-cost span { font-size: 13px; font-weight: 600; color: var(--muted); }
.m-tariff-desc { font-size: 12.5px; color: var(--muted); }

.m-link { color: var(--gold-light); text-decoration: none; }
.m-link:hover { text-decoration: underline; }

/* login */
.m-login { max-width: 440px; margin: 50px auto 20px; padding: 0 12px; }
.m-login-card {
    background: linear-gradient(160deg, #1c2145 0%, #151a38 100%);
    border: 1px solid var(--border); border-radius: 20px; padding: 38px 34px;
    box-shadow: 0 24px 60px rgba(0,0,0,.45); position: relative; overflow: hidden;
}
.m-login-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(400px 180px at 50% 0%, rgba(217,154,31,.12), transparent 60%);
}
.m-login-logo {
    width: 64px; height: 64px; border-radius: 18px; margin: 0 auto 18px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 24px; color: #20180a;
    box-shadow: 0 10px 26px rgba(217,154,31,.35); position: relative;
}
.m-login-card h2 { text-align: center; font-size: 24px; margin-bottom: 6px; position: relative; }
.m-login-card .sub { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 24px; position: relative; }
.m-login-card form { position: relative; }
.m-login-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 18px; opacity: .75; }

@media (max-width: 640px) {
    .m-hero h1 { font-size: 22px; }
    .m-credits-num { font-size: 48px; }
    .m-hero-top { flex-direction: column; }
    .m-hero-top .btn { width: 100%; }
}

/* ============ DASHBOARD V2 (sidebar) ============ */
.dash { display: flex; min-height: 100vh; margin: -22px -18px -40px; }
.dash-side {
    width: 240px; flex-shrink: 0;
    background: #10132c; border-right: 1px solid var(--border);
    padding: 26px 18px; display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.dash-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; margin-bottom: 30px; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav a {
    color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
    padding: 11px 14px; border-radius: 10px; transition: all .15s;
}
.dash-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.dash-nav a.on { color: var(--gold-light); background: rgba(217,154,31,.12); }
.dash-side-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }
.dash-user { font-weight: 700; font-size: 14px; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-logout { color: #ff9d9d; text-decoration: none; font-size: 13px; font-weight: 600; }
.dash-logout:hover { text-decoration: underline; }

.dash-main { flex: 1; padding: 30px 34px; max-width: 960px; }
.dash-eyebrow { color: var(--gold); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 4px; }
.dash-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.dash-hero h1 { font-size: 30px; margin-bottom: 10px; }
.dash-credits { text-align: right; }
.dash-credits-num {
    font-size: 52px; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.dash-credits-lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px; }

.dash-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 26px; }
.dash-btn {
    display: flex; align-items: center; gap: 14px;
    background: var(--card); border: 1px solid var(--border); border-radius: 14px;
    padding: 18px; text-decoration: none; color: var(--text); transition: all .15s;
}
.dash-btn:hover { transform: translateY(-2px); border-color: var(--gold); }
.dash-btn.primary { background: linear-gradient(135deg, var(--gold-light), var(--gold)); border: none; color: #20180a; }
.dash-btn.primary small { color: rgba(32,24,10,.7); }
.dash-btn-ic { font-size: 24px; flex-shrink: 0; }
.dash-btn b { display: block; font-size: 15px; }
.dash-btn small { color: var(--muted); font-size: 12px; }

.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.dash-stat {
    background: var(--card); border: 1px solid var(--border); border-radius: 12px;
    padding: 18px; text-align: center;
}
.dash-stat b { display: block; font-size: 26px; font-weight: 800; color: var(--gold-light); }
.dash-stat span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }

.dash-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 26px; margin-bottom: 22px;
}
.dash-card h2 { font-size: 18px; color: var(--gold-light); margin-bottom: 16px; }

.dash-steps { list-style: none; counter-reset: steps; display: flex; flex-direction: column; gap: 16px; }
.dash-steps li { counter-increment: steps; display: flex; gap: 16px; align-items: flex-start; }
.dash-steps li::before {
    content: counter(steps); flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(217,154,31,.15); border: 1px solid var(--gold);
    color: var(--gold-light); font-weight: 800; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
}
.dash-steps b { display: block; font-size: 15px; margin-bottom: 3px; }
.dash-steps span { color: var(--muted); font-size: 13.5px; }

.dash-tariffs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.dash-tariff { background: var(--card2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.dash-tariff b { font-size: 14px; }
.dash-tariff-cost { font-size: 24px; font-weight: 800; color: var(--gold-light); margin: 6px 0 2px; }
.dash-tariff-cost small { font-size: 12px; color: var(--muted); font-weight: 600; }
.dash-tariff span { font-size: 12px; color: var(--muted); }

.dash-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 10px; opacity: .7; }

@media (max-width: 760px) {
    .dash { flex-direction: column; }
    .dash-side { width: 100%; height: auto; position: static; padding: 16px; flex-direction: row; align-items: center; gap: 12px; border-right: none; border-bottom: 1px solid var(--border); }
    .dash-logo { margin-bottom: 0; font-size: 14px; }
    .dash-nav { flex-direction: row; flex-wrap: wrap; }
    .dash-nav a { padding: 8px 10px; font-size: 13px; }
    .dash-side-foot { margin-top: 0; padding-top: 0; border-top: none; margin-left: auto; display: flex; align-items: center; gap: 10px; }
    .dash-main { padding: 20px 16px; }
    .dash-hero h1 { font-size: 24px; }
    .dash-credits { text-align: left; }
    .dash-credits-num { font-size: 40px; }
}
