/* ══════════════════════════════════════════════════════
   Admin Panel — ITCFI UAGRM
══════════════════════════════════════════════════════ */

:root {
    --blue-dark:  #1A2A5E;
    --blue-mid:   #2E4A9E;
    --red-inst:   #C8102E;
    --white:      #FFFFFF;
    --gray-light: #F5F6FA;
    --gray-text:  #4B5563;
    --sidebar-w:  260px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--gray-light);
    color: #1a1a2e;
    margin: 0;
}

/* ── Login ────────────────────────────────────────── */
.login-body {
    min-height: 100vh;
    background: #F0F0F0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-wrapper {
    width: 100%;
    max-width: 1100px;
}

.login-card {
    display: flex;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(26, 42, 94, 0.18);
    min-height: 580px;
}

/* ── Panel izquierdo ──────────────────────────────── */
.login-panel-left {
    flex: 0 0 42%;
    background-image: url('../img/admin/login-bg.jpg');
    background-size: cover;
    background-position: center;
    background-color: #1A2A5E;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    text-align: center;
}

.login-panel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(26,42,94,0.88) 0%, rgba(200,16,46,0.52) 100%);
}

.login-panel-left-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.login-panel-escudo {
    width: 82px;
    height: auto;
    opacity: 0.93;
    filter: brightness(1.08) drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.login-panel-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.login-panel-brand-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 3px;
    line-height: 1;
}

.login-panel-brand-sub {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.82);
    letter-spacing: 5px;
    text-transform: uppercase;
}

.login-panel-divider {
    width: 44px;
    height: 3px;
    background: #C8102E;
    border-radius: 2px;
}

.login-panel-phrase {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.7;
    max-width: 230px;
    font-style: italic;
    margin: 0;
}

.login-panel-badge {
    margin-top: 0.25rem;
    font-size: 0.68rem;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ── Panel derecho ────────────────────────────────── */
.login-panel-right {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3.5rem 3rem;
}

.login-right-header {
    margin-bottom: 2rem;
}

.login-right-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.login-right-subtitle {
    font-size: 0.9rem;
    color: #6B7280;
    line-height: 1.55;
    margin: 0;
}

.login-card .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.login-card .input-group-text {
    background: #F5F6FA;
    border-color: #E5E7EB;
    color: #6B7280;
}

.login-card .form-control {
    border-color: #E5E7EB;
    padding: 0.6rem 0.875rem;
    font-size: 0.925rem;
}

.login-card .form-control:focus {
    border-color: #1A2A5E;
    box-shadow: 0 0 0 0.2rem rgba(26, 42, 94, 0.12);
}

.btn-admin-primary {
    background: #1A2A5E;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 10px;
    font-size: 0.975rem;
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.btn-admin-primary:hover {
    background: #2E4A9E;
    color: #fff;
    transform: translateY(-1px);
}

.btn-admin-primary:active {
    transform: translateY(0);
}

.login-back {
    text-align: center;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #E5E7EB;
}

.login-back a {
    color: #6B7280;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.login-back a:hover {
    color: #1A2A5E;
}

.login-footer-note {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.72rem;
    color: #B0B0B0;
    letter-spacing: 0.3px;
}

/* ── Login responsive ─────────────────────────────── */
@media (max-width: 768px) {
    .login-panel-left {
        display: none;
    }

    .login-card {
        border-radius: 16px;
        min-height: unset;
    }

    .login-panel-right {
        padding: 2.5rem 1.75rem;
    }
}

@media (max-width: 390px) {
    .login-body {
        padding: 0.75rem;
    }

    .login-panel-right {
        padding: 2rem 1.25rem;
    }

    .login-right-title {
        font-size: 1.45rem;
    }
}

/* ── Layout general ───────────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────── */
.admin-sidebar {
    width: var(--sidebar-w);
    background: var(--blue-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 40px;
    height: 40px;
    background: var(--red-inst);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-brand-icon i { font-size: 1.1rem; color: #fff; }

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-brand-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0.75rem;
}

.sidebar-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.38);
    padding: 0 0.5rem;
    margin-bottom: 0.4rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.875rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 0.125rem;
}

.sidebar-nav-link i { font-size: 1rem; flex-shrink: 0; }

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-nav-link.active {
    background: var(--red-inst);
    color: #fff;
}

.sidebar-footer {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebar-footer-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.825rem;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 0.25rem;
}

.sidebar-footer-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar-footer-logout { color: rgba(255, 120, 120, 0.75); }

.sidebar-footer-logout:hover {
    background: rgba(227, 6, 19, 0.15);
    color: #ff8080;
}

/* ── Topbar ───────────────────────────────────────── */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--blue-dark);
    padding: 0.25rem;
    cursor: pointer;
    line-height: 1;
}

