.secondary-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 950px;
    border: none;
    border-radius: 12px;
    padding: 0;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    overflow: hidden;
}

.secondary-modal::backdrop {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.secondary-modal-header {
  background: var(--expired-color);
  align-items: center !important;
  padding: 20px 24px;
  border-bottom: medium none currentcolor;
}

.secondary-modal-title {
    font-size: 16px;
    font-weight: 700;
}

.secondary-modal-icon-circle {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.secondary-modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 14px;
}

.secondary-modal-body .card-header {
    border-bottom: 1px solid rgb(234, 234, 234);
    padding: 12px 10px;
}

.secondary-modal-body .card {
    border: 1px solid rgb(234, 234, 234);
}

.secondary-modal-body .card-title {
    font-size: 15px;
    margin: 0px;
    margin-bottom: 0 !important;
}

.secondary-modal-body .card-body {
    padding: 16px;
    color: var(--bs-card-color);
    flex: 1 1 auto;
}

.secondary-modal-body .card-body .col-md-6 {
    flex: 0 0 auto;
    width: 50%;
}

.secondary-modal-body .detail-item {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    background: white;
    padding: 10px;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(234, 234, 234);
    border-image: initial;
    margin-bottom: 1rem !important;
}

.secondary-modal-body .detail-label {
    font-size: 11px;
    font-weight: 600;
    color: rgb(102, 102, 102);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
}

.secondary-modal-body .detail-value {
    font-size: 14px;
    font-weight: 600;
    color: rgb(51, 51, 51);
    
}

.secondary-modal-body .alert-secondary-custom {
    background: rgba(149, 165, 166, 0.1); 
    border: 1px solid rgba(149, 165, 166, 0.3); 
    border-radius: 12px; padding: 12px;
    margin-top: 1rem !important;
    color: #7f8c8d;
}


.delete-modal-header {
    padding: 20px 24px;
    border-bottom: medium none currentcolor;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-modal-header  h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.delete-modal-title {
    font-size: 18px;
}

.delete-modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 14px;
}

.delete-modal-body .card {
    border: 1px solid rgb(234, 234, 234);
}

.delete-modal-body .card-header {
    border-bottom: 1px solid rgb(234, 234, 234);
    padding: 12px 10px;
}

.delete-modal-body .card-body {
    padding: 16px;
    color: var(--bs-card-color);
    flex: 1 1 auto;
}

.delete-modal-body .card-body .col-md-6 {
    flex: 0 0 auto;
    width: 50%;
}

.delete-modal-body .detail-item {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    background: white;
    padding: 10px;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(234, 234, 234);
    border-image: initial;
    margin-bottom: 1rem !important;
}

.delete-modal-body .detail-label {
    font-size: 11px;
    font-weight: 600;
    color: rgb(102, 102, 102);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 5px;
}

.delete-modal-body .detail-value {
    font-size: 14px;
    font-weight: 600;
    color: rgb(51, 51, 51);
}

@media (max-width: 768px) {
    .secondary-modal-header {
        padding: 16px;
    }

    .delete-modal-header {
        padding: 10px 15px;
    }
}

@media (max-width: 576px) {
    .secondary-modal-header {
        position: sticky;
        top: 0px;
        z-index: 10;
        padding: 14px 16px;
    }

    .secondary-modal-icon-circle {
        width: 36px;
        height: 36px;
    }

    .secondary-modal-icon-circle i {
        font-size: 1rem;
    }

    .secondary-modal-title {
        font-size: 15px;
    }

    .secondary-modal-body .card-body {
        padding: 12px;
    }

    .secondary-modal-body .card-body .col-md-6 {
        width: 100%;
    }

    .secondary-modal-body .detail-item {
        margin-bottom: 8px;
        display: flex;
        justify-content: space-between;
        padding: 8px;
    }

    .secondary-modal-body .detail-label {
        font-size: 9px;
    }

    .secondary-modal-body .detail-value {
        font-size: 11px;
    }

    .notification-message {
        font-size: 11px;
    }

    .delete-modal-body .card-body {
        padding: 12px;
    }

    .delete-modal-body .card-body .col-md-6 {
        width: 100%;
    }

    .delete-modal-body .detail-item {
        margin-bottom: 8px;
        display: flex;
        justify-content: space-between;
        padding: 8px;
    }

    .delete-modal-body .detail-label {
        font-size: 9px;
    }

    .delete-modal-body .detail-value {
        font-size: 11px;
    }

    .delete-modal-title {
        font-size: 15px;
    }

    .delete-modal .modal-footer {
        flex-direction: row;
        justify-content: space-between;
        gap: 12px;
    }
    
    .delete-modal .modal-footer .d-flex {
        flex-direction: row;
        gap: 12px;
        width: 100%;
    }
    
    .delete-modal .modal-footer button {
        flex: 1;
        width: auto;
        margin: 0;
    }
    
    /* Agar tugmalar #cancelBookedBtn va #startConsultationLink bo'lsa */
    .delete-modal .modal-footer .btn-danger,
    .delete-modal .modal-footer .btn-success {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .delete-modal-body .card-title {
        font-size: 15px;
    }

}

@media (max-width: 480px) {
    .secondary-modal-header {
        padding: 10px 12px;
    }

    .delete-modal-header  h3 {
        font-size: 14px;
    }
}


/* ============================================
   SUCCESS MODAL (availableModal) - 3 QADAMLI MODAL
   ============================================ */

/* Modal asosiy konteyner */
.success-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%;
    max-width: 850px;
    border: none;
    border-radius: 20px;
    padding: 0;
    background: white;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    overflow: hidden;
}

.success-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

/* Modal header */
.success-modal .modal-header {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.success-modal .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

/* Progress Steps */
.success-modal .steps {
    display: flex;
    padding: 20px 24px 0;
    gap: 8px;
    margin-bottom: 24px;
}

.success-modal .step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.success-modal .step-number {
    width: 32px;
    height: 32px;
    background: #eef2f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: bold;
    font-size: 14px;
    color: #7f8c8d;
    transition: all 0.3s;
}

.success-modal .step-item.active .step-number {
    background: #2ecc71;
    color: white;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3);
}

.success-modal .step-item.completed .step-number {
    background: #2ecc71;
    color: white;
}

.success-modal .step-label {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 500;
}

.success-modal .step-item.active .step-label {
    color: #2ecc71;
    font-weight: 600;
}

/* Modal body */
.success-modal-body {
    padding: 8px 24px 20px;
    max-height: 55vh;
    overflow-y: auto;
}

.success-modal-body::-webkit-scrollbar {
    width: 8px;
}

.success-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.success-modal-body::-webkit-scrollbar-thumb {
    background: #2ecc71;
    border-radius: 4px;
}

.success-modal-body::-webkit-scrollbar-thumb:hover {
    background: #27ae60;
}

/* Slot Info Card */
.success-modal .slot-info-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.success-modal .slot-info-card .row {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.success-modal .slot-info-card .col-6 {
    flex: 0 0 50%;
    width: 50%;
}

.success-modal .slot-info-card .col-6 .mb-3 {
    margin-bottom: 12px;
}

.success-modal .slot-info-card .col-6 small {
    font-size: 0.7rem;
    color: #7f8c8d;
}

.success-modal .slot-info-card .col-6 strong {
    font-size: 0.9rem;
    color: #2c3e50;
}

.success-modal .slot-info-card .slot-status {
    font-size: 11px;
}

/* Alert Info Custom */
.success-modal .alert-info-custom {
    background: rgba(46, 204, 113, 0.08);
    border-radius: 12px;
    padding: 12px;
}

.success-modal .alert-info-custom .d-flex {
    align-items: center;
}

.success-modal .alert-info-custom i {
    color: #2ecc71;
    font-size: 1.2rem;
    margin-right: 12px;
}

.success-modal .notification-message {
    font-size: 0.85rem;
    color: #2c3e50;
}

.success-modal .notification-message strong {
    color: #2ecc71;
}

/* Search Section */
.success-modal .search-section {
    margin-bottom: 20px;
}

.success-modal .search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    border-bottom: 2px solid #eef2f6;
    padding-bottom: 8px;
}

.success-modal .search-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #7f8c8d;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
}

