/* ============================
   ESTILO GENERAL - MODERNO
============================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1f2937;
    min-height: 100vh;
    padding: 20px;
}

/* Importar fuente Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

/* ============================
   HEADER MODERNO
============================ */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #1f2937;
    padding: 30px;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

header h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================
   BOTONES MODERNOS
============================ */
.btn {
    padding: 10px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

.btn-back {
    background: linear-gradient(135deg, #868f96 0%, #596164 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-back:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Contenedor de botones superiores */
.actions-top {
    width: 95%;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* ============================
   TABLAS MODERNAS
============================ */
.title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 30px;
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.styled-table {
    width: 95%;
    margin: 0 auto;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.styled-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.styled-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.styled-table td {
    padding: 14px 20px;
    text-align: left;
}

.styled-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.styled-table tbody tr:nth-child(even) {
    background: #faf9ff;
}

.styled-table tbody tr:hover {
    background: linear-gradient(90deg, #f3f4ff 0%, #ffffff 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Acciones dentro de la tabla */
.actions {
    display: flex;
    gap: 10px;
}

.btn-edit {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #5b21b6;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 237, 234, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #dc2626;
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 154, 158, 0.4);
}

.delete-form {
    display: inline;
}

/* ============================
   FORMULARIOS MODERNOS
============================ */
.container {
    width: 100%;
    max-width: 500px;
    margin: 40px auto;
    animation: fadeInUp 0.5s ease;
}

.top-actions {
    margin-bottom: 20px;
}

.form-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 35px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.form-card h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

label {
    font-weight: 600;
    margin-top: 18px;
    margin-bottom: 6px;
    display: block;
    color: #4a5568;
    font-size: 14px;
}

input,
select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

input:focus,
select:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

input:hover,
select:hover {
    border-color: #a0aec0;
}

.error {
    color: #f56565;
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px;
    border: none;
    border-radius: 12px;
    margin-top: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.link:hover {
    color: #764ba2;
    transform: translateX(5px);
}

/* ============================
   ANIMACIONES
============================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}