/* SEO Panel - Dark Elegant Theme */
:root {
    --bg: #0f172a;
    --card: #1e293b;
    --card-hover: #334155;
    --accent: #38bdf8;
    --accent-dim: #0ea5e9;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #22c55e;
    --warning: #eab308;
    --danger: #ef4444;
    --radius: 8px;
    --font: 'Inter', -apple-system, sans-serif;
    /* Piramida / aksen (inspirasi palet modern) */
    --pyramid-cyan: rgba(56, 189, 248, 0.85);
    --pyramid-violet: rgba(167, 139, 250, 0.55);
    --pyramid-mint: rgba(52, 211, 153, 0.75);
    --pyramid-glow: 0 0 24px rgba(56, 189, 248, 0.12);
}

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

/* Layout Main — mesh + sidebar aksen (beda jelas dari halaman polos) */
.layout-main {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 90% 60% at 0% 0%, rgba(56, 189, 248, 0.09), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 20%, rgba(167, 139, 250, 0.06), transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(52, 211, 153, 0.05), transparent 45%),
        var(--bg);
}
.sidebar {
    position: relative;
    width: 252px;
    min-width: 252px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.92) 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 0;
    box-shadow: 4px 0 32px -8px rgba(0, 0, 0, 0.35);
}
.sidebar::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), rgba(52, 211, 153, 0.75), rgba(167, 139, 250, 0.5));
    opacity: 0.95;
    pointer-events: none;
}
.sidebar-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.25rem 0 1rem;
}
.sidebar-brand {
    display: block;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 0 1.5rem 0.85rem;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.15s;
}
.sidebar-brand:hover {
    opacity: 0.92;
}
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 0.5rem;
}
.sidebar-nav-label {
    display: block;
    padding: 0.85rem 1.5rem 0.25rem;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0.75;
}
.sidebar-nav-label:first-child {
    padding-top: 0.25rem;
}
.sidebar-nav .nav-item,
.sidebar-account .nav-item {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
    font-size: 0.9rem;
}
.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active,
.sidebar-account .nav-item:hover,
.sidebar-account .nav-item.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent);
}
.sidebar-account {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.12), transparent 70%);
}
.sidebar-account .nav-item-logout {
    color: var(--text-muted);
}
.sidebar-account .nav-item-logout:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

.main-content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-x: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, transparent 28%);
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}
.user-badge {
    background: var(--card);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-muted);
}
.topbar-user {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    justify-content: flex-end;
}
.topbar-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
}
.topbar-link:hover {
    text-decoration: underline;
}
.topbar-link-logout {
    color: var(--text-muted);
}
.topbar-link-logout:hover {
    color: #fca5a5;
    text-decoration: none;
}
.topbar-sep {
    color: var(--border);
    user-select: none;
    font-weight: 300;
}

.page-intro {
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.page-intro-text {
    flex: 1;
    min-width: 220px;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
}
.page-intro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.text-link-back {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 0.5rem;
}
.text-link-back:hover {
    text-decoration: underline;
}

/* Auth layout */
.layout-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.auth-box {
    width: 100%;
    max-width: 400px;
}
.auth-card {
    background: var(--card);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border);
}
.auth-title {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
    color: var(--accent);
}
.auth-subtitle {
    margin: 0 0 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.auth-form .form-group {
    margin-bottom: 1rem;
}
.auth-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.auth-form input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 1rem;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
}
.auth-hint {
    margin: 1rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Login — selaras tema panel */
.layout-auth-panel {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: var(--bg);
}
.login-page {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
}
.login-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(56, 189, 248, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(52, 211, 153, 0.08), transparent 50%),
        linear-gradient(180deg, #0f172a 0%, #0c1222 100%);
    pointer-events: none;
}
.login-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.6;
}
.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1040px;
    width: 100%;
    margin: auto;
    min-height: 100vh;
    box-shadow: 0 0 100px -24px rgba(56, 189, 248, 0.22), 0 0 1px rgba(56, 189, 248, 0.4);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}
