/* Axiam Networks – Broadband Client Portal Styles */
:root {
    --bg0: #F4FBFF;
    --bg1: #EAF6FF;
    --surface: #FFFFFF;
    --text: #0B1B2B;
    --muted: #516B85;
    --accent: #2AA8FF;
    --accent2: #6FD3FF;
    --nav-bg: #1C82D6;
    --nav-dark: #156DBF;
    --border: rgba(11,27,43,.12);
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --ease: cubic-bezier(.2,.8,.2,1);
    --ease2: cubic-bezier(.16,1,.3,1);
    --shadow: 0 10px 30px rgba(10,40,70,.08);
    --shadow-lg: 0 18px 50px rgba(10,40,70,.14);
}

*,*::before,*::after { box-sizing: border-box; }
html,body { height: 100%; margin: 0; }

body {
    font-family: "Poppins", ui-sans-serif, system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(1100px 550px at 15% 0%, rgba(42,168,255,.14), transparent 55%),
        radial-gradient(900px 520px at 85% 10%, rgba(111,211,255,.18), transparent 60%),
        linear-gradient(180deg, var(--bg0), var(--bg1));
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ===================== PORTAL WRAP ===================== */
.portal-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.portal-main {
    flex: 1;
    padding: 36px 0 60px;
}

/* ===================== NAV ===================== */
.portal-nav {
    background: var(--nav-bg);
    border-bottom: 1px solid rgba(255,255,255,.14);
    position: sticky;
    top: 0;
    z-index: 60;
}

.pnav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 64px;
}

.pnav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pnav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,.3);
}

.pnav-label {
    font-size: 13px;
    font-weight: 800;
    color: rgba(255,255,255,.9);
    letter-spacing: .4px;
}

.pnav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.pnav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 12px;
    color: rgba(255,255,255,.88);
    font-size: 13px;
    font-weight: 700;
    transition: background .2s var(--ease), color .2s var(--ease);
}

.pnav-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.pnav-link.active { background: rgba(255,255,255,.2); color: #ffe432; }

.pnav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.pnav-name {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.88);
}

.btn-portal-primary {
    padding: 9px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff, #e8f4ff);
    color: var(--nav-bg);
    font-weight: 800;
    font-size: 13px;
    transition: all .2s var(--ease);
}

.btn-portal-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.12); color: var(--nav-dark); }

.btn-portal-ghost {
    padding: 9px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.92);
    font-weight: 700;
    font-size: 13px;
    transition: all .2s var(--ease);
}

.btn-portal-ghost:hover { background: rgba(255,255,255,.18); color: #fff; }

.pmob-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.pmob-drawer {
    display: none;
    flex-direction: column;
    background: var(--nav-dark);
    border-top: 1px solid rgba(255,255,255,.14);
    padding: 8px 24px 16px;
}

.pmob-drawer a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: rgba(255,255,255,.9);
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.pmob-drawer a:last-child { border-bottom: none; }

@media (max-width: 768px) {
    .pnav-links, .pnav-actions { display: none; }
    .pmob-toggle { display: inline-flex; }
    .pmob-drawer.open { display: flex; }
}

/* ===================== FOOTER ===================== */
.portal-footer {
    background: #0B1B2B;
    padding: 20px 24px;
}

.pf-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: rgba(255,255,255,.6);
    font-size: 13px;
}

.pf-links {
    display: flex;
    gap: 18px;
}

.pf-links a {
    color: rgba(255,255,255,.6);
    font-size: 13px;
    transition: color .2s;
}

.pf-links a:hover { color: rgba(255,255,255,.9); }

/* ===================== CONTAINER ===================== */
.pcontainer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.pcontainer-sm {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================== ALERTS ===================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% - 48px);
}

