/* ============================================================
   Kitsuya User Portal — dashboard / profile / notifications / plans
   Uses the landing design tokens. Inter body · DM Sans headings.
   ============================================================ */

.portal-head { padding-top: 2.6rem; margin-bottom: 1.8rem; }
.portal-head h1 { font-family: "DM Sans", var(--font-display); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 3px; }
.portal-head p { margin: 0; }

/* profile identity strip */
.portal-id {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px 22px;
}
.portal-id img, .portal-id .portal-avatar {
    width: 58px; height: 58px;
    border-radius: 50%;
    object-fit: cover;
    flex: none;
}
.portal-avatar {
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "DM Sans", var(--font-display);
    font-weight: 800;
    font-size: 22px;
}
.portal-id b { font-family: "DM Sans", var(--font-display); font-size: 17px; display: block; }
.portal-id .muted { font-size: 13px; }
.portal-id .pill-row { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }

/* KPI cards */
.portal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 1.4rem 0;
}
.stat-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: var(--radius-lg);
    padding: 15px 17px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .15s ease, border-color .15s ease;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--bd2); }
.stat-card::after {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent 70%);
    opacity: 0;
    transition: opacity .2s ease;
}
.stat-card:hover::after { opacity: .85; }
.stat-value {
    font-family: "DM Sans", var(--font-display);
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.stat-label { font-size: 11.5px; color: var(--muted-d); margin-top: 3px; font-weight: 500; }

/* activity feed */
.feed { display: flex; flex-direction: column; }
.feed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: var(--radius);
    margin-bottom: 7px;
    font-size: 13px;
    transition: border-color .15s ease;
}
.feed-item:hover { border-color: var(--bd2); }
.feed-item .spacer { flex: 1; min-width: 0; }

/* notifications */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: var(--radius-lg);
    margin-bottom: 9px;
    transition: border-color .15s ease, transform .12s ease;
}
.notif-item:hover { border-color: var(--bd2); transform: translateY(-1px); }
.notif-item.unread { border-left: none; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.notif-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--bd2);
    flex: none;
    margin-top: 5px;
}
.notif-item.unread .notif-dot { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.notif-body b { display: block; font-size: 13.5px; font-family: "DM Sans", var(--font-display); }
.notif-body span { display: block; font-size: 12.5px; color: var(--muted-d); margin-top: 2px; line-height: 1.5; }

/* upgrade plan cards */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    align-items: stretch;
}
.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 26px 24px;
    transition: transform .18s ease, border-color .18s ease;
}
.plan-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.plan-card.featured { border-color: var(--accent); box-shadow: var(--shadow-md); }
.plan-flag {
    position: absolute;
    top: -11px; left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 14px;
    font-family: "DM Sans", var(--font-display);
    white-space: nowrap;
}
.plan-name { font-family: "DM Sans", var(--font-display); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-d); }
.plan-price { font-family: "DM Sans", var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 2px; }
.plan-price small { font-size: 13px; color: var(--muted-d); font-weight: 500; }
.plan-perks { list-style: none; margin: 16px 0 22px; padding: 0; flex: 1; }
.plan-perks li { padding: 7px 0 7px 26px; position: relative; font-size: 13.5px; border-bottom: 1px dashed var(--bd); }
.plan-perks li:last-child { border-bottom: 0; }
.plan-perks li::before { content: "✓"; position: absolute; left: 2px; color: var(--mint); font-weight: 700; }

/* generic portal card */
.pcard {
    background: var(--surface);
    border: 1px solid var(--bd);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px 22px;
}

@media (max-width: 640px) {
    .portal-id { flex-wrap: wrap; }
    .portal-id .pill-row { margin-left: 0; width: 100%; }
}