.login-side {
    display: flex;
    align-items: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(165deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.92));
    border-right: 1px solid rgba(51, 65, 85, 0.8);
}
.login-side-inner { max-width: 320px; margin: 0 auto; }
.login-logo {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(100deg, var(--text), var(--accent), var(--pyramid-mint, #34d399));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.75rem;
}
.login-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 1.25rem;
}
.login-bullets {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.7;
}
.login-bullets li { margin-bottom: 0.35rem; }
.login-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: rgba(15, 23, 42, 0.65);
}
.login-form-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem 1.85rem;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: linear-gradient(155deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.88) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 28px 56px -28px rgba(0, 0, 0, 0.65),
        0 0 48px -20px rgba(56, 189, 248, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.login-form-title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}
.login-form-sub {
    margin: 0 0 1.35rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.login-form .form-group { margin-bottom: 1rem; }
.login-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}
.login-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login-input:focus {
    outline: none;
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}
.login-captcha-block label { margin-bottom: 0.5rem; }
.login-captcha-hint { font-weight: 400; opacity: 0.85; }
.login-captcha-display {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(167, 139, 250, 0.1));
    border: 1px solid rgba(56, 189, 248, 0.25);
    user-select: none;
}
.login-captcha-char {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.5rem;
    padding: 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--accent);
    font-family: var(--font);
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}
.login-captcha-input {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}
.login-captcha-refresh {
    margin: 0.4rem 0 0;
    font-size: 0.75rem;
}
.login-link-muted {
    color: var(--accent);
    text-decoration: none;
    opacity: 0.85;
}
.login-link-muted:hover { text-decoration: underline; opacity: 1; }
.login-submit { margin-top: 0.25rem; padding: 0.7rem 1rem; border-radius: 10px; font-weight: 600; }
.login-foot-hint {
    margin: 1.15rem 0 0;
    font-size: 0.7rem;
    text-align: center;
    opacity: 0.65;
}
@media (max-width: 768px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .login-side {
        border-right: none;
        border-bottom: 1px solid rgba(51, 65, 85, 0.8);
        padding: 1.5rem 1.25rem;
    }
    .login-form-wrap { padding: 1.5rem 1rem; }
}

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}
.card-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}
.card-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