.admin-topbar-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--blue-dark);
    flex: 1;
}

.admin-topbar-user {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-text);
    font-weight: 500;
}

.btn-logout {
    color: var(--gray-text);
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.2s;
}

.btn-logout:hover { color: var(--red-inst); }

/* ── Content area ─────────────────────────────────── */
.admin-content {
    flex: 1;
    padding: 2rem 1.5rem;
}

/* ── Stat cards ───────────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    height: 100%;
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.4rem;
}

.stat-card-icon.blue   { background: #EEF1FB; color: var(--blue-dark); }
.stat-card-icon.green  { background: #e8faf0; color: #16a34a; }
.stat-card-icon.red    { background: #fef2f2; color: var(--red-inst); }

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--blue-dark);
    line-height: 1;
}

.stat-card-label {
    font-size: 0.8rem;
    color: var(--gray-text);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ── Quick actions card ───────────────────────────── */
.admin-quick-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.admin-quick-card h5 {
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 0.25rem;
}

.btn-admin-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--blue-dark);
    color: #fff;
    border: none;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-admin-action:hover {
    background: var(--blue-mid);
    color: #fff;
}

.btn-admin-action-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    color: var(--blue-dark);
    border: 1.5px solid #d1d5db;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.btn-admin-action-outline:hover {
    border-color: var(--blue-dark);
    color: var(--blue-dark);
}

/* ── Sidebar overlay (mobile) ─────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.show {
        transform: translateX(0);
    }
    .sidebar-overlay.show {
        display: block;
    }
    .admin-main {
        margin-left: 0;
    }
    .admin-content {
        padding: 1.25rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .stat-card-value {
        font-size: 1.65rem;
    }
}

/* ── Alerts ───────────────────────────────────────── */
.admin-alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.admin-alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.admin-alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ── Page header row ──────────────────────────────── */
.admin-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin: 0;
}

/* ── Empty state ──────────────────────────────────── */
.admin-empty {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    color: var(--gray-text);
}

.admin-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    color: #d1d5db;
}

/* ── Card wrapper ─────────────────────────────────── */
.admin-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* ── Table ────────────────────────────────────────── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th {
    background: var(--gray-light);
    color: var(--blue-dark);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    text-align: left;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.75rem 1rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: #fafafa;
}

.admin-table code {
    font-size: 0.8rem;
    background: #f3f4f6;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    color: #374151;
}

/* ── Badge toggle ─────────────────────────────────── */
.badge-toggle {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.badge-toggle:hover { opacity: 0.75; }
.badge-active       { background: #dcfce7; color: #166534; }
.badge-inactive     { background: #f3f4f6; color: #6b7280; }
.badge-featured     { background: #fef9c3; color: #854d0e; }
.badge-plain        { background: #f3f4f6; color: #6b7280; }

/* ── Table action buttons ─────────────────────────── */
.table-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.btn-view {
    background: #f0fdf4;
    color: #16a34a;
}

.btn-view:hover {
    background: #16a34a;
    color: #fff;
}

.btn-edit {
    background: #EEF1FB;
    color: var(--blue-dark);
}

.btn-edit:hover {
    background: var(--blue-dark);
    color: #fff;
}

.btn-delete {
    background: #fef2f2;
    color: var(--red-inst);
}

.btn-delete:hover {
    background: var(--red-inst);
    color: #fff;
}

/* ── Form card ────────────────────────────────────── */
.admin-form-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    max-width: 800px;
}

.admin-form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.btn-back-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--gray-text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
}

.btn-back-admin:hover { color: var(--blue-dark); }

/* ── Form sections ────────────────────────────────── */
.form-section {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.form-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-text);
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.font-mono {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem !important;
}

/* ── Image upload ─────────────────────────────────── */
.img-info-box {
    background: #f0f4ff;
    border: 1px solid #c7d2f0;
    border-left: 4px solid var(--blue-dark);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 0.82rem;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.img-info-box-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--blue-dark);
    margin-bottom: 0.5rem;
}

.img-info-box ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #4b5563;
}

.img-info-box ul li {
    margin-bottom: 0.2rem;
}

.img-preview-wrap {
    display: inline-flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.img-current-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-text);
}

.img-preview {
    width: 180px;
    height: 112px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: block;
}

