/**
 * Caminho.DEV — Client Portal CSS v4
 * Warm lilac-indigo · matches main website palette · Poppins font
 * Brand tokens extracted from style-v3.css
 */

:root {
    /* ── Core palette — website's warm lilac-indigo ── */
    --p-bg:              #f5f2f9;
    --p-card:            rgba(255,255,255,0.90);
    --p-sidebar:         #ffffff;

    /* ── Brand accent — purple-first ──────────────── */
    --p-primary:         #7c3aed;
    --p-primary-light:   rgba(124,58,237,0.07);
    --p-primary-mid:     rgba(124,58,237,0.13);
    --p-primary-dark:    #6d28d9;
    --p-primary-grad:    linear-gradient(135deg, #6d28d9 0%, #7c3aed 52%, #9333ea 100%);

    /* ── Text — exact website palette ────────────── */
    --p-text:            #2f3967;   /* site --heading-dark */
    --p-text-muted:      #697292;   /* site --body-text */
    --p-text-light:      #aab0c5;   /* site --subtext */

    /* ── Borders & Shadows — indigo tint ─────────── */
    --p-border:          rgba(180,170,220,0.30);
    --p-border-solid:    rgba(160,150,210,0.28);
    --p-shadow:
        0 32px 64px -4px rgba(97,109,162,0.12),
        0  8px 24px      rgba(97,109,162,0.07),
        0  2px  6px      rgba(97,109,162,0.04),
        inset 0 1px 0    rgba(255,255,255,1);
    --p-shadow-md:
        0 36px 72px -4px rgba(97,109,162,0.14),
        0  8px 26px      rgba(97,109,162,0.08),
        inset 0 1px 0    rgba(255,255,255,1);
    --p-shadow-hover:
        0 40px 80px -4px rgba(97,109,162,0.18),
        0 10px 30px      rgba(97,109,162,0.10);

    /* ── Radius ───────────────────────────────────── */
    --p-radius:          16px;
    --p-radius-sm:       10px;
    --p-radius-xs:        7px;

    /* ── Layout ───────────────────────────────────── */
    --p-sidebar-w:       220px;
    --p-topbar-h:        64px;

    /* ── Status ───────────────────────────────────── */
    --p-green:           #22c55e;
    --p-green-bg:        rgba(34,197,94,0.09);
    --p-green-text:      #14a044;
    --p-red:             #ef4444;
    --p-red-bg:          rgba(239,68,68,0.09);
    --p-red-text:        #c41c1c;
    --p-yellow:          #f59e0b;
    --p-yellow-bg:       rgba(245,158,11,0.09);
    --p-yellow-text:     #a96d00;
    --p-blue-bg:         rgba(97,109,162,0.08);
    --p-blue-text:       #5a82f5;
    --p-grey-bg:         rgba(100,116,139,0.09);
    --p-grey-text:       #475569;

    /* ── Aliases ──────────────────────────────────── */
    --admin-primary:         #7c3aed;
    --admin-primary-dark:    #6d28d9;
    --admin-text:            #2f3967;
    --admin-text-muted:      #697292;
    --admin-text-secondary:  #697292;
    --admin-border:          rgba(180,170,220,0.30);
    --admin-card:            rgba(255,255,255,0.90);
    --admin-bg:              #f5f2f9;
    --admin-surface:         rgba(250,248,252,0.82);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ════════════════════════════════════════════════════
   BODY — soft pastel lavender atmosphere
════════════════════════════════════════════════════ */
body.portal-body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f2f9;
    background-image:
        radial-gradient(ellipse 140% 75% at 108%  -6%,
            rgba(180,160,230,0.20) 0%, rgba(150,130,210,0.07) 40%, transparent 62%),
        radial-gradient(ellipse  80% 50% at  -4% 106%,
            rgba(97,109,162,0.11)  0%, transparent 50%),
        radial-gradient(ellipse 100% 65% at  50%  50%,
            rgba(200,195,240,0.12) 0%, transparent 58%),
        radial-gradient(ellipse  60% 40% at  90%  90%,
            rgba(170,155,220,0.06) 0%, transparent 45%),
        linear-gradient(165deg, #f7f4fb 0%, #f4f1f8 40%, #f2effb 70%, #eeeafb 100%);
    background-attachment: fixed;
    color: var(--p-text);
    line-height: 1.55;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* ════════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════════ */
.p-layout {
    display: flex;
    min-height: 100vh;
}

/* ════════════════════════════════════════════════════
   SIDEBAR — light white with brand-blue tint
════════════════════════════════════════════════════ */
.p-sidebar {
    width: var(--p-sidebar-w);
    background: linear-gradient(178deg, #ffffff 0%, #fdfcff 45%, #f8f5fd 100%);
    border-right: 1px solid rgba(97,109,162,0.10);
    box-shadow: 3px 0 28px rgba(97,109,162,0.07), 1px 0 0 rgba(255,255,255,0.90);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    flex-shrink: 0;
}

.p-sidebar::-webkit-scrollbar { width: 3px; }
.p-sidebar::-webkit-scrollbar-track { background: transparent; }
.p-sidebar::-webkit-scrollbar-thumb { background: rgba(97,109,162,0.13); border-radius: 3px; }

/* Logo */
.p-logo {
    display: flex;
    align-items: center;
    padding: 22px 18px 18px;
    text-decoration: none;
    border-bottom: 1px solid rgba(97,109,162,0.09);
    flex-shrink: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 1;
}
.p-logo-img {
    max-height: 32px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    object-position: left center;
    display: block;
}
.p-logo-primary { color: var(--p-primary); }
.p-logo-secondary { color: var(--p-text-light); }

/* Nav */
.p-nav {
    padding: 14px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.p-nav-label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: var(--p-text-light);
    padding: 8px 11px 4px;
}

.p-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 11px;
    color: var(--p-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.14s;
    position: relative;
    letter-spacing: -0.1px;
}
.p-nav-link:hover {
    background: rgba(97,109,162,0.07);
    color: var(--p-text);
}
.p-nav-link:hover svg { opacity: 0.80; }
.p-nav-link.active {
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 55%, #9333ea 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow:
        0  6px 20px rgba(124,58,237,0.32),
        0  2px  8px rgba(109,40,217,0.18),
        inset 0 1px 0 rgba(255,255,255,0.18);
}
.p-nav-link.active svg { opacity: 1; color: #fff; }
.p-nav-link svg {
    flex-shrink: 0;
    opacity: 0.48;
    transition: opacity 0.14s;
}

/* Badge on nav item */
.p-nav-badge {
    margin-left: auto;
    background: var(--p-red-bg);
    color: var(--p-red-text);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

/* Sidebar footer */
.p-sidebar-footer {
    padding: 12px 10px 18px;
    border-top: 1px solid rgba(97,109,162,0.09);
    flex-shrink: 0;
}
.p-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    transition: background 0.14s;
    min-width: 0;
}
.p-user-row:hover { background: rgba(97,109,162,0.07); }
.p-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--p-primary-grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(109,121,239,0.28);
}
.p-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.p-user-name {
    font-weight: 600;
    font-size: 12.5px;
    color: var(--p-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-width: 0;
}
.p-user-email {
    font-size: 10px;
    color: var(--p-text-light);
    word-break: break-all;
    line-height: 1.4;
    margin-top: 1px;
    min-width: 0;
}
.p-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border-radius: var(--p-radius-sm);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--p-text-muted);
    text-decoration: none;
    transition: all 0.14s;
}
.p-logout:hover {
    background: rgba(239,68,68,0.07);
    color: var(--p-red-text);
}
.p-logout svg { flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   MAIN AREA
════════════════════════════════════════════════════ */
.p-main {
    flex: 1;
    margin-left: var(--p-sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar — frosted warm lilac glass */
.p-topbar {
    height: var(--p-topbar-h);
    background: rgba(250,248,252,0.82);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-bottom: 1px solid rgba(180,170,220,0.28);
    box-shadow:
        0 1px 0   rgba(255,255,255,0.90),
        0 4px 24px rgba(97,109,162,0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.p-topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--p-text);
    letter-spacing: -0.4px;
}
.p-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.p-bell {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(97,109,162,0.14);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 2px 10px rgba(97,109,162,0.08), inset 0 1px 0 rgba(255,255,255,1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-text-muted);
    transition: all 0.14s;
    position: relative;
}
.p-bell:hover {
    border-color: var(--p-primary);
    color: var(--p-primary);
    box-shadow: 0 4px 16px rgba(124,58,237,0.20);
}

.p-user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 5px;
    border: 1px solid rgba(97,109,162,0.14);
    border-radius: 50px;
    cursor: pointer;
    background: rgba(255,255,255,0.92);
    box-shadow: 0 2px 10px rgba(97,109,162,0.08), inset 0 1px 0 rgba(255,255,255,1);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--p-text);
    transition: all 0.14s;
    text-decoration: none;
}
.p-user-chip:hover {
    border-color: rgba(97,109,162,0.28);
    box-shadow: 0 4px 16px rgba(97,109,162,0.14);
}
.p-user-chip .p-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
    box-shadow: none;
}
.p-user-chip svg { color: var(--p-text-muted); }

/* Content area */
.p-content {
    padding: 28px;
    flex: 1;
    max-width: 1400px;
    width: 100%;
}

/* ════════════════════════════════════════════════════
   CARDS — white glass panels
════════════════════════════════════════════════════ */
.p-card {
    background: linear-gradient(160deg,
        rgba(255,255,255,0.98)  0%,
        rgba(253,251,255,0.96) 45%,
        rgba(248,244,255,0.92) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(185,175,225,0.30);
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow);
    position: relative;
    overflow: hidden;
}
.p-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.20) 0%,
        rgba(255,255,255,1)   20%,
        rgba(255,255,255,1)   80%,
        rgba(255,255,255,0.20) 100%);
    pointer-events: none;
}
.p-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg,
        transparent 0%, rgba(255,255,255,0.95) 30%,
        rgba(255,255,255,0.95) 70%, transparent 100%);
    pointer-events: none;
}