/* Stats */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    text-align: center;
    padding: 1.25rem;
}
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.stat-card.stat-active .stat-value { color: var(--success); }
.stat-card.stat-dead .stat-value { color: var(--danger); }
.stat-card.stat-redirect .stat-value { color: var(--accent); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    transition: background .15s, opacity .15s;
}
.btn-primary {
    background: var(--accent);
    color: var(--bg);
}
.btn-primary:hover {
    background: var(--accent-dim);
}
.btn-danger {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}
.btn-danger:hover {
    background: var(--danger);
    opacity: 0.95;
}
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    background: var(--card-hover);
    color: var(--text);
}
.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}
.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
input[type="text"],
input[type="password"],
input[type="number"],
input[type="url"],
select {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font);
}
input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
}
.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.form.compact .form-group {
    margin-bottom: 0.75rem;
}
.inline-form {
    display: inline;
}
.inline-form select {
    width: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Table */
.table-wrap {
    overflow-x: auto;
    margin: 0 -0.5rem;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table th,
.table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}
.text-muted {
    color: var(--text-muted);
}
.ml { margin-left: 0.5rem; }
.mt { margin-top: 0.75rem; }
.mt-lg { margin-top: 1.5rem; }

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}
.badge-success { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge-danger  { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-info    { background: rgba(56, 189, 248, 0.2); color: var(--accent); }
.badge-warning { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.badge-secondary { background: var(--border); color: var(--text-muted); }
.badge-toxic-safe  { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.badge-toxic-risky { background: rgba(234, 179, 8, 0.2); color: #facc15; }
.badge-toxic-toxic { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-type-putih { background: rgba(248, 250, 252, 0.25); color: #e2e8f0; }
.badge-type-hitam { background: rgba(30, 41, 59, 0.8); color: #94a3b8; border: 1px solid #475569; }

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-success { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.alert-error   { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Toolbar */
.toolbar {
    margin-bottom: 1rem;
}
.toolbar-left,
.toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

/* Detail */
.detail-header .card { margin-bottom: 0; }
.domain-name { margin: 0 0 0.25rem; font-size: 1.25rem; }
.domain-status-box { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--text-muted); }
.domain-status-box strong { color: var(--text); }
.redirect-info { margin-left: 0.5rem; color: var(--accent); }
.flex-between {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.detail-header-actions,
.domain-edit-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.inline-delete-form {
    display: inline;
    margin: 0;
}
.td-actions { white-space: nowrap; vertical-align: middle; }
.domain-delete-zone {
    padding-top: 1rem;
    border-top: 1px dashed rgba(239, 68, 68, 0.35);
    margin-top: 1.25rem;
}

.domain-tier-hint-card {
    border-color: rgba(56, 189, 248, 0.22);
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.06), transparent 55%);
    margin-bottom: 1rem;
}
.domain-tier-hint-list {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.875rem;
    line-height: 1.6;
}
.domain-tier-hint-list li {
    margin-bottom: 0.35rem;
}
.domain-tier-line {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}
.domain-tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(56, 189, 248, 0.18);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.35);
    margin-right: 0.35rem;
    vertical-align: middle;
}
.domain-tier-badge--header {
    margin-left: 0.35rem;
    margin-right: 0;
    text-transform: none;
    font-size: 0.75rem;
}
.domain-status-box .domain-status-row {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.domain-status-box .domain-status-row strong {
    color: var(--text);
}
.domain-ts-hint {
    font-size: 0.78rem;
    opacity: 0.85;
}
.detail-inline-link {
    margin-left: 0.35rem;
    font-size: 0.8125rem;
    color: var(--accent);
    text-decoration: none;
}
.detail-inline-link:hover {
    text-decoration: underline;
}
.pondasi-fieldset--disabled {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
    background: rgba(0, 0, 0, 0.12);
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Anchor ratio */
.anchor-ratio { margin-top: 0.5rem; }
.ratio-bar {
    display: flex;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--bg);
    margin-bottom: 0.5rem;
}
.ratio-seg.branded { background: var(--accent); }
.ratio-seg.exact   { background: var(--success); }
.ratio-seg.generic { background: var(--text-muted); }
.ratio-labels {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* List */
.list-muted {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.list-muted li { padding: 0.2rem 0; }

.aging-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.aging-stats .aging-item { color: var(--text-muted); font-size: 0.9rem; }
.aging-stats .aging-item strong { color: var(--accent); margin-right: 0.25rem; }

/* Pondasi Pyramid */
.pyramid-layers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.pyramid-layers-flow {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.pyramid-layer { padding: 1.1rem 1.15rem; border-radius: 12px; border: 1px solid var(--border); position: relative; overflow: hidden; }
.pyramid-layer::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.5;
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.04), transparent 55%);
}
.pyramid-layer > * { position: relative; z-index: 1; }
.pyramid-layer.pondasi { background: linear-gradient(160deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04)); border-color: rgba(34, 197, 94, 0.38); box-shadow: var(--pyramid-glow); }
.pyramid-layer.tier2 { background: rgba(56, 189, 248, 0.08); border-color: rgba(56, 189, 248, 0.3); }
.pyramid-layer.tier3 { background: rgba(148, 163, 184, 0.1); border-color: var(--border); }
.pyramid-layer.tier-layer--top {
    background: linear-gradient(165deg, rgba(56, 189, 248, 0.14), rgba(167, 139, 250, 0.08));
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 12px 40px -18px rgba(56, 189, 248, 0.35);
}
.pyramid-layer.tier-layer--one { border-color: rgba(56, 189, 248, 0.28); }
.pyramid-layer.tier-layer--zero { border-width: 1px; }
.pyramid-layer-title { margin: 0 0 0.25rem; font-size: 1.05rem; color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pyramid-layer-desc { margin: 0 0 0.75rem; font-size: 0.8rem; color: var(--text-muted); line-height: 1.45; }
.pyramid-list { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.pyramid-list li { padding: 0.35rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.pyramid-list li:last-child { border-bottom: none; }
.pyramid-list a { color: var(--accent); text-decoration: none; }
.pyramid-list a:hover { text-decoration: underline; }

.tier-badge {
    display: inline-block;
    font-size: 0.62rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    vertical-align: middle;
}
.tier-badge--inline { font-size: 0.65rem; }
.tier-badge--awal {
    background: linear-gradient(100deg, rgba(56, 189, 248, 0.22), rgba(167, 139, 250, 0.2));
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.12);
}
.tier-badge--akhir {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

/* Estafet chains */
.estafet-chains { display: flex; flex-direction: column; gap: 1rem; }
.estafet-chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.9));
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.15);
    font-size: 0.9rem;
    box-shadow: 0 8px 28px -12px rgba(0, 0, 0, 0.45);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.estafet-chain:hover {
    border-color: rgba(56, 189, 248, 0.28);
    box-shadow: 0 12px 36px -14px rgba(56, 189, 248, 0.15);
}
.estafet-label { color: var(--text-muted); margin-right: 0.5rem; font-size: 0.8rem; font-weight: 600; }
.estafet-arrow { color: var(--pyramid-cyan); font-weight: 700; opacity: 0.85; }
.estafet-node {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    background: var(--card);
    border-radius: 6px;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid rgba(56, 189, 248, 0.12);
}
.estafet-node-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.estafet-node--has-bl { border-color: rgba(52, 211, 153, 0.35); }
.estafet-node:hover { background: var(--card-hover); border-color: rgba(56, 189, 248, 0.25); }
.estafet-node.external { color: var(--text-muted); border-color: var(--border); }

.node-bl-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    font-size: 0.62rem;
    font-weight: 800;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.35), rgba(56, 189, 248, 0.25));
    color: #ecfdf5;
    border: 1px solid rgba(52, 211, 153, 0.45);
    line-height: 1;
}
.node-bl-badge--pondasi {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.45), rgba(52, 211, 153, 0.3));
}
.node-bl-badge--inline { vertical-align: middle; margin-left: 0.25rem; }
.node-bl-badge--demo { opacity: 0.85; cursor: default; }
.pyramid-legend-bl { white-space: normal; }

.backlink-toolbar-btns { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: flex-end; }
.backlink-import-block {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}
.backlink-import-title { margin: 0 0 0.5rem; font-size: 0.95rem; }
.backlink-import-hint { font-size: 0.78rem; line-height: 1.5; margin: 0 0 0.75rem; }
.backlink-import-hint code { font-size: 0.72rem; background: var(--bg); padding: 0.1rem 0.35rem; border-radius: 4px; }
.backlink-import-textarea {
    width: 100%;
    min-height: 140px;
    padding: 0.65rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    line-height: 1.45;
    resize: vertical;
}
.backlink-import-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.12);
}
.td-url { max-width: 220px; word-break: break-all; font-size: 0.82rem; }
.backlink-url-link { color: var(--accent); }

