@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --sidebar-width: 280px;
    --primary-color: #2D60FF;
    --primary-hover: #1b4cd6;
    --primary-light: #E9F0FF;
    --text-main: #232323;
    --text-muted: #718EBF;
    --bg-light: #F5F7FA;
    --white: #ffffff;
    --border-color: #E6EFF5;
    --success-color: #16DBAA;
    --error-color: #FF4B4A;
    --warning-color: #FFBB38;
    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 25px;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

body {
    background-color: #fff;
    color: var(--text-main);
    min-height: 100vh;
    font-size: 16px;
    padding: 15px 0;
}

/* =========================================
   AUTH STYLES
   ========================================= */
.auth-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.auth-sidebar {
    position: relative;
    flex: 1.1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: url('/assets/img/auth-bg.png') center/cover no-repeat;
    padding: 4rem;
    color: var(--white);
    overflow: hidden;
}

.auth-sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.auth-sidebar-content {
    position: relative;
    z-index: 1;
    width: 85%;
    max-width: 450px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.auth-main {
    flex: 0.9;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
}

.auth-form-wrapper {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
}

.auth-header {
    margin-bottom: 2.5rem;
}

.auth-header h2 {
    font-size: 1.875rem;
    margin-bottom: 0.75rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2rem;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* =========================================
   DASHBOARD STYLES
   ========================================= */
.sidebar {
    width: var(--sidebar-width);
    background-color: #F8F9FF;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    z-index: 100;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    margin: 15px 0;
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem;
    margin-bottom: 3rem;
    text-decoration: none;
}

.sidebar .logo img {
    height: 35px;
}

.menu-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    padding: 0 0.6rem;
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.25rem;
    padding: 0 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0.55rem;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    font-size: 0.9375rem;
}

.nav-link:hover {
    background-color: rgba(45, 96, 255, 0.05);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: #2D4091;
    /* Exact blue from screenshot */
    color: var(--white);
    box-shadow: 0 4px 12px rgba(45, 64, 145, 0.25);
}

.sidebar-footer-box {
    margin: 2rem 1rem;
    background-color: #C2EFEC;
    padding: 50px 0 120px 15px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    color: #2D4091;
}

.sidebar-footer-box .footer-logo {
    height: 30px;
    margin-bottom: 1rem;
    display: block;
}

.sidebar-footer-box p {
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 500;
}

.sidebar-footer-box .footer-icon {
    position: absolute;
    right: 5px;
    bottom: 5px;
    font-size: 4rem;
    opacity: 0.2;
    transform: rotate(-15deg);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

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

.user-info {
    flex-grow: 1;
}

.user-name {
    font-size: 0.8125rem;
    font-weight: 600;
}

.user-email {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.welcome-text h2 {
    font-size: 1.5rem;
}

.table-container {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.table-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.action-btns {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-icon {
    width: 45px;
    height: 45px;
    border: 1px solid #E6EFF5;
    background: var(--white);
    border-radius: 0.75rem;
    color: #718EBF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
}

.btn-add {
    background: linear-gradient(90deg, #8B44A3 0%, #2D60FF 100%);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-block;
}

.custom-table th {
    background-color: #F8F9FF;
    padding: 1.25rem 1.5rem;
    color: #718EBF;
    font-weight: 500;
    font-size: 0.8125rem;
    text-align: center;
    border-bottom: 1px solid #F1F4F9;
}

.custom-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #F1F4F9;
    font-size: 0.875rem;
    color: #2D4091;
    text-align: center;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.status-active {
    background-color: #DCFCE7;
    color: #16A34A;
}

.status-inactive {
    background-color: #FEE2E2;
    color: #EF4444;
}

.table-actions {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.table-actions a,
.table-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    text-decoration: none;
}

.view-btn {
    color: #16DBAA;
}

.edit-btn {
    color: #2D60FF;
}

.delete-btn {
    color: #FE5C73;
}

.block-btn {
    color: #2D4091;
}

.status-icon-active {
    color: #2D4091 !important;
}

.status-icon-inactive {
    color: #16A34A !important;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
}

.btn-pagination {
    border: 1px solid #E6EFF5;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #2D4091;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-pagination.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.page-num {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #2D4091;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.page-num.active {
    background-color: #E9F0FF;
    color: #2D60FF;
    font-weight: 600;
}

.page-dots {
    color: #718EBF;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stats-grid-large {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    min-height: 400px;
}

/* User Profile */
.profile-banner {
    height: 175px;
    background: linear-gradient(135deg, #5B8DEF 0%, #6EC6A0 50%, #4ADE80 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-bottom: 0;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0 2.5rem;
    margin-bottom: 2rem;
    margin-top: -55px;
    position: relative;
    z-index: 1;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    flex-shrink: 0;
}

.profile-name-section {
    flex: 1;
}

.profile-name-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    padding-top: 55px;
}

.admin-show-btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 55px;
    transition: background 0.2s;
    white-space: nowrap;
}

.admin-show-btn:hover {
    background-color: var(--primary-hover);
}

/* Contact Info Section */
.contact-section-title {
    padding: 0 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-section-title h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0 2.5rem;
    margin-bottom: 0;
}

.contact-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-item:nth-child(odd) {
    padding-right: 3rem;
    border-right: 1px solid var(--border-color);
}

.contact-item:nth-child(even) {
    padding-left: 3rem;
}

.contact-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.contact-item h4 {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.contact-item p {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Permissions Section */
.permissions-section-title {
    padding: 2rem 2.5rem 1rem;
}

.permissions-section-title h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.permissions-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
    padding: 0 2.5rem 2.5rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-main);
    padding: 0.4rem 0;
}

.permission-item i {
    color: var(--success-color);
    font-size: 1.1rem;
    flex-shrink: 0;
}

table.custom-table td a {
    text-decoration: none;
    font-size: 13px;
}

table.custom-table td button {
    border: 0;
    background: 0;
    font-size: 18px;
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    animation: fadeIn 0.6s ease-out;
    background: #fff;
    padding: 0 10px;
}

.page-content-wrapper {
    background-color: #f8f9ff;
    border-radius: var(--radius-lg);
    min-height: calc(100vh - 120px);
    padding: 10px 10px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-sidebar-content {
    animation: fadeInUp 0.8s ease-out;
}

.auth-form-wrapper {
    animation: fadeInRight 0.8s ease-out;
}

/* OTP Specific */
.otp-container {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 2rem 0;
}

.otp-input {
    width: 3.5rem !important;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem !important;
}

/* Social Login */
.social-login {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--white);
    cursor: pointer;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 768px) {

    .stats-grid,
    .stats-grid-large {
        grid-template-columns: 1fr;
    }

    .chart-container {
        padding: 1rem;
    }
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 64, 145, 0.2);
    /* Tinted overlay */
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background-color: #fff;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    position: relative;
    width: 90%;
    transform: translateY(0);
    transition: transform 0.3s ease-out;
}

.modal-icon-success {
    width: 64px;
    height: 64px;
    background: #ffffff;
    color: #16A34A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto;
    border: 2px solid #16A34A;
}

.modal-icon-warning {
    width: 64px;
    height: 64px;
    background: #ffffff;
    color: #EF4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto;
    border: 2px solid #EF4444;
}

.btn-modal-done {
    background: #2D4091;
    color: white;
    padding: 0.875rem 4rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-modal-done:hover {
    background: #1b2b6d;
    transform: translateY(-1px);
}

.btn-modal-action {
    flex: 1;
    color: white;
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-modal-cancel {
    flex: 1;
    background: white;
    color: #718EBF;
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid #E6EFF5;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-modal-cancel:hover {
    background: #F8F9FF;
}

/* =========================================
   EDIT ADMIN FORM
   ========================================= */
.edit-form-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.edit-form-group {
    margin-bottom: 1.75rem;
}

.edit-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 0.6rem;
}

.edit-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    color: var(--text-main);
    background-color: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: 'Poppins', sans-serif;
}

.edit-form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 96, 255, 0.08);
}

/* Tag-style select wrapper */
.edit-select-wrapper {
    display: flex;
    align-items: center;
    min-height: 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    background: var(--white);
    cursor: pointer;
    position: relative;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.edit-tags-area {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1;
}

.edit-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #F0F4FF;
    color: var(--text-main);
    font-size: 0.8125rem;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #D6E2FF;
}

.edit-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    transition: color 0.15s;
}

.edit-tag-remove:hover {
    color: var(--error-color);
}

.edit-select-arrow {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s;
    width: 100%;
    text-align: right;
    position: absolute;
    right: 15px;
}

/* Dropdown */
.edit-dropdown {
    display: none;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-top: 0.4rem;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    max-height: 220px;
    overflow-y: auto;
}

.edit-dropdown.open {
    display: flex;
}

.edit-dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: var(--text-main);
    cursor: pointer;
    transition: background 0.15s;
}

