/* src/css/admin.css */
.admin-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.admin-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.logout-btn-small {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.logout-btn-small:hover {
    background-color: #fef2f2;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr 2fr;
    }
    .col-span-2 {
        grid-column: span 2;
    }
}

.admin-card {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius-card);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.admin-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.admin-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.admin-form .form-group {
    margin-bottom: 1rem;
}

.admin-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.admin-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
}

.admin-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.admin-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.admin-btn:hover {
    opacity: 0.9;
}

.form-msg {
    margin-top: 1rem;
    font-size: 0.85rem;
    text-align: center;
    min-height: 1rem;
}

.form-msg.success {
    color: #10b981;
}

.form-msg.error {
    color: #ef4444;
}

/* Tabla */
.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th, .admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); font-style: italic; }
.text-error { color: #ef4444; }

/* Botones de acción en tabla */
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem 0.4rem;
    transition: transform 0.2s;
    border-radius: 4px;
}

.action-btn:hover {
    transform: scale(1.1);
    background-color: var(--background-color);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal Content */
.modal-content {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius-card);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}