/* Pyramid prefs & visual */
.pyramid-prefs-form { margin-top: 0.5rem; }
.pyramid-prefs-row { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-end; }
.pyramid-prefs-row .form-group { margin-bottom: 0; min-width: 200px; }
.pyramid-prefs-row .form-group-actions { align-self: flex-end; }
.tier-stepper { display: flex; align-items: center; gap: 0.35rem; }
.tier-stepper input { width: 4rem; text-align: center; }

.card-pyramid-dash {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border-color: rgba(56, 189, 248, 0.14);
    box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.55), var(--pyramid-glow);
}
.card-pyramid-dash::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(125deg, rgba(56, 189, 248, 0.07), transparent 42%, rgba(52, 211, 153, 0.05));
    z-index: 0;
}
.card-pyramid-dash > * { position: relative; z-index: 1; }

.pyramid-dash-title {
    background: linear-gradient(90deg, var(--text), var(--accent), var(--pyramid-mint));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.pyramid-dash-lead { font-size: 0.875rem; line-height: 1.55; }

.pyramid-visual-wrap {
    padding: 1.35rem 1.1rem;
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(51, 65, 85, 0.85);
    background:
        radial-gradient(ellipse 70% 55% at 50% 0%, rgba(56, 189, 248, 0.1), transparent 58%),
        linear-gradient(180deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.35));
}
.pyramid-visual { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 280px; }