/* ── Plan Banner ──────────────────────────────────── */
.p-plan-banner {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(97,109,162,0.16);
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.p-plan-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.p-plan-banner-icon {
    width: 36px;
    height: 36px;
    border: 1.5px dashed rgba(97,109,162,0.40);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-primary);
    flex-shrink: 0;
    background: rgba(97,109,162,0.06);
}
.p-plan-banner-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--p-text);
}
.p-plan-banner-text span {
    font-weight: 700;
    color: var(--p-primary);
}
.p-plan-banner-btn {
    padding: 9px 20px;
    background: var(--p-primary-grad);
    color: #fff;
    border: none;
    border-radius: var(--p-radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    box-shadow: 0 6px 18px rgba(109,121,239,0.30);
}
.p-plan-banner-btn:hover {
    box-shadow: 0 8px 24px rgba(109,121,239,0.40);
    transform: translateY(-1px);
}

/* ── Grid Layouts ─────────────────────────────────── */
.p-grid-3   { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.p-grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.p-grid-2-1 { display: grid; grid-template-columns: 1fr 340px; gap: 18px; }

/* ── Stat Cards ───────────────────────────────────── */
.p-stat-card { padding: 22px; }
.p-stat-card-icon {
    width: 42px;
    height: 42px;
    background: rgba(97,109,162,0.07);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--p-primary);
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(97,109,162,0.10);
}
.p-stat-card-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--p-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 6px;
}
.p-stat-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--p-text);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}
.p-stat-card-sub {
    font-size: 12px;
    color: var(--p-text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.p-stat-card .p-btn { font-size: 12.5px; }

/* ── Buttons ──────────────────────────────────────── */
.p-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--p-radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(97,109,162,0.18);
    background: rgba(255,255,255,0.92);
    color: var(--p-text);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(97,109,162,0.06), inset 0 1px 0 rgba(255,255,255,1);
}
.p-btn:hover {
    background: rgba(97,109,162,0.07);
    border-color: rgba(97,109,162,0.30);
    color: var(--p-primary);
    box-shadow: 0 4px 14px rgba(97,109,162,0.14);
}
.p-btn-primary {
    background: var(--p-primary-grad);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(124,58,237,0.32);
}
.p-btn-primary:hover {
    box-shadow: 0 8px 26px rgba(124,58,237,0.44);
    transform: translateY(-1px);
    background: var(--p-primary-grad);
    color: #fff;
    border: none;
}
.p-btn-block { width: 100%; }
.p-btn-secondary {
    background: rgba(124,58,237,0.07);
    border-color: rgba(124,58,237,0.22);
    color: var(--p-primary);
    font-weight: 500;
}
.p-btn-secondary:hover {
    background: rgba(124,58,237,0.12);
    border-color: rgba(124,58,237,0.34);
    color: var(--p-primary);
}
.p-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ── Status Badges ────────────────────────────────── */
.p-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}
.p-badge-green  { background: var(--p-green-bg);  color: var(--p-green-text);  border-color: rgba(34,197,94,0.22);  }
.p-badge-blue   { background: var(--p-blue-bg);   color: var(--p-blue-text);   border-color: rgba(97,109,162,0.22); }
.p-badge-red    { background: var(--p-red-bg);    color: var(--p-red-text);    border-color: rgba(239,68,68,0.22);  }
.p-badge-yellow { background: var(--p-yellow-bg); color: var(--p-yellow-text); border-color: rgba(245,158,11,0.22); }
.p-badge-grey   { background: var(--p-grey-bg);   color: var(--p-grey-text);   border-color: rgba(100,116,139,0.18);}

