/* === BOTONES === */
.boton {
    display: block;
    width: 50%;
    max-width: 300px;
    padding: 13px 26px;
    font-size: 1.2em;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    color: white;
    background: linear-gradient(145deg, var(--color-dia) 0%, color-mix(in srgb, var(--color-dia) 70%, #000) 100%);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.2),
        0 6px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.boton:active {
    transform: scale(0.97);
    opacity: 0.85;
}

/* === FORMULARIOS === */
.form-moderno {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* === INPUTS === */
.input-group {
    position: relative;
    margin-bottom: 24px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 16px 20px 12px 20px;
    font-size: 1.1em;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

.input-group select {
    appearance: none;
    cursor: pointer;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--color-dia);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-dia) 15%, transparent);
    background: rgba(255, 255, 255, 0.95);
}

.input-group input::placeholder { color: transparent; }

.input-group label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1em;
    pointer-events: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    padding: 0 4px;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group select:focus + label,
.input-group select:not([value=""]) + label {
    top: 0;
    font-size: 0.85em;
    color: var(--color-dia);
    transform: translateY(-50%);
    font-weight: 500;
}

/* === TOGGLE === */
.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.1);
}

.toggle-label {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-dia);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* === CARDS === */
.card-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-align: left;
    margin-bottom: 10px;
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-info { flex: 1; }

.card-nombre {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 4px;
    color: #333;
}

.card-estado {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
}

/* === BOTONES SECUNDARIOS === */
.btn-secundario {
    background: linear-gradient(145deg, var(--color-dia) 0%, color-mix(in srgb, var(--color-dia) 70%, #000) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-secundario:active {
    transform: scale(0.95);
}

.btn-secundario .material-icons {
    font-size: 16px;
    color: white;
}

/* Botón dentro de formularios */
.form-moderno .boton {
    width: 100%;
    max-width: none;
}

/* === STATS === */
.stats-row {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    margin-bottom: 8px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stats-label { font-weight: 600; color: #333; }
.stats-value { font-weight: 700; color: var(--color-dia); font-size: 1.1em; }
.stats-secondary { font-size: 0.9em; color: #666; margin-left: 8px; }

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 9999;
    font-size: 0.95em;
    backdrop-filter: blur(6px);
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.ok { background: var(--color-dia); }
.toast.error { background: #e74c3c; }
.toast.warn { background: #f1c40f; color: #222; }

/* === SECCIONES === */
.seccion { margin-bottom: 40px; }

.seccion-titulo {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--color-dia);
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === LOADING === */
.loading {
    text-align: center;
    color: #666;
    padding: 30px;
    font-size: 1em;
}

/* === AUTH (PIN modal) === */
#pin-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#pin-login {
    max-width: 400px;
    padding: 40px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

#pin-login h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.6em;
}