.edit-dropdown-option:hover {
    background-color: var(--primary-light);
}

.edit-dropdown-option input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Form action buttons */
.edit-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
}

.btn-edit-save {
    background-color: #2D4091;
    color: var(--white);
    padding: 0.65rem 2.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: 'Poppins', sans-serif;
}

.btn-edit-save:hover {
    background-color: #1b2b6d;
    transform: translateY(-1px);
}

.btn-edit-cancel {
    background-color: var(--white);
    color: var(--text-muted);
    padding: 0.65rem 2.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
    font-family: 'Poppins', sans-serif;
}

.btn-edit-cancel:hover {
    background-color: var(--bg-light);
}

/* =========================================
   PERMISSION SUCCESS TOAST
   ========================================= */
.perm-success-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #D1FAE5;
    border-left: 4px solid #16A34A;
    border-radius: 0.875rem;
    padding: 1rem 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 3000;
    animation: slideInToast 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.9375rem;
    color: var(--text-main);
    font-weight: 500;
    min-width: 280px;
}

.perm-toast-icon {
    width: 36px;
    height: 36px;
    background: #DCFCE7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16A34A;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.perm-toast-hide {
    animation: slideOutToast 0.4s ease-in forwards;
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToast {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(60px);
    }
}

/* Form field error styles */
.form-field-error {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--error-color);
    font-size: 0.8125rem;
    margin-top: 0.4rem;
}