.success-modal .search-tab.active {
    background: #2ecc71;
    color: white;
}

.success-modal .search-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.success-modal .search-fields.full-width {
    grid-column: span 2;
}

.success-modal .search-fields input {
    width: 100%;
    padding: 12px;
    border: 2px solid #eef2f6;
    border-radius: 12px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.success-modal .search-fields input:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.success-modal .search-btn {
    width: 100%;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: none;
    padding: 12px;
    border-radius: 40px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.success-modal .search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

/* Patient Results */
.success-modal .patient-results {
    margin-top: 16px;
    max-height: 300px;
    overflow-y: auto;
    border-radius: 12px;
}

.success-modal .patient-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #eef2f6;
}

.success-modal .patient-card:hover {
    background: white;
    border-color: #2ecc71;
}

.success-modal .patient-name {
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.success-modal .patient-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.7rem;
    color: #7f8c8d;
}

.success-modal .select-badge {
    background: #2ecc71;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
}

/* Selected Patient Card */
.success-modal .selected-patient {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0.05));
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.success-modal .selected-patient h4 {
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: #2ecc71;
}

.success-modal .patient-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.8rem;
}

.success-modal .change-patient-btn {
    margin-top: 12px;
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
}

/* Reason Section */
.success-modal .reason-section {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
}

