/* ===================== */
/* Users Page Styles     */
/* ===================== */

/* Users Table Container */
.users-table-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 0;
    min-height: 340px;
}

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

.users-table thead th {
    background: #D5E4EF;
    color: #7F7F7F;
    font-weight: 600;
    font-size: 13px;
    padding: 14px 18px;
    text-align: left;
    white-space: nowrap;
    border: none;
}

.users-table tbody td {
    padding: 14px 18px;
    color: #1a1a2e;
    font-size: 13px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}

.users-table tbody tr:last-child td {
    border-bottom: none;
}

.users-table tbody tr:hover {
    background: #f8fafd;
}

/* User Name Cell */
.user-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-table-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Table Icons */
.table-icon {
    color: #2E77AE;
    margin-right: 6px;
    font-size: 12px;
}

/* View Button */
.view-btn {
    padding: 5px 22px;
    border: 1px solid #2E77AE;
    background: #fff;
    color: #2E77AE;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    background: #2E77AE;
    color: #fff;
}

/* Empty State */
.users-empty-state {
    padding: 80px 20px;
    text-align: center;
    color: #7F7F7F;
    font-size: 14px;
}

/* Bottom Row */
.users-bottom-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    position: relative;
}

/* Create User Button */
.create-user-btn {
    position: fixed;
    bottom: 30px;
    right: 40px;
    padding: 12px 28px;
    background: #1a3d5c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 50;
    font-family: 'Lato', sans-serif;
}

.create-user-btn:hover {
    background: #15314a;
}

/* ===================== */
/* Modal Styles           */
/* ===================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #fff;
    border-radius: 16px;
    width: 500px;
    max-width: 92vw;
    z-index: 600;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 28px 32px;
}

.modal.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Modal Header */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #2E77AE;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #D63030;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 0.7;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin-bottom: 28px;
    border-bottom: 1px solid #e8eaed;
    padding-bottom: 0;
}

.modal-tab {
    text-decoration: none;
    color: #7F7F7F;
    font-size: 14px;
    font-weight: 500;
    padding-bottom: 10px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.modal-tab.active {
    color: #1a3d5c;
    border-bottom-color: #1a3d5c;
    font-weight: 600;
}

.modal-tab:hover {
    color: #1a3d5c;
}

/* Modal Form */
.modal-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

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

.modal-form-group-full {
    flex: 1 1 100%;
}

.modal-form-group-grow {
    flex: 2;
}

.modal-form-label {
    font-size: 13px;
    color: #7F7F7F;
    margin-bottom: 6px;
    font-weight: 500;
}

.modal-form-input {
    padding: 10px 14px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Lato', sans-serif;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
}

.modal-form-input:focus {
    outline: none;
    border-color: #2E77AE;
}

.modal-form-input::placeholder {
    color: #b0b8c4;
}

/* Modal Select */
.modal-select-wrapper {
    position: relative;
}

.modal-form-select {
    width: 100%;
    padding: 10px 14px;
    padding-right: 32px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Lato', sans-serif;
    color: #333;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.modal-form-select:focus {
    outline: none;
    border-color: #2E77AE;
}

.modal-select-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #7F7F7F;
    pointer-events: none;
}

/* Email Row */
.modal-email-row {
    align-items: flex-end;
}

.send-invite-btn {
    padding: 10px 20px;
    background: #2E77AE;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Lato', sans-serif;
    transition: background 0.2s;
    height: 40px;
}

.send-invite-btn:hover {
    background: #245F8B;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.modal-next-btn,
.modal-create-btn {
    padding: 10px 36px;
    background: #1a3d5c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: background 0.2s;
}

.modal-next-btn:hover,
.modal-create-btn:hover {
    background: #15314a;
}

/* ===================== */
/* Responsive             */
/* ===================== */

@media (max-width: 900px) {
    .users-table-container {
        overflow-x: auto;
    }

    .modal {
        width: 95vw;
        padding: 20px;
    }

    .modal-form-row {
        flex-direction: column;
    }

    .create-user-btn {
        right: 20px;
        bottom: 20px;
    }
}

@media (max-width: 600px) {
    .modal-email-row {
        flex-direction: column;
        align-items: stretch;
    }

    .send-invite-btn {
        align-self: flex-end;
    }
}
