/* Employee Registration page. Scoped under .emp-reg-page - every selector here used to be
   unscoped (plain .form-inp/.main-card/.section-header/.form-lbl/.btn-cancel/.btn-save/etc.),
   which collided with identically-named, equally unscoped classes in LocationSaveList.css,
   Enclosures.css and EmployeeList.css (all loaded globally alongside every other page's CSS -
   see FieldDashboard.css for the fuller writeup of why that always matters). EmployeeList.css in
   particular defines `select.form-inp` (higher specificity than a bare .form-inp), so its rule
   won regardless of source order, producing inconsistent/broken-looking inputs here. This file
   also used to define several of its own selectors (.main-card/.section-header/.section-title/
   .form-lbl/.form-inp/.btn-cancel/.btn-save) TWICE with different values - the two copies are
   merged below into one rule each, keeping whichever value the cascade was already picking. */

/* --- Header --- */
.emp-reg-page .page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    margin-top: 24px;
}

.emp-reg-page .page-title {
    color: #1F2937;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

/* --- Main Cards --- */
.emp-reg-page .main-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    padding: 24px;
    margin-bottom: 20px;
}

.emp-reg-page .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.emp-reg-page .section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .emp-reg-page .section-title i {
        color: #059669;
        font-size: 1.2rem;
    }

/* --- Form Inputs (Borderless Flat Design) --- */
.emp-reg-page .form-lbl {
    font-size: 0.75rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    display: block;
}

.emp-reg-page .form-inp {
    background-color: #F3F4F6;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #1F2937;
    width: 100%;
    transition: all 0.2s;
}

    .emp-reg-page .form-inp::placeholder {
        color: #9CA3AF;
        font-weight: 500;
    }

    .emp-reg-page .form-inp:focus {
        border-color: #3B82F6;
        outline: none;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

/* Custom Select Arrow */
.emp-reg-page select.form-inp {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 36px;
}

/* --- Buttons --- */
.emp-reg-page .btn-cancel {
    background-color: #ffffff;
    color: #059669;
    border: 1px solid #10B981;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 6px;
    margin-right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

    .emp-reg-page .btn-cancel:hover {
        background-color: #ECFDF5;
    }

.emp-reg-page .btn-save {
    background-color: #166534;
    color: #ffffff;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

    .emp-reg-page .btn-save:hover {
        background-color: #14532D;
    }

/* --- Table Controls --- */
.emp-reg-page .table-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.emp-reg-page .search-box {
    position: relative;
}

    .emp-reg-page .search-box i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #9CA3AF;
        font-size: 0.85rem;
    }

    .emp-reg-page .search-box input {
        padding-left: 32px;
        border: 1px solid #E5E7EB;
        border-radius: 6px;
        background-color: #F8FAFC;
        font-size: 0.8rem;
        padding-top: 8px;
        padding-bottom: 8px;
        width: 220px;
    }

.emp-reg-page .btn-outline-green {
    border: 1px solid #10B981;
    color: #10B981;
    background-color: transparent;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}

    .emp-reg-page .btn-outline-green:hover {
        background-color: #ECFDF5;
    }

/* --- Data Table --- */
.emp-reg-page .data-table {
    width: 100%;
    border-collapse: collapse;
}

    .emp-reg-page .data-table th {
        background-color: #F8FAFC;
        color: #4B5563;
        font-size: 0.75rem;
        font-weight: 700;
        padding: 12px 16px;
        text-transform: capitalize;
        border-bottom: 1px solid #E5E7EB;
        border-top: 1px solid #E5E7EB;
        text-align: left;
    }

        .emp-reg-page .data-table th:first-child {
            border-top-left-radius: 8px;
            border-left: 1px solid #E5E7EB;
        }

        .emp-reg-page .data-table th:last-child {
            border-top-right-radius: 8px;
            border-right: 1px solid #E5E7EB;
            text-align: center;
        }

    .emp-reg-page .data-table td {
        padding: 14px 16px;
        border-bottom: 1px solid #F3F4F6;
        font-size: 0.85rem;
        color: #1F2937;
        font-weight: 500;
        vertical-align: middle;
    }

    .emp-reg-page .data-table tr:hover td {
        background-color: #F8FAFC;
    }

/* Action Icons */
.emp-reg-page .action-icons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

    .emp-reg-page .action-icons i {
        font-size: 1rem;
        cursor: pointer;
    }

.emp-reg-page .icon-del {
    color: #EF4444;
}

.emp-reg-page .icon-edit {
    color: #3B82F6;
}

/* --- Pagination --- */
.emp-reg-page .pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 10px;
}

.emp-reg-page .items-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #4B5563;
    font-weight: 500;
}

    .emp-reg-page .items-per-page select {
        border: 1px solid #E5E7EB;
        border-radius: 4px;
        padding: 4px 8px;
        font-size: 0.8rem;
    }

.emp-reg-page .pagination-controls {
    display: flex;
    gap: 6px;
}

.emp-reg-page .page-btn {
    border: 1px solid #E5E7EB;
    background-color: #ffffff;
    color: #4B5563;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
}

    .emp-reg-page .page-btn.active {
        background-color: #F3F4F6;
        color: #1F2937;
        font-weight: 700;
    }

    .emp-reg-page .page-btn.ellipsis {
        border: none;
        background: transparent;
        cursor: default;
    }

/* --- Badges --- */
.emp-reg-page .badge-director {
    background-color: #FCE7F3;
    color: #BE185D;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 6px;
}