/* Online dot */
.p-dot-online {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--p-green);
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.20), 0 0 8px rgba(34,197,94,0.35);
    flex-shrink: 0;
}

/* ── Section Headers ──────────────────────────────── */
.p-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.p-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--p-text);
    letter-spacing: -0.3px;
}
.p-section-link {
    font-size: 12.5px;
    color: var(--p-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.14s;
}
.p-section-link:hover { color: var(--p-primary-dark); text-decoration: underline; }

/* ── Welcome heading ──────────────────────────────── */
.p-welcome { margin-bottom: 22px; }
.p-welcome h1 {
    font-size: 30px;
    font-weight: 300;
    color: var(--p-text);
    margin-bottom: 8px;
    letter-spacing: -1.3px;
    line-height: 1.18;
}
.p-welcome h1 strong {
    font-weight: 800;
    background: linear-gradient(90deg, #6d79ef 0%, #6096f4 48%, #7dd0fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.p-welcome p {
    font-size: 14px;
    color: var(--p-text-muted);
    line-height: 1.65;
}
.p-welcome p strong { color: var(--p-primary); font-weight: 600; }
.p-welcome-plan { color: var(--p-primary); font-weight: 700; }

/* ── Invoice Table ────────────────────────────────── */
.p-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.p-table th {
    font-size: 10px;
    font-weight: 700;
    color: var(--p-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    padding: 0 8px 12px 0;
    text-align: left;
    border-bottom: 1px solid rgba(97,109,162,0.10);
}
.p-table td {
    padding: 12px 8px 12px 0;
    border-bottom: 1px solid rgba(97,109,162,0.07);
    color: var(--p-text);
    vertical-align: middle;
}
.p-table tr:hover td { background: rgba(97,109,162,0.028); }
.p-table tr:last-child td { border-bottom: none; }
.p-table th:last-child,
.p-table td:last-child { text-align: right; padding-right: 0; }

/* ── Pending Invoice Card ─────────────────────────── */
.p-pending-card { padding: 22px; }
.p-pending-label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--p-text-light);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 8px;
}
.p-pending-plan {
    font-size: 14px;
    font-weight: 600;
    color: var(--p-text);
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}
.p-pending-divider {
    height: 1px;
    background: rgba(97,109,162,0.10);
    margin: 16px 0;
}
.p-pending-amount {
    font-size: 36px;
    font-weight: 800;
    color: var(--p-text);
    letter-spacing: -2px;
    line-height: 1;
    margin: 8px 0;
}
.p-pending-due {
    font-size: 12px;
    color: var(--p-text-muted);
    margin-bottom: 18px;
}
.p-pay-btn {
    width: 100%;
    padding: 14px;
    background: var(--p-primary-grad);
    color: #fff;
    border: none;
    border-radius: var(--p-radius-sm);
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: block;
    text-align: center;
    transition: all 0.15s;
    box-shadow: 0 8px 24px rgba(109,121,239,0.36);
    font-family: inherit;
}
.p-pay-btn:hover {
    box-shadow: 0 12px 32px rgba(109,121,239,0.48);
    transform: translateY(-1px);
}

/* ── Performance Cards ────────────────────────────── */
.p-perf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.p-perf-card {
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}
.p-perf-icon-wrap {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(140deg, #d4ccff 0%, #e2d8ff 45%, #eedeff 100%);
    border: 1.5px solid rgba(97,109,162,0.20);
    box-shadow: 0 6px 18px rgba(97,109,162,0.18), inset 0 1px 0 rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
    color: var(--p-primary);
    flex-shrink: 0;
}
.p-perf-val {
    font-size: 26px;
    font-weight: 800;
    color: var(--p-text);
    letter-spacing: -1px;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}
.p-perf-val-sub { font-size: 12px; color: var(--p-text-muted); margin-top: 3px; }
.p-perf-link {
    font-size: 12px;
    color: var(--p-primary);
    text-decoration: none;
    font-weight: 600;
    margin-top: 6px;
    display: inline-block;
    transition: color 0.14s;
}
.p-perf-link:hover { color: var(--p-primary-dark); }

/* ── Services List ────────────────────────────────── */
.p-services-card { padding: 22px; }
.p-service-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 0;
    border-top: 1px solid rgba(97,109,162,0.08);
}
.p-service-item:first-of-type { border-top: none; padding-top: 0; }
.p-service-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(97,109,162,0.07);
    border: 1px solid rgba(97,109,162,0.13);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--p-primary);
    box-shadow: 0 2px 8px rgba(97,109,162,0.08);
}
.p-service-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--p-text);
    margin-bottom: 3px;
    letter-spacing: -0.2px;
}
.p-service-desc {
    font-size: 12px;
    color: var(--p-text-muted);
    line-height: 1.55;
}

