/* Inbound SEO Hub — design tokens + base components */
:root {
    --orange: #F26522;
    --orange-dark: #d4551a;
    --orange-soft: #fff6f0;
    --charcoal: #3C3C43;
    --ink: #0f0f14;
    --text: #3C3C43;
    --text-muted: #8a8a92;
    --text-dim: #b4b4bc;
    --border: #f0f0f0;
    --border-strong: #e8e8ec;
    --bg: #ffffff;
    --bg-subtle: #fafafa;
    --green: #22a55a;
    --green-bg: #e6f9ec;
    --red: #e5484d;
    --red-bg: #fef2f2;
    --amber: #b45309;
    --amber-bg: #fef4e6;
    --blue: #2563eb;
    --blue-bg: #eff6ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

a { color: inherit; text-decoration: none; }
input, button, select, textarea { font-family: inherit; letter-spacing: -0.01em; }

/* ========== AUTH LAYOUT ========== */
.auth-layout { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth { width: 100%; max-width: 380px; padding: 40px 24px; }
.auth .brand { text-align: center; margin-bottom: 48px; }
.auth .brand img { height: 36px; }
.auth .brand .sub { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 3px; font-weight: 600; margin-top: 12px; }
.auth h1 { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.02em; }
.auth .subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 32px; }
.auth .field { margin-bottom: 20px; }
.auth .label { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.auth .input { width: 100%; padding: 12px 14px; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px; transition: border-color 0.15s, box-shadow 0.15s; }
.auth .input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15,15,20,0.06); }
.auth .input::placeholder { color: var(--text-dim); }
.auth .btn { width: 100%; padding: 12px 20px; font-size: 14px; font-weight: 600; background: var(--ink); color: #fff; border: none; border-radius: 8px; cursor: pointer; transition: background 0.15s; }
.auth .btn:hover { background: #000; }
.auth .btn-ghost { background: transparent; color: var(--text-muted); font-size: 13px; padding: 8px; margin-top: 8px; }
.auth .btn-ghost:hover { color: var(--ink); background: transparent; }
.auth .forgot { display: block; text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 20px; text-decoration: none; transition: color 0.15s; }
.auth .forgot:hover { color: var(--ink); }
.auth .footer { text-align: center; font-size: 11px; color: var(--text-dim); margin-top: 40px; text-transform: uppercase; letter-spacing: 2px; font-weight: 500; }
.auth .dot { color: var(--orange); }
.auth .error { background: var(--red-bg); color: var(--red); font-size: 12px; padding: 8px 12px; border-radius: 6px; margin-bottom: 16px; }
.auth .success { background: var(--green-bg); color: var(--green); font-size: 12px; padding: 8px 12px; border-radius: 6px; margin-bottom: 16px; }

.otp-group { display: flex; gap: 8px; justify-content: center; margin: 8px 0 24px; }
.otp { width: 44px; height: 52px; text-align: center; font-size: 20px; font-weight: 600; color: var(--ink); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px; }
.otp:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15,15,20,0.06); }

