:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #eef2ff;
    --background: #f5f7fb;
    --white: #ffffff;
    --text-primary: #172033;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text-primary);
    background: var(--background);
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 14px;
}

button,
input,
select {
    font: inherit;
}

.page-container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px;
}

.page-header {
    margin-bottom: 22px;
}

.page-title {
    margin: 0;
    font-size: 26px;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.page-description {
    margin: 7px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

/* Summary cards */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(145px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.summary-card {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.summary-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
}

.icon-total {
    color: #4f46e5;
    background: #eef2ff;
}

.icon-pending {
    color: #b45309;
    background: #fef3c7;
}

.icon-confirmed {
    color: #0369a1;
    background: #e0f2fe;
}

.icon-progress {
    color: #7c3aed;
    background: #f3e8ff;
}

.icon-completed {
    color: #047857;
    background: #d1fae5;
}

.icon-cancelled {
    color: #b91c1c;
    background: #fee2e2;
}

.summary-label {
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 12px;
}

.summary-number {
    font-size: 22px;
    font-weight: 750;
    line-height: 1;
}

/* Content cards */

.content-card {
    margin-bottom: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-heading {
    padding: 18px 20px 0;
}

.card-heading h2,
.table-heading h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.card-heading p,
.table-heading p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

/* Filter */

.filter-form {
    display: grid;
    grid-template-columns:
        minmax(280px, 2fr)
        minmax(160px, 0.7fr)
        minmax(150px, 0.7fr)
        minmax(150px, 0.7fr)
        auto;
    gap: 12px;
    align-items: end;
    padding: 18px 20px 20px;
    align-items: center;
}

.form-group {
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #344054;
    font-size: 11px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    color: var(--text-primary);
    background: var(--white);
    border: 1px solid #cfd7e5;
    border-radius: 8px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.filter-actions {
    display: flex;
    gap: 9px;
    margin-top: 15px;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.2s ease;
}

.button-primary {
    color: var(--white);
    background: var(--primary);
}

.button-primary:hover {
    background: var(--primary-dark);
}

.button-secondary {
    color: #475569;
    background: var(--white);
    border-color: #cfd7e5;
}

.button-secondary:hover {
    background: #f8fafc;
}

/* Table */

.table-heading {
    padding: 18px 20px;
}

.table-responsive {
    padding: 0 20px 20px;
    overflow-x: auto;
}

.booking-table {
    width: 100%;
    min-width: 1500px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.booking-table th {
    padding: 12px 11px;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.25px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.booking-table td {
    padding: 13px 11px;
    color: #334155;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    vertical-align: middle;
}

.booking-table tbody tr:last-child td {
    border-bottom: 0;
}

.booking-table tbody tr:hover {
    background: #fafbff;
}

.serial-number {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: 7px;
    font-size: 11px;
    font-weight: 800;
}

.reference-number {
    color: #f48d02;
    font-weight: 750;
    white-space: nowrap;
}

.primary-text {
    color: var(--text-primary);
    font-weight: 650;
}

.secondary-text {
    margin-top: 4px;
    color: var(--text-light);
    font-size: 10px;
    white-space: nowrap;
}

.mode-badge {
    display: inline-flex;
    padding: 5px 9px;
    color: #334155;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.concern-preview {
    max-width: 220px;
    overflow: hidden;
    color: #475569;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status badges */

.status-badge {
    min-width: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.status-pending {
    color: #92400e;
    background: #fef3c7;
}

.status-confirmed {
    color: #075985;
    background: #e0f2fe;
}

.status-progress {
    color: #6d28d9;
    background: #ede9fe;
}

.status-completed {
    color: #047857;
    background: #d1fae5;
}

.status-cancelled {
    color: #b91c1c;
    background: #fee2e2;
}

.status-default {
    color: #475569;
    background: #e2e8f0;
}

.view-details-button {
    padding: 7px 11px;
    color: var(--primary);
    background: var(--primary-light);
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.view-details-button:hover {
    background: #e0e7ff;
}

.empty-state {
    padding: 55px 20px !important;
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 15px;
}

.empty-state span {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Modal */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(3px);
}

.modal-overlay.is-open {
    display: flex;
}

.modal-dialog {
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.26);
    animation: modalOpen 0.2s ease;
}

@keyframes modalOpen {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 750;
}

.modal-reference {
    margin-top: 5px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.modal-close-button {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: #f1f5f9;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 21px;
}

.modal-close-button:hover {
    color: #0f172a;
    background: #e2e8f0;
}

.modal-body {
    padding: 22px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.detail-box {
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #edf1f6;
    border-radius: 10px;
}

.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    margin-bottom: 7px;
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.detail-value {
    color: #1e293b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.concern-detail {
    white-space: pre-wrap;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
}


/* Counselling booking pagination */

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px 20px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-link {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    color: #475569;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.pagination-link:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-color: #c7d2fe;
}

.pagination-navigation {
    padding-right: 14px;
    padding-left: 14px;
}

.pagination-active {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
    cursor: default;
}

.pagination-active:hover {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.pagination-disabled {
    color: #94a3b8;
    background: #f8fafc;
    cursor: not-allowed;
    opacity: 0.7;
}

.pagination-disabled:hover {
    color: #94a3b8;
    background: #f8fafc;
    border-color: var(--border);
}

.pagination-dots {
    min-width: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 700px) {
    .pagination-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination {
        width: 100%;
        justify-content: flex-start;
    }

    .pagination-navigation {
        padding-right: 10px;
        padding-left: 10px;
    }
}


/* Meeting link column */
/* Meeting-link information */

.meeting-link-column {
    min-width: 0px;
    max-width: 360px;
}

.meeting-link-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.meeting-link-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 100%;
}

.join-session-button {
    min-height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    color: #ffffff;
    background: #059669;
    border: 1px solid #059669;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.join-session-button:hover {
    color: #ffffff;
    background: #047857;
    border-color: #047857;
}

.join-session-button:active {
    transform: translateY(1px);
}

.meeting-link-url {
    display: inline-block;
    max-width: 190px;
    overflow: hidden;
    color: #2563eb;
    font-size: 10px;
    font-weight: 650;
    line-height: 1.4;
    text-decoration: underline;
    text-overflow: ellipsis;
    white-space: nowrap;
    display:none;
}

.meeting-link-url:hover {
    color: #1d4ed8;
}

.meeting-link-url-expired {
    color: #64748b;
    cursor: default;
    text-decoration: none;
   
}

.meeting-link-time {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
    display:none;
    
}

.meeting-link-expired {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

.meeting-link-empty {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}


/* Support button beside Session Expired */

.expired-session-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.meeting-support-button,
.meeting-support-button:visited {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;

    color: #ffffff !important;
    background-color: #4f46e5 !important;
    border: 1px solid #4f46e5 !important;
    border-radius: 7px;

    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}

.meeting-support-button:hover {
    color: #ffffff !important;
    background-color: #4338ca !important;
    border-color: #4338ca !important;
    text-decoration: none !important;
}

.meeting-support-button:active {
    color: #ffffff !important;
    background-color: #3730a3 !important;
    border-color: #3730a3 !important;
    transform: translateY(1px);
}

.meeting-support-button:focus {
    color: #ffffff !important;
    outline: none;
}

.meeting-support-button:focus-visible {
    color: #ffffff !important;
    outline: 3px solid rgba(79, 70, 229, 0.25);
    outline-offset: 2px;
    box-shadow: 0 0 0 1px #4f46e5;
}

@media (max-width: 700px) {
    .meeting-link-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .meeting-link-url {
        max-width: 220px;
    }
}

/* Responsive */

@media (max-width: 1300px) {
    .summary-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    .filter-form {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .page-container {
        padding: 15px;
    }

    .page-title {
        font-size: 22px;
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(130px, 1fr));
    }

    .filter-form {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        grid-column: auto;
    }

    .filter-actions .button {
        flex: 1;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: auto;
    }

    .modal-overlay {
        padding: 12px;
    }
}

@media (max-width: 450px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }

    .filter-actions .button {
        width: 100%;
    }
}