/* ── Flash Alerts ─────────────────────────────────── */
.p-alert {
    padding: 13px 18px;
    border-radius: var(--p-radius-sm);
    font-size: 13.5px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid transparent;
}
.p-alert-success {
    background: var(--p-green-bg);
    border-color: rgba(34,197,94,0.22);
    color: var(--p-green-text);
}
.p-alert-error {
    background: var(--p-red-bg);
    border-color: rgba(239,68,68,0.22);
    color: var(--p-red-text);
}
.p-alert-warning {
    background: var(--p-yellow-bg);
    border-color: rgba(245,158,11,0.22);
    color: var(--p-yellow-text);
}

/* ── Page Header ──────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--p-text);
    margin-bottom: 3px;
    letter-spacing: -0.6px;
}
.page-subtitle {
    font-size: 13px;
    color: var(--p-text-muted);
}

/* ── Auth Pages (login / register / set-password) ─── */
body.portal-auth {
    background-color: #f5f2f9;
    background-image:
        radial-gradient(ellipse 140% 75% at 108%  -6%,
            rgba(180,160,230,0.20) 0%, transparent 60%),
        radial-gradient(ellipse  80% 50% at  -4% 106%,
            rgba(97,109,162,0.11)  0%, transparent 50%),
        linear-gradient(165deg, #f7f4fb 0%, #f2effb 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
}
.p-auth-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(160deg,
        rgba(255,255,255,0.98) 0%,
        rgba(250,246,255,0.94) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(185,175,225,0.28);
    border-radius: 20px;
    padding: 40px;
    box-shadow:
        0 32px 64px -4px rgba(97,109,162,0.14),
        0  8px 24px      rgba(97,109,162,0.07),
        inset 0 1px 0    rgba(255,255,255,1);
}
.p-auth-logo { text-align: center; margin-bottom: 30px; }
.p-auth-logo a { text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.p-auth-logo-icon {
    width: 38px; height: 38px;
    background: var(--p-primary-grad);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(109,121,239,0.30);
}
.p-auth-logo-name { font-size: 20px; font-weight: 800; color: var(--p-text); letter-spacing: -0.5px; }
.p-auth-title { text-align: center; font-size: 22px; font-weight: 700; color: var(--p-text); margin-bottom: 6px; letter-spacing: -0.4px; }
.p-auth-sub { text-align: center; font-size: 14px; color: var(--p-text-muted); margin-bottom: 28px; line-height: 1.55; }
.p-form-group { margin-bottom: 16px; }
.p-form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--p-text); margin-bottom: 6px; }
.p-form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid rgba(180,170,220,0.55);
    border-radius: 11px;
    font-size: 14px;
    color: var(--p-text);
    background: rgba(255,255,255,0.92);
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    font-family: inherit;
}
.p-form-control:focus {
    border-color: rgba(109,121,239,0.50);
    box-shadow: 0 0 0 4px rgba(97,109,162,0.09);
    background: #fff;
}
.p-form-hint { font-size: 12px; color: var(--p-text-muted); margin-top: 4px; }
.p-submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--p-primary-grad);
    color: #fff;
    border: none;
    border-radius: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 4px;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(109,121,239,0.34);
}
.p-submit-btn:hover {
    box-shadow: 0 12px 32px rgba(109,121,239,0.46);
    transform: translateY(-1px);
}
.p-auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--p-text-muted); }
.p-auth-footer a { color: var(--p-primary); font-weight: 600; text-decoration: none; }
.p-auth-footer a:hover { text-decoration: underline; }
.p-error-box {
    background: var(--p-red-bg);
    border: 1px solid rgba(239,68,68,0.22);
    color: var(--p-red-text);
    padding: 11px 14px;
    border-radius: var(--p-radius-sm);
    font-size: 13.5px;
    margin-bottom: 18px;
}
.p-success-box {
    background: var(--p-green-bg);
    border: 1px solid rgba(34,197,94,0.22);
    color: var(--p-green-text);
    padding: 11px 14px;
    border-radius: var(--p-radius-sm);
    font-size: 13.5px;
    margin-bottom: 18px;
}

