:root {
    --bg-primary: #0a0c14;
    --bg-secondary: #11141f;
    --bg-card: #161a28;
    --bg-card-hover: #1c2133;
    --bg-elevated: #20263a;
    --accent-blue: #4f8cf7;
    --accent-teal: #2dd4bf;
    --accent-purple: #a78bfa;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-green: #10b981;
    --accent-indigo: #6366f1;
    --pnc-gold: #f5a623;
    --pnc-orange: #f26a21;
    --text-primary: #e8ecf4;
    --text-secondary: #b0b8cc;
    --text-muted: #74809a;
    --border-card: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.28);
    --shadow-elevated: 0 16px 52px rgba(0, 0, 0, 0.42);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-primary);
    background:
        radial-gradient(ellipse at 18% 0%, rgba(79, 140, 247, 0.08), transparent 42%),
        radial-gradient(ellipse at 86% 30%, rgba(45, 212, 191, 0.06), transparent 48%),
        linear-gradient(180deg, #0a0c14 0%, #071017 100%);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

button, a.btn { min-width: 0; }

.container {
    width: min(100%, 1320px);
    margin: 0 auto;
    padding: 34px 28px 58px;
}

.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(79, 140, 247, 0.28);
    border-radius: 999px;
    padding: 11px 16px;
    background: rgba(79, 140, 247, 0.16);
    color: #dce7ff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    margin-top: 15px;
    /* width: 100%; */
}

.admin-table-card .action-row,.report-header,.header-actions .button-group{
    .btn,button.btn{margin-top: 0;}
}

.btn:hover, button.btn:hover {
    transform: translateY(-1px);
    background: rgba(79, 140, 247, 0.24);
    border-color: rgba(79, 140, 247, 0.45);
}

.btn:disabled, button.btn:disabled {
    opacity: 0.68;
    cursor: wait;
    transform: none;
}

.btn.secondary, button.btn.secondary {
    background: rgba(45, 212, 191, 0.14);
    border-color: rgba(45, 212, 191, 0.26);
    color: #bdf7ef;
}

.btn.danger, button.btn.danger {
    background: rgba(244, 63, 94, 0.14);
    border-color: rgba(244, 63, 94, 0.28);
    color: #ffc4cf;
}

.button-group, .action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hint {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin: 10px 0 0;
}

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(244, 63, 94, 0.14);
    border: 1px solid rgba(244, 63, 94, 0.26);
    color: #ffc4cf;
}

.alert.hidden {
    display: none;
}

.alert.success {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.28);
    color: #c9f8e8;
}

.password-form-card {
    padding: 20px 22px;
}

.password-form-card h3 {
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.password-form {
    display: grid;
    gap: 14px;
    max-width: 560px;
    margin-top: 10px;
}

.password-form .form-row {
    display: grid;
    gap: 8px;
}

.password-form .button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 13px;
    background: rgba(79, 140, 247, 0.15);
    border: 1px solid rgba(79, 140, 247, 0.24);
    color: #9fc0ff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.center-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card, .panel-card, .card, .report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.login-card {
    width: 100%;
    max-width: 500px;
    padding: 32px;
}

.login-card h1, .header-bar h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    line-height: 1.1;
    letter-spacing: 0;
}

.login-card .subtitle {
    margin: 12px 0 24px;
    color: var(--text-secondary);
}

.login-card label, .form-row label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
}

.password-field {
    position: relative;
    margin-top: 7px;
}

.password-field input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
}

.password-toggle:hover {
    color: var(--text-primary);
}

input, textarea, select {
    width: 100%;
    margin-top: 7px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: #101624;
    border-radius: var(--radius-md);
    padding: 13px 14px;
    color: var(--text-primary);
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(79, 140, 247, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 140, 247, 0.10);
}

textarea { min-height: 120px; resize: vertical; }

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 30px 24px;
    background: rgba(12, 15, 25, 0.96);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar h2 {
    margin: 0;
    color: #fff;
    font-size: 1.35rem;
}

.sidebar p {
    color: var(--text-muted);
    line-height: 1.65;
}

.sidebar .nav-links {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}

.sidebar .nav-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sidebar .nav-links a:hover,
.sidebar .nav-links a.active {
    color: #fff;
    background: rgba(79, 140, 247, 0.14);
    border-color: rgba(79, 140, 247, 0.20);
}

.main-content { padding: 30px; min-width: 0; }

