* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f1f5f9; color: #0f172a; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.pbn-topbar { display: flex; align-items: center; gap: 24px; padding: 12px 24px; background: #0f172a; color: #fff; flex-wrap: wrap; }
.pbn-brand a { color: #fff; font-weight: 700; font-size: 18px; }
.pbn-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.pbn-nav a { color: #cbd5e1; padding: 8px 12px; border-radius: 8px; }
.pbn-nav a.active, .pbn-nav a:hover { background: #1e293b; color: #fff; text-decoration: none; }
.pbn-user { margin-left: auto; display: flex; gap: 12px; align-items: center; color: #cbd5e1; }
.pbn-main { max-width: 1400px; margin: 0 auto; padding: 24px; }
.pbn-breadcrumb { color: #64748b; margin-bottom: 8px; font-size: 14px; }
.pbn-page-title { font-size: 28px; margin-bottom: 8px; }
.pbn-page-desc { color: #64748b; margin-bottom: 20px; }
.page-container { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pbn-footer { text-align: center; padding: 24px; color: #94a3b8; font-size: 13px; }

.pbn-login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.pbn-login-box { background: #fff; padding: 32px; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.1); width: 100%; max-width: 420px; }
.pbn-login-box h1 { margin-bottom: 8px; }
.pbn-login-box p { color: #64748b; margin-bottom: 20px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; color: #334155; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px;
}
.btn { display: inline-block; padding: 10px 18px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; }
.btn-primary { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; }
.btn-secondary { background: #e2e8f0; color: #334155; }
.btn-danger { background: #ef4444; color: #fff; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; display: flex; gap: 8px; align-items: center; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.pbn-master-section { margin-top: 0; }
.pbn-header { margin-bottom: 20px; }
.pbn-header h1 { font-size: 28px; margin-bottom: 8px; }
.pbn-header .subtitle { color: #64748b; }
.pbn-section { margin-bottom: 20px; }
.pbn-form { margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.location-toggle { display: inline-flex; gap: 12px; }
.location-toggle input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.location-toggle .toggle-segment {
    display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px;
    border: 2px solid #e2e8f0; border-radius: 8px; cursor: pointer; font-weight: 500; min-width: 100px;
}
.location-toggle #location-footer:checked + .toggle-left { background: #10b981; color: #fff; border-color: #10b981; }
.location-toggle #location-home:checked + .toggle-right { background: #2563eb; color: #fff; border-color: #2563eb; }
.domains-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.domains-table th, .domains-table td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.domains-table th { background: #f8fafc; font-weight: 600; }
.domains-table tr:hover { background: #f8fafc; }
.domain-url { word-break: break-all; }
.new-badge { background: #fef3c7; color: #92400e; font-size: 11px; padding: 2px 6px; border-radius: 4px; margin-left: 6px; }
.pagination-container { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pagination-btn { padding: 6px 12px; border: 1px solid #e2e8f0; border-radius: 6px; color: #334155; }
.pagination-active { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-deselect-all { font-size: 12px; padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; cursor: pointer; }
.status-badge { padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.status-active { background: #dcfce7; color: #166534; }
.status-inactive { background: #fee2e2; color: #991b1b; }
.status-sent, .status-ok { background: #dcfce7; color: #166534; }
.status-fail { background: #fee2e2; color: #991b1b; }
.links-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.links-table th, .links-table td { padding: 10px; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
.links-table th { background: #f8fafc; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 768px) {
    .pbn-topbar { flex-direction: column; align-items: flex-start; }
    .pbn-user { margin-left: 0; }
    .domains-table, .links-table { display: block; overflow-x: auto; }
}
