@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@300;400;600&display=swap');

/* ======== ESTILO GLOBAL ======== */
body {
    font-family: 'Unbounded', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffefdf;
}

/* === HOME ==================================================================================== */
.home-header {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-header .logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.home-header .logo:hover {
    transform: scale(1.05);
}

.home-header h1 {
    font-size: 1.8em;
    color: white;
    margin: 0;
    letter-spacing: 1px;
    font-weight: 600;
}

.home-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    min-height: calc(100vh - 0px);
    overflow: hidden;
    margin: 0;
    padding: 0 20px;
}

.home-container h1 {
    font-size: 2.5em;
    margin-top: 20px;
    letter-spacing: 1px;
}

.home-container p {
    font-size: 1.1em;
    margin-top: 30px;
    color: #f2f2f2;
}

.home-container img {
    width: 80px;
}

.home-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: white;
    color: #ff7b00;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid white;
    margin-top: 20px;
}

.home-btn:hover {
    background-color: transparent;
    color: white;
    border: 2px solid #ff7b00;
}

.home-image {
    width: 60px;
    margin-top: 40px;
}

.footer {
    background-color: #2a0f00;
    color: #ffdfbd;
    text-align: center;
    padding: 0.1px 0;
    font-size: 0.8em;
    position: fixed;
    bottom: 0;
    width: 100%;
    left: 0;
    z-index: 10;
    border-top: 2.5px solid rgb(255, 98, 0);
}

.footer a {
    color: #ffdfbd;
    text-decoration: none;
    margin: 0 5px;
}

.footer p {
    color: #ffdfbd;
    font-size: 0.9em;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* === LOGIN ==================================================================================== */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 89vh;
    background-color: #ffefdf;
}

.login-container img {
    width: 80px;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.201));
}

.login-container h2 {
    color: #ff7b00;
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 2em;
}

form {
    background: white;
    padding: 30px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 320px;
    margin-bottom: 55px;
}

label {
    font-weight: bold;
    color: #333;
    text-align: left;
}

input {
    width: 100%;
    padding: 10px;
    margin-top: 12px;
    margin-bottom: 25px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: 0.3s;
    box-sizing: border-box;
}

input:focus {
    border-color: #ff7b00;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 237, 221, 0.927);
}

button {
    display: block;
    margin: 0 auto;
    padding: 12px 40px;
    margin-bottom: -5px;
    background-color: #ff7b00;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Unbounded', 'Segoe UI', Arial, sans-serif;
}

button:hover {
    background-color: #e56f00;
}

p {
    color: red;
    font-size: 0.9em;
    margin-top: 0px;
    margin-bottom: 30px;
}

