:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --sidebar: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-active: #334155;
    --sidebar-text: #94a3b8;
    --sidebar-text-active: #f8fafc;
    --text: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

.text-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
}
.text-link:hover { text-decoration: underline; }

/* Logo */
.logo-mark {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--primary);
}

.sidebar .logo-mark { color: #818cf8; }

/* App shell */
.app-body { min-height: 100vh; }

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--sidebar);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-brand:hover { background: transparent; }

.brand-text { display: flex; flex-direction: column; }
.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.02em;
}
.brand-tagline {
    font-size: 11px;
    color: var(--sidebar-text);
    font-weight: 500;
}

/* Workspace switcher (sidebar) */
.workspace-switcher {
    position: relative;
    padding: 12px 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.workspace-trigger,
.workspace-readonly {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 10px;
    border: 1px solid #334155;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #1e293b 0%, #172033 100%);
    color: var(--sidebar-text-active);
    font-family: var(--font);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.workspace-trigger:hover,
.workspace-switcher.is-open .workspace-trigger {
    border-color: #6366f1;
    background: #1e293b;
}
.workspace-readonly {
    cursor: default;
    border-color: #334155;
}
.workspace-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}
.workspace-icon svg { width: 18px; height: 18px; }
.workspace-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.workspace-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}
.workspace-name {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.workspace-slug {
    font-size: 11px;
    color: #94a3b8;
    font-family: ui-monospace, monospace;
}
.workspace-chevron {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.workspace-switcher.is-open .workspace-chevron {
    transform: rotate(180deg);
}
.workspace-menu {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% - 4px);
    z-index: 300;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    padding: 8px;
    max-height: 280px;
    overflow-y: auto;
}
.workspace-menu-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 6px 8px 4px;
}
.workspace-options {
    list-style: none;
    margin: 0;
    padding: 0;
}
.workspace-options form { margin: 0; }
.workspace-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: #e2e8f0;
    font-family: var(--font);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
}
.workspace-option:hover { background: #334155; }
.workspace-option.is-active {
    background: rgba(99, 102, 241, 0.25);
    color: #fff;
}
.workspace-option-name { font-weight: 600; flex: 1; }
.workspace-option-slug {
    font-size: 11px;
    color: #94a3b8;
    font-family: ui-monospace, monospace;
    width: 100%;
}
.workspace-option-check {
    color: #818cf8;
    font-weight: 700;
    font-size: 14px;
}
.workspace-manage-link {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #a5b4fc;
    text-align: center;
    border-top: 1px solid #334155;
}
.workspace-manage-link:hover {
    color: #c7d2fe;
    text-decoration: none;
}

/* Tenants admin page */
.tenants-layout {
    display: grid;
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 24px;
    align-items: start;
}
.tenants-create-card { position: sticky; top: 20px; }
.tenants-create-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 20px 20px;
}
.tenants-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.tenant-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    scroll-margin-top: 20px;
}
.tenant-card.is-focused {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.tenant-card.is-inactive { opacity: 0.85; }
.tenant-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(180deg, #fafbff 0%, var(--surface) 100%);
}
.tenant-card-identity {
    display: flex;
    align-items: center;
    gap: 14px;
}
.tenant-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tenant-card-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}
.tenant-card-slug-display code {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 4px;
}
.tenant-card-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.tenant-status {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}
.tenant-status-active {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.tenant-status-off {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}
.tenant-member-count {
    font-size: 12px;
    color: var(--text-secondary);
}
.tenant-edit-form { padding: 16px 20px 0; }
.tenant-edit-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    padding: 0;
}
.tenants-create-form .field + .field,
.tenant-edit-form .field,
.tenant-grant-form .field {
    margin-bottom: 0;
}
.tenant-grant-form .field {
    margin-bottom: 12px;
}
.tenant-active-field { display: flex; align-items: flex-end; }
.checkbox-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
}
.checkbox-card input { accent-color: var(--primary); }
.tenant-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px 16px;
    border-bottom: 1px solid var(--border-light);
}
.tenant-open-form {
    padding: 0 20px 16px;
    margin-top: -8px;
}
.field-hint {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}
.slug-preview {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--primary);
    font-family: ui-monospace, monospace;
}
.tenant-access {
    padding: 16px 20px 20px;
    background: var(--bg);
}
.tenant-access-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.tenant-access-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}
.tenant-member-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.tenant-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.tenant-member-info strong { display: block; font-size: 13px; }
.tenant-member-info span { font-size: 12px; color: var(--text-secondary); }
.tenant-access-empty {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.tenant-grant-details summary {
    list-style: none;
    cursor: pointer;
}
.tenant-grant-details summary::-webkit-details-marker { display: none; }
.tenant-grant-panel {
    margin-top: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.tenant-grant-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.tenant-grant-tab {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    color: var(--text-secondary);
}
.tenant-grant-tab.is-active {
    background: var(--primary-light);
    border-color: #c7d2fe;
    color: var(--primary);
}
.tenant-grant-form.is-hidden { display: none; }
.btn-danger-text { color: var(--danger) !important; }
.btn-danger-text:hover { background: var(--danger-bg) !important; }
.tenants-empty {
    padding: 32px;
    text-align: center;
    color: var(--text-secondary);
}

@media (max-width: 960px) {
    .tenants-layout { grid-template-columns: 1fr; }
    .tenants-create-card { position: static; }
    .tenant-edit-grid { grid-template-columns: 1fr; }
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 12px 10px 6px;
}

.nav-item,
.nav-child {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius);
    color: var(--sidebar-text);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.nav-item {
    margin-bottom: 2px;
}
.nav-item:hover,
.nav-child:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
    text-decoration: none;
}
.nav-item.is-active,
.nav-child.is-active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}
.nav-item.is-parent-active {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
}
.nav-label {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.nav-icon,
.nav-child-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.72;
}
.nav-item.is-active .nav-icon,
.nav-child.is-active .nav-child-icon { opacity: 1; }
.nav-child-icon { opacity: 0.55; }
.nav-child:hover .nav-child-icon,
.nav-child.is-active .nav-child-icon { opacity: 1; }

/* GMB nav group (collapsible parent + children) */
.nav-group {
    margin-bottom: 4px;
}
.nav-group-collapsible .nav-parent-row {
    display: flex;
    align-items: stretch;
    gap: 2px;
}
.nav-item-parent {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}
.nav-item-parent .nav-badge-parent {
    margin-left: auto;
    flex-shrink: 0;
}
.nav-group-collapsible.is-open .nav-badge-parent {
    display: none;
}
.nav-group-collapsible:not(.is-open) .nav-badge-child {
    display: none;
}
.nav-group-collapsible .nav-child .nav-badge-child {
    margin-left: auto;
    flex-shrink: 0;
}
.nav-expand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    flex-shrink: 0;
    margin-bottom: 2px;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.nav-expand:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}