.header-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.project-edit-header {
    position: sticky;
    top: 0;
    z-index: 30;
    align-items: center;
    padding: 16px 0;
    background: rgba(10, 12, 20, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.project-edit-header .save-project-btn {
    margin-top: 0;
    flex: 0 0 auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-menu {
    position: relative;
}

.profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(79, 140, 247, 0.24);
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(79, 140, 247, 0.14);
    color: #dce7ff;
    cursor: pointer;
}

.profile-avatar, .profile-avatar-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(79, 140, 247, 0.2);
    color: #9fc0ff;
}

.profile-avatar-large {
    width: 54px;
    height: 54px;
    font-size: 1.2rem;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    display: none;
    flex-direction: column;
    padding: 8px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-card);
    z-index: 20;
}

.profile-menu.open .profile-dropdown {
    display: flex;
}

.profile-option, .profile-tab {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
}

.profile-dropdown-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

.profile-dropdown-action:hover {
    background: rgba(79, 140, 247, 0.12);
    color: #fff;
}

.profile-dropdown-action i {
    width: 18px;
    text-align: center;
}

.profile-option.active, .profile-tab.active {
    background: rgba(79, 140, 247, 0.16);
    color: #fff;
}

.profile-panel-card {
    margin-bottom: 24px;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 2px;
}

.stats-grid, .report-cards, .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.panel-card {
    margin-top: 24px;
    padding: 22px;
    background: rgba(22, 26, 40, 0.92);
}

.card {
    padding: 22px;
    min-height: 122px;
}

.card h3 {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.card p { color: var(--text-secondary); margin: 0; }

.stat-value {
    margin-top: 12px;
    color: #fff;
    font-size: 2.35rem;
    line-height: 1;
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-row { display: grid; gap: 12px; }

.form-row-wide {
    grid-column: 1 / -1;
}

.form-section {
    padding-bottom: 22px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.section-heading-spaced {
    margin-top: 24px;
}

.section-heading h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: #fff;
    font-size: 1.02rem;
}

.form-row h3, .form-row h4 {
    margin: 8px 0;
    color: #fff;
    font-size: 1.02rem;
}

.metric-group { display: grid; gap: 14px; }

.metric-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 13px;
    align-items: end;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.section-order-list, .custom-sections-list {
    display: grid;
    gap: 12px;
}

.section-order-row {
    cursor: grab;
}

.section-order-row.dragging {
    opacity: 0.62;
    border-color: rgba(79, 140, 247, 0.42);
}

.drag-handle {
    color: var(--text-muted);
    flex: 0 0 auto;
}

.section-order-row > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 160px;
}

.section-order-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
}

.icon-btn:hover {
    color: #fff;
    border-color: rgba(79, 140, 247, 0.38);
    background: rgba(79, 140, 247, 0.16);
}

.custom-section-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px);
    gap: 13px;
    align-items: end;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
}

.custom-section-items,
.custom-section-actions {
    grid-column: 1 / -1;
}

.custom-section-items {
    display: grid;
    gap: 10px;
}

.custom-section-item {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: rgba(8, 12, 24, 0.35);
}

.custom-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; cursor: pointer; background: #2b3247; border-radius: 999px; transition: 0.25s; }
.slider:before { content: ""; position: absolute; width: 18px; height: 18px; left: 4px; bottom: 4px; background: #fff; border-radius: 50%; transition: 0.25s; }
input:checked + .slider { background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal)); }
input:checked + .slider:before { transform: translateX(20px); }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
}

.admin-table-card { padding: 0; }

table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

th, td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
}

th {
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

td {
    color: var(--text-primary);
    font-weight: 600;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
td:first-child { text-align: left; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent-blue); margin-top: 0; }

.link-pill, .chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 9px 13px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
}

.chip.active {
    background: rgba(79, 140, 247, 0.15);
    border-color: rgba(79, 140, 247, 0.30);
    color: #9fc0ff;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.empty-panel { text-align: center; color: var(--text-muted); }
.empty-state { margin: 0; }

.report-view {
    /* width: min(100%, 1020px); */
    margin: 0 auto;
}

.report-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
    padding: 0 4px;
}

