/* Variables CSS */
:root {
    --primary-color: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gray-50);
}

/* Pantalla de Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 2rem;
}

.login-box {
    background: var(--white);
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

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

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.login-form {
    text-align: left;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.login-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: #fee2e2;
    color: var(--error-color);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    border: 1px solid #fecaca;
}

.info-message {
    background: #dbeafe;
    color: var(--primary-color);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    border: 1px solid #bfdbfe;
}

/* Panel de Administración */
.admin-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: var(--white);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-left h1 i {
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.logout-btn {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background: var(--gray-200);
}

/* Navegación */
.admin-nav {
    background: var(--white);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--gray-600);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Contenido */
.admin-content {
    flex: 1;
    padding: 2rem;
    max-width: 100%;
    overflow-x: hidden;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.recent-activity {
    margin-top: 2rem;
}

.recent-activity h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.activity-list {
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.activity-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.activity-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--white);
}

.activity-icon.create {
    background: var(--success-color);
}

.activity-icon.update {
    background: var(--warning-color);
}

.activity-icon.delete {
    background: var(--error-color);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: var(--gray-900);
}

.activity-time {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Secciones de contenido */
.section-header {
    display: flex;
    align-items: center;
    justify-content: between;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    flex: 1;
}

.add-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Lista de contenido */
.content-list {
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.list-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-bar {
    flex: 1;
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.filter-bar select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.item-list {
    max-height: 60vh;
    overflow-y: auto;
}

.item {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    transition: background-color 0.2s ease;
}

.item:hover {
    background: var(--gray-50);
}

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

.item-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.item-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.item-category {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.item-category.maintenance {
    background: #dbeafe;
    color: var(--primary-color);
}

.item-category.announcement {
    background: #fef3c7;
    color: var(--warning-color);
}

.item-category.event {
    background: #d1fae5;
    color: var(--success-color);
}

.item-excerpt {
    color: var(--gray-600);
    margin: 0.5rem 0;
    line-height: 1.5;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn.edit {
    background: var(--white);
    color: var(--gray-700);
}

.action-btn.edit:hover {
    background: var(--gray-50);
}

.action-btn.delete {
    background: var(--white);
    color: var(--error-color);
    border-color: var(--error-color);
}

.action-btn.delete:hover {
    background: var(--error-color);
    color: var(--white);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.small {
    max-width: 400px;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.modal-body {
    padding: 2rem;
}

.modal-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Modal de confirmación específico */
#confirm-message {
    line-height: 1.6;
    word-wrap: break-word;
}

#confirm-message br {
    margin: 0.5rem 0;
}

/* Formulario */
.content-form {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.form-group small {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.primary-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    background: var(--primary-dark);
}

.secondary-btn {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-btn:hover {
    background: var(--gray-50);
}

.cancel-btn {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--gray-500);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn:hover {
    background: var(--gray-50);
    color: var(--gray-700);
}

/* Configuración */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.setting-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.setting-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.setting-item label {
    font-weight: 500;
    color: var(--gray-700);
}

/* Respaldos */
.backup-info {
    margin-bottom: 2rem;
}

.backup-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

.backup-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.backup-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.backup-stats {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.backup-list {
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.backup-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.backup-info-item {
    display: flex;
    flex-direction: column;
}

.backup-name {
    font-weight: 500;
    color: var(--gray-900);
}

.backup-date {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.backup-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.backup-actions .action-btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    min-width: auto;
}

.backup-actions .action-btn.delete {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.backup-actions .action-btn.delete:hover {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.backup-actions .action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Sección de Seguridad */
.security-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.security-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.danger-btn {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.danger-btn:hover {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* Herramientas de Seguridad */
.security-tools {
    margin: 2rem 0;
}

.tool-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.tool-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.tool-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0.75rem 0 0 0;
    line-height: 1.5;
}

.ip-unblock-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.ip-unblock-form input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-family: 'SF Mono', Monaco, monospace;
}

.ip-unblock-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Lista de IPs Bloqueadas */
.blocked-ips-container {
    margin: 2rem 0;
}

.blocked-ips-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.table-container {
    overflow-x: auto;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    background: var(--white);
}

.blocked-ips-table {
    width: 100%;
    border-collapse: collapse;
}

.blocked-ips-table th {
    background: var(--gray-50);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.blocked-ips-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.875rem;
    vertical-align: middle;
}

.blocked-ips-table tr:last-child td {
    border-bottom: none;
}

.blocked-ips-table tr:hover {
    background: var(--gray-50);
}

.ip-address {
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 600;
    color: var(--gray-900);
}

.block-date {
    color: var(--gray-600);
}

.block-reason {
    color: var(--gray-700);
}

.threat-score {
    font-weight: 600;
    color: #dc2626;
}

.ip-actions {
    white-space: nowrap;
}

/* Amenazas Recientes */
.recent-threats-container {
    margin: 2rem 0;
}

.recent-threats-container h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.threats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.threat-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    justify-content: between;
    align-items: center;
    gap: 1rem;
}

.threat-info {
    flex: 1;
}

.threat-ip {
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.threat-types {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.threat-details {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
}

.threat-score {
    color: #dc2626;
    font-weight: 600;
}

.threat-flags {
    color: var(--gray-600);
}

.empty-threats,
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.empty-threats i,
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-300);
}

.empty-threats p,
.empty-state p {
    margin: 0.5rem 0;
    font-weight: 500;
}

.empty-threats small,
.empty-state small {
    color: var(--gray-400);
}

/* Notificaciones */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.error {
    border-left-color: var(--error-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

.notification-icon {
    font-size: 1.25rem;
}

.notification.success .notification-icon {
    color: var(--success-color);
}

.notification.error .notification-icon {
    color: var(--error-color);
}

.notification.warning .notification-icon {
    color: var(--warning-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
}

.notification-close:hover {
    color: var(--gray-600);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .header-right {
        justify-content: space-between;
    }

    .admin-nav {
        padding: 1rem;
        gap: 0.25rem;
    }

    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .list-header {
        flex-direction: column;
        gap: 1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-actions {
        padding: 1rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .notification {
        min-width: auto;
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }

    .login-box {
        padding: 2rem;
    }

    .item-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .item-actions {
        flex-wrap: wrap;
    }

    .backup-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    /* Responsive Security Section */
    .security-stats {
        grid-template-columns: 1fr;
    }

    .security-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ip-unblock-form {
        flex-direction: column;
        align-items: stretch;
    }

    .ip-unblock-form input {
        min-width: auto;
    }

    .blocked-ips-table {
        font-size: 0.75rem;
    }

    .blocked-ips-table th,
    .blocked-ips-table td {
        padding: 0.5rem;
    }

    .threat-item {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .security-tools .tool-card {
        padding: 1rem;
    }

    .ip-unblock-form {
        flex-direction: column;
        gap: 0.5rem;
    }

    .security-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .table-container {
        overflow-x: auto;
    }

    .blocked-ips-table {
        min-width: 600px;
    }
}

/* Estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-300);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utilidades */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

/* Document Type Toggle Styles */
.document-type-toggle {
    margin-bottom: 1.5rem;
}

.radio-group {
    display: flex;
    gap: 1rem;
    background: var(--gray-50);
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-200);
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 500;
    color: var(--gray-600);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-option:has(input[type="radio"]:checked) {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--primary-color);
}

.radio-label {
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

/* Document sections visibility */
.document-section {
    transition: all 0.3s ease;
}

.document-section.hidden {
    display: none;
}

/* URL validation styles */
.url-validation {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.url-validation.show {
    opacity: 1;
    transform: translateY(0);
}

.url-validation.valid {
    color: var(--success-color);
}

.url-validation.invalid {
    color: var(--error-color);
}

.url-validation svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* URL input with validation state */
.form-group input.url-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group input.url-invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Enhanced form group styles for document sections */
.form-group.document-upload-group,
.form-group.document-url-group {
    transition: all 0.3s ease;
}

.form-group.document-upload-group.hidden,
.form-group.document-url-group.hidden {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Real-time validation styles */
.form-group input.valid,
.form-group select.valid,
.form-group textarea.valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
    display: none;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--error-color);
    font-weight: 500;
}

.field-error::before {
    content: '⚠️';
    margin-right: 0.5rem;
}

/* Preview button states */
.secondary-btn.warning {
    background: var(--warning-color);
    color: var(--white);
    border-color: var(--warning-color);
}

.secondary-btn.warning:hover {
    background: #d97706;
    border-color: #d97706;
}

.secondary-btn.disabled,
.primary-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.secondary-btn.disabled:hover,
.primary-btn.disabled:hover {
    transform: none;
    background: var(--gray-400);
    border-color: var(--gray-400);
}

/* File upload styling enhancement */
.form-group input[type="file"] {
    padding: 0.75rem;
    border: 2px dashed var(--gray-300);
    border-radius: 0.5rem;
    background: var(--gray-50);
    transition: all 0.2s ease;
}

.form-group input[type="file"]:hover {
    border-color: var(--primary-color);
    background: var(--white);
}

.form-group input[type="file"]:focus {
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

/* Preview Modal Styles */
.preview-modal-content {
    max-width: 1200px;
    width: 95vw;
    max-height: 95vh;
}

.preview-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 1.5rem 2rem;
}

.preview-container {
    margin-bottom: 2rem;
}

/* Preview Minutes Item Simulation */
.preview-minutes-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.preview-minutes-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.preview-minutes-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.preview-minutes-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-minutes-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.preview-minutes-details {
    flex: 1;
}

.preview-minutes-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.preview-minutes-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.preview-minutes-date,
.preview-minutes-type,
.preview-minutes-attendance,
.preview-minutes-file-size {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.preview-minutes-type {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 500;
}

.preview-minutes-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.preview-minutes-action {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    color: var(--gray-700);
}

.preview-minutes-action--view:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.preview-minutes-action--download {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.preview-minutes-action--download:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Preview Content Section */
.preview-content-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.preview-content-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.preview-modal-simulation {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.preview-modal-header {
    margin-bottom: 1rem;
}

.preview-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.preview-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.preview-modal-meta .news__category,
.preview-modal-meta .minutes__type {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.preview-modal-meta .news__category--maintenance {
    background: var(--primary-color);
}

.preview-modal-meta .news__category--announcement {
    background: var(--warning-color);
}

.preview-modal-meta .news__category--event {
    background: var(--success-color);
}

.preview-modal-body {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    line-height: 1.6;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    max-height: 300px;
    overflow-y: auto;
}

/* Preview Document Info */
.preview-document-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.preview-document-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.document-preview-details {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1rem;
}

.document-info-item {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.document-info-item:last-child {
    margin-bottom: 0;
}

.document-info-item strong {
    color: var(--gray-900);
    font-weight: 600;
}

.document-info-item a {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-all;
}

.document-info-item a:hover {
    text-decoration: underline;
}

/* Preview Alerts */
.preview-alerts {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 0.5rem;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-warning {
    color: #92400e;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.alert-content ul {
    margin: 0.5rem 0 0 1rem;
    list-style-type: disc;
}

.alert-content li {
    margin-bottom: 0.25rem;
}

/* Preview Actions */
.preview-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.preview-actions .secondary-btn,
.preview-actions .primary-btn {
    min-width: auto;
    white-space: nowrap;
}

/* Responsive adjustments for preview modal */
@media (max-width: 1024px) {
    .preview-modal-content {
        width: 98vw;
        max-height: 98vh;
    }

    .preview-minutes-header {
        flex-direction: column;
        gap: 1rem;
    }

    .preview-minutes-actions {
        align-self: flex-start;
    }
}

@media (max-width: 768px) {
    .preview-body {
        padding: 1rem;
    }

    .preview-minutes-item {
        padding: 1rem;
    }

    .preview-minutes-info {
        flex-direction: column;
        text-align: center;
    }

    .preview-minutes-meta {
        justify-content: center;
        text-align: center;
    }

    .preview-actions {
        flex-direction: column-reverse;
        padding: 1rem;
    }

    .preview-actions .primary-btn,
    .preview-actions .secondary-btn {
        width: 100%;
        justify-content: center;
    }

    .preview-modal-simulation {
        padding: 1rem;
    }

    .preview-modal-body {
        max-height: 200px;
    }
}

@media (max-width: 480px) {
    .preview-modal-content {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .preview-minutes-actions {
        flex-direction: column;
        width: 100%;
    }

    .preview-minutes-action {
        justify-content: center;
    }
}

/* Form Progress Bar */
.form-progress-bar {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.progress-track {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Temporary Notifications */
.temp-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--white);
    color: var(--gray-900);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    font-size: 0.875rem;
    z-index: 1200;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 300px;
}

.temp-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.temp-notification--success {
    border-left-color: var(--success-color);
}

.temp-notification--error {
    border-left-color: var(--error-color);
}

.temp-notification--warning {
    border-left-color: var(--warning-color);
}

.temp-notification--info {
    border-left-color: var(--primary-color);
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gray-800);
    z-index: 1000;
    margin-bottom: -5px;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

@keyframes tooltipFadeIn {
    to {
        opacity: 1;
    }
}

/* Enhanced Form Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation-name: none;
}

/* Focus Management Enhancements */
.modal.active .form-group:first-child input,
.modal.active .form-group:first-child select,
.modal.active .form-group:first-child textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Enhanced Modal Transitions */
.modal {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active {
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Enhancements for UX Features */
@media (max-width: 768px) {
    .temp-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
        transform: translateY(-100%);
    }

    .temp-notification.show {
        transform: translateY(0);
    }

    .form-progress-bar {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }

    .progress-text {
        font-size: 0.8rem;
    }

    [data-tooltip]:hover::after {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 200px;
        white-space: normal;
        text-align: center;
    }

    [data-tooltip]:hover::before {
        display: none;
    }
}