* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 25px;
    font-family: Arial, sans-serif;
    background: #f3f6fb;
    color: #1e293b;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-header h1 {
    margin: 0;
    font-size: 28px;
    color: #0f172a;
}

.page-header p {
    margin: 6px 0 0;
    color: #64748b;
}

.btn-primary {
    background: #0f766e;
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.stat-card span {
    color: #64748b;
    font-size: 14px;
}

.stat-card h2 {
    margin: 10px 0 0;
    font-size: 28px;
    color: #0f172a;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 15px;
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.search-form input,
.search-form select {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

.search-form input {
    width: 380px;
}

.search-form button {
    background: #0f766e;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.reset-btn {
    background: #e2e8f0;
    color: #0f172a;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.excel-btn {
    margin-left: auto;
    white-space: nowrap;
}

.table-card {
    background: white;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    overflow: hidden;
}

.table-title {
    padding: 18px;
    border-bottom: 1px solid #e2e8f0;
}

.table-title h3 {
    margin: 0;
    color: #0f172a;
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    min-width: 2600px;
    border-collapse: collapse;
}

th {
    background: #0f172a;
    color: white;
    padding: 13px 10px;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    vertical-align: top;
}

tr:hover {
    background: #f8fafc;
}

.col-id { 
    width: 125px;
}
.col-booking { 
    width: 130px; 
    min-width: 130px;
}
.col-channel { 
    width: 100px;
    min-width: 100px; 
}
.col-name {
    width: 320px;
    min-width: 220px;
}
.col-country { 
    width: 80px;
    min-width: 80px;
}
.col-pax { 
    width: 50px;
    min-width: 50px;
}
.col-tour { 
    width: 400px;
    min-width: 200px; 
}
.col-date { 
    width: 100px;
    min-width: 100px; 
}
.col-type { 
    width: 80px;
    min-width: 80px;
}
.col-guide { 
    width: 130px;
    min-width: 130px; 
}
.col-money {
    width: 150px;
    min-width: 120px;
}
.col-remarks {
    width: 250px;
    min-width: 250px;
}
.col-days { 
    width: 100px;
    min-width: 100px;
}
.col-email { 
    width: 220px;
    min-width: 220px;
}
.col-mobile { 
    width: 140px;
    min-width: 140px;
}
.col-status { 
    width: 150px; 
}
.col-action {
    width: 170px;
    min-width: 170px;
}

.remarks-cell {
    max-width: 260px;
    white-space: normal;
    line-height: 1.4;
}

.status-badge {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    white-space: nowrap;
}

.status-payment-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-paid-pending {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-arrived {
    background: #e0f2fe;
    color: #0369a1;
}

.status-complete {
    background: #dcfce7;
    color: #166534;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.edit-btn,
.delete-btn {
    padding: 7px 11px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

.edit-btn {
    background: #dbeafe;
    color: #1d4ed8;
}

.delete-btn {
    background: #fee2e2;
    color: #b91c1c;
}

.currency-cell {
    min-width: 180px;
    text-align: left;
    line-height: 1.5;
}

.currency-code {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.currency-amount {
    display: block;
    font-size: 15px;
    font-weight: bold;
    color: #0f172a;
}

.view-btn {
    background: #dcfce7;
    color: #166534;
    padding: 7px 11px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
}

.status-form {
    margin: 0;
}

.status-dropdown {
    border: none;
    padding: 7px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    appearance: none;
    min-width: 180px;
    text-align: center;
}

/* Add New Booking */
.form-page {
    max-width: 1200px;
    margin: 0 auto;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.form-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
}

.form-header p {
    margin: 6px 0 0;
    color: #64748b;
}

.booking-form {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.form-section {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 22px;
    margin-bottom: 22px;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: bold;
    color: #334155;
    margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.full-width {
    margin-top: 18px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-actions button {
    border: none;
    cursor: pointer;
}

.select2-container .select2-selection--single {
    height: 46px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 8px 12px;
    display: flex;
    align-items: center;
}

.select2-selection__rendered {
    line-height: 28px !important;
    font-size: 14px;
}

.select2-selection__arrow {
    height: 46px !important;
}

.select2-dropdown {
    border-radius: 10px;
    border: 1px solid #cbd5e1;
}

.flatpickr-calendar {
    border-radius: 14px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

#date_range {
    cursor: pointer;
    background: white;
}

/* View Booking */
.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.details-grid div {
    background: #f8fafc;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.small-table {
    min-width: 1000px;
}

/* Header */
.crm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 18px 24px;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    width: 100%;
}

.crm-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.crm-logo {
    height: 58px;
    width: auto;
    object-fit: contain;
}

.brand-text h1 {
    margin: 0;
    font-size: 28px;
    color: #0f172a;
}

.brand-text p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.crm-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
}

.crm-actions a {
    white-space: nowrap;
}

.btn-secondary {
    background: #f1f5f9;
    color: #0f172a;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Login */
.auth-wrapper {
    min-height: 100vh;
    width: 100vw;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    background: #f3f6fb;
    margin: -25px;
}

.auth-left {
    background: linear-gradient(135deg, #0f766e, #0f172a);
    color: white;
    padding: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-logo {
    width: 250px;
    margin-bottom: 30px;
    background: white;
    padding: 14px;
    border-radius: 14px;
}

.auth-left h1 {
    font-size: 38px;
    margin: 0 0 15px;
}

.auth-left p {
    font-size: 17px;
    line-height: 1.7;
    max-width: 480px;
    color: #dbeafe;
}

.auth-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: white;
    padding: 45px;
    border-radius: 20px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.08);
}

.auth-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: 30px;
}

.auth-subtitle {
    margin: 8px 0 28px;
    color: #64748b;
    font-size: 15px;
}

.auth-card .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.auth-card .form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
    display: block;
}

.auth-card .form-group input {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    background: #ffffff;
    transition: all 0.25s ease;
    outline: none;
}

.auth-card .form-group input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}

.auth-card .form-group input::placeholder {
    color: #94a3b8;
}

.full-btn {
    width: 100%;
    border: none;
    margin-top: 10px;
    padding: 15px;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    color: #64748b;
    font-size: 14px;
}

.auth-link a {
    color: #0f766e;
    font-weight: bold;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.error-msg {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.form-header-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.user-info {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: bold;
    color: #0f172a;
    white-space: nowrap;
}

.logout-btn {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
}

.logout-btn:hover {
    background: #fecaca;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #64748b;
    user-select: none;
}

.toggle-password:hover {
    color: #0f766e;
}

/* Filter */
#filter_date_range {
    min-width: 220px;
    cursor: pointer;
    background: white;
}

/* Total USD Summary */
.financial-summary {
    margin-bottom: 25px;
}

.usd-summary-card {
    background: linear-gradient(135deg, #0f172a, #0f766e);
    color: white;
    padding: 28px;
    border-radius: 18px;
    margin-bottom: 18px;
    box-shadow: 0 10px 30px rgba(15,118,110,0.18);
}

.usd-label {
    font-size: 13px;
    letter-spacing: 2px;
    font-weight: 600;
    opacity: 0.85;
    text-transform: uppercase;
}

.usd-main {
    font-size: 42px;
    font-weight: 800;
    margin: 10px 0;
    line-height: 1.1;
}

.usd-sub {
    font-size: 14px;
    opacity: 0.85;
}

.currency-mini-card {
    background: white;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    border-left: 4px solid #0f766e;
}

.mini-code {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}

.mini-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

/* Arrival Summary */
.arrival-summary-card {
    background: white;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    height: 100%;
}

.arrival-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.arrival-summary-header h3 {
    margin: 0;
    font-size: 20px;
    color: #0f172a;
}

.arrival-summary-header span {
    color: #64748b;
    font-size: 13px;
}

.arrival-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.arrival-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 14px 16px;
    border-radius: 12px;
    border-left: 4px solid #0f766e;
}

.arrival-left strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
}

.arrival-left small {
    color: #64748b;
    font-size: 13px;
}

.arrival-right {
    font-weight: 700;
    color: #0f766e;
    font-size: 14px;
    white-space: nowrap;
}

.dashboard-summary-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.summary-left,
.summary-right {
    width: 100%;
}

.currency-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 1200px) {
    .dashboard-summary-row {
        grid-template-columns: 1fr;
    }

    .currency-mini-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .excel-btn {
        margin-left: 0;
        text-align: center;
    }
}

@media (max-width: 900px) {
    body {
        padding: 15px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form input {
        width: 100%;
    }

    .form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .crm-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .crm-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-left {
        padding: 40px;
        text-align: center;
        align-items: center;
    }

    .auth-right {
        padding: 25px;
    }

    .auth-card {
        padding: 32px;
    }

    .currency-mini-grid {
        grid-template-columns: 1fr;
    }

    .usd-main {
        font-size: 30px;
    }
}

/* View Booking - Traveler Table */
.form-page {
    max-width: 95%;
}

.traveler-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.traveler-table {
    width: 100%;
    min-width: 1600px;
    border-collapse: collapse;
}

.traveler-table th,
.traveler-table td {
    white-space: nowrap;
}

.traveler-table td:nth-child(6),
.traveler-table td:nth-child(8) {
    white-space: normal;
    min-width: 220px;
}

.delete-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    align-items: center;
    justify-content: center;
}

.delete-modal-box {
    background: white;
    width: 100%;
    max-width: 430px;
    padding: 28px;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.delete-modal-box h3 {
    margin: 0 0 12px;
    color: #991b1b;
}

.delete-modal-box p {
    color: #475569;
    line-height: 1.5;
}

.delete-modal-box label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #334155;
}

.delete-modal-box input {
    width: 100%;
    padding: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    margin-bottom: 20px;
}

.delete-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.delete-confirm-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.booking-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 18px;
    background: white;
    color: #334155;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: 0.2s;
}

.active-tab {
    background: #0f766e;
    color: white;
    border-color: #0f766e;
}

.guide-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.guide-modal-box {
    background: white;
    width: 90%;
    max-width: 850px;
    border-radius: 20px;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.guide-close {
    position: absolute;
    top: 18px;
    right: 20px;
    border: none;
    background: #fee2e2;
    color: #991b1b;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
}

.guide-profile-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 20px;
}

.guide-profile-top img {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e2e8f0;
}

.guide-profile-top h2 {
    margin: 0 0 8px;
    color: #0f172a;
}

.guide-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.guide-details-grid div,
.guide-full-detail {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 12px;
}

.guide-details-grid strong,
.guide-full-detail strong {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}

.guide-details-grid span,
.guide-full-detail p {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
}

.guide-full-detail {
    margin-top: 15px;
}