.main-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 40px;
    height: 169px;
    border-radius: 10px;
    background-color: #043259;
    box-shadow: 0 4px 4px 0 #60A699;
    align-items: center;
    margin: 40px auto;
    font-family: "Nunito Sans";
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    box-sizing: border-box;
    
}

.main-dashboard h4, .main-dashboard h2 {
    color: #043259;

}

.provider-avatar-wrapper {
    position: relative;

}

.provider-avatar {
    width: 110px;
    height: 110px;
    border-radius: 20px;
    border: 1px solid #036A6F;
    background: linear-gradient(206deg, #FFF 4.06%, #CAE1DD 34.79%, #97C5BC 64.03%, #60A699 95.94%);
    box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.50);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 24px;
    margin-left: 40px;
    overflow: hidden;
    
}


.provider-avatar img {
    width: 85%;
    height: 85%;
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 20px;
    padding: 5px;
    display: block;
    margin: auto;
    
}

/*HEADER */

/* Provider Header Actions Container */
.provider-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 59px;
}

.notification-btn,
.help-btn {
    padding: 6px 10px;
    border-radius: 5px;
    border: none;
    background: #DFF0FF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
}

.notification-btn:hover,
.help-btn:hover, .user-account-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.notification-btn img,
.help-btn img, .user-account-header img {
    width: 25px;
    height: 25px;
    aspect-ratio: 1/1;
}

.user-account-header {
    padding: 6px 10px;
    border-radius: 5px;
    border: none;
    background: linear-gradient(206deg, #FFF 4.06%, #CAE1DD 34.79%, #97C5BC 64.03%, #60A699 95.94%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
    font-size: 20px;
}

.info-name h2 {
    color: #FFF;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    margin-top: 24px;
    
}

.info-specialty {
    color: #FFF;
    font-size: 18px;
    font-weight: 400;
}

.info-npi {
    color: #FFF;
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 24px;
    margin-top: 0;
}

.avatar-edit-btn {
    position: absolute;
    bottom: 10px;
    right: -6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #60A699;
    border: 2px solid #043259;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: background 0.2s ease;
}

.avatar-edit-btn:hover {
    background: #036A6F;
}

.avatar-edit-btn img {
    width: 15px;
    height: 15px;
    filter: brightness(0) invert(1);
}

.avatar-file-input {
    display: none;
}

.validation-banner {
    width: 100%;
    max-width: 1200px;
    border-radius: 5px;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    align-items: center;
    margin: 40px auto;
    font-family: "Nunito Sans";
    display: flex;
    justify-content: space-between;
    gap: 40px;
    padding: 10px 20px;
    box-sizing: border-box;
    
}

.validation-msg img {
    width: 20px;
    height: 20px;
}

.validation-msg {
    padding: 12px 0;
    font-family: "Nunito Sans";
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.validation-ok {
    background: rgba(96, 166, 153, 0.35);
    border: 1px solid #60A699;
    color: #043259;
}

.validation-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid #FFC107;
    color: #856404;
}

.validation-expired {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid #E74C3C;
    color: #E74C3C;
}

.validation-msg .value {
    font-weight: 700;
}

/*VALIDATION BUTTON */
.validation-banner a {
    background: linear-gradient(90deg, #D9D9D9 0%, #80A4AE 77.88%, #80A4AE 88.94%, #D9D9D9 100%);
    color: #043259;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    border: none;
    padding: 8px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-family: "Nunito Sans";
    display: flex;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

/* INPUT CONTAINERS */


.form-section {
    padding: 24px;
    margin-top: 30px;
    border-radius: 10px;
    border: 2px solid #036A6F;
    background: #FFF;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);

}

.form-container-header img {
    width: 22px;
    height: 22px;
}

.form-container-header{
    color: #043259;
    font-family: "Nunito Sans";
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #E0EEEC;
    display: flex;
    gap: 14px;
    align-items: center;
}

.form-container-header h3 {
    flex: 1;   
    margin: 0;
}

.form-row {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.form-row .form-group {
    flex: 1;
}

.form-row .form-group:first-child {
    flex: 2;
}

.form-row label {
    color: #043259;
    font-family: "Nunito Sans";
    font-size: 16px;
    font-weight: 500;
}

.form-container {
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 40px 40px 40px;
}

.edit-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.edit-btn img{
    width: 20px;
    height: 20px;
}

.edit-btn:hover img {
    opacity: 0.7;
}

.blocked-input {
    position: relative;
    width: 100%;
}

.blocked-input input {
    border: 1px solid #60A699;
    background: rgba(176, 217, 205, 0.35);
    color: #678C96;
    cursor: not-allowed;
    height: 40px;
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    padding: 8px 40px 8px 16px;
    align-items: center;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 8px;
}

.input-with-check {
    position: relative;
    width: 100%;
}

.form-group input,
.form-group select {
    border: 1px solid #60A699;
    background: rgba(176, 217, 205, 0.35);
    color: #043259;
    cursor: text;
    height: 40px;
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    padding: 8px 40px 8px 16px;
    align-items: center;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 8px;
    font-family: "Nunito Sans";
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 40px center;
    background-size: 20px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border: 2px solid #60A699;
    background: rgba(176, 217, 205, 0.5);
}

.required {
    color: #E7964F;
    font-weight: bold;
}

.save-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
}

/*SUBESPECIALTY CSS */

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    min-height: 40px;
}

.tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(96, 166, 153, 0.2);
    border-left: 2px solid #60A699;
    border-radius: 5px;
    padding: 4px 12px;
    font-size: 14px;
    color: #043259;
    font-family: "Nunito Sans";
}

.tag .tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #60A699;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    display: none; /* hidden until edit mode */
}

