/* Infront PM — dashboard styles */

:root {
    --bg:        #f5f6f8;
    --surface:   #ffffff;
    --ink:       #1d2530;
    --ink-soft:  #6b7686;
    --line:      #e6e9ef;
    --brand:     #2f6df0;
    --brand-soft:#e8f0fe;
    --accent:    #2f6df0;
    --radius:    10px;
    --shadow:    0 1px 2px rgba(20, 30, 50, .05), 0 1px 8px rgba(20, 30, 50, .04);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}

/* Top bar */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.topbar__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.brand {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.2px;
    text-decoration: none;
    color: var(--ink);
}
.brand span { color: var(--brand); }
.nav { display: flex; gap: 20px; }
.nav__link {
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
}
.nav__link.is-active { color: var(--brand); }

/* Page shell */
.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}
.dash-head h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -.3px;
}
.dash-head__sub {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 14px;
}

/* KPI cards */
.kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin: 24px 0;
}
.kpi {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.kpi__value { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
.kpi__label { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; }

/* Layout grid */
.grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.grid__side { display: flex; flex-direction: column; gap: 20px; }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
    margin-bottom: 20px;
}
.card__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
}

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--ink-soft);
    font-weight: 600;
    padding: 0 12px 10px;
    border-bottom: 1px solid var(--line);
}
.table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfc; }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-soft); }

/* Proportion bar inside the client table */
.bar {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 22px;
    border-radius: 5px;
    overflow: hidden;
}
.bar__fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: var(--brand-soft);
    border-radius: 5px;
}
.bar__label {
    position: relative;
    padding: 0 8px;
    font-weight: 500;
}

/* Breakdown lists */
.breakdown { list-style: none; margin: 0; padding: 0; }
.breakdown li {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.breakdown li:last-child { border-bottom: none; }
.breakdown__name { color: var(--ink); }
.breakdown__value { font-weight: 600; }

/* Footer */
.footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    color: var(--ink-soft);
    font-size: 13px;
}

/* User box in the top bar */
.userbox {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.userbox__avatar { width: 28px; height: 28px; border-radius: 50%; }
.userbox__name { color: var(--ink); font-weight: 500; }
.userbox__logout {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 13px;
    padding-left: 10px;
    border-left: 1px solid var(--line);
}
.userbox__logout:hover { color: var(--brand); }

/* Login page */
.login-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #eef2fb 0%, #f5f6f8 100%);
}
.login-card {
    width: 360px;
    max-width: calc(100vw - 40px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(20, 30, 50, .10);
    padding: 36px 32px;
    text-align: center;
}
.login-brand { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
.login-brand span { color: var(--brand); }
.login-tagline { color: var(--ink-soft); font-size: 14px; margin: 8px 0 24px; }
.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    color: #3c4043;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: box-shadow .15s, background .15s;
}
.google-btn:hover { box-shadow: 0 1px 4px rgba(20, 30, 50, .15); background: #f8faff; }
.login-error {
    background: #fdecea;
    color: #b3261e;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin: 0 0 18px;
}
.login-error code { background: rgba(0,0,0,.05); padding: 1px 4px; border-radius: 3px; }
.login-foot { color: var(--ink-soft); font-size: 12px; margin: 22px 0 0; }

/* Responsive */
@media (max-width: 860px) {
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .grid { grid-template-columns: 1fr; }
}