.success-modal .reason-textarea {
    width: 100%;
    border: 2px solid #eef2f6;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
    transition: all 0.2s;
}

.success-modal .reason-textarea:focus {
    outline: none;
    border-color: #2ecc71;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.success-modal .mb-3 label {
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: block;
}

/* Modal Footer */
.success-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eef2f6;
    background: #fafbfc;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.success-modal .btn-outline-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.success-modal .btn-outline-secondary:hover {
    background: #7f8c8d;
}

.success-modal .btn-primary {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.success-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* ========== RESPONSIVE (MOBILE) ========== */
@media (max-width: 768px) {
    .success-modal {
        width: 95%;
        max-width: 95%;
    }
    
    .success-modal .modal-header {
        padding: 10px 15px;
    }
    
    .success-modal .modal-header h3 {
        font-size: 15px;
    }
    
    .success-modal-body {
        padding: 0 16px 16px;
        max-height: 60vh;
    }
    
    .success-modal .steps {
        padding: 12px 12px 0;
        gap: 4px;
    }
    
    .success-modal .step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .success-modal .step-label {
        font-size: 9px;
    }
    
    .success-modal .slot-info-card .col-6 strong {
        font-size: 0.8rem;
    }
    
    .success-modal .slot-info-card .col-6 small {
        font-size: 0.65rem;
    }
    
    .success-modal .search-tab {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .success-modal .search-fields input {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .success-modal .search-btn {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .success-modal .patient-name {
        font-size: 0.85rem;
    }
    
    .success-modal .patient-details {
        font-size: 0.65rem;
    }
    
    .success-modal .modal-footer {
        padding: 12px;
    }
    
    .success-modal .btn-outline-secondary,
    .success-modal .btn-primary {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .success-modal .slot-info-card .row {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .success-modal .slot-info-card .col-6 {
        width: 50%;
        flex: 0 0 50%;
    }
    
    .success-modal .patient-info-grid {
        grid-template-columns: 1fr;
    }
    
    .success-modal .reason-section {
        padding: 12px;
    }
    
    .success-modal .notification-message {
        font-size: 11px;
    }
    
    .modal-footer .btn-outline-secondary,
    .modal-footer .btn-primary {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .success-modal .step-number {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .success-modal .step-label {
        font-size: 8px;
    }
    
    .success-modal .search-tab {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
    
    .success-modal .slot-info-card .col-6 strong {
        font-size: 0.75rem;
    }
}



.success-modal-body .card-body .col-md-6 {
    flex: 0 0 auto;
    width: 50%;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

.success-modal-body .detail-item {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    background: white;
    padding: 6px 10px;
    border-radius: 8px;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(234, 234, 234);
    border-image: initial;
    margin-bottom: 1rem !important;
}

.success-modal-body .detail-label {
    font-size: 10px;
    font-weight: 600;
    color: rgb(102, 102, 102);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.success-modal-body .detail-value {
    font-size: 11px;
    font-weight: 600;
    color: rgb(51, 51, 51);
}

/* Kichik ekranda col-md-6 yon yon turishi uchun */
@media (max-width: 768px) {
    .secondary-modal-body .card-body .col-md-6,
    .delete-modal-body .card-body .col-md-6,
    .success-modal-body .col-md-6 {
        width: 50%;
        flex: 0 0 50%;
    }

    .success-modal-body .col-md-6 {
        padding: 0 3px;
    }
}

/* Juda kichik ekranda (480px) esa ustun qilib ko'rsatish */
@media (max-width: 480px) {
    .secondary-modal-body .card-body .col-md-6,
    .delete-modal-body .card-body .col-md-6,
    .success-modal-body .card-body .col-md-6 {
        width: 100%;
        flex: 0 0 100%;
    }

    .modal-footer .btn-success {
        width: 50%;
    }
}

