/**
 * Applicant Dashboard Styles
 * 
 * Beautiful styling for the teacher applicant dashboard
 * Primary Color: #8b0628
 * Secondary Color: #f7bf00
 */

/* CSS Variables */
:root {
    --primary-color: #8b0628;
    --second-color: #f7bf00;
    --primary-light: rgba(139, 6, 40, 0.1);
    --primary-dark: #6b0420;
    --secondary-light: rgba(247, 191, 0, 0.1);
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Main Dashboard Container */
.applicant-dashboard {
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
    text-align: right;
}

/* Header Section */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(247, 191, 0, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.welcome-section {
    z-index: 2;
    position: relative;
}

.welcome-title {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-container {
    margin-top: 10px;
}

.zuwad-logo {
    height: 80px;
    width: auto;
    opacity: 0.9;
}

/* Dates Info Section */
.dates-info {
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    text-align: right;
}

.date-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.date-label {
    font-size: 0.9rem;
    opacity: 0.8;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

.date-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Individual Status Card Styling */
.dashboard-card.status-info {
    max-width: 800px;
    margin: 30px auto;
}

/* Dashboard Cards */
.dashboard-card {
    background: #8e0d27;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.card-header {
    background: #f7bf00;
    padding: 20px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    /* gap: 10px; */
}

.card-icon {
    font-size: 1.6rem;
    filter: grayscale(1);
    padding-right: 10px;
}

/* Simple Timer Styles */
.simple-timer {
    display: flex;
    align-items: center;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    direction: ltr;
}

.simple-timer .timer-value {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
    font-size: 1.1rem;
    margin-left: 2px;
}

/* Responsive design for timer */
@media (max-width: 768px) {
    .simple-timer {
        padding: 8px 15px;
        font-size: 1.1rem;
    }

    .simple-timer .timer-value {
        font-size: 1rem;
        min-width: 25px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .simple-timer {
        font-size: 1rem;
        padding: 6px 12px;
    }

    .simple-timer .timer-value {
        font-size: 0.9rem;
        min-width: 22px;
        padding: 2px 4px;
    }
}


/* Confirmation Message Styling */
.confirmation-message {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    margin: 15px 0;
}

.confirmation-message p {
    margin: 0;
    font-size: 1rem;
}

/* Confirmation Message Styling */
.confirmation-message {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    margin: 15px 0;
}

.confirmation-message p {
    margin: 0;
    font-size: 1rem;
}

.card-content {
    padding: 25px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    color: var(--text-dark);
    font-size: 1.1rem;
    padding: 10px 15px;
    background: var(--primary-light);
    border-radius: 8px;
    border-right: 4px solid var(--primary-color);
    transition: var(--transition);
}

.info-item span:hover {
    background: rgba(139, 6, 40, 0.15);
    transform: translateX(-3px);
}

/* Status Timeline */
.status-timeline {
    position: relative;
    padding-right: 30px;
}

.status-timeline::before {
    content: '';
    position: absolute;
    right: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #ffffff, var(--second-color));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    margin-top: 10px;
    padding: 0px 5px 0px 15px;
}

.timeline-marker {
    position: absolute;
    right: -24px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    background: white;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.timeline-item.completed .timeline-marker {
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(139, 6, 40, 0.2);
    color: #000000;
}

.timeline-item.rejected .timeline-marker {
    background: #f44336;
    border-color: #f44336;
    box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.2);
}

.timeline-item.pending .timeline-marker {
    background: var(--second-color);
    border-color: var(--second-color);
    box-shadow: 0 0 0 4px rgba(247, 191, 0, 0.2);
    animation: pulse-marker 2s infinite;
}

@keyframes pulse-marker {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.timeline-content h4 {
    margin: 0 0 12px 0;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Qatar-medium', sans-serif;
    position: relative;
    padding-bottom: 8px;
}

.timeline-content h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background: rgb(255 255 255 / 65%);
    border-radius: 1px;
}

.timeline-content p {
    margin: 5px 0;
    color: #ffffff;
    line-height: 1.5;
}


/* Login Required Styles */
.applicant-login-required {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.login-message {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 400px;
}

.login-message h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.login-message p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.login-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    text-decoration: none;
    color: white;
}

/* Error Styles */
.applicant-error {
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    color: #c62828;
    margin: 20px 0;
}

/* Mobile Dates Section */
.mobile-dates-section {
    display: none;
    position: relative;
    margin-top: -60px;
    margin-bottom: 30px;
    padding: 0 15px;
    z-index: 3;
}

.mobile-date-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-date-right {
    text-align: right;
    align-items: flex-end;
}

.mobile-date-left {
    text-align: left;
    align-items: flex-start;
}

.mobile-date-center {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Logo positioning for mobile - half inside, half outside dashboard-header */
.mobile-dates-section .mobile-date-center::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: var(--zuwad-applicant-logo) center/contain no-repeat;
    top: -20px;
    z-index: 4;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Responsive Design */
@media (max-width: 768px) {
    .applicant-dashboard {
        padding: 15px;
    }

    .dashboard-header {
        flex-direction: column;
        text-align: center;
        gap: 3px;
        padding: 12px 20px;
        padding-bottom: 20px; /* Reduced padding since dates are outside */
    }

    .welcome-title {
        font-size: 2rem;
    }

    .zuwad-logo {
        display: none; /* Hide desktop logo on mobile */
    }

    .dates-info {
        display: none; /* Hide desktop dates info on mobile */
    }

    /* Show mobile dates section */
    .mobile-dates-section {
        display: grid;
        grid-template-columns: 1fr 80px 1fr;
        gap: 15px;
        align-items: start;
    }

    .mobile-date-column .date-item {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .mobile-date-column .date-label {
        font-size: 0.85rem;
        color: #ffffff;
        font-weight: 400;
    }

    .mobile-date-column .date-value {
        font-size: 1rem;
        font-weight: 600;
        color: var(--primary-color);
        background: rgba(139, 6, 40, 0.1);
        padding: 8px 12px;
        border-radius: 8px;
        border-right: 3px solid var(--primary-color);
    }

    .mobile-date-left .date-value {
        border-right: none;
        border-left: 3px solid var(--primary-color);
        text-align: left;
    }

    .dashboard-card.status-info {
        margin: 20px 0;
    }


    .card-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 1rem;
    }

    .zuwad-logo {
        height: 30px;
    }

    .card-header {
        padding: 1px;
    }

    .card-content {
        padding: 0px;
    }

    .mobile-dates-section {
        grid-template-columns: 1fr 60px 1fr;
        gap: 36px;
        padding: 0 10px;
    }

    /* Logo positioning for smaller screens */
    .mobile-dates-section .mobile-date-center::before {
        width: 70px;
        height: 70px;
        top: -10px;
    }

    .mobile-date-column .date-label {
        font-size: 0.8rem;
    }

    .mobile-date-column .date-value {
        font-size: 0.7rem;
        padding: 6px 5px;
    }

    .dashboard-header {
        padding-bottom: 15px;
    }
}

/* Acceptance Message Styles */

.acceptance-message p {
    margin: 8px 0;
    color: #ffffff;
    font-weight: 500;
    line-height: 1.6;
}

.acceptance-message p:first-child {
    /* font-size: 1.1em;
    font-weight: 600; */
}

/* Recording Section Styles */
.recording-section {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 2px solid #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
    text-align: center;
}

.recording-section p {
    margin-bottom: 15px;
    color: #8d0d27;
    font-weight: 600;
}

/* Recording Submitted Styles */
.recording-submitted {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
    text-align: center;
}

.recording-submitted p {
    margin-bottom: 15px;
    color: #2e7d32;
    font-weight: 600;
    font-size: 1.1em;
}

.submitted-recording {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.submitted-recording h5 {
    margin: 0 0 10px 0;
    color: #333;
    font-weight: 600;
}

/* Recording Status Styles */
.recording-status {
    background: linear-gradient(135deg, #f5f5f5, #eeeeee);
    border: 2px solid #9e9e9e;
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
    text-align: center;
}

.recording-status p {
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.recording-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.btn-record, .btn-stop, .btn-play, .btn-upload, .btn-confirm, .btn-cancel {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgb(0 0 0 / 30%);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-record {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.btn-record:hover {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(244, 67, 54, 0.3);
}

.btn-stop {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.btn-stop:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    transform: translateY(-2px);
}

.btn-play {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
}

.btn-play:hover {
    background: linear-gradient(135deg, #388e3c, #2e7d32);
    transform: translateY(-2px);
}

.btn-upload {
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: white;
}

.btn-upload:hover {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    transform: translateY(-2px);
}

.btn-confirm {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #388e3c, #2e7d32);
    transform: translateY(-2px);
}

.btn-cancel {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    color: white;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #757575, #616161);
    transform: translateY(-2px);
}

#audioPlayer {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

#audioPlayer audio {
    border-radius: 8px;
    margin-bottom: 15px;
}

#audioActions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#recordingStatus {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
}

/* Specific styles for recording controls to stay in row on mobile */
@media (max-width: 768px) {
    .recording-controls {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    /* Target only the main recording buttons - keep them in row */
    .recording-controls .btn-record,
    .recording-controls .btn-upload {
        flex: 0 0 auto;
        min-width: 120px;
        max-width: 140px;
        justify-content: center;
        font-size: 0.9rem;
        padding: 10px 16px;
        white-space: nowrap;
    }

    /* Give stop and play buttons more width for longer text */
    .recording-controls .btn-stop {
        flex: 0 0 auto;
        min-width: 130px;
        max-width: 160px;
        justify-content: center;
        font-size: 0.9rem;
        padding: 10px 16px;
        white-space: nowrap;
    }

    .recording-controls .btn-play {
        flex: 0 0 auto;
        min-width: 130px;
        max-width: 170px;
        justify-content: center;
        font-size: 0.9rem;
        padding: 10px 16px;
        white-space: nowrap;
    }

    /* Other buttons can wrap normally */
    .recording-controls .btn-confirm,
    .recording-controls .btn-cancel {
        flex: 1;
        min-width: 140px;
        max-width: 180px;
        justify-content: center;
        font-size: 0.9rem;
        padding: 10px 16px;
    }

    #audioActions {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    #audioActions button {
        flex: 1;
        min-width: 120px;
        max-width: 160px;
        font-size: 0.9rem;
        padding: 10px 16px;
    }
}

/* Extra small screens - specific for recording buttons only */
@media (max-width: 480px) {
    .recording-controls {
        gap: 8px;
    }

    /* Keep only recording buttons in tight row */
    .recording-controls .btn-record,
    .recording-controls .btn-upload {
        flex: 0 0 auto;
        min-width: 100px;
        max-width: 115px;
        font-size: 0.85rem;
        padding: 8px 12px;
        white-space: nowrap;
    }

    /* Give stop and play buttons more width for longer text */
    .recording-controls .btn-stop {
        flex: 0 0 auto;
        min-width: 110px;
        max-width: 140px;
        font-size: 0.85rem;
        padding: 8px 12px;
        white-space: nowrap;
    }

    .recording-controls .btn-play {
        flex: 0 0 auto;
        min-width: 110px;
        max-width: 145px;
        font-size: 0.85rem;
        padding: 8px 12px;
        white-space: nowrap;
    }

    /* Other buttons can be normal */
    .recording-controls .btn-confirm,
    .recording-controls .btn-cancel {
        flex: 1;
        min-width: 100px;
        max-width: 140px;
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    #audioActions {
        gap: 8px;
    }

    #audioActions button {
        min-width: 100px;
        max-width: 130px;
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Print Styles */
@media print {
    .applicant-dashboard {
        box-shadow: none;
        background: white;
    }

    .dashboard-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .dashboard-header {
        background: var(--primary-color) !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }

    .recording-section {
        display: none;
    }

    .acceptance-message {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
        border: 1px solid #ccc !important;
    }
}

/* Appointment Management Styles */
.appointment-info {
    /* background: linear-gradient(135deg, #fff9e6, #ffffff);
    border: 2px solid var(--second-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(247, 191, 0, 0.15); */
}

.appointment-info p {
    margin: 10px 0;
    line-height: 1.6;
}

.appointment-info strong {
    color: #f7bf00;
}

.appointment-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.appointment-actions .btn {
    flex: 1;
    min-width: 150px;
    justify-content: center;
}

.btn-reschedule {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgb(0 0 0 / 30%);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-reschedule:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 152, 0, 0.3);
}

/* Reschedule Info Styling */
.reschedule-info {
    background: linear-gradient(135deg, #fff3cd, #ffffff);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 15px;
    color: #856404;
    font-size: 0.9rem;
    text-align: center;
}

/* Result Info Styling */
.result-info {
    background: #000000;
    /* border: 1px solid #c8e6c9; */
    border-radius: 8px;
    padding: 5px;
    color: #f7bf00;
    text-align: center;
}

/* .result-info strong {
    color: #1b5e20;
} */

/* Contract Section Styles */

/* Ensure timeline contract section is not affected by modal styles */
.status-timeline .contract-section {
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    position: static !important;
    text-align: center;
}

/* Salary amount styling in contract */
.salary-amount {
    font-weight: bold;
    color: #7f0525;
    font-size: 1.11em;
}

/* Contract Popup Styles */
.contract-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    direction: rtl;
    padding: 20px;
    box-sizing: border-box;
}

.contract-popup {
    background: white;
    border-radius: 12px;
    max-width: 100%;
    max-height: 100vh;
    width: 900px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
}

.contract-popup-header {
    background: linear-gradient(135deg, #8b0628, #6b0420);
    color: white;
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.contract-popup-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.close-popup {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-popup:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.contract-popup-content {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.5;
    max-height: calc(100vh - 200px);
}

.contract-content {
    background: linear-gradient(135deg, #f9f9f9, #ffffff);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(139, 6, 40, 0.05);
}

.contract-content h1 {
    text-align: center;
    color: #8b0628;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.contract-content h2 {
    color: #8b0628;
    margin: 20px 0 12px 0;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid #f7bf00;
    padding-bottom: 6px;
}

.contract-content h3 {
    color: #8b0628;
    margin: 15px 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.contract-content p {
    margin: 8px 0;
    color: #333;
    font-size: 0.95rem;
    text-align: justify;
    line-height: 1.6;
}

.contract-content strong {
    color: #8b0628;
    font-weight: 600;
}

.contract-content ul {
    margin: 10px 0;
    padding-right: 25px;
}

.contract-content li {
    margin: 5px 0;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* .contract-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(139, 6, 40, 0.02);
    border-radius: 8px;
    border-right: 3px solid #8b0628;
} */

.contract-agreement {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 1px solid #4caf50;
    border-radius: 10px;
}

.contract-agreement h3 {
    color: #2e7d32;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    margin: 12px 0;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-wrapper:hover {
    border-color: #8b0628;
    box-shadow: 0 2px 6px rgba(139, 6, 40, 0.1);
}

.checkbox-wrapper input[type="checkbox"] {
    margin-left: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-top: 2px;
}

.checkbox-wrapper label {
    cursor: pointer;
    flex: 1;
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.identity-upload-section {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #fff9e6, #ffffff);
    border: 1px solid #f7bf00;
    border-radius: 10px;
}

.identity-upload-section h3 {
    color: #8b0628;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.identity-upload-section > p {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

.upload-item {
    text-align: center;
    padding: 15px;
    background: white;
    border: 2px dashed #ccc;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.upload-item.has-file {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
}

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

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 15px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.upload-label:hover {
    background: rgba(247, 191, 0, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    color: #f7bf00;
}

.upload-text {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    font-size: 0.95rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: #666;
}

.file-preview {
    margin-top: 12px;
    text-align: center;
}

.file-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.file-name {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #4caf50;
    font-weight: 500;
}

.contract-popup-footer {
    padding: 15px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 0 0 12px 12px;
}

.btn-contract {
    padding: 10px 25px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.btn-accept-contract {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
}

.btn-accept-contract:hover:not(:disabled) {
    background: linear-gradient(135deg, #388e3c, #2e7d32);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
}

.btn-cancel-contract {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    color: white;
}

.btn-cancel-contract:hover {
    background: linear-gradient(135deg, #757575, #616161);
    transform: translateY(-1px);
}

.btn-accept-contract:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Contract Success and Reviewing Status Styles */
.success-message {
    text-align: center;
    padding: 20px;
}

.success-message h2 {
    color: #4caf50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.reviewing-status {
    margin-top: 20px;
}

.reviewing-status h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.reviewing-status .status-timeline {
    margin: 20px 0;
    text-align: right;
}

.reviewing-status .timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.reviewing-status .timeline-item.completed {
    background: rgba(76, 175, 80, 0.1);
    border-right: 3px solid #4caf50;
}

.reviewing-status .timeline-item.pending {
    background: rgba(255, 193, 7, 0.1);
    border-right: 3px solid #ffc107;
}

.reviewing-status .timeline-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-left: 15px;
    flex-shrink: 0;
}

.reviewing-status .timeline-item.completed .timeline-marker {
    background: #4caf50;
    color: white;
}

.reviewing-status .timeline-item.pending .timeline-marker {
    background: #ffc107;
    color: white;
}

.reviewing-status .timeline-content h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.reviewing-status .timeline-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

.reviewing-status .note {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: var(--secondary-light);
    border-radius: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

/* Animation for the success message */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    animation: slideInUp 0.5s ease-out;
}

.reviewing-status .timeline-item {
    animation: slideInUp 0.5s ease-out;
}

.reviewing-status .timeline-item:nth-child(2) {
    animation-delay: 0.1s;
}

.reviewing-status .timeline-item:nth-child(3) {
    animation-delay: 0.2s;
}

/* Contract Submitted Status Styles */
.contract-submitted-status {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}


.contract-submitted-status p:first-child {
    font-size: 1.1rem;
}

.submitted-documents {
    background: rgba(247, 191, 0, 0.1);
    border: 1px solid rgba(247, 191, 0, 0.3);
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0;
}

.submitted-documents h5 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-size: 1rem;
}

.submitted-documents p {
    margin: 3px 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* Success Message Styles */
.success-message {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border-radius: 12px;
    border: 2px solid #4caf50;
    margin: 20px 0;
}

.success-message h2 {
    color: #2e7d32;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 600;
}

.success-message p {
    color: #388e3c;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 10px 0;
}

/* Responsive Design for Contract Popup */
@media (max-width: 768px) {
    .contract-popup-overlay {
        padding: 10px;
    }

    .contract-popup {
        width: 100%;
        max-height: 95vh;
        margin: 0;
    }

    .contract-popup-header {
        padding: 15px 20px;
    }

    .contract-popup-header h2 {
        font-size: 1.4rem;
    }

    .contract-popup-content {
        padding: 15px 20px;
        max-height: calc(100vh - 150px);
    }

    .contract-content {
        padding: 15px;
    }

    .contract-content h1 {
        font-size: 1.6rem;
    }

    .contract-content h2 {
        font-size: 1.2rem;
    }

    .upload-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .contract-popup-footer {
        padding: 12px 20px;
        flex-direction: column;
    }

    .btn-contract {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .contract-popup-header {
        padding: 12px 15px;
    }

    .contract-popup-content {
        padding: 12px 15px;
    }

    .contract-content {
        padding: 12px;
    }

    .contract-content h1 {
        font-size: 1.4rem;
    }

    .contract-content h2 {
        font-size: 1.1rem;
    }
}

/* Responsive Design for Appointment Buttons */
@media (max-width: 768px) {
    .appointment-actions {
        flex-direction: row;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .appointment-actions .btn {
        flex: 1;
        min-width: 120px;
        max-width: none;
        justify-content: center;
        font-size: 0.9rem;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .appointment-actions {
        gap: 8px;
    }

    .appointment-actions .btn {
        min-width: 100px;
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Rejection Message Styles */
.rejection-message {
    background: #8f0f26;
    /* border: 2px solid #dee2e6;
    border-radius: var(--border-radius);
    padding: 0;
    margin: 20px 0; */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.rejection-content {
    padding: 30px;
    text-align: center;
}

.rejection-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #dee2e6;
}

.rejection-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.7;
}

.rejection-header h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #ffffff;
}

.rejection-text {
    line-height: 1.8;
    color: #ffffff;
    font-size: 1.1rem;
}

.rejection-text p {
    margin: 0 0 15px 0;
    text-align: right;
}

.rejection-text p:last-child {
    margin-bottom: 0;
}

.rejection-signature {
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
}

.rejection-signature p {
    margin: 0;
    color: #f9c600;
    font-size: 1rem;
    line-height: 1.4;
}

.rejection-signature strong {
    color: #ffffff;
    font-weight: 600;
}

/* Responsive Design for Rejection Message */
@media (max-width: 768px) {
    .rejection-content {
        padding: 20px;
    }

    .rejection-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .rejection-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }

    .rejection-header h3 {
        font-size: 1.2rem;
    }

    .rejection-text {
        font-size: 1rem;
    }

    .rejection-text p {
        margin-bottom: 12px;
    }

    .rejection-signature {
        margin-top: 25px;
        padding-top: 15px;
    }
}

@media (max-width: 480px) {
    .rejection-content {
        padding: 15px;
    }

    .rejection-header h3 {
        font-size: 1.2rem;
    }

    .rejection-text {
        font-size: 0.95rem;
    }

    .rejection-signature {
        margin-top: 20px;
    }
}
