/* ========================================
   IDENTITY MANAGE - RESPONSIVE STYLES
   ======================================== */

/* Base - Asegurar que todo sea responsive */
* {
    box-sizing: border-box;
}

.manage-wrapper {
    width: 100%;
    overflow-x: hidden;
}

.manage-breadcrumb {
    overflow-x: auto;
    overflow-y: hidden;
}

/* ========================================
   PANTALLA EXTRA GRANDE (>1200px)
   ======================================== */
@media (min-width: 1200px) {
    .manage-wrapper .profile-page,
    .manage-wrapper .change-password-page {
        padding: 2rem;
    }

    .profile-header-card {
        padding: 2rem;
    }

    .profile-header-content {
        gap: 2rem;
        flex-wrap: nowrap;
    }

    .password-content-grid {
        grid-template-columns: 1fr 350px;
    }
}

/* ========================================
   PANTALLA GRANDE (992px - 1200px)
   ======================================== */
@media (max-width: 1199px) and (min-width: 992px) {
    .manage-wrapper .profile-page,
    .manage-wrapper .change-password-page {
        padding: 1.5rem;
    }

    .profile-header-card {
        padding: 1.5rem;
    }

    .profile-header-content {
        gap: 1.5rem;
    }

    .password-content-grid {
        grid-template-columns: 1fr 300px;
    }

    .profile-avatar-large {
        width: 90px;
        height: 90px;
    }

    .avatar-initials-profile {
        font-size: 2.25rem;
    }

    .profile-name {
        font-size: 1.2rem;
    }

    .profile-info-section {
        flex: 1;
        min-width: 0;
    }

    .profile-actions {
        margin-left: auto;
    }

    .profile-content-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.25rem;
    }

    .quick-links-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

/* ========================================
   TABLET (768px - 992px)
   ======================================== */
@media (max-width: 991px) and (min-width: 768px) {
    .manage-wrapper .profile-page,
    .manage-wrapper .change-password-page {
        padding: 1rem 1.25rem;
    }

    .manage-breadcrumb {
        margin-bottom: 1rem;
    }

    .manage-breadcrumb .breadcrumb {
        font-size: 0.875rem;
    }

    .profile-header-card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .profile-header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        width: 100%;
    }

    .profile-avatar-section {
        width: 100%;
    }

    .profile-info-section {
        width: 100%;
    }

    .profile-actions {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .profile-avatar-large {
        width: 85px;
        height: 85px;
    }

    .avatar-initials-profile {
        font-size: 2rem;
    }

    .profile-name {
        font-size: 1.1rem;
    }

    .profile-fullname,
    .profile-email,
    .profile-code {
        font-size: 0.9rem;
        justify-content: center;
    }

    .profile-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .quick-links-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.75rem;
    }

    .profile-card-header,
    .profile-card-body {
        padding: 1rem;
    }

    .profile-card-header h2 {
        font-size: 1rem;
    }

    .password-content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .password-header-card {
        padding: 1.25rem;
    }

    .password-header-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1rem;
    }

    .password-icon-large {
        width: 80px;
        height: 80px;
    }

    .password-icon-large i {
        font-size: 2rem;
    }

    .password-title {
        font-size: 1.3rem;
    }

    .password-subtitle {
        font-size: 0.95rem;
    }

    .password-card {
        margin-bottom: 0;
    }

    .security-tips-card {
        margin-top: 1rem;
    }

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

    .password-card-header h2 {
        font-size: 1rem;
    }
}

/* ========================================
   TABLET PEQUEÑO (576px - 768px)
   ======================================== */