.form-field-error i {
    font-size: 1rem;
    flex-shrink: 0;
}

.input-error {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 75, 74, 0.08) !important;
}

/* Password input wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .edit-form-input {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: var(--primary-color);
}

/* =========================================
   PREMIUM REDESIGN UTILITIES & COMPONENTS
   ========================================= */

/* iOS-style Toggle Switch */
.status-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    vertical-align: middle;
}

.status-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.status-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E2E8F0;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
}

.status-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked+.status-slider {
    background-color: #10B981;
    /* Premium Green */
}

input:checked+.status-slider:before {
    transform: translateX(20px);
}

/* Premium Avatar cell */
.user-cell {
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-initials {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 2px solid #fff;
}

.user-meta {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.user-cell-name {
    font-weight: 600;
    color: #2D4091;
    font-size: 0.9rem;
    line-height: 1.25;
    margin-bottom: 0.15rem;
}

.user-cell-email {
    font-size: 0.75rem;
    color: #718EBF;
    line-height: 1.2;
}

/* Permissions Pill Badges */
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-width: 340px;
}

.permission-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    text-transform: capitalize;
    transition: transform 0.15s ease;
}

.permission-badge:hover {
    transform: scale(1.05);
}

/* Badge Color Themes */
.badge-blue {
    background-color: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #DBEAFE;
}

.badge-purple {
    background-color: #F5F3FF;
    color: #6D28D9;
    border: 1px solid #EDE9FE;
}

.badge-indigo {
    background-color: #EEF2FF;
    color: #4338CA;
    border: 1px solid #E0E7FF;
}

.badge-pink {
    background-color: #FDF2F8;
    color: #BE185D;
    border: 1px solid #FCE7F3;
}

.badge-orange {
    background-color: #FFF7ED;
    color: #C2410C;
    border: 1px solid #FFEDD5;
}

.badge-teal {
    background-color: #F0FDFA;
    color: #0F766E;
    border: 1px solid #CCFBF1;
}

.badge-green {
    background-color: #ECFDF5;
    color: #047857;
    border: 1px solid #D1FAE5;
}

/* Enhanced Modern Animations for Modals */
@keyframes modalFadeIn {
    from {
        background-color: rgba(45, 64, 145, 0);
    }

    to {
        background-color: rgba(45, 64, 145, 0.25);
    }
}

