.hidden {
    display: none !important;
}

/* Estilos generales */
ion-content {
    --background: #f5f5f5;
}

/* Header y Toolbar */
ion-header ion-toolbar {
    --background: #ffffff;
    --min-height: 60px;
    --padding-top: 8px;
    --padding-bottom: 8px;
}

ion-header ion-title {
    font-size: 20px;
    font-weight: 600;
}

/* Contenedor principal */
.content-container {
    padding: 16px;
    max-width: 100%;
}

/* Login */
.center-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

.center-content ion-card {
    width: 100%;
    max-width: 400px;
    margin: 0;
}

/* Estilos para el login */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header .login-icon {
    font-size: 150px;
    color: #666;
    margin-bottom: 24px;
}

.login-header h2 {
    font-size: 28px;
    color: #333;
    margin: 0;
    font-weight: 500;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form ion-item {
    --background: #f4f5f8;
    --border-radius: 8px;
    --padding-start: 16px;
    --padding-end: 16px;
    --inner-padding-end: 16px;
    margin-bottom: 16px;
}

.login-form .custom-input {
    --padding-start: 0;
    --placeholder-color: #999;
    --placeholder-opacity: 1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.form-options ion-checkbox {
    margin-right: 8px;
}

.forgot-link {
    color: var(--ion-color-primary);
    text-decoration: none;
}

.login-button {
    margin-bottom: 32px;
    --border-radius: 8px;
    height: 48px;
}

.signup-section {
    text-align: center;
}

.signup-section p {
    color: #666;
    font-size: 12px;
    margin-bottom: 16px;
}

.signup-button {
    --border-radius: 8px;
    height: 48px;
}

/* Searchbar */
ion-searchbar {
    margin: 60px 10px 10px 10px;
    --background: #ffffff;
}

/* Lista de gastos */
.full-width-list {
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
}

.expense-item {
    --padding-start: 16px;
    --padding-end: 16px;
    --inner-padding-end: 8px;
    margin-bottom: 8px;
    border-radius: 10px;
    --background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%;
}

.expense-item ion-label {
    margin: 10px 0;
}

.expense-item h2 {
    font-size: 16px;
    font-weight: 500;
    color: #1f1f1f;
    margin: 0;
    padding: 0;
}

.expense-item p {
    font-size: 14px;
    color: #666;
    margin: 4px 0 0 0;
}

.expense-amount {
    color: #ff4961;
    font-weight: 600;
    margin-right: 12px;
    font-size: 16px;
}

/* Botón de carrito y badge */
#nextButton {
    position: relative;
    margin-right: 12px;
    font-size: 24px;
    min-width: 48px;
    min-height: 48px;
}

#nextButton ion-icon {
    font-size: 28px;
}

ion-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mensaje de error */
.error-message {
    background: #fff3cd;
    color: #856404;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    text-align: center;
    font-size: 14px;
    width: 100%;
}

/* Botones de acción */
ion-button.remove-button {
    margin: 0;
    --padding-start: 8px;
    --padding-end: 8px;
}

ion-icon[name="add-circle-outline"] {
    font-size: 24px;
    color: #3880ff;
    margin-left: 8px;
}

/* Sección de carga de archivos */
.upload-section {
    padding: 16px;
    background: #ffffff;
    border-radius: 10px;
    margin-top: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.upload-section ion-item {
    --background: transparent;
    --border-color: transparent;
}

/* Custom File Upload Styles */
.custom-file-upload {
    margin: 15px;
    text-align: center;
}

.custom-file-upload input[type="file"].hidden {
    display: none;
}

.select-files-btn {
    --background: transparent;
    --color: var(--ion-color-primary);
    --border-style: dashed;
    --border-width: 2px;
    --padding-top: 15px;
    --padding-bottom: 15px;
    margin: 10px 0;
}

.file-count {
    font-size: 0.9em;
    color: var(--ion-color-medium);
    margin-top: 5px;
}

/* Sección del total */
.total-section {
    background: #ffffff;
    border-radius: 10px;
    margin: 16px 0;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.total-item {
    --background: transparent;
    --border-color: transparent;
    --padding-start: 0;
    --padding-end: 0;
}

.total-amount {
    font-size: 20px;
    font-weight: 600;
    color: #3880ff;
}

/* Estilos para las vistas */
#expensesView, #selectedExpensesView, #profileView {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.hidden {
    display: none !important;
}

/* Ajuste para la vista de gastos seleccionados */
#selectedExpensesView .content-container {
    padding-top: 70px; /* Aumentado de 56px a 70px */
    height: 100%;
    overflow-y: auto;
}

#selectedExpensesList {
    margin-top: 0;
    padding-top: 0;
}

/* Estilos del menú */
ion-menu ion-toolbar {
    --background: #3880ff;
    --color: #ffffff;
}

