:root {
    --primary-color: #667eea;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body.dark {
    --primary-color: #6366f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

body.dark {
    /* Mantenemos el mismo fondo */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

body.dark .login-container {
    background: #1e293b;
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

body.dark h1 {
    color: #f8fafc;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

body.dark label {
    color: #cbd5e1;
}

input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

body.dark input {
    background: #334155;
    border-color: #475569;
    color: #f8fafc;
}

input:focus {
    border-color: #667eea;
    outline: none;
}

body.dark input:focus {
    border-color: #6366f1;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

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

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

.theme-toggle button {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 24px;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.theme-toggle button:hover {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.icon {
    position: absolute;
    transition: opacity 0.3s, transform 0.3s;
}

.icon svg {
    width: 20px;
    height: 20px;
    color: currentColor;
}

.sun {
    opacity: 0;
    transform: rotate(-90deg);
}

.moon {
    opacity: 1;
}

body.dark .sun {
    opacity: 1;
    transform: rotate(0);
}

body.dark .moon {
    opacity: 0;
    transform: rotate(90deg);
}

/* Estilos para modo oscuro del botón de tema */
body.dark .theme-toggle button {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

body.dark .theme-toggle button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Estilos para el encabezado de marca */
.brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 6px;
}

.logo {
    width: 24px;
    height: 24px;
    color: white;
    stroke-width: 1.5;
}

.brand-name {
    font-size: 28px;
    color: #333;
    margin: 0;
}

.welcome-text {
    color: #555;
    margin-bottom: 30px;
    text-align: center;
    font-weight: normal;
    font-size: 20px;
}

body.dark .brand-name {
    color: #f8fafc;
}

body.dark .welcome-text {
    color: #cbd5e1;
}

/* Estilos para el logo en modo oscuro */
body.dark .logo-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Estilos para enlace de registro */
.register-link {
    text-align: center;
    margin-top: 20px;
    color: #555;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.register-link a:hover {
    text-decoration: underline;
}

body.dark .register-link {
    color: #cbd5e1;
}

body.dark .register-link a {
    color: #8b5cf6;
}

/* Estilos para el dashboard */
.dashboard-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
}

body.dark .dashboard-container {
    background: #1e293b;
}

/* Línea divisoria */
.divider-line {
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    margin: 12px 0 20px 0;
}

body.dark .divider-line {
    background: #475569;
}

.devices-title {
    color: #555;
    margin-bottom: 20px;
    text-align: center;
}

body.dark .devices-title {
    color: #cbd5e1;
}

.devices-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Estilos para tarjetas con imagen a la derecha */
.device-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.device-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.device-top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.device-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
    transition: color 0.3s ease;
}

body.dark .device-name {
    color: #f8fafc;
}

.device-weight {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    transition: transform 0.3s ease;
}

body.dark .device-weight {
    color: #8b5cf6;
}

.device-bottom-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.device-meta {
    font-size: 14px;
    line-height: 1.4;
    color: #64748b;
}

body.dark .device-meta {
    color: #94a3b8;
}

.device-meta span {
    font-weight: 500;
    color: #64748b;
}

body.dark .device-meta span {
    color: #8b5cf6;
}

.device-image-container {
    width: 100px;
    min-width: 100px;
    height: 100px;
    margin-left: 20px;
    background: #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

body.dark .device-card {
    background: #334155;
    border: 2px solid #475569;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body.dark .device-image-container {
    background: #475569;
}

/* Efectos hover para las tarjetas */
.device-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: #8b5cf6;
}

body.dark .device-card:hover {
    border-color: #a855f7;
}

.device-card:hover::before {
    transform: scaleX(1);
}

.device-card:hover .device-name {
    color: var(--primary-color);
}

.device-card:hover .device-weight {
    transform: scale(1.05);
}

.device-card:hover .device-image {
    transform: scale(1.1);
}

/* Estilos para pestañas */
.tabs-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 10px;
    padding-bottom: 10px; /* Espacio extra para el subrayado */
}

.tabs-left {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 0;
    align-items: center;
}

.tabs-right {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
    align-items: center;
}

.tab {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;

    min-width: max-content;
    font-size: 18px;
    font-weight: 600;
    padding: 8px 8px;
    cursor: pointer;
    white-space: nowrap;
    color: #64748b;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    scroll-snap-align: start;
}

.tab.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
    pointer-events: none; /* Evita que el tab activo pierda el estado */
}

.tab.add-btn, button.add-btn[data-no-tab] {
    flex: 0 0 auto;
    width: 38px;
    height: 36px;
    min-width: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    background-color: #8b5cf6;
    color: white;
    font-weight: bold;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Estilos profesionales para botones */
.professional-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.professional-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.professional-btn:hover::before {
    opacity: 1;
}

.professional-btn svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    transition: transform 0.2s ease;
}

.tab.add-btn {
    font-size: 1.2em;
}

button.add-btn[data-no-tab] {
    font-size: 0.8em;
}

.tab.add-btn:hover, .professional-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

.professional-btn:hover svg {
    transform: scale(1.1);
}

.professional-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tab.add-btn:focus, .professional-btn:focus {
    outline: none;
}

.professional-btn:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

body.dark .tab:not(.add-btn) {
    color: #94a3b8;
}

body.dark .tab.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

body.dark .tab.add-btn, body.dark .professional-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.dark .tab.add-btn:hover, body.dark .professional-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px) scale(1.05);
}

/* Reglas heredadas por .professional-btn */

/* Contenedor para las secciones */
.content-section {
    display: none;
}

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

/* Estilos para tarjetas de aves individuales */
.bird-alert {
    color: #dc2626;
    font-weight: 600;
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
    position: relative;
    overflow: hidden;
}

.bird-alert::before {
    content: '⚠️';
    font-size: 18px;
    flex-shrink: 0;
}

.bird-alert::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.scale-alert {
    color: #dc2626;
    font-weight: 600;
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
    position: relative;
    overflow: hidden;
}

.scale-alert::before {
    content: '⚠️';
    font-size: 18px;
    flex-shrink: 0;
}

.scale-alert::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

body.dark .bird-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

body.dark .scale-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.bird-species {
    color: #10b981;
    font-weight: 500;
}

/* Estilos para el buscador */
.search-container {
    display: flex;
    gap: 8px;
    margin: 10px 0 20px;
    padding: 0 10px;
    animation: fadeIn 0.3s ease;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

#searchInput {
    flex: 1;
    padding: 8px 40px 8px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: border 0.2s;
    width: 100%;
}

#searchInput:focus {
    border-color: #10b981;
}