@keyframes modalScaleUp {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 64, 145, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal.modal-active {
    display: flex !important;
    animation: modalFadeIn 0.25s forwards;
}

.modal.modal-active .modal-content {
    animation: modalScaleUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Inline Add Permission elements */
.edit-form-header-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.edit-form-header-group .edit-form-label {
    margin-bottom: 0;
}

.btn-add-inline-perm {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.btn-add-inline-perm:hover {
    background-color: var(--primary-light);
    color: var(--primary-hover);
}

.btn-add-inline-perm i {
    font-size: 1rem;
}

/* Status switch cell adjustment */
.td-status {
    padding: 1rem 1.5rem !important;
    text-align: center;
}

/* =========================================
   TOOLS AND RESOURCES MODULE
   ========================================= */

/* ── Index: Search box ─────────────────────── */
.tool-search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.tool-search-input {
    width: 100%;
    height: 50px;
    padding: 0 3rem 0 1.25rem;
    border: 1.5px solid #E6EFF5;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-main);
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.tool-search-input:focus {
    border-color: #16DBAA;
    box-shadow: 0 0 0 3px rgba(22, 219, 170, 0.1);
}

.tool-search-input::placeholder {
    color: #B0C0D8;
}

.tool-search-icon-btn {
    position: absolute;
    right: 0.9rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #718EBF;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    padding: 0;
    transition: color 0.2s;
}

.tool-search-icon-btn:hover {
    color: var(--primary-color);
}

/* ── Index: Filter button ──────────────────── */
.tool-filter-btn {
    width: 50px;
    height: 50px;
    border: 1.5px solid #E6EFF5;
    background: var(--white);
    border-radius: 0.75rem;
    color: #718EBF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s;
}

.tool-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ── Index: Filter dropdown menu ───────────── */
.filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--white);
    border: 1.5px solid #E6EFF5;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: none;
    padding: 1.25rem;
}

.filter-dropdown.show {
    display: block;
}

.filter-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2D4091;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    width: 100%;
    height: 40px;
    padding: 0 1rem;
    border: 1.5px solid #E6EFF5;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-main);
    background: var(--white);
    outline: none;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:focus {
    border-color: #2D60FF;
}

/* ── Index: Add Tool button (gradient) ─────── */
.btn-add-tool {
    background: linear-gradient(90deg, #8B44A3 0%, #2D60FF 100%);
    color: #fff;
    padding: 0 2rem;
    height: 50px;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-add-tool:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

/* ── Index: Status badges ──────────────────── */
.tool-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tool-status-on {
    background-color: #D1FAE5;
    color: #065F46;
}

.tool-status-off {
    background-color: #FEE2E2;
    color: #991B1B;
}

.tool-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.tool-status-on .tool-status-dot {
    background-color: #10B981;
}

.tool-status-off .tool-status-dot {
    background-color: #EF4444;
}

/* ── Index: Action icon buttons ────────────── */
.tool-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
}

.tool-action-btn:hover {
    opacity: 0.75;
    transform: scale(1.1);
}

.tool-action-view {
    color: #16DBAA;
}

.tool-action-edit {
    color: #2D60FF;
}

.tool-action-delete {
    color: #FE5C73;
}

.tool-action-deactivate {
    color: #FE5C73;
}

.tool-action-activate {
    color: #16A34A;
}

/* ── Form: wrapper ─────────────────────────── */
.tool-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.tool-form-group {
    margin-bottom: 1.5rem;
}

.tool-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.tool-form-input {
    width: 100%;
    height: 50px;
    padding: 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    color: var(--text-main);
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.tool-form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 96, 255, 0.08);
}

.tool-form-input::placeholder {
    color: #B0C0D8;
}

/* ── Form: Custom select ───────────────────── */
.tool-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tool-select {
    width: 100%;
    height: 50px;
    padding: 0 2.5rem 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    color: var(--text-main);
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tool-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 96, 255, 0.08);
}

.tool-select-caret {
    position: absolute;
    right: 1rem;
    color: #718EBF;
    font-size: 1.1rem;
    pointer-events: none;
}

/* ── Form: Tool cost row (side-by-side) ────── */
.tool-cost-row {
    display: flex;
    gap: 1rem;
}

.tool-cost-field {
    flex: 0 0 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
}

/* ── Form: Action buttons ──────────────────── */
.tool-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.btn-tool-save {
    background-color: #2D4091;
    color: var(--white);
    padding: 0.65rem 2.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    transition: background 0.2s, transform 0.15s;
}

.btn-tool-save:hover {
    background-color: #1b2b6d;
    transform: translateY(-1px);
}

.btn-tool-cancel {
    background: var(--white);
    color: var(--text-muted);
    padding: 0.65rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    transition: background 0.2s;
}

.btn-tool-cancel:hover {
    background: var(--bg-light);
}

/* ── Show/View page ────────────────────────── */
.tool-show-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.tool-show-field {
    margin-bottom: 1.75rem;
}

.tool-show-label {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.tool-show-value {
    font-size: 1rem;
    font-weight: 600;
    color: #2D4091;
    line-height: 1.4;
}

.tool-show-value--description {
    color: #16DBAA;
    font-weight: 600;
}

.tool-show-cost-row {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.tool-show-cost-item {
    font-size: 1rem;
    font-weight: 600;
    color: #2D4091;
}

/* =========================================
   CLIENTS MODULE CSS
   ========================================= */

/* ── Clients Status badges ──────────────────── */
.client-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.client-status-activated {
    background-color: #D1FAE5;
    color: #065F46;
}

.client-status-inactivated {
    background-color: #FEE2E2;
    color: #991B1B;
}

.client-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.client-status-activated .client-status-dot {
    background-color: #10B981;
}

.client-status-inactivated .client-status-dot {
    background-color: #EF4444;
}

/* ── Clients Action icon buttons ────────────── */
.client-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
}

.client-action-btn:hover {
    opacity: 0.75;
    transform: scale(1.1);
}

.client-action-view {
    color: #16DBAA;
}

.client-action-edit {
    color: #2D60FF;
}

.client-action-delete {
    color: #FE5C73;
}

.client-action-deactivate {
    color: #FE5C73;
}

.client-action-activate {
    color: #16A34A;
}

/* ── Form: wrapper ─────────────────────────── */
.client-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.client-form-group {
    margin-bottom: 1.5rem;
}

.client-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.client-form-input {
    width: 100%;
    height: 50px;
    padding: 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    color: var(--text-main);
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.client-form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 96, 255, 0.08);
}

.client-form-input::placeholder {
    color: #B0C0D8;
}

/* ── Form: Custom select ───────────────────── */
.client-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.client-select {
    width: 100%;
    height: 50px;
    padding: 0 2.5rem 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    color: var(--text-main);
    background: var(--white);
    font-family: 'Poppins', sans-serif;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.client-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 96, 255, 0.08);
}