.nav-expand-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}
.nav-group-collapsible.is-open .nav-expand-icon {
    transform: rotate(180deg);
}
.nav-group-collapsible .nav-children {
    list-style: none;
    margin: 0 0 4px;
    padding: 0 0 0 22px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.15s ease, margin 0.2s ease;
}
.nav-group-collapsible.is-open .nav-children {
    max-height: 48px;
    opacity: 1;
    margin-top: 2px;
}
.nav-children li { margin: 0; }
.nav-group-collapsible .nav-child {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    color: var(--sidebar-text);
    text-decoration: none;
}
.nav-child-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    flex-shrink: 0;
}
.nav-child.is-active .nav-child-dot {
    opacity: 1;
    background: #a5b4fc;
}
.nav-child:hover,
.nav-child.is-active {
    color: var(--sidebar-text-active);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.locale-switcher {
    margin-bottom: 12px;
}

.locale-switcher-form {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.locale-btn {
    flex: 1;
    padding: 7px 10px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.locale-btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
}

.locale-btn.is-active {
    color: #f8fafc;
    background: rgba(99, 102, 241, 0.35);
    box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.25);
}

.auth-form-wrap .locale-switcher {
    margin-top: 20px;
}

.auth-form-wrap .locale-switcher-form {
    background: var(--bg);
    border-color: var(--border-light);
}

.auth-form-wrap .locale-btn {
    color: var(--text-secondary);
}

.auth-form-wrap .locale-btn:hover {
    color: var(--text);
    background: var(--surface);
}

.auth-form-wrap .locale-btn.is-active {
    color: var(--primary);
    background: var(--primary-light);
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-meta { min-width: 0; }
.user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-email {
    display: block;
    font-size: 11px;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-area {
    flex: 1;
    margin-left: 260px;
    min-width: 0;
}

.page-content {
    padding: 32px 40px 48px;
    max-width: 1280px;
}

/* Page header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

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

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.stat-icon-blue { background: #3b82f6; }
.stat-icon-indigo { background: var(--primary); }
.stat-icon-green { background: #10b981; }
.stat-icon-teal { background: #14b8a6; }
.stat-icon-amber { background: #ea580c; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1;
}

/* Grid & cards */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
}
.card-header h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

/* Tables */
.table-wrap { overflow-x: auto; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    text-align: left;
    padding: 10px 20px;
    background: var(--bg);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr:hover { background: #fafbfc; }
.table tbody tr:last-child td { border-bottom: none; }

.cell-primary {
    display: block;
    font-weight: 500;
    color: var(--text);
}
.cell-secondary {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.cell-action { text-align: right; }

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}
.inline { display: inline; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
    white-space: nowrap;
}
.badge-pendiente { background: #fffbeb; color: #b45309; }
.badge-en-progreso { background: #ede9fe; color: #5b21b6; }
.badge-en_progreso, .badge-en_revision { background: var(--primary-light); color: var(--primary); }
.badge-optimizado, .badge-verificado { background: #ecfdf5; color: #047857; }
.badge-revisar { background: var(--danger-bg); color: var(--danger); }
.badge-no_aprobada { background: #fef2f2; color: #b91c1c; }
.badge-suspendido { background: #f1f5f9; color: #475569; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--bg);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}

.sidebar .btn-ghost {
    color: var(--sidebar-text);
    border-color: #334155;
}
.sidebar .btn-ghost:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.btn-danger-ghost {
    background: transparent;
    color: var(--danger);
    border-color: transparent;
}
.btn-danger-ghost:hover { background: var(--danger-bg); }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-block, .btn-full { width: 100%; }

/* Forms */
.form-card { padding: 28px; max-width: 760px; }

.form .field,
.tenants-create-form .field,
.tenant-edit-form .field,
.tenant-grant-form .field {
    margin-bottom: 0;
}

.form label,
.field > label,
.field > .label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.form select,
.form textarea,
.field > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.field > select,
.field > textarea,
.tenants-create-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.tenants-create-form select,
.tenants-create-form textarea,
.tenant-edit-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.tenant-edit-form select,
.tenant-grant-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.tenant-grant-form select,
.user-panel-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.user-panel-form select,
.users-modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.users-modal-body select,
.saas-grant-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.saas-grant-form select,
.gmb-profile-archive-note-form textarea,
.page-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.page-content select,
.page-content textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.page-content select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
}

.form input::placeholder,
.field > input::placeholder,
.tenants-create-form input::placeholder,
.tenant-edit-form input::placeholder,
.tenant-grant-form input::placeholder,
.user-panel-form input::placeholder,
.page-content input::placeholder {
    color: #94a3b8;
}

.form input:not([type="checkbox"]):not([type="radio"]):focus,
.form select:focus,
.form textarea:focus,
.field > input:not([type="checkbox"]):not([type="radio"]):focus,
.field > select:focus,
.field > textarea:focus,
.tenants-create-form input:not([type="checkbox"]):not([type="radio"]):focus,
.tenants-create-form select:focus,
.tenant-edit-form input:not([type="checkbox"]):not([type="radio"]):focus,
.tenant-grant-form input:not([type="checkbox"]):not([type="radio"]):focus,
.tenant-grant-form select:focus,
.user-panel-form input:not([type="checkbox"]):not([type="radio"]):focus,
.user-panel-form select:focus,
.users-modal-body input:not([type="checkbox"]):not([type="radio"]):focus,
.users-modal-body select:focus,
.saas-grant-form input:not([type="checkbox"]):not([type="radio"]):focus,
.saas-grant-form select:focus,
.gmb-profile-archive-note-form textarea:focus,
.page-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.page-content select:focus,
.page-content textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.form-grid .full { grid-column: 1 / -1; }

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

/* Empty states */
.empty-state,
.empty-state-card {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
}
.empty-state p,
.empty-state-card p { margin-bottom: 16px; font-size: 14px; }
.empty-state-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

/* Auth page */
.auth-page {
    min-height: 100vh;
    background: var(--bg);
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-panel {
    background: var(--sidebar);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-brand .logo-mark {
    width: 40px;
    height: 40px;
    color: #818cf8;
    margin-bottom: 24px;
}

.auth-brand h1 {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.auth-brand p {
    font-size: 15px;
    color: var(--sidebar-text);
    line-height: 1.6;
    max-width: 360px;
}

.auth-features {
    list-style: none;
    margin-top: 40px;
    padding: 0;
}

.auth-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #cbd5e1;
}

.auth-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #818cf8;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.auth-form-wrap {
    width: 100%;
    max-width: 380px;
}

.auth-form-wrap h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.auth-form-wrap .field { margin-bottom: 18px; }

.alert {
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13px;
}
.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert-info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.auth-layout--verify {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
}

.auth-form-panel--full {
    width: 100%;
}

.login-otp-input {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.auth-verify-hint {
    margin: 0 0 20px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
}

.login-verify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.login-verify-actions form {
    display: inline;
}

.users-2fa-tag {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.users-2fa-tag--on {
    background: #ecfdf5;
    color: #047857;
}

.users-2fa-tag--off {
    background: #f1f5f9;
    color: #64748b;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); font-weight: 500; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-secondary); }
.breadcrumb span:not(:last-child)::after,
.breadcrumb a + span::before { content: none; }
.breadcrumb > * + *::before {
    content: "/";
    margin-right: 8px;
    color: #cbd5e1;
}

.page-subtitle .sep { margin: 0 8px; color: #cbd5e1; }

/* Website cards list */
.website-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.website-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow-sm);
}

.website-card-main {
    display: block;
    padding: 16px 16px 12px;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.website-card-main:hover {
    text-decoration: none;
    color: inherit;
}
/* List search + filters (GMB) */
.gmb-list-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.gmb-list-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0 16px;
    min-height: 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    cursor: text;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gmb-list-search:focus-within {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.gmb-list-search-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #64748b;
}

.gmb-list-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    outline: none;
}

.gmb-list-search-input::placeholder {
    color: #64748b;
}

.gmb-list-search-input::-webkit-search-cancel-button {
    display: none;
}

.gmb-list-search-clear {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.gmb-list-search-clear:hover {
    background: #f1f5f9;
    color: var(--text);
}

.gmb-list-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
}

.gmb-filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.gmb-filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: #475569;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.gmb-filter-chip:hover {
    border-color: #c7d2fe;
    color: #4338ca;
    background: #f8fafc;
}

.gmb-filter-chip.is-active {
    color: #fff;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

.gmb-filter-chip.is-active:hover {
    color: #fff;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.gmb-filter-chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.35);
}

.gmb-list-meta {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: #64748b;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .gmb-list-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .gmb-filter-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        margin: 0 -4px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .gmb-filter-chips::-webkit-scrollbar {
        display: none;
    }

    .gmb-list-meta {
        text-align: right;
    }

}

/* Websites list toolbar */
.websites-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 20px;
    padding: 10px 12px 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.websites-toolbar-search {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 220px;
    min-width: min(100%, 200px);
    max-width: 360px;
    padding: 0 12px;
    min-height: 40px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    cursor: text;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.websites-toolbar-search:focus-within {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: var(--surface);
}
.websites-toolbar-search-icon {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    flex-shrink: 0;
    color: #94a3b8;
}
.websites-toolbar svg {
    flex-shrink: 0;
}
.websites-toolbar-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 9px 0;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    outline: none;
}
.websites-toolbar-search-input::placeholder {
    color: #94a3b8;
}
.websites-toolbar-search-input::-webkit-search-cancel-button {
    display: none;
}
.websites-toolbar-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}
.websites-toolbar-search-clear:hover {
    background: #e2e8f0;
    color: var(--text);
}
.websites-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}
.websites-filter-pill {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    margin: 0;
}
.websites-filter-pill-input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.websites-filter-pill-face {
    position: relative;
    z-index: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px 0 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
    user-select: none;
    pointer-events: none;
}
.websites-filter-pill-face::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pill-dot, #94a3b8);
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}
.websites-filter-pill:hover .websites-filter-pill-face {
    border-color: #cbd5e1;
    background: #fff;
}
.websites-filter-pill.is-active .websites-filter-pill-face {
    background: var(--pill-bg, #eef2ff);
    border-color: var(--pill-border, #c7d2fe);
    color: var(--pill-text, #4338ca);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.websites-filter-pill.is-active .websites-filter-pill-face::before {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}
.websites-filter-pill-input:focus-visible + .websites-filter-pill-face {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.28);
}
.websites-filter-pill-label {
    letter-spacing: -0.01em;
}
.websites-filter-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: inherit;
}
.websites-filter-pill.is-active .websites-filter-pill-count {
    background: rgba(255, 255, 255, 0.72);
}
.websites-filter-pill--cerrajeria { --pill-dot: #d97706; --pill-bg: #fffbeb; --pill-border: #fcd34d; --pill-text: #92400e; }
.websites-filter-pill--fontaneria { --pill-dot: #2563eb; --pill-bg: #eff6ff; --pill-border: #bfdbfe; --pill-text: #1e40af; }
.websites-filter-pill--electricidad { --pill-dot: #ca8a04; --pill-bg: #fefce8; --pill-border: #fef08a; --pill-text: #854d0e; }
.websites-filter-pill--electrodomesticos { --pill-dot: #0284c7; --pill-bg: #f0f9ff; --pill-border: #bae6fd; --pill-text: #0369a1; }
.websites-filter-pill--climatizacion { --pill-dot: #0891b2; --pill-bg: #ecfeff; --pill-border: #a5f3fc; --pill-text: #0e7490; }
.websites-filter-pill--limpieza { --pill-dot: #059669; --pill-bg: #ecfdf5; --pill-border: #a7f3d0; --pill-text: #047857; }
.websites-filter-pill--construccion { --pill-dot: #b45309; --pill-bg: #fff7ed; --pill-border: #fed7aa; --pill-text: #9a3412; }
.websites-filter-pill--jardineria { --pill-dot: #16a34a; --pill-bg: #f0fdf4; --pill-border: #bbf7d0; --pill-text: #15803d; }
.websites-filter-pill--mudanzas { --pill-dot: #7c3aed; --pill-bg: #f5f3ff; --pill-border: #ddd6fe; --pill-text: #5b21b6; }
.websites-filter-pill--dental { --pill-dot: #0d9488; --pill-bg: #f0fdfa; --pill-border: #99f6e4; --pill-text: #0f766e; }
.websites-filter-pill--estetica { --pill-dot: #db2777; --pill-bg: #fdf2f8; --pill-border: #fbcfe8; --pill-text: #9d174d; }
.websites-filter-pill--restaurante { --pill-dot: #dc2626; --pill-bg: #fef2f2; --pill-border: #fecaca; --pill-text: #b91c1c; }
.websites-filter-pill--inmobiliaria { --pill-dot: #4f46e5; --pill-bg: #eef2ff; --pill-border: #c7d2fe; --pill-text: #4338ca; }
.websites-filter-pill--ecommerce { --pill-dot: #db2777; --pill-bg: #fdf2f8; --pill-border: #fbcfe8; --pill-text: #9d174d; }
.websites-filter-pill--servicios { --pill-dot: #059669; --pill-bg: #ecfdf5; --pill-border: #a7f3d0; --pill-text: #047857; }
.websites-filter-pill--otro { --pill-dot: #64748b; --pill-bg: #f1f5f9; --pill-border: #cbd5e1; --pill-text: #334155; }
.websites-filter-pill--none { --pill-dot: #94a3b8; --pill-bg: #f8fafc; --pill-border: #cbd5e1; --pill-text: #475569; }
.websites-toolbar-end {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}
.websites-toolbar-reset {
    border: none;
    background: transparent;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.websites-toolbar-reset:hover {
    background: #f1f5f9;
    color: var(--text);
}
.websites-toolbar-meta {
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: #64748b;
    white-space: nowrap;
}
@media (max-width: 900px) {
    .websites-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }
    .websites-toolbar-search {
        max-width: none;
        flex: 1 1 auto;
    }
    .websites-toolbar-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        margin: 0 -2px;
        padding-left: 2px;
        padding-right: 2px;
    }
    .websites-toolbar-filters::-webkit-scrollbar {
        display: none;
    }
    .websites-toolbar-end {
        margin-left: 0;
        justify-content: space-between;
        width: 100%;
    }
}

/* Legacy list toolbar (websites, etc.) */
.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.search-bar {
    flex: 1;
    min-width: min(100%, 320px);
    max-width: 520px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.search-bar-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.search-bar-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 11px 0;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    outline: none;
}

.search-bar-input::placeholder {
    color: #94a3b8;
}

.search-bar-input::-webkit-search-cancel-button {
    display: none;
}

.search-bar-clear {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.search-bar-clear:hover {
    background: #e2e8f0;
    color: var(--text);
}

.search-bar-meta {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.website-search-empty {
    margin-top: 0;
}

.website-card[hidden] {
    display: none;
}

.website-card:hover {
    border-color: #c7d2fe;
    box-shadow: var(--shadow);
}

.website-card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.website-card-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    min-height: 40px;
    background: var(--bg);
    border-top: 1px solid var(--border-light);
}

.website-card-bar-end {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.website-card-social {
    display: flex;
    align-items: center;
    gap: 4px;
}

.website-card-social .social-icon-link {
    display: inline-flex;
    vertical-align: middle;
}

.website-card-phone {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.website-card-phone:empty,
.contact-empty {
    color: var(--text-secondary);
    font-weight: 400;
}

.contact-card {
    margin-bottom: 20px;
    padding: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.contact-cell {
    background: var(--surface);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.contact-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.contact-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.35;
}

.contact-phone {
    text-decoration: none;
}

.contact-phone:hover {
    color: var(--primary);
}

.contact-empty-link {
    font-size: 12px;
    text-decoration: none;
}

.contact-empty-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.line-tag-none {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
}

.line-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.page-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cell-primary-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hub-site-group-head,
.hub-recent-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.cat-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    padding: 3px 8px;
    border-radius: 4px;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    white-space: nowrap;
}

.cat-tag-none {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    font-weight: 500;
}

.cat-tag-cerrajeria { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.cat-tag-fontaneria { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.cat-tag-electricidad { background: #fef9c3; color: #854d0e; border-color: #fef08a; }
.cat-tag-electrodomesticos { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.cat-tag-climatizacion { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.cat-tag-ecommerce { background: #fce7f3; color: #9d174d; border-color: #fbcfe8; }
.cat-tag-servicios { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

.line-tag-voip {
    background: #ede9fe;
    color: #5b21b6;
}

.line-tag-sim {
    background: #dbeafe;
    color: #1d4ed8;
}

.page-subtitle .line-tag {
    margin-left: 4px;
    vertical-align: middle;
}
.website-card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.website-card-url {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 8px;
    word-break: break-all;
    line-height: 1.4;
}

.website-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.website-card-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.keyword-chip {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 999px;
}
.keyword-chip.muted {
    background: var(--bg);
    color: var(--text-secondary);
}

/* Metrics / clicks */
.metrics-card {
    margin-bottom: 20px;
    padding: 0;
    overflow: hidden;
}

.metrics-display {
    padding: 20px 20px 0;
}

.metric-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
}

.metric-value.metric-empty {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
}

.metric-meta {
    font-size: 13px;
    color: var(--text-secondary);
}

.clics-form {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 16px;
    background: var(--bg);
}

.clics-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.website-card-meta .meta-clics {
    font-weight: 600;
    color: var(--primary);
}

/* Detail layout */
.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.keyword-form {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.keyword-form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.field-action .btn { width: 100%; }

.form-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: -8px;
}

.empty-state.compact {
    padding: 24px 20px;
}

/* Hub calendar (dashboard) */
.hub-calendar-card {
    margin-bottom: 24px;
}

.hub-calendar-grid .calendar-day.hub-day {
    aspect-ratio: auto;
    min-height: 72px;
    align-items: stretch;
    justify-content: flex-start;
    padding: 6px 4px 4px;
    gap: 4px;
}

.hub-day .day-num-link,
.hub-day .day-num-muted {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    line-height: 1.2;
}

.hub-day .day-num-link:hover {
    color: var(--primary);
}

.hub-day.is-selected .day-num-link {
    color: #fff;
}

.hub-day.is-selected .day-num-link:hover {
    color: #fff;
}

.calendar-day-tags {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-width: 0;
}

.site-tag {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.3;
    padding: 2px 4px;
    border-radius: 3px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    text-align: center;
}

.site-tag:hover {
    background: var(--primary-hover);
    color: #fff;
    text-decoration: none;
}

.hub-day.is-selected .site-tag {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.hub-day.is-selected .site-tag:hover {
    background: rgba(255, 255, 255, 0.4);
}

.site-tag-more {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    cursor: default;
}

.hub-day.is-selected .site-tag-more {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.35);
}

.site-tag-lg {
    font-size: 12px;
    padding: 4px 10px;
    align-self: flex-start;
    margin-bottom: 8px;
}

.hub-day-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hub-site-group {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.hub-site-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hub-entry-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hub-entry-preview {
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.hub-entry-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.hub-entry-text {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.45;
}

.hub-entry-link {
    font-size: 12px;
}

.calendar-panel-recent {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 640px;
    padding-bottom: 12px;
}

.calendar-panel-recent .calendar-panel-head {
    flex-shrink: 0;
    margin-bottom: 10px;
}

.hub-recent-scroll {
    flex: 1;
    min-height: 0;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -4px;
    padding: 2px 4px 4px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.hub-recent-scroll::-webkit-scrollbar {
    width: 6px;
}

.hub-recent-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.hub-recent-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.hub-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hub-recent-item {
    padding: 11px 0;
    border-bottom: 1px solid var(--border-light);
}

.hub-recent-item:first-child {
    padding-top: 2px;
}

.hub-recent-item:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}

.hub-recent-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.hub-recent-site {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.hub-recent-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
}

.hub-recent-name:hover {
    color: var(--primary);
}

.hub-recent-site .cat-tag {
    font-size: 9px;
    padding: 2px 6px;
}

.hub-recent-date {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    padding-top: 1px;
}

.hub-recent-line {
    margin: 0 0 4px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hub-recent-line:last-of-type {
    margin-bottom: 6px;
}

.hub-recent-k {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-right: 6px;
}

.hub-recent-foot {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hub-recent-link {
    font-size: 11px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
}

.hub-recent-link:hover {
    text-decoration: underline;
}

.hub-recent-sep {
    color: #cbd5e1;
    font-size: 11px;
    user-select: none;
}

.hub-recent-empty {
    margin: 0;
}

/* Dashboard — GMB profiles table */
.hub-gmb-card .card-header {
    align-items: flex-start;
    gap: 16px;
}

.hub-gmb-header-copy h2 {
    margin: 0;
}

.hub-gmb-subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.hub-gmb-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.hub-gmb-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 220px;
    min-width: 0;
    padding: 0 12px;
    height: 38px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.hub-gmb-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.hub-gmb-search-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.hub-gmb-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text);
    outline: none;
}

.hub-gmb-search-input::placeholder {
    color: var(--text-muted);
}

.hub-gmb-search-input::-webkit-search-cancel-button {
    display: none;
}

.hub-gmb-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.hub-gmb-search-clear:hover {
    background: var(--border-light);
    color: var(--text-secondary);
}

.hub-gmb-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hub-gmb-filter {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hub-gmb-filter:hover {
    border-color: #cbd5e1;
    color: var(--text);
}

.hub-gmb-filter.is-active {
    color: var(--primary);
    background: var(--primary-light);
    border-color: transparent;
}

.hub-gmb-table-wrap {
    overflow: auto;
    max-height: min(520px, 60vh);
}

.hub-gmb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hub-gmb-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    color: var(--text-muted);
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.hub-gmb-table tbody td {
    padding: 14px 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}

.hub-gmb-row {
    transition: background 0.12s;
}

.hub-gmb-row:hover {
    background: #fafbfc;
}

.hub-gmb-row:last-child td {
    border-bottom: none;
}

.hub-gmb-name-link {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

.hub-gmb-name-link:hover {
    color: var(--primary);
}

.hub-gmb-area-tag {
    display: inline-flex;
    align-items: center;
    max-width: 200px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-gmb-area-empty {
    color: var(--text-muted);
    font-size: 13px;
}

.hub-gmb-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.hub-gmb-status-pill--en_progreso {
    background: #ede9fe;
    color: #5b21b6;
}

.hub-gmb-status-pill--verificando {
    background: #ffedd5;
    color: #c2410c;
}

.hub-gmb-status-pill--verificado {
    background: #ecfdf5;
    color: #047857;
}

.hub-gmb-status-pill--no_aprobada {
    background: #fef2f2;
    color: #b91c1c;
}

.hub-gmb-status-pill--suspendido {
    background: #f1f5f9;
    color: #475569;
}

.hub-gmb-col-action {
    width: 1%;
    white-space: nowrap;
}

.hub-gmb-open-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--surface);
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.hub-gmb-open-link:hover {
    color: var(--primary);
    border-color: #c7d2fe;
    background: var(--primary-light);
}

.hub-gmb-empty,
.hub-gmb-empty-state {
    margin: 0;
    padding: 24px 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.hub-gmb-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

@media (max-width: 720px) {
    .hub-gmb-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hub-gmb-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .hub-gmb-table-wrap {
        max-height: none;
    }

    .hub-gmb-table th,
    .hub-gmb-table td {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Social */
.calendar-legend {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.day-dots {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}

.day-dot-seo {
    background: var(--primary);
}

.day-dot-social {
    background: #db2777;
}

.hub-day-dots {
    justify-content: center;
}

.site-tag-seo {
    background: var(--primary);
}

.site-tag-social {
    background: #db2777;
}

.calendar-card .card-header {
    align-items: center;
}

.social-icons-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.social-icons-row-compact {
    gap: 5px;
}

.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.12s;
}

.social-icon-link.social-icon-sm {
    width: 26px;
    height: 26px;
    border-radius: 5px;
}

.social-icon-link:hover {
    opacity: 0.88;
    color: #fff;
    text-decoration: none;
}

.social-icon-static {
    width: 26px;
    height: 26px;
    pointer-events: none;
}

.social-icon-svg {
    width: 14px;
    height: 14px;
}

.social-icon-sm .social-icon-svg {
    width: 13px;
    height: 13px;
}

.social-icon-facebook { background: #1877f2; }
.social-icon-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-icon-linkedin { background: #0a66c2; }
.social-icon-youtube { background: #ff0000; }
.social-icon-tiktok { background: #010101; }
.social-icon-twitter { background: #0f1419; }
.social-icon-pinterest { background: #bd081c; }
.social-icon-otro { background: #64748b; }

.social-config-card {
    margin-top: 16px;
}

.social-config-card .card-header {
    padding: 16px 20px 0;
    border-bottom: none;
}

.social-config-card .card-header h2 {
    font-size: 15px;
    font-weight: 600;
}

.social-config-list {
    list-style: none;
    margin: 0;
    padding: 8px 20px 0;
}

.social-config-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.social-config-item:last-child {
    border-bottom: none;
}

.social-config-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.social-config-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.social-config-url {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-config-empty {
    padding: 0 20px;
}

.social-link-form {
    display: grid;
    grid-template-columns: 160px 1fr auto;
    gap: 12px;
    align-items: end;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.social-link-form .field {
    margin: 0;
}

.social-link-form .field-grow {
    min-width: 0;
}

.social-posts-card {
    margin-top: 20px;
}

.social-post-form {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.social-post-form-row {
    display: grid;
    grid-template-columns: 140px 150px 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.social-post-form .field-grow {
    min-width: 0;
}

.social-posts-feed {
    list-style: none;
    margin: 0;
    padding: 8px 20px 16px;
}

.social-post-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.social-post-item:last-child {
    border-bottom: none;
}

.social-post-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.social-post-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.social-post-meta time {
    font-size: 12px;
    color: var(--text-secondary);
}

.social-post-stamp {
    font-size: 11px;
    color: var(--text-secondary);
}

.social-post-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    margin: 0 0 6px;
}

.social-day-block {
    margin: 12px 0;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.social-day-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.social-post-item-compact {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-light);
}

.activity-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
}

.activity-badge-seo {
    background: var(--primary-light);
    color: var(--primary);
}

.activity-badge-social {
    background: #fce7f3;
    color: #be185d;
}

.hub-entry-social {
    margin-bottom: 8px;
}

.hub-recent-footer {
    flex-shrink: 0;
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Calendar */
.calendar-card .card-header {
    flex-wrap: wrap;
    gap: 12px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.calendar-month {
    font-size: 14px;
    font-weight: 600;
    min-width: 140px;
    text-align: center;
}

.calendar-layout {
    display: grid;
    grid-template-columns: 1fr minmax(380px, 420px);
    gap: 0;
}

.calendar-grid-wrap {
    padding: 16px 20px 20px;
    border-right: 1px solid var(--border-light);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}
.calendar-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding: 4px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    position: relative;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}
.calendar-day:hover {
    background: var(--bg);
    text-decoration: none;
    color: var(--text);
}
.calendar-day.is-outside {
    color: #cbd5e1;
    pointer-events: none;
}
.calendar-day.is-today {
    border-color: var(--primary);
}
.calendar-day.has-entry {
    background: var(--primary-light);
}
.calendar-day.has-entry:hover {
    background: #e0e7ff;
}
.calendar-day.is-selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.calendar-day.is-selected .day-dot {
    background: #fff;
}
.calendar-day.is-selected:hover {
    color: #fff;
    background: var(--primary-hover);
}

.day-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 2px;
}

.day-dot.day-dot-count {
    width: auto;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    line-height: 16px;
    text-align: center;
}

.calendar-day.is-selected .day-dot.day-dot-count {
    background: #fff;
    color: var(--primary);
}

.calendar-panel {
    padding: 16px 18px 20px;
    min-height: 320px;
    max-height: 640px;
    overflow-y: auto;
}

.calendar-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    position: sticky;
    top: 0;
    background: var(--surface);
    padding-bottom: 8px;
    z-index: 1;
}

.calendar-panel-head h3 {
    font-size: 16px;
    font-weight: 600;
}

.panel-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}
.calendar-panel-empty h3 {
    margin-bottom: 8px;
}
.calendar-panel-empty p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.panel-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.seo-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.seo-log-item {
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.seo-log-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.seo-log-num {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

.seo-log-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.seo-log-edit-form .field {
    margin-bottom: 10px;
}

.seo-log-edit-form label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.seo-log-edit-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 56px;
}

.seo-log-edit-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.seo-log-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.seo-log-add {
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.seo-log-add h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.entry-form .field { margin-bottom: 10px; }
.entry-form label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}
.entry-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    margin-bottom: 0;
}

/* GMB phases */
.card-header-hint {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
}

.gmb-process-intro {
    margin-bottom: 16px;
    padding: 16px 20px;
}

/* GMB profile list cards */
.gmb-cards--list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gmb-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.gmb-card[hidden] {
    display: none;
}

.gmb-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

.gmb-card--in-progress {
    border-color: #e0e7ff;
}

.gmb-card--in-progress:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.gmb-card--in-progress .gmb-card-icon {
    background: var(--primary-light);
    color: var(--primary);
}

.gmb-card--complete {
    border-color: #bbf7d0;
}

.gmb-card--complete:hover {
    border-color: #86efac;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.08);
}

.gmb-card--rejected {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fef2f2 0%, var(--surface) 48%);
}

.gmb-card--rejected:hover {
    border-color: #fca5a5;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.1);
}

.gmb-card--rejected .gmb-card-icon {
    background: #fef2f2;
    color: #dc2626;
}

.gmb-card--rejected .gmb-card-track-title {
    color: #b91c1c;
}

.gmb-card--rejected .gmb-card-segment.is-done {
    background: linear-gradient(90deg, #f87171, #dc2626);
}

.gmb-card--rejected .gmb-card-segment.is-active {
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.35);
}

.gmb-card--rejected .gmb-card-segment.is-active::after {
    background: linear-gradient(90deg, #fca5a5, #dc2626);
}

.gmb-card--rejected .gmb-card-phase-labels li.is-done,
.gmb-card--rejected .gmb-card-phase-labels li.is-active {
    color: #dc2626;
    font-weight: 600;
}

.gmb-card--rejected .gmb-card-aside {
    background: rgba(254, 242, 242, 0.9);
    border-left-color: #fecaca;
}

.gmb-card--verifying {
    border-color: #fdba74;
    background: linear-gradient(180deg, #fffbeb 0%, var(--surface) 48%);
}

.gmb-card--verifying:hover {
    border-color: #fb923c;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.1);
}

.gmb-card--verifying .gmb-card-icon {
    background: #ffedd5;
    color: #ea580c;
}

.gmb-card--verifying .gmb-card-track-title {
    color: #c2410c;
}

.gmb-card--verifying .gmb-card-phase-labels li.is-done,
.gmb-card--verifying .gmb-card-phase-labels li.is-active,
.gmb-card--verifying .gmb-card-phase-labels li.is-verifying {
    color: #ea580c;
}

.gmb-card-note-alert {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    padding: 7px 9px;
    font-size: 11px;
    line-height: 1.35;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    max-width: 168px;
}
.gmb-card-note-alert-icon {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    color: #d97706;
}
.gmb-card-note-alert-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-word;
}
.gmb-card--verifying .gmb-card-note-alert {
    background: #fff;
    border-color: #fdba74;
}
.gmb-card--rejected .gmb-card-note-alert {
    background: #fff;
    border-color: #fecaca;
}
.gmb-card-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(148px, auto);
    align-items: stretch;
    gap: 0;
}

.gmb-card-main {
    display: block;
    min-width: 0;
    padding: 20px 22px 20px 20px;
    text-decoration: none;
    color: inherit;
}

.gmb-card-main:hover {
    text-decoration: none;
    color: inherit;
}

.gmb-card-identity {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.gmb-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);
}

.gmb-card--complete .gmb-card-icon {
    background: #ecfdf5;
    color: #059669;
}

.gmb-card-copy {
    min-width: 0;
    flex: 1;
}

.gmb-card-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
    margin: 0 0 6px;
    color: var(--text);
}

.gmb-card-body:hover .gmb-card-title {
    color: var(--primary);
}

.gmb-card-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.gmb-card-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-secondary);
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmb-card-chip--muted {
    font-weight: 400;
    color: var(--text-muted);
    background: transparent;
    border-color: transparent;
    padding-left: 0;
}

.gmb-card-track {
    padding-left: 54px;
    margin-top: 2px;
}

.gmb-card-track-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.gmb-card-track-text {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    min-width: 0;
}

.gmb-card-track-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
}

.gmb-card-track-detail {
    font-size: 12px;
    color: var(--text-secondary);
}

.gmb-card-track-detail::before {
    content: "·";
    margin-right: 10px;
    color: var(--border);
}

.gmb-card-track-stat {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    flex-shrink: 0;
}

.gmb-card-track-stat-sep {
    font-weight: 400;
    margin: 0 1px;
    opacity: 0.6;
}

.gmb-card-segments {
    display: flex;
    gap: 4px;
    height: 6px;
}

.gmb-card-segment {
    flex: 1;
    border-radius: 999px;
    background: #e2e8f0;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.gmb-card-segment.is-done {
    background: linear-gradient(90deg, #6366f1, #4f46e5);
}

.gmb-card-segment.is-active {
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.35);
}

.gmb-card-segment.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 42%;
    border-radius: 999px;
    background: linear-gradient(90deg, #818cf8, #4f46e5);
}

.gmb-card-segment.is-verifying {
    background: linear-gradient(90deg, #fb923c, #ea580c);
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

.gmb-card--complete .gmb-card-segment.is-done {
    background: linear-gradient(90deg, #34d399, #059669);
}

.gmb-card-phase-labels {
    display: flex;
    gap: 4px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.gmb-card-phase-labels li {
    flex: 1;
    min-width: 0;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmb-card-phase-labels li.is-done {
    color: #818cf8;
}

.gmb-card-phase-labels li.is-active {
    color: var(--primary);
    font-weight: 600;
}

.gmb-card-phase-labels li.is-verifying {
    color: #ea580c;
    font-weight: 600;
}

.gmb-card--complete .gmb-card-phase-labels li.is-done,
.gmb-card--complete .gmb-card-phase-labels li.is-active {
    color: #059669;
}

.gmb-card-aside {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 14px;
    flex-shrink: 0;
    padding: 20px 18px;
    border-left: 1px solid var(--border-light);
    background: rgba(248, 250, 252, 0.65);
}

.gmb-card--verifying .gmb-card-aside {
    background: rgba(255, 247, 237, 0.85);
    border-left-color: #fed7aa;
}

.gmb-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.gmb-card-cta svg {
    opacity: 0.55;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.gmb-card-cta:hover svg {
    opacity: 1;
    transform: translateX(2px);
}

@media (max-width: 768px) {
    .gmb-card-layout {
        grid-template-columns: 1fr;
    }

    .gmb-card-main {
        padding: 16px 16px 14px;
    }

    .gmb-card-aside {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        padding: 14px 16px;
        border-left: none;
        border-top: 1px solid var(--border-light);
    }
    .gmb-card-note-alert {
        max-width: none;
    }
    .gmb-card-aside .badge,
    .gmb-card-aside .gmb-card-cta {
        align-self: flex-start;
    }
    .gmb-card-aside .gmb-card-cta {
        align-self: stretch;
        justify-content: center;
    }

    .gmb-card-track {
        padding-left: 0;
    }

    .gmb-card-phase-labels {
        display: none;
    }
}

@media (max-width: 480px) {
    .gmb-card-identity {
        gap: 10px;
    }

    .gmb-card-icon {
        width: 36px;
        height: 36px;
    }

    .gmb-card-chip--muted {
        flex-basis: 100%;
        padding-left: 0;
    }
}

.gmb-autosave-status {
    font-size: 12px;
    font-weight: 500;
    margin: 6px 0 0;
    min-height: 18px;
}

.gmb-autosave-status[data-state="saving"] {
    color: var(--text-secondary);
}

.gmb-autosave-status[data-state="saved"] {
    color: #047857;
}

.gmb-autosave-status[data-state="error"] {
    color: #b91c1c;
}

/* GMB profile detail layout */
.gmb-profile {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gmb-profile-header {
    margin-bottom: 0;
}

.gmb-profile .gmb-review-alert {
    margin-bottom: 0;
}

.gmb-profile-header .page-title {
    margin-bottom: 10px;
}

.gmb-profile-archive-note-card {
    max-width: 640px;
    margin: 0 0 20px;
    padding: 16px 18px;
}
.gmb-profile-archive-note-card--readonly {
    padding: 14px 18px;
}
.gmb-profile-archive-note-form .field {
    margin-bottom: 12px;
}
.gmb-profile-archive-note-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.gmb-archive-note-status {
    font-size: 13px;
    color: var(--text-secondary);
}
.gmb-archive-note-status[data-state="saving"] {
    color: var(--primary);
}
.gmb-archive-note-status[data-state="saved"] {
    color: #059669;
}
.gmb-archive-note-status[data-state="error"] {
    color: #dc2626;
}
.gmb-profile-archive-note-readonly {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    white-space: pre-wrap;
}
.gmb-profile-archive-note-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.gmb-toast {
    margin: 0 0 16px;
    padding: 12px 16px;
    font-size: 14px;
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
}
.gmb-profile-header .page-subtitle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 4px;
    line-height: 1.5;
}

.gmb-profile-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.gmb-profile-sections > .card {
    margin: 0;
}

.gmb-profile-danger-card {
    border-color: rgba(220, 38, 38, 0.2);
}
.gmb-profile-danger-zone {
    padding: 20px 24px;
}
.gmb-profile-danger-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger, #dc2626);
    margin: 0 0 8px;
}
.gmb-profile-danger-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 16px;
    max-width: 52ch;
    line-height: 1.5;
}
.gmb-profile-delete-form {
    margin: 0;
}

/* Allow stepper ring/glow to paint outside (global .card uses overflow:hidden) */
.card.gmb-flow-card {
    margin-bottom: 0;
    overflow: visible;
}

.gmb-flow-card .card-header {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.gmb-flow-card-body {
    padding: 24px 28px 28px;
    background: var(--surface);
    overflow: visible;
}

.gmb-flow-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.gmb-flow-head-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gmb-flow-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.gmb-flow-current {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.gmb-flow-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.gmb-flow-track {
    position: relative;
    --gmb-marker: 32px;
    --gmb-stepper-pad-top: 8px;
    --gmb-rail-y: calc(var(--gmb-stepper-pad-top) + var(--gmb-marker) / 2);
}

.gmb-flow-stepper-wrap {
    position: relative;
    isolation: isolate;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c7d2fe transparent;
    margin: 0 -4px;
    padding: var(--gmb-stepper-pad-top) 4px 10px;
}

.gmb-flow-stepper-wrap::-webkit-scrollbar {
    height: 5px;
}

.gmb-flow-stepper-wrap::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 999px;
}

.gmb-flow-rail {
    position: absolute;
    top: var(--gmb-rail-y);
    left: calc(100% / (var(--gmb-phase-count, 6) * 2));
    width: calc(100% * (var(--gmb-phase-count, 6) - 1) / var(--gmb-phase-count, 6));
    height: 2px;
    margin-top: -1px;
    background: #e2e8f0;
    border-radius: 999px;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gmb-flow-rail-fill {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    transition: width 0.35s ease;
}

.gmb-flow-stepper {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--gmb-phase-count, 6), minmax(72px, 1fr));
    gap: 0;
    width: 100%;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.gmb-flow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 4px;
    text-align: center;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.gmb-flow-marker {
    position: relative;
    z-index: 2;
    width: var(--gmb-marker);
    height: var(--gmb-marker);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: var(--text-muted);
    flex-shrink: 0;
    box-shadow: 0 0 0 2px #fff;
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.gmb-flow-marker svg {
    display: block;
}

.gmb-flow-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    color: var(--text-muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gmb-flow-step.is-done .gmb-flow-marker {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 2px #fff;
}

.gmb-flow-step.is-done .gmb-flow-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.gmb-flow-step.is-active .gmb-flow-marker {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
    /* Ring kept within pad-top via inset-friendly shadow */
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.gmb-flow-step.is-active .gmb-flow-label {
    color: var(--primary);
    font-weight: 600;
}

.gmb-flow-step.is-verifying .gmb-flow-marker {
    background: #fff;
    border-color: #ea580c;
    color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}

.gmb-flow-step.is-verifying .gmb-flow-label {
    color: #c2410c;
    font-weight: 600;
}

.gmb-flow-step.is-upcoming .gmb-flow-marker {
    background: #f8fafc;
}

.gmb-flow-preview .gmb-flow-head {
    display: none;
}

.gmb-flow-preview .gmb-flow-rail-fill {
    width: 0 !important;
}

.gmb-flow-preview .gmb-flow-step.is-upcoming .gmb-flow-marker {
    background: #fff;
}

.gmb-nuevo .gmb-profile-sections {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gmb-nuevo-phase-card .card-header {
    padding-bottom: 0;
}

.gmb-nuevo-form {
    padding: 0 24px 24px;
}

.gmb-nuevo-extras {
    margin-top: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #f8fafc;
}

.gmb-nuevo-extras summary {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.gmb-nuevo-extras summary::-webkit-details-marker {
    display: none;
}

.gmb-nuevo-extras summary::after {
    content: "▾";
    float: right;
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.15s;
}

.gmb-nuevo-extras[open] summary::after {
    transform: rotate(180deg);
}

.gmb-nuevo-extras-body {
    padding: 0 16px 16px;
    border-top: 1px solid var(--border);
}

.gmb-nuevo-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
    .gmb-flow-card-body {
        padding: 16px 16px 20px;
    }

    .gmb-flow-stepper-wrap {
        overflow-x: auto;
    }

    .gmb-flow-stepper {
        min-width: calc(88px * var(--gmb-phase-count, 6));
    }
}

.fase-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.fase-badge-active {
    background: #ede9fe;
    color: #5b21b6;
}

.fase-badge-done {
    background: #ecfdf5;
    color: #047857;
}

.fase-badge-rejected {
    background: #fef2f2;
    color: #b91c1c;
}

.fase-badge-review {
    background: #fff7ed;
    color: #c2410c;
}

.fase-badge-lg {
    font-size: 12px;
    padding: 4px 10px;
}

/* —— GBP optimization (unified SaaS layout) —— */
.gmb-profile-sections > .gmb-opt-card {
    margin: 0;
}
.gmb-opt-card { overflow: hidden; }

.gmb-opt-flash {
    margin: 0;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
}
.gmb-opt-flash--ok { background: var(--primary-light); color: var(--primary-hover); }
.gmb-opt-flash--err { background: var(--danger-bg); color: var(--danger); }

/* Shared pills & hints */
.gmb-opt-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 6px;
    line-height: 1.4;
}
.gmb-opt-pill--template { background: var(--primary-light); color: var(--primary); }
.gmb-opt-pill--locked { background: #f1f5f9; color: var(--text-secondary); border: 1px solid var(--border); }
.gmb-opt-pill--day { background: var(--border-light); color: var(--text-secondary); }
.gmb-opt-pill--done { background: #ecfdf5; color: #047857; }
.gmb-opt-pill--sm { font-size: 10px; padding: 1px 6px; }
.gmb-opt-hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}
.gmb-opt-hint strong { color: var(--text); font-weight: 600; }
.label-muted { font-weight: 400; color: var(--text-muted); }

/* Card header */
.gmb-opt-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--surface);
}
.gmb-opt-card-title h2 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.gmb-opt-template-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.gmb-opt-template-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}
.gmb-opt-template-desc {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    max-width: 52ch;
}
.gmb-opt-stat {
    margin: 0;
    text-align: right;
    flex-shrink: 0;
}
.gmb-opt-stat dt {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.gmb-opt-stat dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* Cooldown status strip */
.gmb-opt-status-strip {
    padding: 14px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
}
.gmb-opt-status-strip-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.gmb-opt-status-strip-head h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.gmb-opt-status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.gmb-opt-status-chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.gmb-opt-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    font-size: 13px;
}
.gmb-opt-status-chip-label { font-weight: 500; color: var(--text); }
.gmb-opt-status-chip-meta { font-size: 12px; color: var(--text-muted); }
.gmb-opt-cooldown-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
}
.gmb-opt-cooldown-timer.is-ready { color: #059669; }

/* Calendar section */
.gmb-opt-cal {
    padding: 20px 24px 24px;
    border-bottom: 1px solid var(--border-light);
    background: var(--surface);
}
.gmb-opt-cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.gmb-opt-template-block {
    flex: 1 1 280px;
    min-width: 0;
    max-width: 480px;
}
.gmb-opt-template-card {
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.gmb-opt-template-card--locked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.gmb-opt-template-card-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.gmb-opt-template-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.gmb-opt-template-card .field { margin-bottom: 12px; }
.gmb-opt-template-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 4px;
}
.gmb-opt-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}
.gmb-opt-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
}
.gmb-opt-template-lock-inline { margin-top: 8px; }

.gmb-opt-cal-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}
.gmb-opt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px 10px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}
.gmb-opt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}
.gmb-opt-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gmb-opt-dot--due { background: #f87171; }
.gmb-opt-dot--task { background: #cbd5e1; }
.gmb-opt-dot--done { background: #34d399; }
.gmb-opt-dot--edit { background: #a78bfa; }

.gmb-opt-month-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.gmb-opt-month-label {
    min-width: 120px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    padding: 0 8px;
}
.gmb-opt-month-btn { min-width: 32px; }

.gmb-opt-cal-grid-wrap {
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}
.gmb-opt-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 6px;
}
.gmb-opt-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 0;
}
.gmb-opt-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

/* Calendar day cells */
.gmb-opt-day {
    display: flex;
    flex-direction: column;
    min-height: 76px;
    padding: 7px 6px 6px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    font-size: 11px;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.gmb-opt-day:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text);
}
.gmb-opt-day.is-outside { opacity: 0.28; pointer-events: none; background: transparent; }
.gmb-opt-day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.gmb-opt-day-num {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--text);
}
.gmb-opt-day.is-today .gmb-opt-day-num {
    color: var(--primary);
}
.gmb-opt-day-flag {
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
    background: #ef4444;
    color: #fff;
}
.gmb-opt-day-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.gmb-opt-day-tag {
    font-size: 9px;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 4px;
    background: var(--border-light);
    color: var(--text-muted);
}
.gmb-opt-day-tag.is-pending { background: #fee2e2; color: #b91c1c; }
.gmb-opt-day-tag.is-done { background: #d1fae5; color: #047857; }
.gmb-opt-day-tag.is-edit { background: var(--primary-light); color: var(--primary); }
.gmb-opt-day-preview {
    margin-top: auto;
    padding-top: 4px;
    font-size: 9px;
    line-height: 1.25;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gmb-opt-day.is-task { background: var(--surface); }
.gmb-opt-day.is-due {
    background: #fff;
    border-color: #fecaca;
    box-shadow: inset 0 0 0 1px #fecaca;
}
.gmb-opt-day.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.gmb-opt-day.has-edit { box-shadow: inset 0 0 0 2px #c7d2fe; }
.gmb-opt-day.is-selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Day workspace */
.gmb-opt-workspace {
    padding: 22px 24px 24px;
    background: var(--bg);
    border-top: 1px solid var(--border-light);
}
.gmb-opt-workspace-head {
    margin-bottom: 18px;
}
.gmb-opt-workspace-date {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.gmb-opt-workspace-meta {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.gmb-opt-workspace-sep { color: var(--text-muted); }
.gmb-opt-workspace-empty {
    padding: 40px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.gmb-opt-workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 960px) {
    .gmb-opt-workspace-grid { grid-template-columns: 1fr; }
}

.gmb-opt-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.gmb-opt-panel--full { grid-column: 1 / -1; }
.gmb-opt-panel-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-light);
    background: var(--surface);
}
.gmb-opt-panel-head h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}
.gmb-opt-panel-lead {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.gmb-opt-panel-body { padding: 16px 18px 18px; }

/* Tasks */
.gmb-opt-task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gmb-opt-task {
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg);
}
.gmb-opt-task.is-pending {
    border-color: #fecaca;
    background: var(--surface);
}
.gmb-opt-task.is-complete { opacity: 0.88; }
.gmb-opt-task-main {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.gmb-opt-task-text {
    margin: 0;
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}
.gmb-opt-task-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

/* Edit form (uses global .form) */
.gmb-opt-edit-form .field { margin-bottom: 16px; }
.gmb-opt-form-actions {
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}
.gmb-opt-cooldown-preview {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: var(--primary-light);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
}
.gmb-opt-cooldown-preview-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    margin-bottom: 4px;
}
.gmb-opt-cooldown-preview-value {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}
.gmb-opt-cooldown-preview-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Edit log items */
.gmb-opt-edit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.gmb-opt-edit-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.gmb-opt-edit-item:last-child { border-bottom: none; padding-bottom: 0; }
.gmb-opt-edit-item:first-child { padding-top: 0; }
.gmb-opt-edit-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.gmb-opt-edit-item-top strong { font-size: 14px; font-weight: 600; }
.gmb-opt-edit-meta {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}
.gmb-opt-edit-notes {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text);
    line-height: 1.45;
}
.gmb-opt-edit-delete { margin-top: 8px; }

/* Historial (profile optimization) */
.gmb-hist {
    margin-top: 20px;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.gmb-hist-toggle {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: var(--surface);
    border-bottom: 1px solid transparent;
    transition: background 0.15s;
}
.gmb-hist[open] .gmb-hist-toggle {
    border-bottom-color: var(--border-light);
}
.gmb-hist-toggle:hover { background: #fafbfc; }
.gmb-hist-toggle::-webkit-details-marker { display: none; }
.gmb-hist-toggle::before {
    content: "";
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-right: 4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z' clip-rule='evenodd'/%3E%3C/svg%3E") center / 14px no-repeat;
    transition: transform 0.15s;
}
.gmb-hist[open] .gmb-hist-toggle::before { transform: rotate(90deg); }
.gmb-hist-toggle-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}
.gmb-hist-toggle-meta {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.gmb-hist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: var(--bg);
}
@media (max-width: 960px) {
    .gmb-hist-grid { grid-template-columns: 1fr; }
}
.gmb-hist-panel {
    display: flex;
    flex-direction: column;
    min-height: 120px;
    border-right: 1px solid var(--border-light);
}
.gmb-hist-panel:last-child { border-right: none; }
@media (max-width: 960px) {
    .gmb-hist-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .gmb-hist-panel:last-child { border-bottom: none; }
}
.gmb-hist-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
}
.gmb-hist-panel-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.gmb-hist-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--border-light);
    border-radius: 999px;
}
.gmb-hist-list {
    list-style: none;
    margin: 0;
    padding: 6px 8px 10px;
    flex: 1;
    max-height: 320px;
    overflow-y: auto;
}
.gmb-hist-item {
    margin: 0;
    border-radius: var(--radius);
}
.gmb-hist-item-link {
    display: block;
    padding: 10px 10px;
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}
.gmb-hist-item-link:hover {
    background: var(--surface);
    border-color: var(--border);
    text-decoration: none;
}
.gmb-hist-item.is-pending .gmb-hist-item-link {
    background: #fffafa;
    border-color: #fee2e2;
}
.gmb-hist-item.is-pending .gmb-hist-item-link:hover {
    background: #fff5f5;
    border-color: #fecaca;
}
.gmb-hist-item.is-done .gmb-hist-item-link {
    opacity: 0.88;
}
.gmb-hist-item-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.gmb-hist-date {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}
.gmb-hist-item-link:hover .gmb-hist-date { color: var(--primary); }
.gmb-hist-date--link {
    color: var(--primary);
    text-decoration: none;
}
.gmb-hist-date--link:hover { text-decoration: underline; }
.gmb-hist-plan {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--border-light);
    color: var(--text-secondary);
}
.gmb-hist-status {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.gmb-hist-status--pending { background: #fee2e2; color: #b91c1c; }
.gmb-hist-status--scheduled { background: #e2e8f0; color: #475569; }
.gmb-hist-status--done { background: #d1fae5; color: #047857; }
.gmb-hist-action {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
}
.gmb-hist-completed {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
}
.gmb-hist-empty {
    margin: 0;
    padding: 28px 16px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}
.gmb-hist-item--edit {
    padding: 10px 10px;
    border-radius: var(--radius);
    border: 1px solid transparent;
}
.gmb-hist-item--edit + .gmb-hist-item--edit { margin-top: 2px; }
.gmb-hist-edit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.gmb-hist-edit-field {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.gmb-hist-edit-meta {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.45;
}
.gmb-hist-edit-meta .gmb-hist-edit-notes {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-style: italic;
}
.gmb-hist-edit-delete { margin-top: 8px; }

.gmb-opt-pill--pending { background: #fee2e2; color: #b91c1c; }
.gmb-opt-pill--scheduled { background: var(--border-light); color: var(--text-secondary); }

.risk-pill {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 7px;
    border-radius: 6px;
}
.risk-very_high, .risk-high { background: var(--danger-bg); color: var(--danger); }
.risk-medium_high, .risk-medium { background: #fffbeb; color: #b45309; }
.risk-low_medium, .risk-low { background: #ecfdf5; color: #047857; }
.risk-very_low { background: var(--border-light); color: var(--text-secondary); }

/* —— Notifications page (feed) —— */
.notifications {
    max-width: 680px;
    margin: 0 auto;
}
.notifications-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.notifications-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}
.notifications-lead {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}
.notifications-summary {
    flex-shrink: 0;
    text-align: right;
}
.notifications-summary-count {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.notifications-summary-label {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}
.notifications-banner {
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-lg);
}
.notifications-banner--success {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
}

.notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.notifications-item {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.notifications-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 10px;
}
.notifications-item-body {
    flex: 1;
    min-width: 0;
}
.notifications-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.notifications-item-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}
.notifications-item-title a {
    color: var(--text);
    text-decoration: none;
}
.notifications-item-title a:hover {
    color: var(--primary);
}
.notifications-badge {
    flex-shrink: 0;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--border-light);
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
}
.notifications-item-meta {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--text-muted);
}
.notifications-item-task {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
}
.notifications-item-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.notifications-item-form {
    margin: 0;
}

.notifications-empty {
    padding: 48px 32px;
    text-align: center;
}
.notifications-empty-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    color: #10b981;
}
.notifications-empty-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}
.notifications-empty-text {
    margin: 0 0 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #fff;
    background: #ef4444;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.8);
}
.nav-child.is-active .nav-badge {
    box-shadow: 0 0 0 2px var(--sidebar-active);
}

.gmb-link-card {
    padding: 20px 24px;
}

.gmb-link-form label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.gmb-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.gmb-link-row input[type="url"] {
    flex: 1;
    min-width: 200px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

.gmb-phases-card {
    margin: 0;
}

.gmb-phases-card > .card-header {
    padding: 20px 28px 16px;
    border-bottom: 1px solid var(--border-light);
}

.gmb-phases-card > .card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.gmb-phases-card > .card-header .card-header-hint {
    margin-top: 4px;
    font-size: 13px;
}

.gmb-phase-list {
    list-style: none;
    margin: 0;
    padding: 8px 28px 28px;
}

.gmb-phase-item {
    display: flex;
    gap: 18px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.gmb-phase-item:last-child {
    border-bottom: none;
}

.gmb-phase-marker {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--bg);
    border: 2px solid var(--border);
    color: var(--text-secondary);
}

.gmb-phase-item.is-completed .gmb-phase-marker {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.gmb-phase-item.is-current .gmb-phase-marker {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.gmb-phase-item.is-current {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.04) 0%, transparent 72%);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: var(--radius);
}

.gmb-phase-item.is-locked {
    opacity: 0.65;
}

.gmb-phase-details {
    flex: 1;
    min-width: 0;
}

.gmb-phase-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0 8px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.gmb-phase-summary::-webkit-details-marker {
    display: none;
}

.gmb-phase-summary-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
    flex: 1;
}

.gmb-phase-summary-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

.gmb-phase-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2364748b'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.94a.75.75 0 111.08 1.04l-4.24 4.5a.75.75 0 01-1.08 0l-4.24-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E") center / 14px no-repeat;
    transition: transform 0.2s ease, background-color 0.15s;
}

.gmb-phase-details[open] .gmb-phase-chevron {
    transform: rotate(180deg);
}

.gmb-phase-details-body {
    padding: 0 0 12px 0;
}

.gmb-phase-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.gmb-phase-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 16px 0 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.gmb-phase-section-label:first-of-type {
    margin-top: 8px;
    padding-top: 0;
    border-top: none;
}

.gmb-phase-hint-muted {
    color: var(--text-muted);
    font-size: 13px;
}

.gmb-phase-body {
    flex: 1;
    min-width: 0;
}

.gmb-phase-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.gmb-phase-title-row h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.gmb-phase-title-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.gmb-reset-borrar-datos {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: auto;
    max-width: 280px;
    cursor: pointer;
}

.gmb-reset-borrar-datos input {
    margin-top: 2px;
    flex-shrink: 0;
}

.gmb-phase-reset-form {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    width: 100%;
}

/* GMB review alert + countdown */
.gmb-review-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px 20px;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 55%, #fff 100%);
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.06);
}

.gmb-review-alert-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffedd5;
    color: #ea580c;
}

.gmb-review-alert-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gmb-review-alert-head .gmb-google-verificando {
    font-size: 16px;
}

.gmb-review-alert-meta {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    max-width: 52rem;
}

.gmb-review-alert-date {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.gmb-review-alert--done {
    border-color: var(--border);
    background: var(--bg);
    box-shadow: none;
}

.gmb-review-alert--done .gmb-review-alert-icon {
    background: #ecfdf5;
    color: #059669;
}

.gmb-review-alert--compact {
    margin: 0;
    padding: 12px 14px;
    gap: 0;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: none;
}

.gmb-review-alert--compact .gmb-review-alert-icon {
    display: none;
}

.gmb-google-verificando {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.3;
}

.gmb-google-verificando-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9a3412;
}

.gmb-google-verificando-clock-wrap {
    display: block;
}

.gmb-countdown-clock {
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #c2410c;
    line-height: 1.2;
}

.gmb-review-alert--compact .gmb-countdown-clock {
    font-size: 17px;
}

.gmb-review-alert-head .gmb-google-verificando {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 14px;
}

.gmb-review-alert-head .gmb-google-verificando-label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: none;
    color: #9a3412;
}

.gmb-countdown-clock.is-expired {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
}

.gmb-google-verificando--done .gmb-countdown-clock {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
}

.gmb-activation-fieldset {
    border: none;
    margin: 0 0 16px;
    padding: 0;
}

.gmb-activation-fieldset legend {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.gmb-activation-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.gmb-activation-option {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.gmb-activation-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gmb-activation-option span {
    display: block;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
}

.gmb-activation-option.is-selected span,
.gmb-activation-option:has(input:checked) span {
    background: var(--primary);
    color: #fff;
}

.gmb-activation-toggle--3 {
    flex-wrap: wrap;
}

.gmb-activation-option--rejected.is-selected span,
.gmb-activation-option--rejected:has(input:checked) span {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.gmb-activation-option + .gmb-activation-option {
    border-left: 1px solid var(--border);
}

.gmb-phase-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.gmb-phase-notas {
    font-size: 13px;
    color: var(--text);
    margin-top: 4px;
}

.gmb-phase-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.gmb-phase-form input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

.gmb-phase-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.gmb-phase-data-form,
.gmb-phase1-form {
    display: block;
    margin-top: 10px;
}

.gmb-phase-data-grid,
.gmb-phase1-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 14px;
    margin-bottom: 12px;
}

.gmb-phase-data-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gmb-phase-data-grid .field-span-2,
.gmb-phase1-grid .field-span-2 {
    grid-column: span 2;
}

.gmb-phase-data-grid .field input,
.gmb-phase-data-grid .field select,
.gmb-phase1-grid .field input,
.gmb-phase1-grid .field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
}

.gmb-phase-data-grid label,
.gmb-phase1-grid label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-hint-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--primary);
}

.gmb-phase-data-actions,
.gmb-phase1-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.gmb-phase-data-actions input[type="text"],
.gmb-phase1-actions input[type="text"] {
    flex: 1;
    min-width: 160px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

.gmb-phase-data-summary,
.gmb-phase1-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
    margin: 8px 0 0;
    font-size: 13px;
}

.gmb-phase-data-summary dt,
.gmb-phase1-summary dt {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.gmb-phase-data-summary dd,
.gmb-phase1-summary dd {
    margin: 2px 0 0;
    color: var(--text);
}

.form-section-label span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.gmb-phase-checklist-intro {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.gmb-phase-checklist,
.gmb-phase-checklist-done {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gmb-phase-checklist {
    padding: 14px 16px;
    background: #fafaff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.gmb-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
}

.gmb-check-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.gmb-checklist-edit {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
}

.gmb-phase-checklist-done li {
    font-size: 13px;
    color: var(--text-secondary);
}

.gmb-phase-checklist-done li.is-done {
    color: #047857;
    font-weight: 500;
}

.gmb-phase-checklist-done li.is-pending {
    opacity: 0.6;
}

.label-optional {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
    font-size: 11px;
}

.mono-chip {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .gmb-phase-data-grid,
    .gmb-phase-data-grid-3,
    .gmb-phase1-grid,
    .gmb-phase-data-summary,
    .gmb-phase1-summary {
        grid-template-columns: 1fr;
    }
    .gmb-phase-data-grid .field-span-2,
    .gmb-phase1-grid .field-span-2 {
        grid-column: 1;
    }
}

.copy-btn.is-copied,
.copy-cell.is-copied {
    background: #ecfdf5 !important;
    border-color: #6ee7b7 !important;
    color: #047857 !important;
}

/* Roles & read-only */
.readonly-banner {
    padding: 10px 24px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    font-size: 13px;
    font-weight: 500;
}

.is-readonly .admin-only {
    display: none !important;
}

.role-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 4px;
}

.role-tag-admin {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.role-tag-client {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

/* Admin SaaS pages (users, clients) */
.users-saas,
.tenants-saas {
    max-width: 1100px;
}
.tenants-slug-cell {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 4px;
}
.users-row.is-inactive {
    opacity: 0.65;
}
/* wide panel max-width set with modal panel rules above */
.users-modal-panel.users-modal-panel-wide {
    max-width: 520px;
}
.users-modal-divider {
    padding: 0 24px 12px;
    border-top: 1px solid var(--border-light);
    margin-top: 4px;
}
.users-modal-divider h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 16px 0 4px;
}
.users-modal-divider p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}
.saas-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.saas-checkbox input {
    accent-color: var(--primary);
    width: auto;
}
.saas-member-list {
    list-style: none;
    margin: 0 24px 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.saas-member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}
.saas-member-row strong {
    display: block;
    font-size: 13px;
}
.saas-member-row span {
    font-size: 12px;
    color: var(--text-secondary);
}
.saas-member-empty {
    margin: 0 24px 16px;
    font-size: 13px;
    color: var(--text-muted);
}
.saas-grant-block {
    margin: 0 24px 24px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.saas-grant-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin: 0 0 12px;
}
.saas-grant-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.saas-grant-tab {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    color: var(--text-secondary);
}
.saas-grant-tab.is-active {
    background: var(--primary-light);
    border-color: #c7d2fe;
    color: var(--primary);
}
.saas-grant-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.saas-grant-form.is-hidden {
    display: none;
}
.saas-grant-form .field {
    margin-bottom: 0;
}

.tenant-delete-zone {
    margin: 0 24px 20px;
    padding-top: 16px;
    padding-bottom: 8px;
    border-top: 1px solid var(--border-light);
}
.tenant-delete-panel {
    margin-top: 12px;
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
}
.tenant-delete-warning {
    margin: 0 0 12px;
    font-size: 13px;
    color: #991b1b;
    line-height: 1.5;
}
.tenant-delete-blocked {
    margin: 0;
    font-size: 13px;
    color: #b45309;
    font-weight: 500;
}
.tenant-delete-step-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #b91c1c;
    margin: 0 0 8px;
}
.tenant-delete-step p {
    margin: 0 0 12px;
    font-size: 13px;
    color: #7f1d1d;
}
.tenant-delete-checkbox {
    margin-bottom: 14px;
    background: #fff;
    border-color: #fecaca;
}
.tenant-delete-checkbox span {
    color: #7f1d1d;
}
.tenant-delete-form .field label {
    color: #7f1d1d;
}
.tenant-delete-step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}
.tenant-delete-form.is-hidden,
.tenant-delete-step.is-hidden,
.tenant-delete-panel.is-hidden {
    display: none;
}

.users-saas-header,
.tenants-saas .users-saas-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}
.users-saas-header .page-subtitle {
    max-width: 420px;
}
.users-saas-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.users-toast {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}
.users-toast.is-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}
.users-table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.users-table thead th {
    text-align: left;
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.users-table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.users-table tbody tr:last-child td {
    border-bottom: none;
}
.users-table tbody tr:hover {
    background: #fafbff;
}
.users-row.is-self {
    background: #f8faff;
}
.users-cell-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.users-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.users-cell-name {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.users-you-tag {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 4px;
}
.users-cell-email {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
}
.users-tenant-name {
    font-size: 13px;
    color: var(--text);
}
.users-tenant-missing {
    font-size: 12px;
    color: #b45309;
    font-weight: 500;
}
.users-tenant-na {
    color: var(--text-muted);
}
.users-th-actions,
.users-td-actions {
    text-align: right;
    white-space: nowrap;
}
.users-td-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}
.users-delete-form {
    display: inline;
    margin: 0;
}
.users-empty-cell {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px !important;
}
.users-tenant-field.is-hidden {
    display: none;
}

/* User modals */
.users-modal[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}
.users-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    margin: 0;
    padding: 24px 16px;
    border: none;
    background: transparent;
    max-width: none;
    max-height: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}
.users-modal::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
}
.users-modal-backdrop {
    position: absolute;
    inset: 0;
}
.users-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: calc(100dvh - 48px);
    min-height: 0;
    flex: 0 1 auto;
    margin: 0;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.users-modal-panel-wide {
    max-height: min(90dvh, calc(100dvh - 48px));
}
.users-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}
.users-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px 16px;
    flex-shrink: 0;
}
.users-modal-header-sticky {
    border-bottom: 1px solid var(--border-light);
    background: var(--surface);
}
.users-modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.users-modal-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}
.users-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    text-decoration: none;
    flex-shrink: 0;
}
.users-modal-close:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}
.users-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.users-modal-form .field {
    margin-bottom: 0;
}
.users-modal-note {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius);
}
.users-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}
.users-modal-danger-zone {
    padding: 12px 24px 20px;
    border-top: 1px dashed var(--border);
    text-align: center;
}

@media (max-width: 720px) {
    .users-saas-header {
        flex-direction: column;
        align-items: stretch;
    }
    .users-saas-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .users-table-card {
        overflow-x: auto;
    }
    .users-table {
        min-width: 560px;
    }
    .users-modal {
        padding: 0;
        align-items: stretch;
    }
    .users-modal-panel {
        max-width: none;
        max-height: 100dvh;
        height: 100%;
        border-radius: 0;
    }
}

.form-success {
    padding: 10px 14px;
    margin-bottom: 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
    color: #047857;
    font-size: 13px;
}

/* Google accounts */
.accounts-page .accounts-add-card {
    margin-bottom: 20px;
}

.accounts-add-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 16px;
    padding: 4px 20px 20px;
}

.accounts-add-form .field-span-2 {
    grid-column: span 2;
}

.accounts-add-form .field-action {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.accounts-list-card {
    overflow: hidden;
}

.accounts-table {
    table-layout: fixed;
    width: 100%;
}

.accounts-table th:nth-child(1) { width: 14%; }
.accounts-table th:nth-child(2) { width: 20%; }
.accounts-table th:nth-child(3) { width: 11%; }
.accounts-table th:nth-child(4) { width: 16%; }
.accounts-table th:nth-child(5) { width: 11%; }
.accounts-table th:nth-child(6) { width: 14%; }
.accounts-table th:nth-child(7) { width: 14%; }

.td-tags,
.td-avail {
    min-width: 0;
}

.account-tags {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.twofa-tag-si {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #c4b5fd;
}

.twofa-tag-no {
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    font-weight: 600;
}

.twofa-opt-si.is-active span,
.twofa-opt-si input:checked + span {
    background: #ede9fe;
    border-color: #a78bfa;
    color: #5b21b6;
    box-shadow: 0 0 0 1px #a78bfa;
}

.twofa-opt-no.is-active span,
.twofa-opt-no input:checked + span {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text-secondary);
    box-shadow: 0 0 0 1px var(--border);
}

.avail-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.avail-tag-disponible {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.avail-tag-no_disponible {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.avail-chooser {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 100%;
}

.avail-opt {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.avail-opt input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.avail-opt span {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
    background: var(--bg);
    color: var(--text-secondary);
    transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s;
    white-space: nowrap;
}

.avail-opt:hover span {
    border-color: #c7d2fe;
    color: var(--text);
}

.avail-opt-disponible.is-active span,
.avail-opt-disponible input:checked + span {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #047857;
    box-shadow: 0 0 0 1px #6ee7b7;
}

.avail-opt-no_disponible.is-active span,
.avail-opt-no_disponible input:checked + span {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
    box-shadow: 0 0 0 1px #fca5a5;
}

.accounts-table .th-actions,
.accounts-table .td-actions {
    text-align: right;
    white-space: nowrap;
}

.accounts-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.accounts-data-row td {
    vertical-align: middle;
    padding: 12px 14px;
}

.accounts-readonly-value {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    word-break: break-word;
}

.copy-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.copy-chip:hover {
    border-color: #c7d2fe;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.copy-chip.is-copied {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #047857;
}

.copy-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.copy-chip-mono .copy-chip-text {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.copy-chip-icon {
    padding: 8px 10px;
}

.copy-chip-icon .copy-chip-text {
    display: none;
}

.copy-icon-mini {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--primary);
    opacity: 0.9;
}

.copy-chip.is-copied .copy-icon-mini {
    color: #047857;
}

.accounts-online {
    display: flex;
    align-items: center;
    gap: 6px;
}

.accounts-empty,
.accounts-comment-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.accounts-comment-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accounts-edit-row {
    display: none;
}

.accounts-edit-row:target {
    display: table-row;
}

.accounts-data-row:has(+ .accounts-edit-row:target) {
    background: #f5f3ff;
}

.accounts-data-row:has(+ .accounts-edit-row:target) td {
    border-bottom-color: transparent;
}

.accounts-edit-row td {
    padding: 0 14px 16px;
    background: #fafaff;
    border-bottom: 1px solid var(--border);
}

.accounts-edit-panel {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.accounts-edit-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.accounts-edit-panel-head h3 {
    font-size: 14px;
    font-weight: 600;
}

.accounts-edit-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 16px;
}

.accounts-edit-form .field-span-2 {
    grid-column: span 2;
}

.accounts-edit-form .field-action {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.accounts-edit-form .field label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.accounts-edit-form input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
}

.accounts-edit-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* Phone numbers */
.phones-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: 16px;
}

.phones-list-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 240px;
    min-width: 0;
    padding: 0 12px;
    height: 40px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.phones-list-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.phones-list-search-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.phones-list-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text);
    outline: none;
}

.phones-list-search-input::placeholder {
    color: var(--text-muted);
}

.phones-list-search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.phones-list-search-clear:hover {
    background: var(--border-light);
    color: var(--text-secondary);
}

.phones-list-meta {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.phone-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.phone-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.phone-tag-voip {
    background: #ede9fe;
    color: #5b21b6;
}

.phone-tag-sim {
    background: #ecfdf5;
    color: #047857;
}

.phone-tag-provider {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.phone-number-text {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.phone-assign-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 220px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.phone-assign-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-assign-chip--site {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.phone-assign-chip--site:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.phone-assign-chip--gmb {
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.phone-assign-chip--gmb:hover {
    background: #ffedd5;
    border-color: #fdba74;
}

.phone-assign-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}

.phone-assign-fieldset {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phones-table th:nth-child(1) { width: 16%; }
.phones-table th:nth-child(2) { width: 18%; }
.phones-table th:nth-child(3) { width: 24%; }
.phones-table th:nth-child(4) { width: 22%; }
.phones-table th:nth-child(5) { width: 20%; }

.phones-search-empty {
    margin-top: 12px;
    text-align: center;
}

/* Security / access audit */
.security-page .security-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 999px;
}

.security-block-form {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 12px 16px;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border-light);
    align-items: end;
}

.security-toolbar {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.security-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 420px;
    padding: 0 12px;
    height: 40px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
}

.security-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.security-search-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.security-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
}

.security-search-clear {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.security-ip {
    font-size: 12px;
    font-weight: 600;
    color: #1e3a8a;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
}

.security-event-pill {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.security-event-pill--login_success {
    background: #ecfdf5;
    color: #047857;
}

.security-event-pill--login_failure {
    background: #fef2f2;
    color: #b91c1c;
}

.security-event-pill--logout {
    background: #f1f5f9;
    color: #475569;
}

.security-event-pill--blocked_request {
    background: #fff7ed;
    color: #c2410c;
}

.security-flag {
    margin-left: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #c2410c;
}

.security-user {
    display: block;
    font-weight: 600;
    font-size: 13px;
}

.security-email {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.security-device {
    font-size: 12px;
    color: var(--text-secondary);
}

.security-mobile-tag,
.security-bot-tag {
    margin-left: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.security-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 8px 0;
}

.security-detail-block h4 {
    margin: 0 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.security-detail-block--full {
    grid-column: 1 / -1;
}

.security-kv {
    margin: 0;
    display: grid;
    gap: 6px;
}

.security-kv > div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    font-size: 12px;
}

.security-kv dt {
    margin: 0;
    color: var(--text-muted);
    font-weight: 500;
}

.security-kv dd {
    margin: 0;
    word-break: break-word;
}

.security-pre {
    margin: 0;
    padding: 12px;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    font-size: 11px;
    line-height: 1.45;
    overflow: auto;
    max-height: 220px;
    white-space: pre-wrap;
    word-break: break-word;
}

.security-pre-json {
    max-height: 320px;
}

.security-mono-sm {
    font-size: 11px;
    word-break: break-all;
}

.security-event-detail-row td {
    background: #fafbfc;
    border-bottom: 1px solid var(--border-light);
}

.security-events-table .td-actions {
    white-space: nowrap;
}

.security-events-table .td-actions form {
    display: inline;
}

.auth-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.security-settings-form {
    padding: 0 20px 20px;
}

.security-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px 16px;
    margin-bottom: 12px;
}

.security-settings-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 12px;
}

.security-smtp-hint {
    margin-bottom: 12px;
}

.security-geo {
    display: block;
    font-size: 12px;
    font-weight: 600;
}

.security-geo-isp {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
}

.security-event-pill--login_page_view {
    background: #eef2ff;
    color: #4338ca;
}

.security-event-pill--honeypot_trigger {
    background: #fdf4ff;
    color: #a21caf;
}

.security-event-pill--rate_limited {
    background: #fff7ed;
    color: #c2410c;
}

.security-event-pill--login_failure_cleared {
    background: #f8fafc;
    color: #64748b;
}

.security-event-pill--login_2fa_sent {
    background: #eef2ff;
    color: #4338ca;
}

.security-event-pill--login_2fa_failure {
    background: #fef2f2;
    color: #b91c1c;
}

.security-failure-actions {
    white-space: nowrap;
}

.security-failure-actions form {
    display: inline;
}

.security-unblock-form {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.security-unblock-whitelist {
    font-size: 11px;
}

.security-page .card + .card {
    margin-top: 20px;
}

@media (max-width: 900px) {
    .security-block-form {
        grid-template-columns: 1fr;
    }
    .security-settings-grid {
        grid-template-columns: 1fr;
    }
    .security-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .calendar-layout { grid-template-columns: 1fr; }
    .calendar-grid-wrap { border-right: none; border-bottom: 1px solid var(--border-light); }
    .keyword-form-row { grid-template-columns: 1fr 1fr; }
    .clics-form-row { grid-template-columns: 1fr 1fr; }
    .field-action { grid-column: 1 / -1; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: repeat(2, 1fr); }
    .social-link-form { grid-template-columns: 1fr; }
    .accounts-add-form,
    .accounts-edit-form { grid-template-columns: 1fr 1fr; }
    .accounts-add-form .field-span-2,
    .accounts-edit-form .field-span-2 { grid-column: span 2; }
    .gmb-link-row { flex-direction: column; align-items: stretch; }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    .main-area { margin-left: 0; }
    .app-shell { flex-direction: column; }
    .page-content { padding: 20px 16px; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .accounts-add-form,
    .accounts-edit-form { grid-template-columns: 1fr; }
    .accounts-add-form .field-span-2,
    .accounts-edit-form .field-span-2,
    .accounts-add-form .field-action,
    .accounts-edit-form .field-action { grid-column: 1; }
    .accounts-table thead { display: none; }
    .accounts-data-row,
    .accounts-edit-row { display: block; }
    .accounts-data-row td,
    .accounts-edit-row td { display: block; width: 100%; border-bottom: none; padding: 8px 16px; }
    .accounts-data-row { border-bottom: 1px solid var(--border-light); padding-bottom: 8px; margin-bottom: 12px; }
    .accounts-data-row td::before {
        content: attr(data-label);
        display: block;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--text-secondary);
        margin-bottom: 4px;
    }
    .accounts-edit-row:target { display: block; }
}