/* Custom Status Box */
.emp-reg-page .status-toggle-box {
    background-color: #D1FAE5;
    border-radius: 8px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.emp-reg-page .status-toggle-text {
    display: flex;
    flex-direction: column;
}

    .emp-reg-page .status-toggle-text strong {
        font-size: 0.85rem;
        font-weight: 700;
        color: #065F46;
        line-height: 1.2;
    }

    .emp-reg-page .status-toggle-text small {
        font-size: 0.65rem;
        color: #6B7280;
    }

.emp-reg-page .status-toggle-inactive {
    background-color: #FEE2E2;
    border-color: #FECACA;
}

.emp-reg-page .status-toggle-inactive span,
.emp-reg-page .status-toggle-inactive .status-toggle-text strong {
    color: #991B1B;
}

/* CSS Switch */
.emp-reg-page .switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin-bottom: 0;
    flex-shrink: 0;
}

    .emp-reg-page .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.emp-reg-page .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

    .emp-reg-page .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

.emp-reg-page input:checked + .slider {
    background-color: #10B981;
}

    .emp-reg-page input:checked + .slider:before {
        transform: translateX(20px);
    }

/* --- Footer Buttons --- */
.emp-reg-page .footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* --- SpecialAdmin Multi-select Dropdown --- */
.emp-reg-page .samulti {
    position: relative;
    width: 100%;
}

.emp-reg-page .samulti-box {
    background-color: #F3F4F6;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 8px 12px;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

    .emp-reg-page .samulti-box:hover,
    .emp-reg-page .samulti-box.open {
        border-color: #3B82F6;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.emp-reg-page .samulti-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    align-items: center;
    min-width: 0;
}

.emp-reg-page .samulti-placeholder {
    color: #9CA3AF;
    font-size: 0.85rem;
    font-weight: 500;
}

.emp-reg-page .samulti-tag {
    background-color: #e2e8f0;
    color: #0f172a;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #cbd5e1;
    font-weight: 500;
}

    .emp-reg-page .samulti-tag i {
        cursor: pointer;
        font-size: 0.8rem;
        color: #64748b;
    }

        .emp-reg-page .samulti-tag i:hover {
            color: #dc2626;
        }

.emp-reg-page .samulti-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emp-reg-page .samulti-clear {
    cursor: pointer;
    color: #9CA3AF;
    font-size: 0.9rem;
}

    .emp-reg-page .samulti-clear:hover {
        color: #dc2626;
    }

.emp-reg-page .samulti-chevron {
    color: #6B7280;
    font-size: 0.8rem;
}

.emp-reg-page .samulti-overlay {
    position: fixed;
    inset: 0;
    z-index: 1099;
    background: transparent;
}

.emp-reg-page .samulti-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1100;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.emp-reg-page .samulti-search {
    padding: 10px 14px;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    align-items: center;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.emp-reg-page .samulti-search-icon {
    color: #94A3B8;
    font-size: 0.85rem;
}

.emp-reg-page .samulti-search-input {
    border: none;
    outline: none;
    width: 100%;
    margin-left: 8px;
    font-size: 0.85rem;
    color: #1F2937;
    background: transparent;
}

    .emp-reg-page .samulti-search-input::placeholder {
        color: #9CA3AF;
        font-weight: 400;
    }

.emp-reg-page .samulti-list {
    max-height: 210px;
    overflow-y: auto;
    padding: 6px;
}

.emp-reg-page .samulti-select-all {
    padding: 9px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #059669;
    cursor: pointer;
    border-bottom: 1px solid #F1F5F9;
    background-color: #F8FAFC;
    transition: background-color 0.1s ease;
}

    .emp-reg-page .samulti-select-all:hover {
        background-color: #DCFCE7;
        color: #047857;
    }

.emp-reg-page .samulti-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #1F2937;
}

    .emp-reg-page .samulti-option:hover {
        background-color: #F3F4F6;
    }

    .emp-reg-page .samulti-option.selected {
        background-color: #E2E8F0;
        color: #0F172A;
        font-weight: 600;
    }

.emp-reg-page .samulti-empty {
    padding: 16px 10px;
    font-size: 0.85rem;
    color: #9CA3AF;
    text-align: center;
}

/* native: phone */
/* Cancel / Save render through <ActionBar CssClass="emp-reg-actions">. Tablet and desktop keep the
   old .footer-actions geometry (right-aligned, 12px gap, 24px top margin, no extra padding).
   Left un-prefixed with .emp-reg-page on purpose - emp-reg-actions/fb-actionbar/shell-page-actions
   are already their own uniquely-named classes (the ActionBar/shell components'), not part of the
   collision this file otherwise had. */
@media (min-width: 768px) {
    .fb-actionbar.emp-reg-actions {
        margin-top: 24px;
        padding: 0;
        gap: 12px;
    }
}

/* Phone-only (max-width 767.98px): sticky bar buttons at 44px, full-width inputs with 16px text. */
@media (max-width: 767.98px) {
    .fb-actionbar--sticky.emp-reg-actions .btn-cancel,
    .fb-actionbar--sticky.emp-reg-actions .btn-save {
        min-height: var(--tap-min, 44px);
        margin: 0;
        justify-content: center;
    }

    .emp-reg-actions ~ .badge-director,
    .shell-page-actions .badge-director {
        white-space: nowrap;
    }
}
