:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f8f9fa;
    --surface-3: #eef1f4;
    --border: #dfe3e7;
    --border-strong: #cfd4da;
    --text: #202124;
    --muted: #5f6368;
    --primary: #e37400;
    --primary-2: #f9ab00;
    --primary-soft: #fff4df;
    --purple: #9334e6;
    --purple-soft: #f4e8ff;
    --blue: #1a73e8;
    --blue-soft: #e8f0fe;
    --success: #188038;
    --success-soft: #e6f4ea;
    --danger: #d93025;
    --danger-soft: #fce8e6;
    --warning: #b06000;
    --warning-soft: #fef7e0;
    --shadow: 0 1px 2px rgba(60,64,67,.08), 0 2px 8px rgba(60,64,67,.06);
    --shadow-hover: 0 4px 14px rgba(60,64,67,.12);
    --radius: 16px;
    --radius-sm: 10px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    background:
        radial-gradient(circle at 86% 4%, rgba(249,171,0,.12), transparent 24rem),
        radial-gradient(circle at 20% 100%, rgba(147,52,230,.05), transparent 26rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.hidden { display: none !important; }

.app-shell { display: grid; grid-template-columns: 250px minmax(0,1fr); min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 250px; display: flex; flex-direction: column;
    padding: 24px 18px; border-right: 1px solid var(--border); background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px); z-index: 20;
}
.brand, .install-brand { display: flex; align-items: center; gap: 12px; }
.brand { padding: 0 8px 30px; }
.brand-mark {
    position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px;
    border-radius: 13px; color: transparent; font-size: 0; overflow: hidden;
    background:
        linear-gradient(to top, var(--primary-2), var(--primary-2)) 8px 24px/7px 10px no-repeat,
        linear-gradient(to top, #f29900, #f9ab00) 18px 15px/7px 19px no-repeat,
        linear-gradient(to top, #df6c00, var(--primary)) 28px 8px/7px 26px no-repeat,
        #fff7e8;
    box-shadow: inset 0 0 0 1px rgba(227,116,0,.14), 0 6px 16px rgba(227,116,0,.13);
}
.brand strong, .install-brand strong { display: block; font-size: 14px; letter-spacing: -.01em; }
.brand small, .install-brand small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
.nav { display: grid; gap: 6px; }
.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 12px;
    color: var(--muted); font-weight: 650; transition: .18s ease;
}
.nav-link span { display: inline-grid; place-items: center; width: 22px; color: #80868b; }
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { color: #7a3e00; background: var(--primary-soft); box-shadow: inset 3px 0 var(--primary); }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); padding: 14px 8px 0; border-top: 1px solid var(--border); font-size: 12px; }
.sidebar-foot > a:hover { color: var(--danger); }
.user-chip { display: flex; align-items: center; gap: 7px; min-width: 0; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px var(--success-soft); }

.main { grid-column: 2; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 28px 34px 18px; }
.topbar h1 { margin: 0; font-size: 25px; letter-spacing: -.035em; }
.topbar p { margin: 5px 0 0; color: var(--muted); }
.menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); }
.content { padding: 0 34px 42px; }
.dashboard-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 9px 0 18px; }
.live-label { display: flex; align-items: center; gap: 9px; font-weight: 700; }
.live-label small { font-weight: 400; color: var(--muted); border-left: 1px solid var(--border); padding-left: 10px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); position: relative; }
.pulse-dot::after { content:""; position:absolute; inset:-5px; border:1px solid var(--success); border-radius:50%; animation:pulse 1.8s infinite; }
@keyframes pulse { 0%{transform:scale(.55);opacity:.8} 100%{transform:scale(1.45);opacity:0} }
.action-row, .button-row, .inline-actions, .detail-actions { display: flex; align-items: center; gap: 9px; }
.search-box { display: flex; align-items: center; gap: 8px; min-width: 210px; padding: 0 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--muted); box-shadow: var(--shadow); }
.search-box input { width: 100%; padding: 10px 0; border: 0; outline: 0; background: transparent; color: var(--text); box-shadow: none; }

.summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.summary-card {
    position: relative; min-height: 142px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.summary-card::before { content:""; position:absolute; inset:0 0 auto; height:4px; background: var(--primary-2); }
.summary-card.primary { border-color: rgba(227,116,0,.24); background: linear-gradient(145deg, #fff9ed, #ffffff 72%); }
.summary-card.primary::before { background: linear-gradient(90deg, var(--primary-2), var(--primary)); }
.summary-card.orange::before { background: var(--primary); }
.summary-card.purple::before { background: var(--purple); }
.summary-card.blue::before { background: var(--blue); }
.summary-card strong { display:block; margin: 13px 0 8px; font-size: 38px; line-height:1; letter-spacing:-.05em; }
.summary-card.primary strong { color: var(--primary); }
.summary-card.orange strong { color: #b85b00; }
.summary-card.purple strong { color: var(--purple); }
.summary-card.blue strong { color: var(--blue); }
.summary-label { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.summary-card small { color: var(--muted); }

.panel { margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 20px; border-bottom:1px solid var(--border); }
.panel-head h2 { margin:0; font-size:16px; letter-spacing:-.02em; }
.panel-head p { margin:5px 0 0; color:var(--muted); font-size:12px; line-height:1.45; }
.countdown { color:var(--muted); font-size:11px; white-space:nowrap; }
.countdown strong { color:var(--primary); }
.padded { padding: 18px 20px; }
.table-wrap { overflow-x:auto; }
.data-table { width:100%; border-collapse:collapse; min-width:720px; }
.data-table th { padding:12px 18px; text-align:left; color:var(--muted); background:var(--surface-2); font-size:11px; text-transform:uppercase; letter-spacing:.035em; }
.data-table td { padding:14px 18px; border-top:1px solid var(--border); vertical-align:middle; }
.data-table tbody tr:hover { background:#fffaf1; }
.data-table .align-right { text-align:right; }
.row-error { background:var(--danger-soft); }
.site-cell { display:flex; align-items:center; gap:11px; min-width:190px; }
.site-cell > div { min-width:0; }
.site-cell strong { display:block; font-size:13px; }
.site-cell a { display:block; max-width:245px; margin-top:4px; color:var(--muted); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.site-cell a:hover { color:var(--blue); }
.site-favicon { display:inline-grid; place-items:center; flex:0 0 34px; width:34px; height:34px; border-radius:10px; color:#8a4700; background:var(--primary-soft); border:1px solid #f6d9aa; font-weight:850; }
.metric-number { font-size:17px; }
.metric-number.is-live { color:var(--success); }
.badge, .data-badge { display:inline-flex; align-items:center; width:max-content; border-radius:999px; font-size:10px; font-weight:800; white-space:nowrap; }
.badge { padding:5px 8px; }
.badge-success { color:var(--success); background:var(--success-soft); }
.badge-muted { color:var(--muted); background:var(--surface-3); }
.badge-error { color:var(--danger); background:var(--danger-soft); }
.status-detail { display:block; max-width:230px; margin-top:5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.loading-state, .error-state { display:flex; align-items:center; justify-content:center; gap:9px; min-height:86px; color:var(--muted); text-align:center; }
.error-state { color:var(--danger); }
.spinner { width:17px; height:17px; border:2px solid #f0d9b4; border-top-color:var(--primary); border-radius:50%; animation:spin .75s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.empty-state { padding:48px 22px; text-align:center; }
.empty-state h3 { margin:12px 0 6px; }
.empty-state p { margin:0 0 18px; color:var(--muted); }
.empty-icon { font-size:30px; color:var(--primary); }

.details-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin:30px 0 14px; }
.details-heading h2 { margin:4px 0 6px; font-size:21px; letter-spacing:-.03em; }
.details-heading p { margin:0; max-width:760px; color:var(--muted); line-height:1.55; }
.section-kicker { color:var(--primary); font-size:11px; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.detail-actions { flex:0 0 auto; }
.detail-actions small { color:var(--muted); white-space:nowrap; }
.details-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.detail-panel { min-height:360px; }
.data-badge { padding:6px 9px; }
.data-badge.realtime { color:var(--success); background:var(--success-soft); }
.data-badge.processed { color:#7a3e00; background:var(--primary-soft); }
.rank-list { display:grid; gap:0; }
.rank-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); }
.rank-item:last-child { border-bottom:0; }
.rank-main { min-width:0; }
.rank-title { display:flex; align-items:center; gap:8px; min-width:0; }
.rank-title strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.site-pill { flex:0 0 auto; display:inline-flex; max-width:150px; padding:3px 7px; border-radius:999px; color:#744100; background:var(--primary-soft); font-size:9px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rank-meta { display:flex; flex-wrap:wrap; gap:5px 9px; margin-top:5px; color:var(--muted); font-size:11px; }
.rank-meta a { color:var(--blue); }
.rank-meta a:hover { text-decoration:underline; }
.rank-value { min-width:64px; text-align:right; }
.rank-value strong { display:block; color:var(--text); font-size:17px; }
.rank-value small { display:block; margin-top:3px; color:var(--muted); font-size:9px; text-transform:uppercase; letter-spacing:.04em; }
.rank-progress { grid-column:1/-1; width:100%; height:4px; border:0; border-radius:999px; overflow:hidden; background:var(--surface-3); appearance:none; }
.rank-progress::-webkit-progress-bar { background:var(--surface-3); border-radius:999px; }
.rank-progress::-webkit-progress-value { background:linear-gradient(90deg,var(--primary-2),var(--primary)); border-radius:999px; }
.rank-progress::-moz-progress-bar { background:linear-gradient(90deg,var(--primary-2),var(--primary)); border-radius:999px; }
.rank-empty { display:grid; place-items:center; min-height:150px; padding:20px; color:var(--muted); text-align:center; line-height:1.55; }
.panel-note { margin:0 20px 18px; padding:11px 12px; border:1px solid #f2d9a3; border-radius:10px; color:#714100; background:var(--warning-soft); font-size:11px; line-height:1.5; }
.live-pages-panel .rank-list { grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:28px; }
.live-pages-panel .rank-item:nth-last-child(-n+2) { border-bottom:0; }

.button { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:0 15px; border-radius:11px; border:1px solid transparent; font-weight:750; transition:.16s ease; }
.button:disabled { opacity:.55; cursor:not-allowed; }
.button-primary { color:#fff; background:linear-gradient(145deg,var(--primary-2),var(--primary)); box-shadow:0 5px 14px rgba(227,116,0,.18); }
.button-primary:hover { transform:translateY(-1px); box-shadow:0 8px 18px rgba(227,116,0,.24); }
.button-secondary { color:var(--text); border-color:var(--border-strong); background:var(--surface); box-shadow:var(--shadow); }
.button-secondary:hover { background:var(--surface-2); border-color:#b9bec5; }
.button-wide { width:100%; }
.button-small { min-height:31px; padding:0 10px; font-size:11px; }
.icon-button { width:31px; height:31px; display:inline-grid; place-items:center; border:1px solid var(--border); border-radius:9px; background:var(--surface); color:var(--muted); }
.icon-button:hover { color:var(--primary); background:var(--primary-soft); }
.icon-button.danger:hover { color:var(--danger); border-color:#f0b7b2; background:var(--danger-soft); }
.inline-actions form { margin:0; }

.layout-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; }
.form-stack { display:grid; gap:16px; }
.form-grid { display:grid; gap:14px; }
.form-grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
label { display:grid; gap:7px; color:#3c4043; font-weight:650; font-size:12px; }
label small { color:var(--muted); font-weight:400; line-height:1.45; }
input, select, textarea { width:100%; border:1px solid var(--border-strong); border-radius:11px; background:var(--surface); color:var(--text); outline:none; padding:11px 12px; transition:border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color:var(--primary-2); box-shadow:0 0 0 3px rgba(249,171,0,.14); }
textarea { resize:vertical; min-height:110px; line-height:1.5; }
input[type="file"] { padding:9px; }
input[type="checkbox"] { width:42px; height:22px; accent-color:var(--primary); }
.switch-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2); }
.switch-row span strong, .switch-row span small { display:block; }
.switch-row span small { margin-top:3px; }
.narrow-form { max-width:760px; }
.copy-box { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 12px; border-radius:11px; border:1px solid var(--border); background:var(--surface-2); overflow:hidden; }
.copy-box code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#3c4043; }
.copy-button { border:0; background:transparent; color:var(--primary); font-weight:750; }
.test-result { display:block; margin-top:5px; max-width:240px; font-size:10px; color:var(--muted); }
.test-result.ok { color:var(--success); }
.test-result.bad { color:var(--danger); }
.alert { padding:12px 14px; border-radius:11px; margin-bottom:14px; border:1px solid; line-height:1.5; }
.alert-success { color:var(--success); border-color:#b7dfc2; background:var(--success-soft); }
.alert-error { color:var(--danger); border-color:#f1b8b3; background:var(--danger-soft); }
.alert-warning { color:#744100; border-color:#efd39d; background:var(--warning-soft); }

.auth-page { display:grid; place-items:center; padding:30px 16px; }
.auth-wrap { width:min(430px,100%); }
.install-wrap { width:min(760px,100%); }
.install-brand { justify-content:center; margin-bottom:20px; }
.auth-card { padding:28px; border-radius:22px; border:1px solid var(--border); background:rgba(255,255,255,.96); box-shadow:var(--shadow-hover); backdrop-filter:blur(18px); }
.auth-card h1 { margin:0 0 7px; font-size:23px; letter-spacing:-.035em; }
.auth-card > p { color:var(--muted); line-height:1.55; margin:0 0 22px; }
.install-card { padding:30px; }
.requirements { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0 0 20px; }
.requirements > div { padding:9px 11px; border:1px solid var(--border); border-radius:10px; color:var(--muted); background:var(--surface-2); font-size:11px; }
.req-ok, .req-bad { display:inline-grid; place-items:center; width:18px; height:18px; margin-right:7px; border-radius:50%; }
.req-ok { color:var(--success); background:var(--success-soft); }
.req-bad { color:var(--danger); background:var(--danger-soft); }
.success-icon { width:58px; height:58px; display:grid; place-items:center; margin-bottom:18px; border-radius:18px; color:var(--success); background:var(--success-soft); font-size:27px; }
.steps { color:var(--muted); line-height:1.8; padding-left:22px; margin:20px 0; }
.small-note { margin:16px 0 0 !important; font-size:11px; }

@media (max-width: 1150px) {
    .summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .live-pages-panel .rank-list { grid-template-columns:1fr; }
    .live-pages-panel .rank-item:nth-last-child(2) { border-bottom:1px solid var(--border); }
}
@media (max-width: 900px) {
    .details-grid { grid-template-columns:1fr; }
}
@media (max-width: 820px) {
    .app-shell { display:block; }
    .sidebar { transform:translateX(-104%); transition:transform .2s ease; box-shadow:var(--shadow-hover); }
    .menu-open .sidebar { transform:translateX(0); }
    .main { grid-column:auto; }
    .menu-button { display:block; }
    .topbar { padding:20px 18px 14px; }
    .content { padding:0 18px 30px; }
    .layout-grid { grid-template-columns:1fr; }
    .details-heading { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 620px) {
    .dashboard-actions { align-items:stretch; flex-direction:column; }
    .action-row { width:100%; }
    .search-box { flex:1; min-width:0; }
    .summary-grid { grid-template-columns:1fr 1fr; }
    .summary-card { min-height:125px; padding:17px; }
    .summary-card strong { font-size:32px; }
    .form-grid.two, .requirements { grid-template-columns:1fr; }
    .panel-head { align-items:flex-start; flex-direction:column; }
    .detail-actions { width:100%; justify-content:space-between; }
    .rank-title { align-items:flex-start; flex-direction:column; gap:4px; }
}
@media (max-width: 440px) {
    .summary-grid { grid-template-columns:1fr; }
    .action-row { align-items:stretch; flex-direction:column; }
    .details-heading h2 { font-size:19px; }
    .rank-item { grid-template-columns:minmax(0,1fr) 54px; }
}

/* v1.2.0 Search Console entegrasyonu */
.data-badge.search-console { color:var(--blue); background:var(--blue-soft); }
.badge-stack { display:grid; justify-items:end; gap:5px; }
.badge-stack small { color:var(--muted); font-size:10px; white-space:nowrap; }
.search-console-notice { margin:16px 20px 0; font-size:11px; }
.search-console-panel .rank-meta a { display:inline-block; max-width:min(520px,70vw); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.property-stack { display:grid; gap:6px; min-width:220px; }
.property-stack span { display:flex; align-items:center; gap:7px; min-width:0; }
.property-stack small { width:24px; color:var(--muted); font-size:9px; font-weight:800; }
.property-stack code { display:block; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; }
.connection-tests { display:grid; gap:8px; min-width:210px; }
.connection-tests > div { display:grid; grid-template-columns:max-content minmax(0,1fr); align-items:start; gap:7px; }
.connection-tests .test-result { margin-top:4px; max-width:280px; }

@media (max-width: 620px) {
    .badge-stack { justify-items:start; }
    .search-console-panel .rank-meta a { max-width:72vw; }
}

.panel-note.compact { margin:0; }
.steps.compact { margin:0; }

/* v1.3.0 AdSense gelir görünümü */
.data-badge.adsense { color:#7a3e00; background:linear-gradient(90deg,var(--primary-soft),#fff8e7); border:1px solid #f3d49b; }
.adsense-toolbar { align-items:center; }
.range-buttons { display:flex; flex-wrap:wrap; gap:6px; }
.range-button { min-height:32px; padding:0 11px; border:1px solid var(--border); border-radius:9px; color:var(--muted); background:var(--surface); font-size:11px; font-weight:750; }
.range-button:hover { color:var(--text); border-color:var(--border-strong); background:var(--surface-2); }
.range-button.active { color:#7a3e00; border-color:#efc267; background:var(--primary-soft); box-shadow:inset 0 0 0 1px rgba(249,171,0,.12); }
.revenue-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; }
.revenue-card { min-width:0; padding:20px; border-right:1px solid var(--border); }
.revenue-card:last-child { border-right:0; }
.revenue-card span { display:block; color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.045em; }
.revenue-card strong { display:block; margin:10px 0 6px; color:#9a4d00; font-size:25px; letter-spacing:-.035em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.revenue-card small { color:var(--muted); font-size:10px; }
.adsense-notice { margin:16px 20px 0; font-size:11px; }
.adsense-grid { display:grid; grid-template-columns:minmax(300px,.72fr) minmax(0,1.28fr); gap:16px; }
.adsense-grid .detail-panel { min-height:410px; }
.adsense-footnote { margin:0 0 16px; }
.adsense-pages-panel .rank-meta a { display:inline-block; max-width:min(520px,58vw); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.adsense-pages-panel .rank-value { min-width:105px; }
.adsense-sites-panel .rank-value { min-width:105px; }

@media (max-width: 1100px) {
    .adsense-grid { grid-template-columns:1fr; }
}
@media (max-width: 900px) {
    .revenue-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .revenue-card:nth-child(2) { border-right:0; }
    .revenue-card:nth-child(-n+2) { border-bottom:1px solid var(--border); }
}
@media (max-width: 620px) {
    .adsense-toolbar { align-items:stretch; }
    .range-buttons { width:100%; }
    .range-button { flex:1 1 calc(50% - 6px); }
    .adsense-actions { align-items:stretch; flex-direction:column; width:100%; }
    .adsense-pages-panel .rank-meta a { max-width:68vw; }
}
@media (max-width: 440px) {
    .revenue-summary-grid { grid-template-columns:1fr; }
    .revenue-card { border-right:0; border-bottom:1px solid var(--border); }
    .revenue-card:nth-child(3) { border-bottom:1px solid var(--border); }
    .revenue-card:last-child { border-bottom:0; }
}
