/* ==================================================
   GUEST DASHBOARD STYLES
   ================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #a8d5e2 0%, #b8cfe5 100%);
    min-height: 100vh;
    color: #333;
}

/* Header Styles */
.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo-image {
    height: 50px;
    width: auto;
    max-width: 400px;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.header-btn {
    background: #68cfff;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: #60ecff;
    box-shadow: 0 4px 20px rgba(104, 207, 255, 0.3);
}

.logout-btn {
    background: #1e40af;
}

.logout-btn:hover {
    background: #1e3a8a;
}

/* Main Content */
.dashboard-main {
    padding: 2rem;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.dashboard-left,
.dashboard-right {
    display: flex;
    flex-direction: column;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #68cfff;
}

/* User Card */
.user-card {
    flex: 0 0 auto;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.info-item label {
    font-weight: 600;
    color: #374151;
}

.info-item span {
    color: #6b7280;
}

.card-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    background: #1e40af;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-primary:hover {
    background: #1e3a8a;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
    background: white;
    color: #1e40af;
    padding: 0.75rem 1.5rem;
    border: 2px solid #1e40af;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-secondary:hover {
    background: #1e40af;
    color: white;
}

/* Booking Card */
.booking-card {
    flex: 0 0 auto;
}

.booking-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.detail-item label {
    font-weight: 600;
    color: #374151;
}

.detail-item span {
    color: #6b7280;
    text-align: right;
}

.total-item {
    background: #e0f2fe;
    font-size: 1.1rem;
    font-weight: 700;
}

.total-item span {
    color: #1e40af;
}

.divider {
    height: 2px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

.balance-item {
    background: #fef3c7;
    font-size: 1.1rem;
    font-weight: 700;
}

.balance-item span {
    color: #d97706;
}

.btn-pay {
    width: 100%;
    background: #10b981;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
}

.btn-pay:hover {
    background: #059669;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-pay:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-pay:disabled:hover {
    background: #9ca3af;
    box-shadow: none;
}

/* Chat Card */
.chat-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #68cfff;
    flex-shrink: 0;
}

.chat-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
}

.btn-link {
    background: none;
    border: none;
    color: #68cfff;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.875rem;
}

.btn-link:hover {
    color: #1e40af;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    min-height: 300px;
    max-height: 400px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    background: #e0f2fe;
    margin-right: 20%;
}

.user-message {
    background: #dbeafe;
    margin-left: 20%;
    text-align: right;
}

.message-content {
    color: #374151;
    line-height: 1.5;
}

.message-content strong {
    color: #1e40af;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: #68cfff;
}

.chat-send-btn {
    background: #1e40af;
    color: white;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    background: #1e3a8a;
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
}

/* Booking History */
.history-card {
    flex: 0 0 auto;
}

.booking-history-table {
    overflow-x: auto;
}

.booking-history-table table {
    width: 100%;
    border-collapse: collapse;
}

.booking-history-table th,
.booking-history-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.booking-history-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #1e40af;
}

.booking-history-table td {
    color: #374151;
}

.empty-state {
    text-align: center !important;
    color: #9ca3af !important;
    padding: 2rem !important;
}

/* Booking History Status Styles */
.booking-history-table tbody tr {
    transition: background-color 0.2s ease;
}

.booking-history-table tbody tr:hover {
    background-color: #f0f9ff;
    cursor: pointer;
}

.booking-history-table tbody tr.status-confirmed {
    border-left: 4px solid #28a745;
}

.booking-history-table tbody tr.status-pending {
    border-left: 4px solid #ffc107;
}

.booking-history-table tbody tr.status-cancelled {
    border-left: 4px solid #dc3545;
    opacity: 0.7;
}

.booking-history-table tbody tr.status-completed {
    border-left: 4px solid #6c757d;
    opacity: 0.85;
}

/* Booking History Payment Button Styles */
.booking-history-table .actions-cell {
    text-align: center;
    padding: 0.75rem 1rem;
}

