/* =========================================================
   Assign Clients to Employee Page
   ========================================================= */

#assignClientsPage {
    padding-bottom: 2rem;
}

/* Back link */
.ac-back-link {
    color: #64748b;
    font-size: 0.85rem;
    transition: color 0.15s;
}
.ac-back-link:hover { color: #2563eb; }

/* Page-level title + subtitle */
.ac-outer-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}
.ac-outer-subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Cards */
.ac-card {
    border-radius: 16px;
    border: none;
}
.ac-card-body {
    padding: 2rem 2.25rem 2rem;
}
.ac-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

/* Labels */
.ac-label {
    font-size: 0.875rem;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

/* Select */
.ac-select {
    border-radius: 8px;
    border-color: #e2e8f0;
    font-size: 0.9rem;
    color: #1e293b;
    padding: 0.5rem 0.85rem;
}
.ac-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ── Employee preview card ── */
.ac-emp-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    flex-wrap: wrap;
}

.ac-emp-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 260px;
    min-width: 0;
}

.ac-emp-avatar-wrap {
    flex-shrink: 0;
}
.ac-emp-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%);
    border: 2px solid #e2e8f0;
}

.ac-emp-info {
    min-width: 0;
}
.ac-emp-name {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-emp-role {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 2px;
}
.ac-emp-id {
    font-size: 0.8rem;
    color: #94a3b8;
}
.ac-copy-btn {
    font-size: 0.75rem;
    color: #2563eb;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
    line-height: 1.6;
}
.ac-copy-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.ac-emp-right {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-shrink: 0;
}
.ac-emp-contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
    white-space: nowrap;
}
.ac-contact-icon {
    color: #94a3b8;
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Filter sections ── */
.ac-filter-section {
    padding-bottom: 1.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.ac-filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.ac-filter-section + .ac-filter-section {
    padding-top: 1.75rem;
}

.ac-filter-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
}

/* Search input */
.ac-search-wrap {
    position: relative;
}
.ac-search-input {
    border-radius: 8px;
    border-color: #e2e8f0;
    font-size: 0.875rem;
    padding: 0.5rem 0.85rem;
    color: #1e293b;
}
.ac-search-input::placeholder { color: #94a3b8; }
.ac-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Selected count */
.ac-selected-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2563eb;
}

/* Tags */
.ac-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}
.ac-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    color: #334155;
    white-space: nowrap;
}
.ac-tag-remove {
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    color: #94a3b8;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    margin-left: 2px;
    transition: color 0.15s;
}
.ac-tag-remove:hover { color: #ef4444; }

/* Select + button row */
.ac-select-row {
    align-items: center;
}
.ac-select-grow {
    flex: 1 1 0;
    min-width: 0;
}
.ac-assign-btn {
    border-radius: 8px;
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Action buttons */
.ac-btn-back {
    min-width: 90px;
    color: #334155;
}
.ac-btn-submit {
    min-width: 140px;
}

/* Disclaimer */
.ac-disclaimer {
    font-size: 0.78rem;
    line-height: 1.6;
    color: #94a3b8;
}

/* ── lg (≥992px) ── */
@media (min-width: 992px) {
    .ac-outer-title  { font-size: 2rem; }
    .ac-card-title   { font-size: 1.2rem; }
    .ac-filter-title { font-size: 1rem; }
    .ac-card-body    { padding: 2.25rem 2.5rem; }
}

/* ── xxl (≥1400px) ── */
@media (min-width: 1400px) {
    .ac-outer-title  { font-size: 2.25rem; }
    .ac-card-title   { font-size: 1.3rem; }
    .ac-filter-title { font-size: 1.05rem; }
    .ac-label        { font-size: 0.9rem; }
    .ac-emp-name     { font-size: 1.05rem; }
    .ac-card-body    { padding: 2.5rem 2.75rem; }
    .ac-disclaimer   { font-size: 0.82rem; }
}

/* ── mobile (≤575px) ── */
@media (max-width: 575.98px) {
    .ac-outer-title  { font-size: 1.4rem; }
    .ac-card-body    { padding: 1.25rem; }
    .ac-emp-preview  { flex-direction: column; align-items: flex-start; }
    .ac-emp-right    { align-items: flex-start; }
    .ac-emp-contact-item { white-space: normal; }
    .ac-select-row   { flex-direction: column; align-items: stretch; }
    .ac-assign-btn   { width: 100%; }
}