.alert-success { background: #e8faf0; border: 1px solid rgba(34,197,94,.3); color: #15803d; }
.alert-error   { background: #fef2f2; border: 1px solid rgba(239,68,68,.3);  color: #dc2626; }
.alert-warning { background: #fffbeb; border: 1px solid rgba(234,179,8,.3);  color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid rgba(59,130,246,.3); color: #1d4ed8; }

/* ===================== CARDS ===================== */
.pcard {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 32px;
}

.pcard-sm { padding: 24px; }

.pcard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.pcard-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.2px;
    margin: 0;
}

/* ===================== PAGE HEADER ===================== */
.page-hero {
    background: linear-gradient(135deg, #1C82D6, #156DBF);
    padding: 48px 24px 40px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.page-hero h1 {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -.5px;
    margin: 0 0 10px;
}

.page-hero p {
    font-size: 16px;
    opacity: .9;
    margin: 0;
}

/* ===================== DASHBOARD GRID ===================== */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dash-stat {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.dash-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(42,168,255,.14), rgba(111,211,255,.1));
    border: 1px solid rgba(42,168,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--nav-bg);
    flex-shrink: 0;
}

.dash-stat-body {}
.dash-stat-value { font-size: 24px; font-weight: 900; letter-spacing: -.3px; }
.dash-stat-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ===================== STATUS BADGES ===================== */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
}

.badge-active    { background: #dcfce7; color: #15803d; }
.badge-pending   { background: #fef9c3; color: #854d0e; }
.badge-suspended { background: #fee2e2; color: #dc2626; }
.badge-cancelled { background: #f1f5f9; color: #64748b; }
.badge-paid      { background: #dcfce7; color: #15803d; }
.badge-overdue   { background: #fee2e2; color: #dc2626; }
.badge-draft     { background: #f1f5f9; color: #64748b; }
.badge-sent      { background: #dbeafe; color: #1d4ed8; }
.badge-void      { background: #f1f5f9; color: #94a3b8; }

/* ===================== TABLES ===================== */
.ptable-wrap { overflow-x: auto; }

.ptable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ptable thead tr {
    background: linear-gradient(135deg, rgba(42,168,255,.07), rgba(111,211,255,.04));
    border-bottom: 2px solid rgba(42,168,255,.12);
}

.ptable th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--nav-bg);
}

.ptable td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.ptable tbody tr:hover { background: rgba(42,168,255,.025); }

/* ===================== FORMS ===================== */
.pform-group { margin-bottom: 20px; }

.pform-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 7px;
}

.pform-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}

.pform-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(42,168,255,.12);
}

.pform-control::placeholder { color: var(--muted); }
.pform-control.is-invalid   { border-color: #ef4444; }

textarea.pform-control { resize: vertical; min-height: 100px; }

.pform-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 580px) { .pform-row { grid-template-columns: 1fr; } }

.pform-hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ===================== BUTTONS ===================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #1C82D6, #2AA8FF);
    color: white;
    font-weight: 800;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all .22s var(--ease);
    text-decoration: none;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(28,130,214,.35); color: white; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    background: rgba(42,168,255,.08);
    color: var(--nav-bg);
    font-weight: 800;
    font-size: 14px;
    border: 2px solid rgba(42,168,255,.2);
    cursor: pointer;
    transition: all .22s var(--ease);
    text-decoration: none;
}

.btn-secondary:hover { background: rgba(42,168,255,.13); border-color: rgba(42,168,255,.35); color: var(--nav-dark); }

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    background: #fee2e2;
    color: #dc2626;
    font-weight: 800;
    font-size: 13px;
    border: 1px solid rgba(220,38,38,.2);
    cursor: pointer;
    transition: all .2s var(--ease);
    text-decoration: none;
}

.btn-danger:hover { background: #fecaca; color: #b91c1c; }

.btn-sm { padding: 7px 14px; font-size: 12px; }

/* ===================== PLANS GRID ===================== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.plan-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    padding: 32px 28px;
    position: relative;
    transition: all .22s var(--ease);
    cursor: pointer;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(10,40,70,.14);
    border-color: rgba(42,168,255,.35);
}

.plan-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(42,168,255,.18), 0 16px 40px rgba(10,40,70,.12);
}

.plan-card.featured {
    border-color: var(--accent);
}

.plan-badge {
    position: absolute;
    top: -12px;
    right: 24px;
    background: linear-gradient(135deg, #1C82D6, #2AA8FF);
    color: white;
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .3px;
}

.plan-name { font-size: 20px; font-weight: 800; margin-bottom: 6px; }

.plan-speed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 99px;
    background: rgba(42,168,255,.08);
    border: 1px solid rgba(42,168,255,.15);
    font-size: 12px;
    font-weight: 700;
    color: var(--nav-bg);
    margin-bottom: 16px;
}

.plan-price { margin-bottom: 20px; }
.plan-price .amount { font-size: 42px; font-weight: 900; line-height: 1; }
.plan-price .currency { font-size: 20px; vertical-align: super; }
.plan-price .period { font-size: 14px; color: var(--muted); }

.plan-features { list-style: none; padding: 0; margin: 0 0 24px; }
.plan-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(11,27,43,.06);
    font-size: 14px;
}
.plan-features li:last-child { border-bottom: none; }
.plan-features li i { color: var(--accent); font-size: 14px; }

/* ===================== CHECKOUT STEPS ===================== */
.checkout-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 36px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.cstep {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cstep-num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(42,168,255,.1);
    border: 2px solid rgba(42,168,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    color: var(--muted);
    transition: all .2s;
}

.cstep-label { font-size: 13px; font-weight: 700; color: var(--muted); }

.cstep.active .cstep-num { background: linear-gradient(135deg, #1C82D6, #2AA8FF); border-color: transparent; color: white; }
.cstep.active .cstep-label { color: var(--text); }
.cstep.done .cstep-num { background: #dcfce7; border-color: rgba(34,197,94,.3); color: #15803d; }
.cstep.done .cstep-label { color: var(--muted); }

.cstep-line {
    flex: 1;
    min-width: 32px;
    height: 2px;
    background: rgba(42,168,255,.15);
    margin: 0 8px;
}

/* ===================== ORDER SUMMARY BOX ===================== */
.order-summary {
    background: linear-gradient(135deg, rgba(42,168,255,.06), rgba(111,211,255,.03));
    border: 1px solid rgba(42,168,255,.15);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(42,168,255,.08);
}

.order-summary-row:last-child { border-bottom: none; }
.order-summary-row.total { font-weight: 900; font-size: 16px; padding-top: 14px; }

/* ===================== INVOICE ===================== */
.inv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.inv-number { font-size: 22px; font-weight: 900; }
.inv-company { font-size: 13px; color: var(--muted); margin-top: 4px; }

.inv-meta { text-align: right; font-size: 13px; }
.inv-meta strong { display: block; font-size: 15px; }

.inv-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 580px) { .inv-parties { grid-template-columns: 1fr; } }

.inv-party-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--nav-bg);
    margin-bottom: 8px;
}

.inv-party-name { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.inv-party p   { font-size: 13px; color: var(--muted); margin: 2px 0; }

/* ===================== LOADING SPINNER ===================== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state i { font-size: 48px; color: rgba(42,168,255,.3); margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: 15px; }
