:root {
    color-scheme: light;
    font-family: VazirmatnLocal, Vazirmatn, Tahoma, sans-serif;
    color: #14223a;
    background: #f3f6fb;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    --ink: #14223a;
    --muted: #68768b;
    --line: #e5eaf2;
    --blue: #365eea;
    --green: #0b8e72;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #95a9ff; outline-offset: 2px; }

.site-header {
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    width: min(1120px, calc(100% - 40px));
    min-height: 78px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(145deg, #4776f4, #5c42c8);
    color: #fff;
    font-size: 21px;
    font-weight: 900;
    box-shadow: 0 8px 18px #365eea26;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.2px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #d5eee6;
    border-radius: 999px;
    background: #f2fbf7;
    color: #16745f;
    font-size: 11px;
    font-weight: 800;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #1aab80; box-shadow: 0 0 0 4px #1aab801a; }
.page-shell { width: min(1120px, calc(100% - 40px)); margin: 32px auto 24px; }
.hero-card {
    min-height: 190px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 40px;
    border-radius: 24px;
    background: radial-gradient(circle at 88% 10%, #4669ff 0, transparent 26%), linear-gradient(115deg, #142c59 0%, #1b3c77 50%, #294caf 100%);
    color: #fff;
    box-shadow: 0 18px 46px #203c721f;
}
.hero-card::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    left: -100px;
    bottom: -230px;
    border: 1px solid #ffffff20;
    border-radius: 50%;
    box-shadow: 0 0 0 30px #ffffff09, 0 0 0 60px #ffffff07;
}
.hero-copy { position: relative; z-index: 1; max-width: 720px; }
.eyebrow { display: inline-block; color: #9dceff; font-size: 11px; font-weight: 800; letter-spacing: .2px; }
.hero-card h1 { margin: 8px 0 7px; font-size: clamp(25px, 4vw, 34px); line-height: 1.35; letter-spacing: -.5px; }
.hero-card p { max-width: 680px; margin: 0; color: #dbe8ff; font-size: 13px; line-height: 1.9; }
.hero-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border: 1px solid #ffffff40;
    border-radius: 26px;
    background: #ffffff18;
    color: #fff;
}
.hero-icon svg { width: 48px; height: 48px; }
.notice-card, .setup-card, .login-card, .report-toolbar, .table-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 22px #233d6908;
}
.notice-card { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 16px 19px; }
.notice-icon { flex: 0 0 auto; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #edf2ff; color: var(--blue); font-size: 13px; font-weight: 900; }
.notice-card p { margin: 0; color: #56657b; font-size: 12px; line-height: 1.9; }
.notice-card strong { color: #34445f; }
.setup-card, .login-card { display: flex; gap: 18px; align-items: flex-start; margin-top: 18px; padding: 24px; }
.setup-symbol { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: #edf2ff; color: #365eea; font-size: 23px; }
.setup-card h2, .login-card h2 { margin: 0 0 5px; font-size: 17px; }
.setup-card p { margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 11px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { color: #fff; background: #365eea; box-shadow: 0 6px 14px #365eea26; }
.button-primary:hover:not(:disabled) { background: #294fd8; }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-quiet { color: #5a6680; background: #fff; border-color: var(--line); }
.login-card { display: block; max-width: 600px; margin: 18px auto 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading .eyebrow { color: #5070d7; }
.section-heading h2 { margin: 4px 0 0; color: var(--ink); font-size: 19px; }
.lock-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #f2f5ff; color: #526de2; font-size: 24px; }
.login-form { margin-top: 20px; }
.login-form label, .date-field label { display: block; margin-bottom: 7px; color: #43516a; font-size: 11px; font-weight: 800; }
.login-row { display: flex; gap: 9px; }
.login-row input, .login-form > input, .date-field input {
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #d9e0eb;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
}
.login-row input { flex: 1; }
.login-form > input { width: 100%; margin-bottom: 10px; }
.form-message { min-height: 17px; margin: 8px 0 0; color: #b43f50; font-size: 11px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.report-toolbar { margin-top: 18px; padding: 22px 24px 19px; }
.toolbar-heading { align-items: flex-start; }
.toolbar-heading h2 { margin-top: 5px; }
.toolbar-heading .muted { margin: 6px 0 0; font-size: 11px; }
.toolbar-heading code { display: inline-block; margin-right: 5px; padding: 2px 7px; border: 1px solid #e6eaf1; border-radius: 6px; background: #f8f9fc; color: #3c4b67; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; unicode-bidi: plaintext; }
.property-picker { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: #63718a; font-size: 11px; font-weight: 800; }
.property-picker select { max-width: min(100%, 480px); min-height: 34px; padding: 0 10px; border: 1px solid #d9e0eb; border-radius: 8px; background: #fff; color: var(--ink); direction: ltr; font: inherit; }
.site-management-card { margin-top: 18px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 6px 22px #233d6908; }
.site-management-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.site-management-heading h2 { margin: 4px 0 0; color: var(--ink); font-size: 16px; }
.site-count { padding: 5px 9px; border: 1px solid #e3e9f3; border-radius: 999px; background: #f7f9fc; color: #65758b; font-size: 10px; white-space: nowrap; }
.site-management-card > p { margin: 8px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.site-add-form { display: flex; align-items: flex-end; gap: 9px; }
.site-add-form > div { flex: 1; min-width: 0; }
.site-add-form label { display: block; margin-bottom: 6px; color: #43516a; font-size: 10px; font-weight: 800; }
.site-add-form input { width: 100%; min-width: 0; min-height: 42px; padding: 0 11px; border: 1px solid #d9e0eb; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; }
.site-add-form input:disabled { background: #f5f7fb; }
.site-management-status { min-height: 16px; color: #14775f !important; font-size: 10px !important; }
.site-management-status.error { color: #b43f50 !important; }
.managed-property-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 0; padding: 0; list-style: none; }
.managed-property-list code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; padding: 4px 7px; border: 1px solid #e8edf4; border-radius: 7px; background: #f8f9fc; color: #53647b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; unicode-bidi: plaintext; }
.filter-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 17px; padding-top: 16px; border-top: 1px solid #eef1f6; }
.date-field { width: 170px; }
.date-field input { width: 100%; font-size: 12px; direction: ltr; }
.report-status { align-self: center; margin-right: 5px; color: var(--muted); font-size: 11px; }
.report-status.error { color: #b43f50; }
.report-status.success { color: #14775f; }
.inline-warning { margin-top: 14px; padding: 11px 13px; border: 1px solid #f3dfb4; border-radius: 10px; background: #fff9ea; color: #8a6522; font-size: 11px; line-height: 1.7; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.metric-card { min-height: 138px; position: relative; overflow: hidden; padding: 19px 20px 16px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 6px 22px #233d6908; }
.metric-card::after { content: ""; position: absolute; left: -23px; bottom: -48px; width: 110px; height: 110px; border-radius: 50%; background: currentColor; opacity: .045; }
.metric-clicks { color: #315ee8; }
.metric-impressions { color: #7555ce; }
.metric-ctr { color: #078c70; }
.metric-position { color: #d1832e; }
.metric-label, .metric-caption { display: block; color: #68768b; font-size: 11px; font-weight: 700; }
.metric-value { display: block; margin: 7px 0 5px; color: var(--ink); font-size: 30px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.metric-caption { color: #9aa5b4; font-size: 10px; }
.table-card { margin-top: 16px; overflow: hidden; }
.table-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; }
.table-heading h2 { margin: 0; font-size: 16px; }
.table-heading p { margin: 5px 0 0; font-size: 11px; }
.range-label { padding: 6px 10px; border-radius: 8px; background: #f5f7fb; color: #63718a; font-size: 10px; white-space: nowrap; }
.table-wrap { overflow-x: auto; border-top: 1px solid #edf0f5; }
table { width: 100%; border-collapse: collapse; text-align: right; white-space: nowrap; }
thead { background: #f8f9fc; color: #6e7b90; font-size: 10px; }
th, td { padding: 12px 18px; }
th { font-weight: 800; }
tbody tr { border-top: 1px solid #f0f2f6; }
tbody tr:hover { background: #fafbfe; }
td { color: #34435e; font-size: 11px; font-variant-numeric: tabular-nums; }
td:first-child { color: #63718a; }
.empty-state { padding: 36px 18px; color: #8894a6; text-align: center; }
.table-footer { min-height: 36px; padding: 10px 20px; border-top: 1px solid #edf0f5; color: #98a2b1; font-size: 10px; }
.page-footer { display: flex; justify-content: space-between; gap: 12px; margin: 18px 2px 0; color: #8994a5; font-size: 10px; }
.page-footer a { color: #6578bc; text-decoration: none; }
.page-footer a:hover { text-decoration: underline; }

@media (max-width: 760px) {
    .header-inner, .page-shell { width: min(100% - 28px, 1120px); }
    .page-shell { margin-top: 18px; }
    .hero-card { min-height: 175px; padding: 25px 23px; border-radius: 19px; }
    .hero-icon { width: 66px; height: 66px; border-radius: 20px; }
    .hero-icon svg { width: 38px; height: 38px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .metric-card { min-height: 122px; padding: 15px; }
    .metric-value { font-size: 25px; }
    .report-toolbar { padding: 18px; }
}
@media (max-width: 480px) {
    .header-inner { min-height: 68px; }
    .brand small { max-width: 185px; font-size: 9px; }
    .status-pill { padding: 7px 8px; font-size: 9px; }
    .hero-card { padding: 22px 19px; }
    .hero-icon { display: none; }
    .hero-card p { font-size: 11px; }
    .notice-card { padding: 13px; }
    .setup-card { padding: 18px; }
    .login-row { flex-direction: column; }
    .login-row .button { width: 100%; }
    .site-management-card { padding: 16px; }
    .site-add-form { flex-direction: column; align-items: stretch; }
    .site-add-form .button { width: 100%; }
    .date-field { width: calc(50% - 5px); }
    .filter-form > .button { width: 100%; }
    .report-status { width: 100%; margin: 0; }
    .table-heading { align-items: flex-start; padding: 16px; }
    th, td { padding: 11px 13px; }
    .page-footer { flex-direction: column; }
}