.pyramid-visual-row {
    margin: 0 auto;
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.1), rgba(56, 189, 248, 0.03));
    transition: width 0.25s ease, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 4px 20px -8px rgba(0, 0, 0, 0.4);
}
.pyramid-visual-row:hover { border-color: rgba(56, 189, 248, 0.35); }
.pyramid-visual-row.tier-row--top {
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.12), rgba(56, 189, 248, 0.08));
    border-color: rgba(167, 139, 250, 0.35);
}
.pyramid-visual-row.tier-row--upper-base {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0.04));
}
.pyramid-visual-row.tier-row--mid { background: linear-gradient(180deg, rgba(56, 189, 248, 0.08), rgba(56, 189, 248, 0.02)); }
.pyramid-visual-row.pyramid-visual-pondasi,
.pyramid-visual-row.tier-row--zero {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.14), rgba(34, 197, 94, 0.05));
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 0 8px 28px -10px rgba(34, 197, 94, 0.25);
}

.pyramid-visual-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.tier-label-name { font-weight: 700; color: var(--text); letter-spacing: 0.04em; }

.pyramid-visual-connector {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.15rem 0;
    min-height: 1.1rem;
    width: 100%;
}
.pyramid-visual-connector-glyph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    line-height: 1;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.22);
    opacity: 0.9;
}

.pyramid-visual-nodes { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; align-items: center; }
.pyramid-node {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    padding: 0.28rem 0.55rem;
    background: rgba(30, 41, 59, 0.95);
    border-radius: 8px;
    color: var(--accent);
    text-decoration: none;
    max-width: 100%;
    border: 1px solid rgba(56, 189, 248, 0.12);
    transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.pyramid-node-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}
.pyramid-node--has-bl {
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 0 16px -6px rgba(52, 211, 153, 0.35);
}
.pyramid-node:hover {
    background: var(--card-hover);
    border-color: rgba(56, 189, 248, 0.35);
    transform: translateY(-1px);
}
.pyramid-node.pondasi-node { color: #4ade80; border-color: rgba(34, 197, 94, 0.25); }
.pyramid-empty { font-size: 0.85rem; }
.pyramid-layer.tier-dynamic { border-color: rgba(56, 189, 248, 0.22); }
.pyramid-overflow {
    padding: 1rem 1.15rem;
    border: 1px dashed rgba(234, 179, 8, 0.35);
    border-radius: 12px;
    background: rgba(234, 179, 8, 0.04);
}
.estafet-pondasi-block {
    padding: 1.1rem;
    background: linear-gradient(160deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.04));
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.32);
    box-shadow: 0 8px 24px -14px rgba(34, 197, 94, 0.2);
}
.estafet-chains-large .estafet-chain { padding: 1rem 1.1rem; font-size: 0.95rem; }

.card-estafet-compact { border-color: rgba(51, 65, 85, 0.9); }

/* Mobile */
@media (max-width: 768px) {
    .layout-main { flex-direction: column; }
    .pyramid-layers { grid-template-columns: 1fr; }
    .estafet-chain { flex-direction: column; align-items: flex-start; }
    .pyramid-prefs-row { flex-direction: column; align-items: stretch; }
    .sidebar {
        width: 100%;
        min-width: 0;
    }
    .sidebar-inner {
        min-height: auto;
        padding: 0.75rem 0;
    }
    .sidebar-brand { padding: 0 1rem 0.5rem; }
    .sidebar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.2rem;
        flex: none;
        overflow: visible;
        padding: 0 0.5rem 0.5rem;
    }
    .sidebar-nav-label {
        width: 100%;
        padding: 0.5rem 0.75rem 0.15rem;
    }
    .sidebar-nav .nav-item { padding: 0.4rem 0.65rem; border-radius: 6px; }
    .sidebar-account {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.2rem;
        width: 100%;
        margin-top: 0;
        padding: 0.5rem 0.75rem 0;
        border-top: 1px solid var(--border);
        background: transparent;
    }
    .sidebar-account .sidebar-nav-label {
        width: auto;
        padding: 0.4rem 0.5rem 0.4rem 0;
    }
    .sidebar-account .nav-item { padding: 0.4rem 0.65rem; border-radius: 6px; }
    .main-content { padding: 1rem; }
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
    .flex-between { flex-direction: column; }
}