/* Modo oscuro para barra de búsqueda */
body.dark #searchInput {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark #searchInput:focus {
    border-color: #10b981;
}

body.dark .search-input-wrapper {
    background-color: transparent;
}

/* Estilos específicos para el botón de limpiar */
.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #6b7280;
    border: none;
    border-radius: 0;
    width: 28px;
    height: 28px;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.search-clear-btn:hover {
    color: #ef4444;
}

.search-clear-btn:active {
    color: #dc2626;
}

/* Modo oscuro para botón de limpiar búsqueda */
body.dark .search-clear-btn {
    color: #9ca3af;
}

body.dark .search-clear-btn:hover {
    color: #ef4444;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Estilos para formularios de añadir */
.add-forms-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin: 10px 0;
}

body.dark .add-forms-container {
    background: #334155;
}

.add-form {
    display: none;
}

.add-form.active {
    display: block;
}

.add-form h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

body.dark .add-form h2 {
    color: #f8fafc;
}

.add-form .form-group {
    margin-bottom: 15px;
}

.add-form label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

body.dark .add-form label {
    color: #cbd5e1;
}

.add-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

body.dark .add-form input {
    background: #475569;
    border-color: #475569;
    color: #f8fafc;
}

.add-form .form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.add-form button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.add-form .submit-btn {
    background: #8b5cf6;
    color: white;
}

.add-form .submit-btn:hover {
    background: #7c3aed;
}

.add-form .cancel-btn {
    background: #e2e8f0;
    color: #333;
}

.add-form .cancel-btn:hover {
    background: #cbd5e1;
}

body.dark .add-form .submit-btn {
    background: #7c3aed;
}

body.dark .add-form .cancel-btn {
    background: #475569;
    color: #f8fafc;
}

body.dark .add-form .cancel-btn:hover {
    background: #334155;
}

/* Estilos para formularios de registro */
.add-form {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
}

