body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f5;
    color: #111827;
}
a {
    color: #2563eb;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.admin-header {
    background: #0f172a;
    color: #e5e7eb;
    padding: 10px 0;
}
.admin-header-inner {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-header h1 {
    margin: 0;
    font-size: 1.3rem;
}
.admin-header p {
    margin: 0;
    font-size: 0.85rem;
    color: #9ca3af;
}
.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.badge-rol {
    padding: 4px 10px;
    border-radius: 999px;
    background: #2563eb;
    font-size: 0.75rem;
}
.btn-link {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #4b5563;
    font-size: 0.8rem;
    color: #e5e7eb;
}
.btn-link:hover {
    background: #111827;
}

/* Main */

.admin-main {
    padding: 16px 0 24px;
}
.admin-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

.alert {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.alert.success {
    background: #ecfdf3;
    border: 1px solid #22c55e;
    color: #166534;
}
.alert.error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* Config */

.admin-config {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 12px 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(15,23,42,0.05);
    margin-bottom: 16px;
}
.admin-config h2 {
    margin: 0 0 8px;
}
.admin-config p {
    font-size: 0.9rem;
}
.admin-config input[type="text"],
.admin-config input[type="number"],
.admin-config textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
}
.admin-config textarea {
    resize: vertical;
}
.admin-config button[type="submit"] {
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
}
.admin-config button[type="submit"]:hover {
    background: #1d4ed8;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
.fieldset-banner {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 8px 10px 10px;
}
.fieldset-banner legend {
    font-size: 0.85rem;
    font-weight: 600;
}
.hint {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Columns admin */

.admin-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr);
    gap: 16px;
    margin-bottom: 18px;
}
.admin-col {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(15,23,42,0.05);
    padding: 12px 12px 14px;
}
.admin-col h2 {
    margin: 0 0 8px;
}
.admin-col p {
    font-size: 0.9rem;
}
.admin-col input[type="text"],
.admin-col input[type="number"],
.admin-col input[type="password"],
.admin-col textarea,
.admin-col select {
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
}
.admin-col textarea {
    resize: vertical;
}

.fieldset-archivos {
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    padding: 8px 10px 10px;
    margin-top: 8px;
}
.fieldset-archivos legend {
    font-size: 0.85rem;
    font-weight: 600;
}
.fieldset-owner {
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    padding: 8px 10px 10px;
    margin-top: 8px;
    background: #f9fafb;
}
.fieldset-owner legend {
    font-size: 0.85rem;
    font-weight: 600;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chk-inline {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 12px;
    background: #f9fafb;
}

/* Botones maps */

.btn-maps {
    display: inline-block;
    margin-right: 6px;
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #0f172a;
    color: #e5e7eb;
    font-size: 0.8rem;
    cursor: pointer;
}
.btn-maps:hover {
    background: #111827;
}

/* Tabla negocios */

.buscador-admin {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.buscador-admin input[type="text"] {
    flex: 1;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
}
.buscador-admin button {
    padding: 6px 10px;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
}
.buscador-admin button:hover {
    background: #1d4ed8;
}

.tabla-scroll {
    max-height: 380px;
    overflow: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}
.tabla-scroll table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.tabla-scroll th,
.tabla-scroll td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
}
.tabla-scroll th {
    background: #f9fafb;
    text-align: left;
    font-weight: 600;
}
.tabla-scroll tbody tr:nth-child(even) {
    background: #f9fafb;
}
.link-btn {
    background: transparent;
    border: none;
    padding: 0;
    color: #2563eb;
    cursor: pointer;
    font-size: 0.8rem;
}

/* Sección editar */

.admin-box {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(15,23,42,0.05);
    padding: 12px 12px 14px;
}
.admin-box h2 {
    margin: 0 0 8px;
}
.admin-box input[type="text"],
.admin-box input[type="password"],
.admin-box input[type="number"],
.admin-box textarea,
.admin-box select {
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
}
.admin-box textarea {
    resize: vertical;
}
.admin-box button[type="submit"] {
    margin-top: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
}
.admin-box button[type="submit"]:hover {
    background: #1d4ed8;
}

/* Login */

.login-body {
    background: radial-gradient(circle at top, #1f2937, #020617);
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-box {
    background: #020617;
    border-radius: 16px;
    padding: 20px 20px 18px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.7);
    border: 1px solid #111827;
}
.login-box h1 {
    margin: 0 0 6px;
    font-size: 1.4rem;
}
.login-box p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    color: #9ca3af;
}
.login-box label {
    font-size: 0.85rem;
}
.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #374151;
    background: #020617;
    color: #e5e7eb;
    font-size: 0.9rem;
}
.login-box button[type="submit"] {
    margin-top: 8px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    border: none;
    background: #22c55e;
    color: #022c22;
    font-weight: 600;
    cursor: pointer;
}
.login-box button[type="submit"]:hover {
    background: #16a34a;
}
.hint-login {
    margin-top: 8px;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Responsive */

@media (max-width: 900px) {
    .admin-columns {
        grid-template-columns: minmax(0,1fr);
    }
}


.admin-tabs {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tab-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
}
.tab-btn.active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
}
.tab-panel {
    display: none;
    margin-bottom: 16px;
}
.tab-panel-active {
    display: block;
}

.admin-box-inline {
    margin-top: 14px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-logo-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #111827;
}


.config-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 10px 12px 12px;
    margin-bottom: 12px;
}
.config-card h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}
.config-banners-negocio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.fieldset-banner-negocio {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 8px 10px 10px;
}
.fieldset-banner-negocio legend {
    font-size: 0.85rem;
    font-weight: 600;
}