/* ── Divider ──────────────────────────────────────── */
.p-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--p-text-muted);
    font-size: 12px;
}
.p-divider::before, .p-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(97,109,162,0.12);
}

/* ── Shared Buttons ───────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--p-radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(97,109,162,0.18);
    background: rgba(255,255,255,0.92);
    color: var(--p-text);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(97,109,162,0.06);
}
.btn:hover {
    background: rgba(97,109,162,0.07);
    border-color: rgba(97,109,162,0.30);
    color: var(--p-primary);
}
.btn-primary {
    background: var(--p-primary-grad);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(109,121,239,0.34);
}
.btn-primary:hover {
    box-shadow: 0 8px 26px rgba(109,121,239,0.44);
    transform: translateY(-1px);
    background: var(--p-primary-grad);
    border-color: transparent;
    color: #fff;
}
.btn-secondary { background: rgba(255,255,255,0.90); }
.btn-danger {
    background: var(--p-red-bg);
    border-color: rgba(239,68,68,0.22);
    color: var(--p-red-text);
}
.btn-danger:hover {
    background: rgba(239,68,68,0.14);
    color: var(--p-red-text);
}
.btn-sm { padding: 6px 13px; font-size: 12px; border-radius: var(--p-radius-xs); }
.btn-block { width: 100%; justify-content: center; }

/* ── Card aliases ─────────────────────────────────── */
.admin-card, .card {
    background: linear-gradient(160deg,
        rgba(255,255,255,0.98)  0%,
        rgba(253,251,255,0.96) 45%,
        rgba(248,244,255,0.92) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(185,175,225,0.30);
    border-radius: var(--p-radius);
    box-shadow: var(--p-shadow);
    position: relative;
    overflow: hidden;
}

/* ── Form controls ────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--p-text);
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(180,170,220,0.55);
    border-radius: 10px;
    background: rgba(255,255,255,0.92);
    color: var(--p-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.14s, box-shadow 0.14s;
    outline: none;
}
.form-control:focus {
    border-color: rgba(109,121,239,0.50);
    box-shadow: 0 0 0 4px rgba(97,109,162,0.09);
    background: #fff;
}
textarea.form-control { resize: vertical; }
select.form-control { appearance: none; cursor: pointer; }

/* ── Modal ────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.active { display: flex; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20,30,60,0.40);
    backdrop-filter: blur(4px);
}
.modal-content {
    position: relative;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(180,170,220,0.35);
    border-radius: 18px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 28px 64px rgba(97,109,162,0.16),
        0  6px 20px rgba(97,109,162,0.08);
    animation: modalIn 0.18s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 26px;
    border-bottom: 1px solid rgba(97,109,162,0.10);
}
.modal-header h3 { font-size: 17px; font-weight: 700; color: var(--p-text); letter-spacing: -0.3px; }
.modal-close {
    background: none;
    border: none;
    color: var(--p-text-muted);
    font-size: 22px;
    cursor: pointer;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.12s;
}
.modal-close:hover { background: rgba(97,109,162,0.07); }
.modal-body { padding: 26px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 26px;
    border-top: 1px solid rgba(97,109,162,0.10);
}

/* ── Invoice filter tabs ──────────────────────────── */
.p-filter-tabs {
    display: flex;
    gap: 4px;
    background: rgba(97,109,162,0.05);
    border: 1px solid rgba(97,109,162,0.11);
    border-radius: var(--p-radius-sm);
    padding: 4px;
    margin-bottom: 20px;
    width: fit-content;
}
.p-filter-tab {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--p-text-muted);
    cursor: pointer;
    transition: all 0.15s;
    border: none;
    background: none;
    font-family: inherit;
}
.p-filter-tab:hover { color: var(--p-text); }
.p-filter-tab.active {
    background: rgba(255,255,255,0.90);
    color: var(--p-primary);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(97,109,162,0.12);
}