.form-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.form-content {
    background: var(--form-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    color: var(--text-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-content button {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
}

.form-content button[type="submit"] {
    background: #8b5cf6;
    color: white;
}

.form-content .cancel-btn {
    background: #f44336;
    color: white;
    margin-top: 0.5rem;
}

/* Estilos para dark mode */
:root {
    --form-bg: white;
    --text-color: #333;
    --input-bg: white;
    --input-border: #ddd;
    --submit-btn: #8b5cf6;
    --cancel-btn: #e2e8f0;
}

body.dark {
    --form-bg: #1e293b;
    --text-color: #f8fafc;
    --input-bg: #475569;
    --input-border: #475569;
    --submit-btn: #7c3aed;
    --cancel-btn: #475569;
}

.dark .form-content .cancel-btn {
    background: #f44336;
}

/* Estilos para páginas de detalle */
.detail-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
}

body.dark .detail-container {
    background: #1e293b;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.back-arrow-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #64748b;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.back-arrow-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateX(-2px);
}

.back-arrow-btn svg {
    width: 20px;
    height: 20px;
}

body.dark .back-arrow-btn {
    border-color: #475569;
    color: #94a3b8;
}

body.dark .back-arrow-btn:hover {
    background: #334155;
    border-color: #64748b;
    color: #cbd5e1;
}

.detail-header h1 {
    margin: 0;
    color: #333;
    flex: 1;
}

body.dark .detail-header h1 {
    color: #f8fafc;
}

.detail-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.detail-image-container {
    width: 100%;
    height: 300px;
    background: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    padding: 0 10px;
}

.detail-info h2 {
    color: #333;
    margin-bottom: 15px;
}

body.dark .detail-info h2 {
    color: #f8fafc;
}

#alertContainer {
    margin-bottom: 15px;
}

#alertContainer .bird-alert {
    margin-bottom: 0;
    margin-top: 0;
}

.detail-meta p {
    color: #64748b;
    margin-bottom: 8px;
}

body.dark .detail-meta p {
    color: #94a3b8;
}

.detail-meta span {
    font-weight: 500;
    color: #8b5cf6;
}

.back-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 40px;
}

.back-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.edit-btn {
    margin-top: 10px;
    padding: 10px 15px; /* Ajustar padding si es necesario */
    background: #f59e0b; /* Naranja para editar */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex; /* Para alinear con el botón de eliminar */
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-right: 10px; /* Espacio entre editar y eliminar */
}

.edit-btn:hover {
    background: #d97706; /* Naranja más oscuro */
}

.edit-btn svg {
    width: 16px;
    height: 16px;
}

.delete-btn {
    margin-top: 10px;
    padding: 10px 20px;
    background: #ef4444; /* Rojo */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Espacio entre el icono y el texto */
}

.delete-btn:hover {
    background: #dc2626; /* Rojo más oscuro */
}

.delete-btn svg {
    width: 16px;
    height: 16px;
}

/* Contenedor para los botones de acción en la página de detalles */
.action-buttons-container {
    display: flex;
    justify-content: space-between; /* Alinea Volver a la izquierda y Eliminar a la derecha */
    align-items: center; /* Centra los botones verticalmente */
    margin-top: 20px; /* Espacio superior similar al que tenía el botón Volver */
    gap: 15px; /* Espacio entre los elementos */
}

/* Ajustes para que el botón de eliminar no ocupe todo el espacio si es el único a la derecha */
.action-buttons-container > div { /* Estilo para el div que contiene editar y eliminar */
    display: flex;
    align-items: center;
}

.action-buttons-container .delete-btn {
    margin-top: 0; /* Quitar el margen superior que tenía individualmente */
}

.action-buttons-container .edit-btn {
    margin-top: 0; /* Quitar el margen superior que tenía individualmente */
}

/* Asegurar que el botón Volver esté alineado con los otros botones */
.action-buttons-container .back-btn {
    margin-top: 0; /* Quitar el margen superior para alinear con los otros botones */
}

/* Mejoras en los botones de editar y eliminar */
.edit-btn, .delete-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 40px;
    min-height: 40px;
    position: relative;
    overflow: hidden;
}

.edit-btn::before, .delete-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.edit-btn:hover::before, .delete-btn:hover::before {
    opacity: 1;
}

.edit-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.edit-btn svg, .delete-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.edit-btn:hover svg, .delete-btn:hover svg {
    transform: scale(1.15);
}

/* Botón de Volver mejorado */
.back-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 40px;
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.back-btn:hover::before {
    opacity: 1;
}

.back-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Modo oscuro para los botones mejorados */
body.dark .edit-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

body.dark .edit-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

body.dark .delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

body.dark .delete-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

body.dark .back-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

body.dark .back-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

/* Prevent body scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}