.btn-pay-booking {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    white-space: nowrap;
}

.btn-pay-booking:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-pay-booking:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-pay-booking i {
    width: 16px;
    height: 16px;
}

.no-action-text {
    color: #9ca3af;
    font-style: italic;
}

/* Prevent row click when clicking on action buttons */
.booking-history-table tbody tr .actions-cell {
    cursor: default;
}

.booking-history-table tbody tr .actions-cell * {
    cursor: pointer;
}

.booking-history-table .remaining-balance-cell {
    font-weight: 600;
    color: #1e40af;
}

/* Booking Summary Card Styles */
#bookingsListContainer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.empty-bookings-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
    font-style: italic;
}

.booking-summary-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.booking-summary-item:hover {
    border-color: #10b981;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1);
}

.booking-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.booking-item-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
}

.booking-item-balance {
    font-size: 1.125rem;
    font-weight: 700;
    color: #dc2626;
}

.booking-item-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.detail-value {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 600;
}

.booking-item-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-pay-single {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-pay-single:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-pay-single:active {
    transform: translateY(0);
}

.btn-pay-single i {
    width: 16px;
    height: 16px;
}

#grandTotalSection {
    margin-top: 1rem;
    padding-top: 1rem;
}

.grand-total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.grand-total-item label {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

.grand-total-item span {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.btn-pay-all {
    width: 100%;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(30, 64, 175, 0.3);
}

.btn-pay-all:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 64, 175, 0.4);
}

.btn-pay-all:active {
    transform: translateY(0);
}

.btn-pay-all i {
    width: 20px;
    height: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .booking-item-details {
        grid-template-columns: 1fr;
    }
    
    .booking-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ==================================================
   PAYMENT PAGE STYLES
   ================================================== */

.payment-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
}

.payment-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reminders-card {
    background: #fef3c7;
}

.reminders-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #374151;
    line-height: 1.6;
}

.reminders-content p {
    font-size: 0.95rem;
}

.reminders-content strong {
    color: #1e40af;
}

.payment-card {
    background: white;
}

.payment-section {
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 1rem;
}

.payment-options,
.payment-mode-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-option {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    background: #e0f2fe;
    border-color: #68cfff;
}

.radio-option input[type="radio"] {
    margin-right: 0.75rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: #1e40af;
    font-weight: 700;
}

.radio-option:has(input[type="radio"]:checked) {
    background: #e0f2fe;
    border-color: #1e40af;
}

.radio-label {
    font-weight: 600;
    color: #374151;
}

.mode-option {
    flex: 0 1 calc(50% - 0.5rem);
}

.qr-section {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
}

.qr-display {
    text-align: center;
}