/* ── Ticket thread ────────────────────────────────── */
.p-ticket-message {
    border-radius: var(--p-radius-sm);
    padding: 16px 18px;
    margin-bottom: 14px;
}
.p-ticket-message.from-client {
    background: rgba(97,109,162,0.07);
    border: 1px solid rgba(97,109,162,0.16);
    margin-left: 24px;
}
.p-ticket-message.from-team {
    background: rgba(255,255,255,0.90);
    border: 1px solid rgba(180,170,220,0.35);
    margin-right: 24px;
    box-shadow: 0 2px 8px rgba(97,109,162,0.06);
}
.p-msg-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--p-text-muted);
}
.p-msg-author { font-weight: 600; color: var(--p-text); }
.p-msg-body { font-size: 13.5px; color: var(--p-text); line-height: 1.6; }

/* ── Subscription feature list ───────────────────── */
.p-feature-list { list-style: none; }
.p-feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(97,109,162,0.08);
    font-size: 13.5px;
    color: var(--p-text);
}
.p-feature-list li:last-child { border-bottom: none; }
.p-feature-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--p-green-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(34,197,94,0.20);
}
.p-feature-check svg { color: var(--p-green-text); }

/* ── Info list (domain details etc.) ─────────────── */
.p-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(97,109,162,0.08);
    font-size: 13.5px;
    gap: 12px;
}
.p-info-row:last-child { border-bottom: none; }
.p-info-label { color: var(--p-text-muted); font-weight: 500; flex-shrink: 0; }
.p-info-value { color: var(--p-text); font-weight: 600; text-align: right; }