@media (max-width: 767px) and (min-width: 576px) {
    .manage-wrapper .profile-page,
    .manage-wrapper .change-password-page {
        padding: 0.75rem;
    }

    .manage-breadcrumb {
        margin-bottom: 0.75rem;
    }

    .manage-breadcrumb nav {
        padding: 0 0.5rem;
    }

    .manage-breadcrumb .breadcrumb {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .manage-breadcrumb .breadcrumb-item {
        margin-bottom: 0.25rem;
    }

    .profile-header-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .profile-header-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        width: 100%;
    }

    .profile-avatar-section {
        width: 100%;
    }

    .profile-info-section {
        width: 100%;
    }

    .profile-actions {
        width: 100%;
    }

    .profile-avatar-large {
        width: 75px;
        height: 75px;
    }

    .avatar-initials-profile {
        font-size: 1.75rem;
    }

    .profile-name {
        font-size: 1rem;
    }

    .profile-fullname,
    .profile-email,
    .profile-code {
        font-size: 0.85rem;
    }

    .profile-content-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .profile-card {
        margin-bottom: 0.5rem;
    }

    .profile-card-header {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .profile-card-header i {
        font-size: 1rem;
    }

    .profile-card-header h2 {
        font-size: 0.95rem;
    }

    .profile-card-body {
        padding: 0.75rem;
    }

    .profile-info-item {
        padding: 0.5rem 0;
    }

    .info-label,
    .info-value {
        font-size: 0.85rem;
    }

    .btn-edit-profile {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        width: 100%;
    }

    .quick-link-card {
        padding: 0.75rem;
    }

    .quick-link-icon {
        width: 35px;
        height: 35px;
    }

    .quick-link-icon i {
        font-size: 1rem;
    }

    .quick-link-title {
        font-size: 0.8rem;
    }

    .quick-link-desc {
        font-size: 0.7rem;
        display: none;
    }

    .password-header-card {
        padding: 1rem;
    }

    .password-header-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .password-icon-large {
        width: 70px;
        height: 70px;
    }

    .password-icon-large i {
        font-size: 1.75rem;
    }

    .password-title {
        font-size: 1.15rem;
    }

    .password-subtitle {
        font-size: 0.85rem;
    }

    .password-content-grid {
        grid-template-columns: 1fr;
    }

    .password-card-header {
        padding: 0.75rem;
    }

    .password-card-header h2 {
        font-size: 0.95rem;
    }

    .password-card-body {
        padding: 0.75rem;
    }

    .form-group-custom {
        margin-bottom: 0.75rem;
    }

    .form-label-custom {
        font-size: 0.85rem;
    }

    .form-control-custom {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .security-tips-header {
        padding: 0.75rem;
    }

    .security-tips-header h3 {
        font-size: 0.95rem;
    }

    .security-tips-body {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .tip-item {
        padding: 0.6rem;
        gap: 0.5rem;
    }

    .tip-title {
        font-size: 0.8rem;
    }

    .tip-desc {
        font-size: 0.75rem;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.55rem 0.75rem;
    }

    .btn-2fa {
        width: 100%;
        font-size: 0.85rem;
    }
}

/* ========================================
   MÓVIL PEQUEÑO (<576px)
   ======================================== */
@media (max-width: 575px) {
    body {
        font-size: 13px;
    }

    /* Contenedores principales más compactos */
    .content-wrapper {
        padding: 0 !important;
        margin: 0 !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .manage-wrapper {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .manage-wrapper .profile-page,
    .manage-wrapper .change-password-page {
        padding: 0.5rem;
    }

    .manage-breadcrumb {
        padding: 0.5rem 0;
        margin: 0 -0.5rem 0.5rem -0.5rem;
        padding-left: 0.5rem;
        padding-right: 0;
    }

    .manage-breadcrumb nav {
        padding: 0 0;
        margin: 0;
    }

    .manage-breadcrumb .breadcrumb {
        font-size: 0.65rem;
        margin: 0;
        padding: 0;
        flex-wrap: wrap;
    }

    .manage-breadcrumb .breadcrumb-item {
        padding: 0;
        margin-right: 0.3rem;
        display: inline;
    }

    .manage-breadcrumb .breadcrumb-item::before {
        content: " / ";
        margin: 0 0.2rem;
    }

    .manage-breadcrumb .breadcrumb-item:first-child::before {
        content: "";
        margin: 0;
    }

    .manage-breadcrumb i {
        display: none;
    }

    .profile-header-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border-radius: 8px;
    }

    .profile-header-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        width: 100%;
    }

    .profile-avatar-section {
        width: 100%;
    }

    .profile-info-section {
        width: 100%;
    }

    .profile-avatar-large {
        width: 60px;
        height: 60px;
    }

    .avatar-initials-profile {
        font-size: 1.5rem;
    }

    .profile-status-badge {
        font-size: 0.65rem;
    }

    .profile-name {
        font-size: 0.95rem;
        margin: 0;
    }

    .profile-fullname,
    .profile-email,
    .profile-code {
        font-size: 0.8rem;
        margin: 0.1rem 0;
        padding: 0;
    }

    .profile-fullname i,
    .profile-email i,
    .profile-code i {
        margin-right: 0.3rem;
    }

    .profile-actions {
        width: 100%;
        padding: 0.5rem 0;
    }

    .btn-edit-profile {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        width: 100%;
    }

    .profile-quick-links {
        margin-top: 1rem;
    }

    .section-title {
        font-size: 0.9rem;
    }

    .profile-content-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }

    .profile-card {
        margin-bottom: 0.5rem;
        border-radius: 8px;
        overflow: hidden;
    }

    .profile-card-header {
        padding: 0.6rem 0.75rem;
        gap: 0.4rem;
    }

    .profile-card-header i {
        font-size: 0.9rem;
    }

    .profile-card-header h2 {
        font-size: 0.85rem;
        margin: 0;
    }

    .profile-card-body {
        padding: 0.6rem 0.75rem;
    }

    .profile-info-item {
        padding: 0.3rem 0;
        margin: 0.2rem 0;
    }

    .info-label {
        font-size: 0.75rem;
        font-weight: 600;
    }

    .info-label i {
        margin-right: 0.25rem;
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.8rem;
        margin-top: 0.2rem;
    }

    .quick-links-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }

    .quick-link-card {
        padding: 0.6rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .quick-link-icon {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    .quick-link-icon i {
        font-size: 0.9rem;
    }

    .quick-link-content {
        flex: 1;
        min-width: 0;
    }

    .quick-link-title {
        font-size: 0.75rem;
        font-weight: 600;
        margin: 0;
    }

    .quick-link-desc {
        font-size: 0.65rem;
        display: none;
    }

    /* CAMBIAR CONTRASEÑA */
    .password-header-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .password-header-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 0.5rem;
    }

    .password-icon-section {
        width: 100%;
    }

    .password-info-section {
        width: 100%;
    }

    .password-icon-large {
        width: 55px;
        height: 55px;
    }

    .password-icon-large i {
        font-size: 1.5rem;
    }

    .password-title {
        font-size: 1rem;
        margin: 0;
    }

    .password-subtitle {
        font-size: 0.8rem;
        margin: 0;
    }

    .password-content-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    .password-card {
        margin-bottom: 0;
        border-radius: 8px;
    }

    .password-card-header {
        padding: 0.6rem 0.75rem;
    }

    .password-card-header h2 {
        font-size: 0.85rem;
    }

    .password-card-body {
        padding: 0.6rem 0.75rem;
    }

    .password-requirements {
        padding: 0.75rem;
        background: var(--bg-light);
        border-radius: 6px;
        margin-bottom: 1rem;
    }

    .requirements-title {
        font-size: 0.8rem;
    }

    .requirement-item {
        font-size: 0.75rem;
        padding: 0.2rem 0;
    }

    .requirement-item i {
        margin-right: 0.25rem;
    }

    .form-group-custom {
        margin-bottom: 0.6rem;
    }

    .form-label-custom {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .form-label-custom i {
        margin-right: 0.25rem;
    }

    .form-control-custom {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
        border-radius: 4px;
    }

    .input-wrapper {
        gap: 0.3rem;
    }

    .input-icon {
        padding: 0.4rem;
        font-size: 0.85rem;
    }

    .security-tips-card {
        border-radius: 8px;
        overflow: hidden;
    }

    .security-tips-header {
        padding: 0.6rem 0.75rem;
    }

    .security-tips-header i {
        font-size: 1rem;
    }

    .security-tips-header h3 {
        font-size: 0.85rem;
        margin: 0;
    }

    .security-tips-body {
        padding: 0.6rem 0.75rem;
        gap: 0.4rem;
    }

    .tip-item {
        padding: 0.5rem;
        gap: 0.4rem;
        border-radius: 6px;
    }

    .tip-icon {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }

    .tip-icon i {
        font-size: 0.85rem;
    }

    .tip-title {
        font-size: 0.75rem;
        font-weight: 600;
    }

    .tip-desc {
        font-size: 0.7rem;
        line-height: 1.3;
    }

    .security-action {
        padding: 0.6rem 0.75rem;
        border-top: 1px solid var(--border-color);
    }

    .btn-2fa {
        width: 100%;
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }

    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-submit,
    .btn-cancel {
        width: 100%;
        padding: 0.45rem 0.5rem;
        font-size: 0.8rem;
        border-radius: 6px;
    }

    .modal-dialog {
        margin: 0.25rem;
        width: calc(100% - 0.5rem);
    }

    .modal-header {
        padding: 0.6rem 0.75rem;
    }

    .modal-header .modal-title {
        font-size: 0.85rem;
    }

    .modal-body {
        padding: 0.75rem;
    }

    .modal-footer {
        padding: 0.6rem 0.75rem;
        gap: 0.3rem;
    }

    .btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
        border-radius: 4px;
    }
}

/* ========================================
   AJUSTES PARA MODO OSCURO
   ======================================== */
[data-bs-theme="dark"] .manage-breadcrumb {
    background-color: #1a1a1a;
    border-bottom-color: #333;
}

[data-bs-theme="dark"] .manage-breadcrumb .breadcrumb-item a {
    color: #a0a0a0;
}

[data-bs-theme="dark"] .manage-breadcrumb .breadcrumb-item.active {
    color: #666;
}