.img-preview-none {
    width: 180px;
    height: 112px;
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.35rem;
    color: #9ca3af;
    font-size: 0.75rem;
}

.img-preview-none i {
    font-size: 1.5rem;
}

.img-replace-note {
    font-size: 0.82rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 0.75rem;
}

/* ── Módulo Administradores ───────────────────────── */
.btn-password {
    background: #eaeefc;
    color: #2E4A9E;
}

.btn-password:hover {
    background: #2E4A9E;
    color: #fff;
}

/* ── Sidebar logo image ───────────────────────────── */
.sidebar-brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* ── Sidebar footer user block ────────────────────── */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem 0.625rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    margin-bottom: 0.375rem;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-avatar i { font-size: .95rem; color: rgba(255,255,255,.65); }

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-name {
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255,255,255,.85);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: .65rem;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .6px;
}

/* ── Topbar user block ────────────────────────────── */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
}

.topbar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a2e;
}

.topbar-user-role {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 400;
}

.topbar-user-avatar {
    width: 36px;
    height: 36px;
    background: #EEF1FB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-dark);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── Module header ────────────────────────────────── */
.module-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.module-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--blue-dark);
    margin: 0 0 0.3rem;
    line-height: 1.2;
}

.module-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.btn-module-create {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--blue-dark);
    color: #fff;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.btn-module-create:hover {
    background: var(--blue-mid);
    color: #fff;
    transform: translateY(-1px);
}

.btn-module-create:active { transform: translateY(0); }

/* ── Toolbar card ─────────────────────────────────── */
.toolbar-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 380px;
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.575rem 0.875rem 0.575rem 2.5rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #374151;
    background: #f9fafb;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    outline: none;
    font-family: inherit;
}

.search-input:focus {
    border-color: var(--blue-dark);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 42, 94, 0.08);
}

.search-input::placeholder { color: #b0b8c4; }

/* ── Featured star badge ──────────────────────────── */
.badge-star-on {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
    background: #fef9c3;
    color: #92400e;
}

.badge-star-off {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
    background: #f3f4f6;
    color: #9ca3af;
}

.badge-star-on:hover,
.badge-star-off:hover { opacity: 0.75; }

/* ── Table row spacing ────────────────────────────── */
.admin-table th { padding: 0.875rem 1.25rem; }
.admin-table td { padding: 0.875rem 1.25rem; }

/* ── Responsive: tablet (max 767.98px) ─────────────── */
@media (max-width: 767.98px) {
    .search-wrap {
        max-width: none;
    }
    .admin-table th,
    .admin-table td {
        padding: 0.65rem 0.875rem;
    }
    .topbar-user-info {
        display: none;
    }
    .admin-form-card {
        padding: 1.5rem;
    }
}

/* ── Responsive: mobile (max 575.98px) ─────────────── */
@media (max-width: 575.98px) {
    .module-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .btn-module-create {
        width: 100%;
        justify-content: center;
    }
    .toolbar-card {
        flex-direction: column;
        align-items: stretch;
    }
    .search-wrap {
        min-width: 100%;
    }
    .admin-table {
        font-size: 0.8rem;
    }
    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.625rem;
    }
    .admin-form-card {
        padding: 1rem;
    }
    .admin-content {
        padding: 1rem 0.75rem;
    }
}

/* ── Paginación ───────────────────────────────────── */
.pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.25rem;
}

.pagination-info {
    font-size: 0.8rem;
    color: #6b7280;
}

.admin-pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.admin-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--blue-dark);
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    cursor: pointer;
}

.admin-page-link:hover:not(.active):not(.disabled) {
    background: #EEF1FB;
    border-color: var(--blue-dark);
    color: var(--blue-dark);
}

.admin-page-link.active {
    background: var(--blue-dark);
    color: #fff;
    border-color: var(--blue-dark);
    cursor: default;
    pointer-events: none;
}

.admin-page-link.disabled {
    color: #d1d5db;
    background: #f9fafb;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
}

.admin-page-ellipsis {
    padding: 0 0.25rem;
    color: #9ca3af;
    font-size: 0.8rem;
    line-height: 32px;
}

@media (max-width: 575.98px) {
    .pagination-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Interesados module ───────────────────────────── */
/* Badges semánticos de estado (usar junto a .badge-toggle).
   Reutilizan colores ya presentes en admin.css; sin paleta nueva. */
.badge-nuevo      { background: #EEF1FB; color: var(--blue-dark); }
.badge-contactado { background: #dcfce7; color: #166534; }
.badge-descartado { background: #f3f4f6; color: #6b7280; }