/* ── Timeline ─────────────────────────────────────── */
.p-timeline { position: relative; padding-left: 20px; }
.p-timeline::before {
    content: '';
    position: absolute;
    left: 6px; top: 8px; bottom: 8px;
    width: 2px;
    background: rgba(97,109,162,0.12);
}
.p-timeline-item { position: relative; padding: 0 0 18px 20px; }
.p-timeline-dot {
    position: absolute;
    left: -20px; top: 4px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--p-primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 3px rgba(97,109,162,0.18);
}
.p-timeline-title { font-size: 13.5px; font-weight: 600; color: var(--p-text); margin-bottom: 2px; }
.p-timeline-date  { font-size: 12px; color: var(--p-text-muted); }

/* ── Mobile menu button ───────────────────────────── */
.p-mobile-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--p-text-muted);
    padding: 4px;
    border-radius: 8px;
    transition: background 0.14s;
}
.p-mobile-menu:hover { background: rgba(97,109,162,0.07); color: var(--p-primary); }

/* ════════════════════════════════════════════════════
   DASHBOARD — LAYOUT COMPONENTS
════════════════════════════════════════════════════ */
.dash-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.dash-welcome-title {
    font-size: 30px;
    font-weight: 300;
    color: var(--p-text);
    letter-spacing: -1.2px;
    margin-bottom: 6px;
    line-height: 1.18;
}
.dash-welcome-title strong {
    font-weight: 800;
    background: linear-gradient(90deg, #6d79ef 0%, #6096f4 48%, #7dd0fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.p-section-title {
    font-size: 17px;
    font-weight: 300;
    color: var(--p-text);
    letter-spacing: -0.5px;
}
.p-section-title strong {
    font-weight: 800;
    background: linear-gradient(90deg, #5870e8 0%, #5a82f5 55%, #6aa8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dash-welcome-sub {
    font-size: 13.5px;
    color: var(--p-text-muted);
}
.dash-welcome-sub strong { color: var(--p-primary); font-weight: 600; }
.dash-welcome-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.dash-btn-primary {
    padding: 9px 18px;
    background: var(--p-primary-grad);
    color: #fff;
    border-radius: var(--p-radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(109,121,239,0.30);
}
.dash-btn-primary:hover {
    box-shadow: 0 8px 24px rgba(109,121,239,0.40);
    transform: translateY(-1px);
}
.dash-btn-ghost {
    padding: 9px 14px;
    color: var(--p-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.dash-btn-ghost:hover { text-decoration: underline; }

/* Top 3 info cards */
.dash-top-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.dash-info-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dash-info-card--alert { border-color: rgba(239,68,68,0.22); }
.dash-info-card-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--p-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.dash-info-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--p-text-light);
    margin-bottom: 2px;
}
.dash-info-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--p-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}
.dash-info-sub {
    font-size: 12px;
    color: var(--p-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}
.dash-card-btn {
    display: inline-block;
    margin-top: auto;
    padding: 7px 14px;
    background: rgba(97,109,162,0.07);
    color: var(--p-primary);
    border-radius: var(--p-radius-xs);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(97,109,162,0.14);
}
.dash-card-btn:hover {
    background: rgba(97,109,162,0.12);
    border-color: rgba(97,109,162,0.26);
}
.dash-card-btn--danger {
    background: rgba(239,68,68,0.07);
    color: #c41c1c;
    border-color: rgba(239,68,68,0.18);
}
.dash-card-btn--danger:hover { background: rgba(239,68,68,0.12); }

/* Full-width analytics card */
.dash-analytics-card {
    padding: 22px 24px;
    margin-bottom: 16px;
}
.dash-analytics-header { margin-bottom: 20px; }
.dash-analytics-metrics {
    display: flex;
    align-items: center;
    gap: 0;
}
.dash-metric { flex: 1; padding: 0 24px; }
.dash-metric:first-child { padding-left: 0; }
.dash-metric:last-child  { padding-right: 0; }
.dash-metric--center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.dash-metric-divider {
    width: 1px;
    height: 80px;
    background: rgba(97,109,162,0.10);
    flex-shrink: 0;
}
.dash-metric-val {
    font-size: 34px;
    font-weight: 800;
    color: var(--p-text);
    line-height: 1;
    letter-spacing: -1.5px;
}
.dash-metric-val--sm {
    font-size: 26px;
    letter-spacing: -0.5px;
    margin-top: 4px;
}
.dash-metric-change {
    font-size: 13px;
    font-weight: 600;
    margin-top: 3px;
}
.dash-metric-change--up { color: var(--p-green-text); }
.dash-metric-label {
    font-size: 11.5px;
    color: var(--p-text-muted);
    margin-top: 5px;
}
.dash-metric-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(140deg, #d4ccff 0%, #e2d8ff 45%, #eedeff 100%);
    border: 1.5px solid rgba(97,109,162,0.20);
    box-shadow: 0 4px 14px rgba(97,109,162,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.dash-metric-link {
    display: inline-block;
    font-size: 12px;
    color: var(--p-primary);
    font-weight: 600;
    text-decoration: none;
    margin-top: 6px;
}
.dash-metric-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .p-grid-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .p-grid-3 { grid-template-columns: 1fr 1fr; }
    .dash-top-cards { grid-template-columns: 1fr 1fr; }
    .dash-analytics-metrics { flex-wrap: wrap; gap: 16px; }
    .dash-metric-divider { display: none; }
    .dash-metric { padding: 0; flex-basis: calc(50% - 8px); }
    .dash-metric--center { align-items: flex-start; text-align: left; }
}
@media (max-width: 768px) {
    .p-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(.4,0,.2,1);
    }
    .p-sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    }
    .p-main { margin-left: 0; }
    .p-grid-3 { grid-template-columns: 1fr; }
    .p-grid-2 { grid-template-columns: 1fr; }
    .p-perf-row { grid-template-columns: 1fr; }
    .p-mobile-menu { display: flex !important; }
    .dash-top-cards { grid-template-columns: 1fr; }
    .dash-welcome { flex-direction: column; align-items: flex-start; }
    .dash-metric { flex-basis: 100%; }
    .p-topbar-title { font-size: 15px; }
    .p-content { padding: 16px; }
    .p-topbar { padding: 0 16px; }
}
@media (max-width: 480px) {
    .p-grid-2-1 { grid-template-columns: 1fr; }
    .p-filter-tabs { width: 100%; }
}