.control-btn {
    display: inline-block;
    background: linear-gradient(90deg, #ff6f00, #ffaa5a);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.80rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    margin-top: -20px;
}

.control-btn:hover {
    background: linear-gradient(90deg, #ff9a3d, #ff7b00);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.login-header{
    display: flex;
    align-items: center;
    margin-bottom: -20px;
    justify-content: space-between;
    padding: 5px 25px;
    height: 70px;
}

.login-header .control-btn:first-child {
    margin-left: 10px;
}

.login-header .control-btn:last-child {
    margin-right: 10px;
}

/*=== PANEL ADMIN ============================================================================== */
.admin-container {
    font-family: 'Unbounded', sans-serif;
    background: #ffdfbd;
}

.admin-header h1 {
    color: #ffffff;
    font-size: 1.5rem;
}

.admin-header {
    display: flex;
    align-items: center;
    margin-bottom: -10px;
    padding: 5px 25px;
    height: 50px;
}

.logout-btn,
.back-login-btn{
    display: inline-block;
    background: linear-gradient(90deg, #ff6f00, #ffaa5a);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.80rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.back-login-btn{
    margin-left: 450px;
}

.logout-btn{
    margin-left: 20px;
}

.back-login-btn:hover,
.logout-btn:hover {
    background: linear-gradient(90deg, #ff9a3d, #ff7b00);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.admin-header .logo {
    width: 50px;
    transition: transform 0.3s ease;
    padding-right: 17px;
    margin-top: -3px;
}

.logo {
    filter:
        drop-shadow(2px 0 2px #ffdfbd70) drop-shadow(-1px 0 2px #ffdfbd70) drop-shadow(0 1px 2px #ffdfbd70) drop-shadow(0 -1px 2px #ffdfbd70);
}

.admin-content {
    transform: scale(0.95);
    display: flex;
}

.admin-form {
    transform-origin: top left;
    flex: 1;
}

.admin-content h3 {
    color: #ff7b00;
    margin-bottom: 20px;
    margin-left: 10px;
    font-size: 1.4rem;
    font-weight: bold;
}

.admin-form input,
.admin-form select {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    margin-bottom: 12px;
    border: 1.8px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    font-family: 'Unbounded', sans-serif;
    font-size: 0.95em;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.admin-form input:hover,
.admin-form select:hover {
    border-color: #ff7b00;
}

.admin-form input:focus,
.admin-form select:focus {
    outline: none;
    border-color: #ff7b00;
    box-shadow: 0 0 8px rgba(255, 123, 0, 0.35);
}

.admin-form select {
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23ff7b00' height='22' viewBox='0 0 24 24' width='22' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
    cursor: pointer;
    padding-right: 20px;
}

.admin-form input,
.admin-form select {
    background: linear-gradient(180deg, #fff, #fffaf5);
}

.admin-form label {
    font-weight: 700;
    color: #222;
    display: block;
}


.admin-form button {
    margin-top: 10px;
    width: 100%;
    background-color: #ff7b00;
    cursor: pointer;
    font-family: 'Unbounded', sans-serif;
}

.admin-table {
    background: white;
    padding: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
}

.admin-table table {
    width: 100%;
}

.admin-section {
    width: 100%;
    padding-left: 37px;
}

.admin-table th {
    background-color: #ff7b00;
    color: white;
    padding: 10px;
}

.admin-table td {
    border: 1px solid #cacaca;
}

.table-filter {
    margin-bottom: 20px;
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-filter label {
    font-weight: bold;
    color: #333;
}

.table-filter select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Unbounded', sans-serif;
    transition: all 0.3s ease;
}

.table-filter select:focus {
    border-color: #ff7b00;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 123, 0, 0.3);
}

.edit-btn {
    background-color: #007bff;
    color: white;
    padding: 7px 20px;
    cursor: pointer;
    margin-top: 10px;
}

.edit-btn:hover {
    background-color: #0056b3;
}

.delete-form {
    all: unset;
}

.delete-btn {
    background-color: red;
    color: white;
    border: none;
    padding: 7.5px 12px;
    margin-top: 7px;
    margin-bottom: 10px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: darkred;
}

.success-msg {
    color: #00a54a;
    font-weight: bold;
    margin-top: 32px;
    margin-bottom: -22px;
    padding: 0px 35px;
    font-size: 1em;
}

.error-msg {
    color: red;
    font-weight: bold;
    margin-top: 32px;
    margin-bottom: -22px;
    padding: 0px 35px;
    font-size: 1em;
}

/* === ANIMACIÓN ==================================================================== */

/* animación de aparición y deslizamiento hacia abajo */
@keyframes fadeSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-header img,
.home-header h1,
.home-container h1,
.home-container p,
.home-container a,
.home-container img {
    opacity: 0;
    animation: fadeSlideDown 1.2s ease-out forwards;
}

.home-img h1 {
    animation-delay: 0.2s;
}

.home-header h1 {
    animation-delay: 0.2s;
}

.home-container h1 {
    animation-delay: 0.2s;
}

.home-container p {
    animation-delay: 0.5s;
}

.home-container a {
    animation-delay: 0.7s;
}

.home-container img {
    animation-delay: 1.3s;
}

.login-container img,
.login-container h2,
.login-container form {
    opacity: 0;
    animation: fadeSlideDown 1s ease-out forwards;
}

.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #ffffff;
    color: #222;
    padding: 25px 30px;
    border-radius: 12px;
    width: 300px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    animation: fadeSlideDown 0.5s ease-out forwards;
    max-height: 450px;
}

.modal-content h2 {
    font-size: 1.2rem;
    color: #ff7b00;
    font-weight: bold;
    margin-top: 0px;
    margin-bottom: 32px;
    text-align: center;
}

.modal-content input,
.modal-content select {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    margin-bottom: 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: 'Unbounded', sans-serif;
    transition: all 0.3s ease;
}

.modal-content input[readonly] {
    background-color: #f3f3f3;
    color: #666;
    border: 1px solid #d0d0d0;
    cursor: not-allowed;
    font-weight: 500;
}

.modal-content input:focus,
.modal-content select:focus {
    border-color: #ff7b00;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 123, 0, 0.3);
}

.modal-content button {
    width: 100%;
    padding: 12px;
    background-color: #ff7b00;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    transition: background 0.3s ease;
    transform: scale(0.85);
    transform-origin: center center;
}

.modal-content button:hover {
    background-color: #e56f00;
}

.modal-content form {
    transform: scale(0.9) translateY(-20px);
    transform-origin: center top;
    font-size: 0.9rem;
    padding: 10px 15px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: inset 0 0 5px rgba(255, 255, 255, 0);
    margin-left: -23px;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 26px;
    color: #444;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ff7b00;
}

/* ======== EFECTO DEGRADADO ANIMADO ======== */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.home-container {
    background: linear-gradient(120deg, #270100, #ff6200, #ffffff);
    background-size: 200% 200%;
    animation: gradientFlow 13s ease infinite;
}

.admin-header {
    background: linear-gradient(120deg, #000000, #ff5900, #ffdfbd);
    background-size: 200% 200%;
    animation: gradientFlow 8s ease infinite;
}

.login-header{
    background: linear-gradient(120deg, #000000, #ff5900, #ffdfbd);
    background-size: 200% 200%;
    animation: gradientFlow 8s ease infinite;
}