ion-menu ion-title {
    font-size: 20px;
    font-weight: 500;
}

ion-menu ion-content {
    --background: #ffffff;
}

ion-menu ion-item {
    --padding-start: 16px;
    margin: 8px 0;
    border-radius: 4px;
    --ripple-color: #3880ff;
}

ion-menu ion-icon {
    font-size: 24px;
    margin-right: 8px;
}

ion-menu ion-item:hover {
    --background: #f4f5f8;
}

#logoutButton {
    margin-top: 16px;
    --ripple-color: #ff4961;
}

/* Estilos para el perfil */
.profile-container {
    padding-top: 70px;
    background-color: #f4f5f8;
    height: 100%;
}

.profile-header {
    background-color: white;
    padding: 24px 0;
    text-align: center;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
}

.profile-username {
    font-size: 16px;
    color: #333;
}

.profile-section {
    background-color: white;
    padding: 16px 0;
    margin-bottom: 16px;
}

.section-title {
    color: #666;
    font-size: 13px;
    padding: 0 16px;
    margin-bottom: 16px;
}

.profile-item {
    padding: 8px 16px;
}

.item-label {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-content ion-icon {
    color: #666;
    font-size: 20px;
}

.item-content ion-input {
    --padding-start: 0;
    --padding-top: 0;
    --padding-bottom: 0;
    --placeholder-color: #999;
    font-size: 14px;
}

.profile-actions {
    padding: 16px;
}

.change-password-btn {
    --color: #666;
    --background: transparent;
    --background-activated: transparent;
    --background-focused: transparent;
    --background-hover: transparent;
    --box-shadow: none;
    height: 44px;
    font-weight: normal;
}

.change-password-btn ion-icon {
    margin-right: 8px;
}

.profile-image-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 20px auto;
}

.profile-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ion-color-primary);
}

.change-photo-button {
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 0;
    --padding-start: 8px;
    --padding-end: 8px;
}

.change-photo-button ion-icon {
    font-size: 20px;
}

#imageInput {
    display: none;
}

#profileForm {
    padding: 20px;
}

#profileForm ion-item {
    --padding-start: 0;
    margin-bottom: 16px;
}

#profileForm ion-icon {
    font-size: 20px;
    margin-right: 8px;
}

#profileView .content-container {
    padding-top: 70px;
}

#profileView ion-card {
    margin: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Estilos para el modal de cambio de contraseña */
.password-modal {
    --width: 100%;
    --height: auto;
    --background: #f4f5f8;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #1f1f1f;
    color: white;
}

.modal-header ion-title {
    font-size: 16px;
    font-weight: 500;
}

.modal-header ion-button {
    --color: white;
    --padding-end: 0;
}

.modal-content {
    padding: 16px;
}

.password-modal ion-list {
    background: transparent;
    padding: 0;
}

.password-modal ion-item {
    --background: #1f1f1f;
    --color: white;
    --border-color: rgba(255,255,255,0.1);
    margin-bottom: 8px;
    --border-radius: 4px;
}

.password-modal ion-item:last-child {
    margin-bottom: 16px;
}

.password-modal ion-label {
    --color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.password-modal ion-input {
    --color: white;
    --placeholder-color: rgba(255,255,255,0.5);
    --padding-top: 8px;
    --padding-bottom: 8px;
}

.update-password-btn {
    --background: #1f1f1f;
    margin: 0;
}

/* Estilos para el modal personalizado */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: #1f1f1f;
    border-radius: 8px;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

.modal-close {
    --color: white;
    --padding-end: 0;
    margin: 0;
}

.modal-content {
    padding: 16px;
}

.form-item {
    margin-bottom: 16px;
}

.form-item ion-label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 8px;
}

.form-item ion-input {
    --background: rgba(255, 255, 255, 0.1);
    --color: white;
    --padding-start: 16px;
    --padding-end: 16px;
    --padding-top: 8px;
    --padding-bottom: 8px;
    --border-radius: 4px;
    margin-top: 4px;
}

.form-actions {
    margin-top: 24px;
}

.update-password-btn {
    --background: #3880ff;
    margin: 0;
}

/* Ajustes para pantallas grandes */
@media (min-width: 768px) {
    .content-container {
        max-width: 768px;
        margin: 0 auto;
    }
}

/* Preview container styles */
.preview-container {
    margin: 0 15px;
    text-align: center;
}

.preview-container.hidden {
    display: none;
}

.file-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 10px;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.preview-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.preview-item .pdf-icon {
    width: 40px;
    height: 40px;
    color: #e74c3c;
}

.preview-item .file-name {
    font-size: 10px;
    margin-top: 5px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-item .remove-file {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    padding: 2px;
    cursor: pointer;
    color: white;
    font-size: 18px;
}