.client-report-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.client-report-logo { display: block; width: 54px; height: 54px; object-fit: contain; border-radius: 12px; background: #fff; padding: 5px; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
.client-report-monogram { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--pnc-gold), var(--pnc-orange)); font-size: 1.25rem; font-weight: 900; box-shadow: 0 8px 22px rgba(0, 0, 0, .2); }
.client-report-name { display: block; overflow: hidden; max-width: min(48vw, 430px); color: #fff; font-size: 1rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.client-report-label { display: block; margin-top: 2px; color: var(--text-muted); font-size: .68rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.presented-by { color: var(--text-muted); font-size: .78rem; font-weight: 600; white-space: nowrap;display: flex;align-items: center;gap: 5px; }
.pnc-brand-link { display: inline-flex; align-items: center; gap: 5px; }
.pnc-brand-mark { display: inline-block; width: 26px; height: 26px; border-radius: 50%; background: url('pnc-logos-logo.png') -64px center / 142px 26px no-repeat; }
.presented-by a, .footer a { /*color: var(--pnc-gold);*/ color: #fff; font-weight: 800; }

.upload-preview-link { display: inline-block; margin-top: 9px; color: var(--accent-teal); font-size: .86rem; font-weight: 700; }
.form-row small { display: block; margin-top: 7px; color: var(--text-muted); font-size: .76rem; }
.report-open-panel { margin-top: 22px; }
.tracking-stats { max-width: 480px; }
.tracking-table-wrap { margin-top: 14px; }

.section-screenshot-card { margin-top: 20px; padding: 14px; }
.section-screenshot-card a { display: block; }
.section-screenshot-card img { display: block; width: 100%; max-height: 680px; object-fit: contain; border-radius: 10px; background: #0b0e16; }

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
    margin-bottom: 36px;
    padding: 32px 34px;
    background: linear-gradient(135deg, rgba(22, 26, 40, 0.98), rgba(29, 25, 33, 0.92));
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elevated);
    position: relative;
    overflow: hidden;
}

.report-header::before {
    content: "";
    position: absolute;
    inset: auto -60px -70px 18%;
    height: 170px;
    background: radial-gradient(ellipse, rgba(245, 166, 35, 0.16), transparent 70%);
    pointer-events: none;
}

.report-header::after {
    content: "";
    position: absolute;
    right: -45px;
    top: -55px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(242, 106, 33, 0.16), transparent 68%);
    pointer-events: none;
}

.report-header > * { position: relative; z-index: 1; }

.report-header h1 {
    margin: 12px 0 5px;
    color: #fff;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    line-height: 1.12;
    letter-spacing: 0;
}

.report-header .subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-weight: 500;
}

.report-header .meta {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.report-month-select {
    width: auto;
    min-width: 190px;
    margin-top: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
    color: #dce7ff;
    background: rgba(79, 140, 247, 0.14);
    border-color: rgba(79, 140, 247, 0.24);
}

.report-history-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
}

.report-history-label {
    color: var(--text-secondary);
    font-weight: 700;
}

.report-history-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.report-history-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(79, 140, 247, 0.2);
    border-radius: 999px;
    color: var(--text-primary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.92rem;
}

.report-history-link:hover,
.report-history-link.active {
    background: rgba(79, 140, 247, 0.16);
    border-color: rgba(79, 140, 247, 0.32);
    color: #fff;
}

.report-history-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-history-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-dropdown-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.history-dropdown-row .btn{
    margin-top: 0;
}

.compact-history-select {
    width: min(100%, 420px);
    margin-top: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(16, 22, 36, 0.98), rgba(12, 17, 28, 0.98));
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 36px;
}

.compact-history-select option {
    color: #101624;
    background: #fff;
}

.compact-history-select:focus {
    border-color: rgba(79, 140, 247, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 140, 247, 0.10);
}

.history-view-btn {
    padding: 10px 12px;
    min-width: 90px;
}

.report-section { margin-bottom: 34px; }

.report-section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    color: #fff;
    font-size: 1.22rem;
    letter-spacing: 0;
}

.sample-data-label {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(245, 158, 11, .14);
    color: #b45309;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    vertical-align: middle;
}

.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: rgba(79, 140, 247, 0.18);
    color: var(--accent-blue);
    font-size: 0.9rem;
}

.icon-teal { /*background: rgba(45, 212, 191, 0.17);*/ color: var(--accent-teal); }
.icon-purple { /*background: rgba(167, 139, 250, 0.17);*/ color: var(--accent-purple); }
.icon-amber { /*background: rgba(245, 158, 11, 0.17);*/ color: var(--accent-amber); }
.icon-rose { /*background: rgba(244, 63, 94, 0.17);*/ color: var(--accent-rose); }
.icon-indigo { /*background: rgba(99, 102, 241, 0.17);*/ color: var(--accent-indigo); }

