/* ver_ejemplares.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2D2A4A 20%, #002D62 40%, #FFFFFF 60%, #A51931 80%, #CE1126 100%);
    background-size: 200% 200%;
    animation: gradientBG 12s ease infinite;
    color: #333;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1e3c72;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.splash-screen.hide {
    opacity: 0;
}

.splash-screen img {
    width: 150px;
    height: auto;
}

.navbar {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
}

.navbar-brand img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.content {
    padding: 15px;
    padding-bottom: 80px;
    flex: 1;
}

.card-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card-container h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.ejemplar-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.ejemplar-card:hover {
    transform: translateY(-3px);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.numero-registro {
    flex: 1;
    font-size: 1rem;
}

.numero-registro span {
    font-weight: 500;
    color: #1e3c72;
}

.photo {
    flex-shrink: 0;
}

.ejemplar-card .photo img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
}

.data-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.data-item {
    flex: 1 1 auto;
    font-size: 0.9rem;
    min-width: 150px;
}

.data-item span {
    font-weight: 500;
    color: #1e3c72;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-end;
}

.action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.edit-btn {
    background-color: #2a5298;
    color: #fff;
}

.edit-btn:hover {
    background-color: #1e3c72;
}

.delete-btn {
    background-color: #dc3545;
    color: #fff;
}

.delete-btn:hover {
    background-color: #c82333;
}

.add-btn {
    position: fixed;
    bottom: 80px;
    right: 15px;
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease;
}

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

.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1001;
    display: none;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    max-width: 90%;
}

.message.error {
    background-color: #dc3545;
}

.form-label.obligatorio::after {
    content: '*';
    color: #dc3545;
    margin-left: 5px;
}

.modal-content {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background-color: #fff;
}

.modal-header {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 15px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    color: #1e3c72;
}

.form-control,
.form-select {
    border-radius: 5px;
    border: 1px solid #ced4da;
    padding: 8px;
    font-size: 0.9rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #2a5298;
    box-shadow: 0 0 5px rgba(42, 82, 152, 0.3);
}

.modal-footer {
    border-top: none;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
}

.save-btn {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    transition: background 0.3s ease;
    flex: 1;
}

.save-btn:hover {
    background: linear-gradient(90deg, #2a5298 0%, #1e3c72 100%);
}

.cancel-btn {
    background-color: #6c757d;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    flex: 1;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

.confirm-btn {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    flex: 1;
}

.confirm-btn:hover {
    background-color: #c82333;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.bottom-nav-item {
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    transition: color 0.3s ease;
    padding: 5px;
}

.bottom-nav-item:hover {
    color: #d1e7ff;
}

.bottom-nav-item .material-icons {
    font-size: 1.5rem;
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #dc3545;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
}

/* Media Queries para Dispositivos Móviles */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.3rem;
    }

    .navbar-brand img {
        width: 35px;
        height: 35px;
    }

    .content {
        padding: 10px;
        padding-bottom: 70px;
    }

    .card-container h3 {
        font-size: 1.3rem;
    }

    .ejemplar-card {
        padding: 10px;
    }

    .header-row {
        flex-direction: row;
        align-items: center;
    }

    .numero-registro {
        font-size: 0.95rem;
    }

    .ejemplar-card .photo img {
        width: 50px;
        height: 50px;
    }

    .data-row {
        flex-direction: column;
        gap: 8px;
    }

    .data-item {
        font-size: 0.85rem;
        min-width: 100%;
    }

    .actions {
        justify-content: space-between;
    }

    .action-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 48%;
    }

    .add-btn {
        bottom: 70px;
        right: 10px;
        width: 45px;
        height: 45px;
    }

    .bottom-nav {
        padding: 8px 0;
    }

    .bottom-nav-item {
        font-size: 0.7rem;
    }

    .bottom-nav-item .material-icons {
        font-size: 1.3rem;
    }

    .modal-body {
        padding: 10px;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .form-control,
    .form-select {
        font-size: 0.85rem;
        padding: 6px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }

    .save-btn,
    .cancel-btn,
    .confirm-btn {
        padding: 10px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .header-row {
        flex-direction: row;
        align-items: center;
    }

    .ejemplar-card .photo img {
        width: 45px;
        height: 45px;
    }

    .numero-registro {
        font-size: 0.9rem;
    }

    .data-item {
        font-size: 0.8rem;
    }

    .action-btn {
        font-size: 0.8rem;
    }
}

@media (max-width: 375px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-brand img {
        width: 30px;
        height: 30px;
    }

    .card-container h3 {
        font-size: 1.2rem;
    }

    .ejemplar-card {
        padding: 8px;
    }

    .numero-registro {
        font-size: 0.85rem;
    }

    .data-item {
        font-size: 0.75rem;
    }

    .action-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .add-btn {
        width: 40px;
        height: 40px;
    }

    .bottom-nav-item {
        font-size: 0.65rem;
    }

    .bottom-nav-item .material-icons {
        font-size: 1.2rem;
    }
}