.qr-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.qr-caption {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.qr-details {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0.25rem 0;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #68cfff;
    box-shadow: 0 0 0 3px rgba(104, 207, 255, 0.1);
}

.file-input {
    display: none;
}

.file-preview {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.file-preview:hover {
    border-color: #68cfff;
    background: #f8fafc;
}

.file-name {
    color: #6b7280;
    font-size: 0.95rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 0.25rem;
}

.checkbox-label span {
    flex: 1;
    color: #374151;
    line-height: 1.5;
    font-size: 0.95rem;
}

.btn-submit-payment {
    width: 100%;
    background: #10b981;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit-payment:hover {
    background: #059669;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-submit-payment:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .payment-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .header-container {
        padding: 0 1rem;
    }

    .card-actions {
        flex-direction: column;
    }

    .info-item,
    .detail-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .info-item span,
    .detail-item span {
        text-align: left;
    }

    .bot-message {
        margin-right: 10%;
    }

    .user-message {
        margin-left: 10%;
    }
}

/* ==================================================
   ACCOUNT MODALS STYLES
   ================================================== */

.account-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.account-modal {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.edit-profile-modal,
.update-password-modal {
    max-width: 700px;
}

.account-modal-header {
    background: linear-gradient(135deg, #68cfff 0%, #5ba3d0 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.account-modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    transition: opacity 0.2s;
}

.back-btn:hover {
    opacity: 0.8;
}

.account-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: opacity 0.2s;
}

.account-modal-close:hover {
    opacity: 0.8;
}

.account-modal-body {
    padding: 2rem;
}

.account-option-btn {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.account-option-btn:hover {
    background: #f9fafb;
    border-color: #68cfff;
    transform: translateY(-2px);
}

.account-option-btn i {
    width: 24px;
    height: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #68cfff;
}

.form-group textarea {
    resize: vertical;
    font-family: inherit;
}

.btn-save,
.btn-confirm {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 1rem;
}

.btn-save:hover,
.btn-confirm:hover {
    background: #1e3a8a;
}

.password-requirements {
    background: #f0f9ff;
    border-left: 4px solid #68cfff;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.password-requirements p {
    font-size: 0.875rem;
    color: #1e3a8a;
    margin: 0.5rem 0;
}

.success-message {
    text-align: center;
    font-size: 1rem;
    color: #10b981;
    font-weight: 600;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: #d1fae5;
    border-radius: 8px;
}

/* Chat Main Content Layout */
.chat-main-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100vh - 300px); /* Prevent extending beyond viewport */
    background: #f8fafc;
    overflow: hidden;
}

/* Chat Status Bar */
.chat-status-bar {
    background: #f0f9ff;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #1e40af;
}

/* Chat Container - Guest Dashboard specific */
.chat-main-content .chat-container {
    flex: 1 1 auto;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: white;
    min-height: 0;
    max-height: calc(100vh - 400px); /* Prevent extending beyond viewport */
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Chat Input Container */
.chat-input-container {
    display: flex;
    padding: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
}

.chat-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.chat-send-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-send-btn:hover {
    background: #2563eb;
}

/* Chat Actions */
.chat-actions {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.agent-transfer-btn {
    width: 100%;
    background: #1e40af;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.agent-transfer-btn:hover {
    background: #1e3a8a;
}

.agent-transfer-btn i {
    width: 16px;
    height: 16px;
}

.end-chat-btn {
    width: 100%;
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

.end-chat-btn:hover {
    background: #c82333;
}

.end-chat-btn i {
    width: 16px;
    height: 16px;
}

.start-new-chat-btn {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
}

.start-new-chat-btn:hover {
    background: #218838;
}

.start-new-chat-btn i {
    width: 16px;
    height: 16px;
}

/* Chat History Modal Styles */
.chat-history-modal {
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    padding: 0;
}

.chat-history-wrapper {
    display: flex;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Left Panel: Chat History List */
.chat-history-list-panel {
    width: 35%;
    background: #e8eef5;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #d1d5db;
}

.chat-history-list-title {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #d1d5db;
}

.chat-history-cases {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.chat-history-case-item {
    padding: 15px 20px;
    border-bottom: 1px solid #d1d5db;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.chat-history-case-item:hover {
    background: #dde5ed;
}

.chat-history-case-item.selected {
    background: #d1d9e3;
}

.chat-history-case-item.selected::after {
    content: '→';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #333;
}

.chat-history-case-number {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 8px;
}

.chat-history-case-preview {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Right Panel: Conversation */
.chat-history-conversation-panel {
    width: 65%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
}

.chat-history-case-title {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    padding: 20px;
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
}

.chat-history-conversation {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
}

.chat-history-message {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #000;
}

.chat-history-message strong {
    font-weight: bold;
    color: #000;
}

.chat-history-message.system-message {
    font-style: italic;
    color: #666;
}

.chat-history-message.system-message em {
    font-style: italic;
}

.chat-history-exit-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-history-exit-btn:hover {
    background: #c82333;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .account-modal {
        width: 95%;
    }

    .account-modal-body {
        padding: 1.5rem;
    }
}

