/* Partner Interface Styles */

/* Override main content padding for partner pages */
.main-content {
    padding: 32px 24px;
}

/* View page gets wider padding */
.main-content.view-page {
    padding: 32px 130px;
}

/* Back Navigation */
.back-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    margin-bottom: 16px;
}

.back-nav:hover {
    color: #1a1d21;
}

.back-nav svg {
    flex-shrink: 0;
}

/* Client Header */
.client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.client-name {
    font-size: 22px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 4px 0;
}

.client-meta {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    margin: 0;
}

/* Edit Client Button */
.btn-edit-client {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #e8183c;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Figtree', sans-serif;
    transition: background-color 0.2s ease;
}

.btn-edit-client:hover {
    background-color: #c91434;
    color: #ffffff;
    text-decoration: none;
}

.btn-edit-client svg {
    flex-shrink: 0;
}

/* Info Cards */
.info-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.06);
}

.info-card-header {
    margin-bottom: 20px;
}

.info-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 4px 0;
}

.info-card-desc {
    font-size: 13px;
    font-weight: 400;
    color: #6b7280;
    margin: 0;
}

/* Info Grid */
.info-grid {
    display: grid;
    gap: 16px 24px;
}

.info-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.info-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.info-grid.cols-1 {
    grid-template-columns: 1fr;
}

/* Info Field */
.info-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.info-label {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    color: #101828;
}

/* Info Notes */
.info-notes {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.info-notes .info-label {
    margin-bottom: 6px;
    display: block;
}

.info-notes .info-value {
    font-weight: 400;
    color: #364153;
    line-height: 1.5;
    margin: 0;
}

/* Referral Section */
.referral-section {
    margin-bottom: 16px;
}

.referral-section:last-child {
    margin-bottom: 0;
}

.referral-category {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 10px;
}

.referral-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.referral-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400;
    color: #364153;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 6px 12px;
}

.referral-tag svg {
    flex-shrink: 0;
}

/* Bottom Action Bar */
.bottom-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
}

.bottom-action-bar .back-nav {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .info-grid.cols-3 {
        grid-template-columns: 1fr;
    }
    .info-grid.cols-2 {
        grid-template-columns: 1fr;
    }
    .client-header {
        flex-direction: column;
        gap: 12px;
    }
}

/* ===== Partner Interface Grid Page ===== */

/* Sub Tabs */
.sub-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
}

.sub-tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: 'Figtree', sans-serif;
}

.sub-tab:hover {
    color: #1a1d21;
    text-decoration: none;
}

.sub-tab.active {
    color: #e8183c;
    font-weight: 600;
    border-bottom-color: #e8183c;
}

/* Search & Filter Bar */
.search-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #d1d5dc;
    border-radius: 6px;
    padding: 8px 14px;
    flex: 1;
    max-width: 400px;
}

.search-box svg {
    flex-shrink: 0;
}

.search-box input {
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: 400;
    color: #101828;
    font-family: 'Figtree', sans-serif;
    width: 100%;
    background: transparent;
}

.search-box input::placeholder {
    color: #9ca3af;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1.5px solid #d1d5dc;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #364153;
    cursor: pointer;
    font-family: 'Figtree', sans-serif;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8183c;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    font-family: 'Figtree', sans-serif;
    transition: background 0.2s ease;
}

.export-btn:hover {
    background: #c91434;
}

/* Table overrides for partner grid */
.table-card .data-table tbody td.client-name-cell a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.table-card .data-table tbody td.client-name-cell a:hover {
    text-decoration: underline;
}

.table-card .data-table tbody td .yes-badge {
    color: #e8183c;
    font-weight: 600;
}

.table-card .data-table tbody td .no-badge {
    color: #6b7280;
    font-weight: 400;
}

/* Actions cell */
.actions-cell {
    display: flex;
    align-items: center;
    gap: 48px;
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.action-link:hover {
    opacity: 0.8;
}

.action-link.view {
    color: #2563eb;
}

.action-link.edit {
    color: #E67E22;
}

.action-link svg {
    flex-shrink: 0;
}

/* Pagination Bar */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-top: 8px;
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #6b7280;
    font-family: 'Figtree', sans-serif;
}

.pagination-left select {
    border: 1.5px solid #d1d5dc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
    font-family: 'Figtree', sans-serif;
    color: #101828;
    background: #fff;
    cursor: pointer;
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
    font-family: 'Figtree', sans-serif;
}

.page-nav {
    background: #ffffff;
    border: 1.5px solid #d1d5dc;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #364153;
    transition: all 0.2s ease;
}

.page-nav:hover:not(:disabled) {
    border-color: #9ca3af;
    background: #f9fafb;
}

.page-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Export Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: #ffffff;
    border-radius: 12px;
    width: 560px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 4px 0;
}

.modal-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #364153;
}

.modal-body {
    padding: 20px 24px;
}

.modal-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 14px;
}

.modal-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #364153;
    margin-bottom: 6px;
}

.modal-filter-group select {
    width: 100%;
    border: 1.5px solid #d1d5dc;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: 'Figtree', sans-serif;
    color: #101828;
    background: #fff;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.modal-cancel {
    background: #ffffff;
    border: 1.5px solid #d1d5dc;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #364153;
    cursor: pointer;
    font-family: 'Figtree', sans-serif;
}

.modal-cancel:hover {
    background: #f9fafb;
}

.modal-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8183c;
    border: none;
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    font-family: 'Figtree', sans-serif;
}

.modal-export:hover {
    background: #c91434;
}

/* Horizontally scrollable table with sticky Actions column */
.table-card {
    position: relative;
    overflow: hidden;
}

.table-scroll-wrapper {
    overflow-x: auto;
    width: 100%;
}

.table-card .data-table {
    min-width: 1100px;
}

.data-table th:last-child,
.data-table td:last-child {
    position: sticky;
    right: 0;
    background: #ffffff;
    z-index: 2;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.06);
}

.data-table thead th:last-child {
    background: #ffffff;
}

/* Modal custom dropdowns - match dashboard style */
.modal-dropdown {
    width: 100%;
}

.modal-dropdown .filter-dropdown-btn {
    width: 100%;
    min-width: unset;
}

.modal-dropdown .filter-dropdown-menu {
    width: 100%;
    min-width: unset;
    max-height: 200px;
    overflow-y: auto;
}

/* Actions column: fixed 189px, centered */
.data-table th:last-child,
.data-table td:last-child {
    width: 189px;
    min-width: 189px;
    max-width: 189px;
    text-align: center;
}

.data-table td:last-child .actions-cell {
    justify-content: center;
}