.client-select-caret {
    position: absolute;
    right: 1rem;
    color: #718EBF;
    font-size: 1.1rem;
    pointer-events: none;
}

/* Caret on regular inputs (Ahmed's special requirement from screens) */
.client-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.client-input-caret {
    position: absolute;
    right: 1rem;
    color: #718EBF;
    font-size: 1.1rem;
    pointer-events: none;
}

/* ── Form: Action buttons ──────────────────── */
.client-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.btn-client-save {
    background-color: #2D4091;
    color: var(--white);
    padding: 0.65rem 2.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    transition: background 0.2s, transform 0.15s;
}

.btn-client-save:hover {
    background-color: #1b2b6d;
    transform: translateY(-1px);
}

.btn-client-cancel {
    background: var(--white);
    color: var(--text-muted);
    padding: 0.65rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    transition: background 0.2s;
}

.btn-client-cancel:hover {
    background: var(--bg-light);
}

/* ── Contact person dynamically added phone row ───────────────── */
.contact-person-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-person-phone-wrapper {
    flex: 1;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 0.625rem;
    background: var(--white);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    transition: border-color 0.2s;
}

.contact-person-phone-wrapper:focus-within {
    border-color: var(--primary-color);
}

.contact-country-selector {
    display: flex;
    align-items: center;
}

.contact-country-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-main);
}

.contact-flag-img {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

.contact-country-code-label {
    font-size: 0.85rem;
    color: var(--text-main);
}

.contact-phone-divider {
    width: 1px;
    height: 20px;
    background-color: var(--border-color);
    margin: 0 0.75rem;
}

.contact-phone-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9375rem;
    color: var(--text-main);
    background: transparent;
    font-family: 'Poppins', sans-serif;
}

.contact-phone-input::placeholder {
    color: #B0C0D8;
}