.editing .tag .tag-remove {
    display: inline; /* show X only in edit mode */
}

.add-tag-btn {
    margin-top: 16px;
    background: #043259;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 12px 24px;
    font-family: "Nunito Sans";
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.add-tag-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.add-tag-btn:hover {
    background: rgba(96, 166, 153, 1);
    text-decoration: none;
    transition: all 0.2s ease;
}

.subesp-dropdown {
    margin-top: 8px;
    width: 100%;
}

.sub-limit {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

.add-tag-btn img{
    width: 16px;
    height: 16px;
}

.form-row-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group textarea {
    border: 1px solid #60A699;
    background: rgba(176, 217, 205, 0.35);
    color: #043259;
    width: 100%;
    font-size: 14px;
    font-weight: 400;
    padding: 8px 16px;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 8px;
    font-family: "Nunito Sans";
    resize: vertical;
}

.form-group textarea:focus {
    outline: none;
    border: 2px solid #60A699;
    background: rgba(176, 217, 205, 0.5);
}

.form-group textarea:disabled {
    cursor: not-allowed;
}

.char-counter {
    font-size: 12px;
    color: #999;
    text-align: right;
    display: block;
    margin-top: 4px;
}

/* INSURANCE CARD SESSION */

.insurance-card {
    background: rgba(96, 166, 153, 0.1);
    border: 1px solid #60A699;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
}

.insurance-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.insurance-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #043259;
    font-family: "Nunito Sans";
}

.remove-plan-btn {
    background: none;
    border: none;
    color: #E74C3C;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.remove-plan-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.contratos-activos {
    margin: 12px 0;
}

.contratos-label {
    font-size: 13px;
    font-weight: 700;
    color: #043259;
    display: block;
    margin-bottom: 8px;
    font-family: "Nunito Sans";
}

.contratos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #043259;
    font-family: "Nunito Sans";
    cursor: pointer;
    margin-top: 16px;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #60A699;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.remove-contract-btn {
    background: none;
    border: none;
    color: #E74C3C;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.remove-contract-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.add-contract-row {
    margin-top: 8px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: "Nunito Sans";
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.add-contract-row select {
    width: 100%;
    margin-top: 10px;
    padding: 8px 16px;
    border: 1px dashed #60A699;
    border-radius: 5px;
    background: rgba(96, 166, 153, 0.1);
    color: #043259;
    font-family: "Nunito Sans";
    font-size: 14px;
    cursor: pointer;
}

.form-section.is-editing {
    border: 2px solid #60A699;
    background: rgba(96, 166, 153, 0.05);
    box-shadow: 0 4px 12px rgba(96, 166, 153, 0.2);
}

.btn-primary {
    margin-top: 16px;
    background: #043259;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 12px 24px;
    font-family: "Nunito Sans";
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary:hover {
    background: rgba(96, 166, 153, 1);
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary img{
    width: 16px;
    height: 16px;
}

.btn-secondary {
    margin-top: 16px;
    background: #fff;
    color: #60A699;
    border: 1px solid rgba(96, 166, 153, 1);
    border-radius: 5px;
    padding: 12px 24px;
    font-family: "Nunito Sans";
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-secondary:hover {
    background: #E74C3C;
    text-decoration: none;
    transition: all 0.2s ease;
    color: #fff;
    border: none;
}

.notification.success { background: #60A699; color: #fff; }
.notification.error { background: #E74C3C; color: #fff; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }


/* ============================================
   TABLET — 768px to 1024px
   ============================================ */
@media (max-width: 1024px) {
    .main-container {
        padding: 0 20px;
        gap: 20px;
        height: auto;
        margin: 20px auto;
        width: 85%;
    }

    .provider-avatar {
        margin-left: 10px;
        width: 90px;
        height: 90px;
    }

    .info-name h2 {
        font-size: 20px;
    }

    .info-specialty,
    .info-npi {
        font-size: 15px;
    }

    .form-container {
        max-width: 900px;
        margin: 0 auto;
        padding: 0 40px 40px 40px;
    }

    .form-row-sections {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .validation-banner {
        max-width: 85%;
        margin: 20px auto;
    }

    .contratos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        flex-wrap: wrap;
    }

    .form-row .form-group {
        flex: 1 1 calc(50% - 12px);
        min-width: 200px;
    }

    .form-row .form-group:first-child {
        flex: 1 1 calc(50% - 12px);
    }
}

/* ============================================
   MOBILE — up to 768px
   ============================================ */
@media (max-width: 768px) {
    .main-container {
        padding: 16px;
        gap: 16px;
        margin: 16px auto;
        grid-template-columns: auto 1fr;
        height: auto;
        border-radius: 5px;
    }

    .form-section { 
        margin-right: 20px;
        margin-left: 20px;
    }

    .validation-msg img {
        width: 16px;
        height: 16px;
    }

    .form-row label {
        font-size: 15px;
    }

    .provider-header-actions {
        margin-right: 0;
    }

    .provider-avatar {
        width: 70px;
        height: 70px;
        border-radius: 20px;
        margin-left: 0;
        margin-top: 16px;
        margin-bottom: 16px;
    }

    .provider-avatar img {
        width: 80%;
        height: 80%;
    }

    .info-name h2 {
        font-size: 14px;
        margin-top: 14px;
    }

    .info-specialty,
    .info-npi {
        font-size: 13px;
    }

    .avatar-edit-btn {
        width: 24px;
        height: 24px;
        bottom: 6px;
        right: -4px;
    }

    .avatar-edit-btn img {
        width: 12px;
        height: 12px;
    }

    .validation-banner {
        flex-direction: column;
        gap: 6px;
        margin: 16px auto;
        padding: 12px 16px;
        align-items: flex-start;
    }

    .validation-banner a {
        margin: auto;
        padding: 4px 8px;
        font-size: 10px;

    }

    .form-container {
        padding: 0 12px 20px 12px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }

    .form-row .form-group:first-child {
        flex: 1 1 100%;
    }

    .form-group {
        margin-bottom: 8px;
    }

    .form-row-sections {
        grid-template-columns: 1fr;
        gap: 0px;
    }

    .form-container-header {
        font-size: 16px;
        gap: 10px;
        margin-bottom: 16px;
    }

    .form-container-header h3 {
        font-size: 16px;
    }

    .contratos-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .insurance-card {
        padding: 12px;
    }

    .tags-container {
        gap: 8px;
    }

    .add-tag-btn {
        padding: 8px 16px;
        font-size: 13px;
        width: 100%;
    }

    .save-bar {
        flex-direction: column;
        gap: 8px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .global-save-bar {
        padding: 12px 16px;
        border-radius: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .validation-msg {
        font-size: 10px;
        gap: 4px;
    }

    .form-row .form-group,
    .form-row .form-group:first-child {
        flex: 1 1 100% !important;
        min-width: unset !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ============================================
   SMALL MOBILE — up to 480px
   ============================================ */
@media (max-width: 480px) {
    .main-container {
        grid-template-columns: 70px 1fr;
        gap: 12px;
    }

    .info-name h2 {
        font-size: 14px;
    }

    .info-specialty,
    .info-npi {
        font-size: 12px;
    }

    .contratos-grid {
        grid-template-columns: 1fr;
    }

    .form-container-header img {
        width: 18px;
        height: 18px;
    }


    .form-group input,
    .form-group select {
        font-size: 13px;
    }
}