.icon-lock { width: 36px; height: 36px; background: var(--bg-subtle); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.icon-lock svg { width: 18px; height: 18px; stroke: var(--ink); }

/* ========== APP LAYOUT ========== */
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar { background: var(--bg); border-right: 1px solid var(--border); padding: 24px 12px 20px; display: flex; flex-direction: column; }
.sidebar-brand { padding: 0 12px 28px; }
.sidebar-brand img { height: 26px; }
.nav-section { margin-bottom: 20px; }
.nav-label { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; padding: 0 12px 8px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px; color: var(--text-muted); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: all 0.12s; margin-bottom: 2px; text-decoration: none; }
.nav-link:hover { background: var(--bg-subtle); color: var(--ink); }
.nav-link.active { background: var(--bg-subtle); color: var(--ink); font-weight: 600; }
.nav-link.active svg { stroke: var(--orange); }
.nav-link svg { width: 16px; height: 16px; stroke-width: 1.75; flex-shrink: 0; }
.nav-link .count { margin-left: auto; font-size: 11px; background: var(--orange); color: #fff; padding: 1px 7px; border-radius: 10px; font-weight: 600; }

.sidebar-user { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.sidebar-user .name { font-size: 12px; font-weight: 600; color: var(--ink); }
.sidebar-user .role { font-size: 10px; color: var(--text-dim); }
.sidebar-user .logout { margin-left: auto; color: var(--text-dim); transition: color 0.15s; background: none; border: none; cursor: pointer; padding: 4px; }
.sidebar-user .logout:hover { color: var(--ink); }
.sidebar-user .logout svg { width: 15px; height: 15px; stroke-width: 1.75; }

.main { padding: 0; min-width: 0; }
.topbar { display: flex; align-items: center; padding: 16px 32px; border-bottom: 1px solid var(--border); gap: 16px; }
.search { flex: 1; position: relative; max-width: 420px; }
.search input { width: 100%; padding: 8px 12px 8px 34px; font-size: 13px; background: var(--bg-subtle); border: 1px solid transparent; border-radius: 6px; color: var(--ink); }
.search input:focus { outline: none; border-color: var(--border-strong); background: #fff; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; stroke: var(--text-dim); stroke-width: 2; }
.topbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.content { padding: 32px; max-width: 1400px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.page-sub { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* ========== BUTTONS ========== */
.btn { font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 6px; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.12s; text-decoration: none; }
.btn svg { width: 14px; height: 14px; stroke-width: 2; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-secondary { background: var(--bg); color: var(--ink); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--bg-subtle); }
.btn-danger { background: transparent; color: var(--red); border: 1px solid var(--border-strong); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }

/* ========== STATS ========== */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 24px; font-weight: 800; color: var(--ink); margin-top: 4px; letter-spacing: -0.02em; }
.stat-delta { font-size: 11px; color: var(--green); margin-top: 4px; font-weight: 600; }
.stat-delta.down { color: var(--red); }
.stat-delta.muted { color: var(--text-muted); }

/* ========== TABLES ========== */
.table-wrap { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 12px 18px; font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--ink); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-subtle); }

/* ========== STATUS CHIPS ========== */
.status-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.3px; }
.status-chip.live { background: var(--green-bg); color: var(--green); }
.status-chip.verified { background: #e6f9ec; color: #059669; }
.status-chip.verified::before { content: '✓'; font-weight: 800; }
.status-chip.pending-verify, .status-chip.pending { background: var(--amber-bg); color: var(--amber); }
.status-chip.submitted { background: var(--blue-bg); color: var(--blue); }
.status-chip.rejected { background: var(--red-bg); color: var(--red); }

/* ========== EMPTY STATE ========== */
.empty { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty h3 { font-size: 16px; color: var(--ink); font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.empty p { font-size: 13px; margin-bottom: 16px; }

/* ========== FLASH MESSAGES ========== */
.flash { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.flash-success { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }
.flash-warn { background: var(--amber-bg); color: var(--amber); }

/* ========== MODALS ========== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,15,20,0.4); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 200; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.modal-backdrop.show { display: flex; }
.modal { background: var(--bg); border-radius: 12px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 4px; display: flex; }
.modal-close:hover { background: var(--bg-subtle); color: var(--ink); }
.modal-close svg { width: 16px; height: 16px; stroke-width: 2; }
.modal-body { padding: 20px; }
.modal-body .field { margin-bottom: 14px; }
.modal-body .field:last-child { margin-bottom: 0; }
.modal-body .label { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.modal-body .input,
.modal-body .select,
.modal-body .textarea { width: 100%; padding: 10px 12px; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 6px; font-family: inherit; letter-spacing: -0.01em; transition: all 0.15s; }
.modal-body .input:focus,
.modal-body .select:focus,
.modal-body .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15,15,20,0.06); }
.modal-body .textarea { resize: vertical; min-height: 50px; }
.modal-body .select { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a92' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.modal-actions { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.grid-2m { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ========== FORM FIELDS (global) ========== */
.input, .select, .textarea { width: 100%; padding: 10px 12px; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--border-strong); border-radius: 6px; font-family: inherit; letter-spacing: -0.01em; transition: all 0.15s; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15,15,20,0.06); }
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.textarea { resize: vertical; min-height: 50px; }
.select { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a92' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.label { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

/* ========== INLINE STATUS SELECT ========== */
.status-select { font-family: inherit; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink); cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 20px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238a8a92' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; }

/* ========== TIER BADGES ========== */
.tier-badge { font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.tier-badge.t1 { background: var(--orange-soft); color: var(--orange); }
.tier-badge.t2 { background: var(--blue-bg); color: var(--blue); }
.tier-badge.t3 { background: var(--bg-subtle); color: var(--text-muted); }

/* ========== PRIORITY BADGES ========== */
.priority { font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.3px; }
.priority-high { background: #fef2f2; color: var(--red); }
.priority-med { background: #fffbeb; color: #92400e; }
.priority-low { background: var(--bg-subtle); color: var(--text-muted); }

/* ========== PAGINATION ========== */
nav[role="navigation"] { margin-top: 16px; }
nav[role="navigation"] svg { width: 16px !important; height: 16px !important; }
nav[role="navigation"] a, nav[role="navigation"] span { font-size: 12px !important; padding: 6px 10px !important; }
.relative nav div:first-child { display: none; }
