@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --kinovo-blue: #1c3ec8;
    --ink: #1b1b1d;
    --muted: #737377;
    --line: #e5e5e7;
    --soft: #f4f4f5;
    --black: #111113;
    --charcoal: #1c1c1f;
    --white: #fff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--soft);
    color: var(--ink);
    font: 16px/1.6 'Poppins', Arial, sans-serif;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 24px;
    background: radial-gradient(circle at 50% 0%, #2a2a2f 0, var(--black) 55%);
}

.login-card {
    width: min(100%, 440px);
    padding: 44px;
    background: var(--charcoal);
    color: var(--white);
    border-radius: 6px;
    box-shadow: 0 28px 70px rgb(0 0 0 / 45%);
    border: 1px solid #6a6a72;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
}

.login-brand img { width: 170px; height: auto; }

.eyebrow {
    margin: 28px 0 5px;
    color: #c7c7ca;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

h1, h2 { margin: 0; font-weight: 600; }
h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.03em; }
h2 { line-height: 1.35; }

.intro { margin: 13px 0 29px; color: #b6b6ba; }

.login-form { display: grid; gap: 17px; }

.login-form label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    border: 1px solid #47474e;
    border-radius: 3px;
    padding: 12px 13px;
    background: #252529;
    color: var(--white);
    font: inherit;
}

.login-form input:focus {
    outline: 3px solid rgb(255 255 255 / 12%);
    border-color: var(--kinovo-blue);
}

button {
    border: 0;
    border-radius: 3px;
    background: var(--kinovo-blue);
    color: var(--white);
    padding: 13px 19px;
    font: 600 14px 'Poppins', Arial, sans-serif;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

button:hover { background: #142d91; transform: translateY(-1px); }

.alert {
    margin: 0 0 20px;
    padding: 11px 13px;
    border-left: 3px solid #c93427;
    background: #fff3f1;
    color: #9c241a;
    font-size: 14px;
}

.form-footnote { margin: 22px 0 0; font-size: 13px; }
.form-footnote a { color: var(--white); font-weight: 600; text-decoration: underline; text-decoration-color: rgb(255 255 255 / 70%); text-underline-offset: 3px; }
.form-footnote a:hover { color: var(--white); text-decoration-color: var(--white); }
.login-card .notice { margin: 20px 0; }

.topbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(24px, calc((100vw - 1120px) / 2));
    background: var(--black);
    color: var(--white);
}

.brand { display: flex; align-items: center; gap: 14px; color: var(--white); text-decoration: none; }
.brand-logo { display: block; width: 132px; height: auto; }
.brand-divider { width: 1px; height: 24px; background: rgb(255 255 255 / 48%); }
.brand-label { font-size: 14px; font-weight: 500; letter-spacing: .04em; }

.account { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.role { color: rgb(255 255 255 / 75%); }
.account-link { color: var(--white); font-weight: 500; text-decoration: none; }
.account-link:hover { text-decoration: underline; }
.link-button { padding: 0; background: transparent; color: var(--white); font-weight: 500; }
.link-button:hover { background: transparent; color: var(--white); transform: none; text-decoration: underline; }

.dashboard { max-width: 1120px; margin: 0 auto; padding: 58px 24px; }
.dashboard > .eyebrow { margin-top: 0; }

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 18px;
    margin: 30px 0;
}

.metric-grid article, .panel, .report-card {
    border: 1px solid var(--line);
    background: var(--white);
}

.metric-grid article { padding: 23px; border-top: 3px solid var(--black); }
.metric-grid span { display: block; color: var(--muted); font-size: 13px; }
.metric-grid strong { font-size: 35px; font-weight: 600; }

.panel { overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { color: var(--ink); font-size: 20px; }
.panel-heading span { color: var(--muted); font-size: 13px; }
.client-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.client-link:hover { color: var(--kinovo-blue); text-decoration: underline; text-underline-offset: 3px; }
.back-link { display: inline-flex; margin-bottom: 22px; color: var(--kinovo-blue); font-size: 14px; font-weight: 600; text-decoration: none; }
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 24px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.empty { padding: 25px; color: var(--muted); }

.notice { margin: 20px 0; padding: 11px 13px; border-left: 3px solid #249566; background: #edf9f3; color: #176c49; font-size: 14px; }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 30px; }
.account-panel { overflow: visible; }
.settings-form { display: grid; gap: 17px; padding: 24px; }
.settings-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.settings-form input { width: 100%; border: 1px solid #d6d6dc; border-radius: 3px; padding: 12px 13px; color: var(--ink); background: var(--white); font: inherit; }
.settings-form input:disabled { color: var(--muted); background: var(--soft); cursor: not-allowed; }
.settings-form input:focus { outline: 3px solid rgb(28 62 200 / 14%); border-color: var(--kinovo-blue); }

.reports-by-month { display: grid; gap: 34px; margin-top: 30px; }
.report-month { display: grid; gap: 17px; }
.report-month-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--black); }
.report-month-heading h2 { font-size: 22px; }
.report-month-heading span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.report-card { padding: 25px; border-top: 3px solid var(--black); }
.report-card h3 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.35; }
.report-card p { color: var(--muted); }
.report-date { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--kinovo-blue) !important; text-transform: uppercase; }
.report-card a { color: var(--kinovo-blue); font-size: 14px; font-weight: 600; }

@media (max-width: 650px) {
    .login-card { padding: 34px 27px; }
    .topbar { min-height: 70px; padding: 14px 20px; }
    .brand-logo { width: 110px; }
    .brand-divider { height: 21px; }
    .account { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
    .role { display: none; }
    .metric-grid { grid-template-columns: 1fr; }
    .account-grid { grid-template-columns: 1fr; }
    .dashboard { padding: 40px 20px; }
    h1 { font-size: 28px; }
    th, td { padding: 13px; }
}