.report-card {
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.report-card:hover {
    background: var(--bg-card-hover);
}

.report-card .card-icon-top {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.report-card .label {
    margin-bottom: 7px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.report-card .value {
    margin-bottom: 4px;
    color: #fff;
    font-size: clamp(2rem, 5vw, 2.6rem);
    font-weight: 850;
    line-height: 1;
}

.report-card .sub {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.report-change {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 10px;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
}

.comparison-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: 10px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.comparison-pill.positive {
    background: rgba(16, 185, 129, 0.14);
    color: var(--accent-green);
}

.comparison-pill.negative {
    background: rgba(244, 63, 94, 0.14);
    color: var(--accent-rose);
}

.report-highlight {
    background: rgba(79, 140, 247, 0.14);
    color: var(--accent-blue);
}

.wide-card { grid-column: 1 / -1; }

.chart-card {
    min-height: 360px;
}

.chart-card canvas {
    width: 100% !important;
    height: 310px !important;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.mini-stat {
    padding: 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-card);
    text-align: center;
}

.mini-stat strong {
    display: block;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
}

.mini-stat span {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.search-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 10px;
}

.search-metrics .value { font-size: 2rem; }

.search-section .search-metrics { justify-content: space-around;text-align: center; }
.search-section .search-metrics .value { font-size: 3rem; }
.search-section .search-metrics .sub{ font-size: 1.3rem; }

.ai-vis-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-card);
}

.ai-score-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
    background: conic-gradient(var(--accent-purple) 0deg 144deg, rgba(255,255,255,0.08) 144deg 360deg);
    color: #fff;
    font-weight: 850;
    font-size: 1.2rem;
    position: relative;
}

.ai-score-circle::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: inherit;
    background: var(--bg-elevated);
}

.ai-score-circle span { position: relative; z-index: 1; }

.keyword-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-card);
}

.keyword-table { min-width: 540px; }

.link-tables-grid {
    display: grid;
    gap: 18px;
}

.link-table-card .label { margin-bottom: 12px; }

.link-report-table td a {
    color: var(--accent, #4f8cf7);
    text-decoration: none;
    word-break: break-word;
}

.link-report-table td a:hover { text-decoration: underline; }

.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: var(--accent-green);
    font-weight: 850;
    font-size: 0.82rem;
}

.rank-badge.top3 { background: rgba(245, 158, 11, 0.18); color: var(--accent-amber); }
.rank-badge.page1 { background: rgba(79, 140, 247, 0.15); color: var(--accent-blue); }

.gmb-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.gmb-stat-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-card);
    background: var(--bg-elevated);
}

.gmb-stat-chip .val { color: #fff; font-size: 1.18rem; font-weight: 850; }
.gmb-stat-chip .lbl { color: var(--text-muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }

.milestone-banner {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(245, 158, 11, 0.30);
    background: rgba(245, 158, 11, 0.11);
    color: var(--accent-amber);
    font-weight: 800;
}

.footer {
    margin-top: 44px;
    padding-top: 24px;
    border-top: 1px solid var(--border-card);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.footer div{width: 100%;}
.exporting-pdf .report-header .meta .btn {
    display: none !important;
}

.exporting-pdf {
    background: #0a0c14 !important;
}

.exporting-pdf .report-section,
.exporting-pdf .report-card {
    break-inside: avoid;
    page-break-inside: avoid;
}

.pdf-export-clone {
    position: static;
    left: 0;
    top: 0;
    z-index: auto;
    width: 794px;
    max-width: none;
    padding: 24px;
    margin: 0;
    background: #0a0c14 !important;
    overflow: visible;
    pointer-events: none;
}

.pdf-export-clone .report-header .meta .btn {
    display: none !important;
}

.pdf-export-clone .report-header {
    margin-bottom: 24px;
}

.pdf-export-clone .report-section {
    margin-bottom: 24px;
}

.pdf-export-clone .report-cards,
.pdf-export-clone .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdf-export-clone .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 960px) {
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .grid-2, .grid-3, .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .container, .main-content { padding: 20px 14px 38px; }
    .project-edit-header { top: 0; padding: 14px 0; }
    .project-edit-header .save-project-btn { width: 100%; }
    .section-order-row { align-items: flex-start; }
    .section-order-actions { width: 100%; justify-content: flex-end; }
    .custom-section-row, .custom-section-item { grid-template-columns: 1fr; }
    .report-header { padding: 24px 20px; }
    .report-header .meta { justify-items: start; }
    .report-top-bar { align-items: flex-start; flex-direction: column; gap: 9px; }
    .client-report-name { max-width: 78vw; }
    .stats-grid, .report-cards, .cards-grid { grid-template-columns: 1fr; }
    .button-group .btn, .action-row .btn { flex: 1 1 100%; }
}

@media print {
    body { background: #fff; color: #111; }
    .btn, .meta .btn, .sidebar, .header-bar { display: none !important; }
    .container { padding: 0; }
    .report-view, .report-header, .report-card, .mini-stat, .gmb-stat-chip, .ai-vis-card {
        background: #fff !important;
        color: #111 !important;
        box-shadow: none !important;
        border-color: #ddd !important;
    }
    .report-header h1, .report-card .value, th, td { color: #111 !important; }
    .chart-card { break-inside: avoid; }
    .report-section, .report-card { break-inside: avoid; }
}