.contact-add-btn {
    width: 50px;
    height: 50px;
    background-color: #2D4091;
    color: var(--white);
    border: none;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.contact-add-btn:hover {
    opacity: 0.9;
}

.contact-remove-btn {
    width: 50px;
    height: 50px;
    background-color: #FE5C73;
    color: var(--white);
    border: none;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.contact-remove-btn:hover {
    opacity: 0.9;
}

/* ── Show/View page ────────────────────────── */
.client-show-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.client-show-field {
    margin-bottom: 1.75rem;
}

.client-show-label {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    text-transform: capitalize;
}

.client-show-value {
    font-size: 1rem;
    font-weight: 600;
    color: #2D4091;
    line-height: 1.4;
}

.client-show-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.75rem;
}

.client-show-email {
    color: #2D60FF;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.client-show-email:hover {
    text-decoration: underline;
}

/* ── Custom Searchable Multi-select widget ───────────────── */
.multiselect-container {
    position: relative;
    width: 100%;
}

.multiselect-selected-box {
    width: 100%;
    min-height: 50px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.625rem;
    background: var(--white);
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.multiselect-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.multiselect-tag {
    background-color: #F0F4F8;
    color: #4A5568;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #E2E8F0;
}

.multiselect-tag i {
    cursor: pointer;
    font-size: 0.95rem;
    color: #A0AEC0;
    transition: color 0.15s;
}

.multiselect-tag i:hover {
    color: #E53E3E;
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.625rem;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    padding: 0.75rem;
}

.multiselect-dropdown.show {
    display: block;
}

.multiselect-search-input {
    width: 100%;
    height: 40px;
    padding: 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    outline: none;
    font-family: inherit;
}

.multiselect-search-input:focus {
    border-color: var(--primary-color);
}

.multiselect-options-list {
    max-height: 200px;
    overflow-y: auto;
}

.multiselect-option {
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    border-radius: 0.375rem;
    transition: background-color 0.15s;
}

.multiselect-option:hover {
    background-color: #F8FAFC;
}

.multiselect-option.selected {
    background-color: #EFF6FF;
    color: #2563EB;
}

.multiselect-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

/* ── Supplier Status Badges ──────────────────────────────────── */
.supplier-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.85rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.supplier-status-on {
    background-color: #D1FAE5;
    color: #065F46;
}

.supplier-status-off {
    background-color: #FEE2E2;
    color: #991B1B;
}

.supplier-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
    background-color: #10B981;
}

.supplier-dot-off {
    background-color: #EF4444;
}

/* ── Supplier form (reuses client-form styles with supplier- prefix) ── */
.supplier-form-wrapper {
    max-width: 760px;
}

.supplier-form-group {
    margin-bottom: 1.25rem;
}

.supplier-form-label {
    display: block;
    font-size: 0.9rem;
    color: #2D4091;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.supplier-form-input {
    width: 100%;
    height: 52px;
    padding: 0 1.1rem;
    border: 1.5px solid #E6EFF5;
    border-radius: 12px;
    background: #FFFFFF;
    font-size: 0.95rem;
    color: #2D4091;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.supplier-form-input:focus {
    border-color: #2D4091;
}

.supplier-form-input::placeholder {
    color: #B0C0D8;
}

.supplier-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2.5rem;
}

/* ── Supplier tags multi-select ──────────────────────────────── */
.supplier-multiselect-wrapper {
    position: relative;
}

.supplier-tags-box {
    min-height: 52px;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1.5px solid #E6EFF5;
    border-radius: 12px;
    background: #FFFFFF;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
}

.supplier-tags-box:focus-within {
    border-color: #2D4091;
}

.supplier-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #F0F3FF;
    color: #2D4091;
    font-size: 0.83rem;
    font-weight: 500;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    border: 1px solid #D4DCF5;
}

.supplier-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    padding: 0;
    color: #718EBF;
    font-size: 0.75rem;
    transition: background 0.15s;
}

.supplier-tag-remove:hover {
    background: #E6EFF5;
    color: #2D4091;
}

.supplier-tags-chevron {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #718EBF;
    font-size: 1rem;
}

.supplier-dropdown-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1.5px solid #E6EFF5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(45, 64, 145, 0.1);
    z-index: 200;
    padding: 0.75rem;
    display: none;
}

.supplier-dropdown-panel.open {
    display: block;
}

/* ── Supplier file attach field ──────────────────────────────── */
.supplier-attach-box {
    height: 52px;
    border: 1.5px solid #E6EFF5;
    border-radius: 12px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    padding: 0 1.1rem;
    cursor: pointer;
    box-sizing: border-box;
    overflow: hidden;
}

.supplier-attach-label {
    color: #2D60FF;
    font-size: 0.95rem;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}