

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

:root {
    --font-family: 'Rubik', sans-serif;

    --bg-primary: #f4f6fa;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(to left, #ffffff 0%, #f8fafc 60%, #f1f5f9 100%);
    --text-main: #334155;
    --text-muted: #64748b;
    --text-light: #f8fafc;

    --primary: #4b5ef6;
    --primary-hover: #3b4ed5;
    --primary-light: #eef2ff;

    --success: #10b981;
    --success-light: #ecfdf5;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;

    --border-color: #e2e8f0;
    --border-radius: 16px;
    --border-radius-lg: 20px;
    --transition: all 0.25s ease;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 10px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--bg-sidebar);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 1.25rem 0.9rem 1rem 0.9rem;
    border-left: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
    z-index: 20;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.15rem 1rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #eef2f6;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.sidebar-logo:hover {
    border-color: rgba(75, 94, 246, 0.25);
    box-shadow: 0 8px 22px rgba(75, 94, 246, 0.1);
    transform: translateY(-2px);
}

.sidebar-logo img,
.sidebar-logo-img {
    max-height: 95px;
    max-width: 230px;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar-logo:hover .sidebar-logo-img {
    transform: scale(1.03);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0.15rem 0.5rem 0.15rem;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background-color: #e2e8f0;
    border-radius: 10px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.menu-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 1.15rem;
    margin-bottom: 0.35rem;
    padding: 0 0.65rem;
}

.menu-section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to left, transparent, #edf2f7 40%, #e2e8f0);
}

.menu-item {
    list-style: none;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.88rem;
    color: #64748b;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
}

.menu-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background-color: transparent;
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.menu-item svg {
    width: 18px;
    height: 18px;
    color: #64748b;
    transition: all 0.22s ease;
}

.menu-item a:hover {
    background-color: #f8fafc;
    color: #1e293b;
    transform: translateX(-3px);
}

.menu-item a:hover .menu-icon-wrap {
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.menu-item a:hover svg {
    color: var(--primary);
}

.menu-item.active a {
    background: linear-gradient(135deg, rgba(75, 94, 246, 0.1) 0%, rgba(99, 102, 241, 0.04) 100%);
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(75, 94, 246, 0.06);
}

.menu-item.active a::before {
    content: '';
    position: absolute;
    right: -0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(to bottom, var(--primary), #6366f1);
}

.menu-item.active a .menu-icon-wrap {
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    box-shadow: 0 3px 8px rgba(75, 94, 246, 0.35);
}

.menu-item.active svg {
    color: #ffffff;
}

.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 0.4rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    animation: sidebarBadgePulse 2.2s infinite;
}

@keyframes sidebarBadgePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.sidebar-footer {
    padding-top: 0.85rem;
    padding-bottom: 0.25rem;
    margin-top: auto;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: center;
    align-items: center;
}

.developer-credit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    padding: 0.35rem 0.5rem;
    transition: var(--transition);
}

.developer-credit:hover {
    transform: translateY(-1px);
}

.dev-logo-img {
    max-height: 48px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.08));
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.developer-credit:hover .dev-logo-img {
    transform: scale(1.04);
}

.main-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-header {
    background-color: var(--bg-card);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-title h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
}

.header-title p {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
}

.header-icon-btn:hover {
    background-color: #f8fafc;
    color: var(--text-main);
    transform: scale(1.05);
}

.header-icon-btn svg {
    width: 20px;
    height: 20px;
}

.header-user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0.65rem 0.35rem 0.4rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: var(--transition);
}

.header-user-profile:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
}

.header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(75, 94, 246, 0.25);
}

.user-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #10b981;
    border: 2px solid #ffffff;
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}

.header-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    text-align: right;
}

.header-user-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.15;
}

.header-user-role {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 0.05rem 0.45rem;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.header-logout-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 0.15rem;
}

.header-logout-btn svg {
    width: 16px;
    height: 16px;
}

.header-logout-btn:hover {
    background-color: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
    transform: scale(1.08);
}

.content-body {
    padding: 2rem;
    flex-grow: 1;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-card);
    padding: 1.5rem 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

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

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-info h3 {
    font-size: 0.825rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-info p {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.stat-icon.success {
    background-color: var(--success-light);
    color: var(--success);
}

.stat-icon.warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

.stat-icon.danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.card-table {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid #edf2f7;
    margin-bottom: 2rem;
    overflow: hidden;
}

.card-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

th {
    background-color: #f8fafc;
    padding: 0.5rem 0.85rem;
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

td {
    padding: 0.4rem 0.85rem;
    font-size: 0.825rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    vertical-align: middle;
    line-height: 1.35;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

.filter-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid #edf2f7;
    box-shadow: var(--shadow-sm);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(75, 94, 246, 0.25);
}

.btn-secondary {
    background-color: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #f8fafc;
}

.btn-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-danger:hover {
    background-color: var(--danger);
    color: #ffffff;
}

.btn-icon-only {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon-only:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
}

.btn-icon-only svg {
    width: 16px;
    height: 16px;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.775rem;
    font-weight: 600;
    border-radius: 50px;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning);
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.45rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    outline: none;
    background-color: #ffffff;
    color: var(--text-main);
    transition: var(--transition);
    font-family: var(--font-family);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(75, 94, 246, 0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 1.5rem;
}

.modal-content {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 550px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid #edf2f7;
    overflow: hidden;
    animation: modalSlideUp 0.25s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(15px);
        opacity: 0;
    }

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

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
}

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.visual-bar-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 180px;
    padding: 1rem 0;
    margin-top: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.chart-bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-grow: 1;
}

.chart-bar {
    width: 32px;
    background-color: #c7d2fe;
    border-radius: 6px 6px 0 0;
    transition: var(--transition);
    min-height: 10px;
}

.chart-bar-container:hover .chart-bar {
    background-color: var(--primary);
}

.chart-bar.active {
    background-color: var(--primary);
}

.chart-label {
    font-size: 0.725rem;
    color: var(--text-muted);
}

.empty-state-dashed {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    color: var(--text-muted);
    background-color: #f8fafc;
}

.empty-state-dashed svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    background-color: var(--bg-primary);
}

.login-card {
    background-color: var(--bg-card);
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid #edf2f7;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .login-logo-img {
    max-height: 156px;

    width: auto;
    height: auto;
    margin-bottom: 1rem;
    object-fit: contain;
    display: inline-block;
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .main-header {
        padding: 1rem;
    }
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.25rem;
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pagination-info strong {
    color: var(--text-main);
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 0.4rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.page-link:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--primary);
}

.page-link.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(75, 94, 246, 0.2);
}

.page-dots {
    color: var(--text-muted);
    padding: 0 0.2rem;
    font-weight: bold;
    font-size: 0.8rem;
}

.sort-header {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.sort-header:hover {
    color: var(--primary);
}

.sort-arrow {
    font-size: 0.75rem;
    color: var(--primary);
}

.row-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.775rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
}

.row-avatar:hover {
    transform: scale(1.08);
    background-color: var(--primary);
    color: #ffffff;
}

.member-name-link {
    color: var(--text-main);
    transition: var(--transition);
}

.member-name-link:hover {
    color: var(--primary);
}

.quick-tel-btn,
.quick-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    transition: var(--transition);
}

.quick-tel-btn {
    background-color: var(--primary-light);
    color: var(--primary);
}

.quick-tel-btn:hover {
    background-color: var(--primary);
    color: #ffffff;
}

.quick-wa-btn {
    background-color: #ecfdf5;
    color: #10b981;
}

.quick-wa-btn:hover {
    background-color: #10b981;
    color: #ffffff;
}

.quick-tel-btn svg,
.quick-wa-btn svg {
    width: 12px;
    height: 12px;
}

.modal-content-compact {
    max-width: 860px !important;
    background-color: #f1f5f9;
}

.modal-body-compact {
    background-color: #f1f5f9;
    padding: 0.85rem 1.15rem !important;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-card-section {
    background-color: #f5f7f8;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.section-header-compact {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.775rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.45rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px dashed #edf2f7;
}

.section-header-compact svg {
    width: 14px;
    height: 14px;
}

.form-group-compact {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.form-label-compact {
    display: block;
    font-size: 0.735rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0;
}

.form-control-compact {
    width: 100%;
    padding: 0.35rem 0.55rem;
    font-size: 0.825rem;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: var(--text-main);
    transition: var(--transition);
    font-family: var(--font-family);
}

.form-control-compact:focus {
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(75, 94, 246, 0.15);
    outline: none;
}

.custom-combobox {
    position: relative;
    width: 100%;
}

.custom-combobox input.form-control-compact {
    padding-left: 1.75rem !important;

}

.combobox-toggle-btn {
    position: absolute;
    left: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0.2rem;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
}

.combobox-toggle-btn:hover {
    color: var(--primary);
    background-color: #f1f5f9;
}

.combobox-dropdown {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    max-height: 190px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    padding: 0.25rem 0;
    font-size: 0.835rem;
}

.combobox-item {
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    color: var(--text-main);
    display: block;
    text-align: right;
    line-height: 1.35;
    transition: background 0.12s ease;
}

.combobox-item:hover,
.combobox-item.active {
    background-color: #eef2ff;
    color: var(--primary);
}

.combobox-item .combobox-highlight {
    color: var(--primary);
    font-weight: 700;
    background-color: rgba(75, 94, 246, 0.12);
    border-radius: 3px;
    padding: 0 2px;
    text-decoration: none;
}

.combobox-new-item {
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    color: #0284c7;
    background-color: #f0f9ff;
    border-top: 1px dashed #bae6fd;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.79rem;
    font-weight: 600;
    text-align: right;
}

.combobox-new-item:hover,
.combobox-new-item.active {
    background-color: #e0f2fe;
}

.combobox-empty {
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.form-section-title {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.35rem;
    margin-bottom: 0.85rem;
}

.picker-modal-content {
    max-width: 680px !important;
    background-color: #f8fafc;
    border-radius: 14px;
}

.picker-search-bar {
    position: relative;
    margin-bottom: 0.75rem;
}

.picker-search-input {
    width: 100%;
    padding: 0.55rem 2.25rem 0.55rem 0.85rem;
    font-size: 0.885rem;
    border-radius: 9px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    font-family: var(--font-family);
    outline: none;
    transition: var(--transition);
}

.picker-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(75, 94, 246, 0.15);
}

.picker-search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.picker-results-container {
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-right: 0.15rem;
}

.picker-member-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    padding: 0.55rem 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
}

.picker-member-item:hover {
    border-color: var(--primary);
    background-color: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(75, 94, 246, 0.08);
}

.picker-member-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.picker-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background-color: rgba(75, 94, 246, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.picker-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.picker-name {
    font-size: 0.865rem;
    font-weight: 700;
    color: var(--text-main);
}

.picker-meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.picker-select-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background-color: rgba(75, 94, 246, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(75, 94, 246, 0.2);
}

.picker-member-item:hover .picker-select-badge {
    background-color: var(--primary);
    color: #ffffff;
}

.relative-link-field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.relative-display-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 0.28rem 0.55rem;
    font-size: 0.825rem;
    min-height: 31px;
}

.relative-display-box.linked {
    background-color: #f0f7ff;
    border-color: #93c5fd;
    color: var(--primary);
    font-weight: 600;
}

.relative-btn-picker {
    padding: 0.3rem 0.55rem;
    font-size: 0.785rem;
    font-weight: 600;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    transition: var(--transition);
}

.relative-btn-picker:hover {
    background-color: #eef2ff;
    border-color: var(--primary);
    color: var(--primary);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--danger);
}

.text-danger {
    color: var(--danger);
}

.relative-search-box {
    position: relative;
}

.relative-clear-btn {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.15rem;
    color: var(--text-muted);
    cursor: pointer;
}

.relative-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    max-height: 190px;
    overflow-y: auto;
    z-index: 120;
    margin-top: 4px;
}

.relative-item {
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    border-bottom: 1px solid #f1f5f9;
    transition: var(--transition);
}

.relative-item:last-child {
    border-bottom: none;
}

.relative-item:hover {
    background-color: var(--primary-light);
}

.prof-avatar-large {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.profile-quick-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    border-radius: 50px;
    font-size: 0.825rem;
    font-weight: 600;
    background-color: var(--primary-light);
    color: var(--primary);
    transition: var(--transition);
    text-decoration: none;
}

.btn-action-pill:hover {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-action-pill.success {
    background-color: #ecfdf5;
    color: #10b981;
}

.btn-action-pill.success:hover {
    background-color: #10b981;
    color: #ffffff;
}

.btn-action-pill svg {
    width: 15px;
    height: 15px;
}

.profile-card-box {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-box-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.35rem;
    margin-bottom: 0.25rem;
}

.profile-box-title svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.825rem;
}

.profile-info-row .lbl {
    color: var(--text-muted);
}

.profile-info-row .val {
    color: var(--text-main);
    font-weight: 600;
}

.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.45rem;
    margin-bottom: 0.75rem;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.profile-family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.75rem;
}

.family-member-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.family-member-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    z-index: 9999;
    max-width: 360px;
}

.custom-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
    animation: toastSlideIn 0.3s ease-out;
    transition: var(--transition);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }

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

.toast-fadeout {
    opacity: 0;
    transform: translateY(10px);
}

.custom-toast.toast-success {
    border-right: 4px solid var(--success);
}

.custom-toast.toast-danger {
    border-right: 4px solid var(--danger);
}

.toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast-success .toast-icon svg {
    color: var(--success);
}

.toast-danger .toast-icon svg {
    color: var(--danger);
}

.toast-msg {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    flex-grow: 1;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

@media print {

    .sidebar,
    .main-header,
    .filter-card,
    .pagination-container,
    .btn-icon-only,
    .quick-tel-btn,
    .quick-wa-btn {
        display: none !important;
    }

    .app-container {
        display: block !important;
    }

    .content-body {
        padding: 0 !important;
    }

    .card-table {
        border: none !important;
        box-shadow: none !important;
    }

    th,
    td {
        padding: 0.5rem !important;
        font-size: 0.75rem !important;
    }
}

.swal2-container {
    z-index: 100000 !important;
    backdrop-filter: blur(2px);
    background: rgba(15, 23, 42, 0.45) !important;
}

.swal2-popup.swal2-compact-popup {
    font-family: var(--font-family) !important;
    direction: rtl !important;
    text-align: center !important;
    width: 360px !important;
    max-width: calc(100vw - 32px) !important;
    padding: 1.25rem 1.25rem 1.1rem !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
    background-color: #ffffff !important;
}

.swal2-compact-popup .swal2-icon {
    width: 44px !important;
    height: 44px !important;
    margin: 0.25rem auto 0.65rem !important;
    border-width: 3px !important;
}

.swal2-compact-popup .swal2-icon .swal2-icon-content {
    font-size: 1.6rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.swal2-compact-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    padding: 0 !important;
    margin: 0 0 0.35rem 0 !important;
}

.swal2-compact-html {
    font-size: 0.875rem !important;
    color: var(--text-muted) !important;
    margin: 0 0 0.75rem 0 !important;
    line-height: 1.5 !important;
    padding: 0 0.5rem !important;
}

.swal2-compact-actions {
    display: flex !important;
    gap: 0.5rem !important;
    margin: 0.65rem 0 0 0 !important;
    padding: 0 !important;
    width: 100% !important;
    justify-content: center !important;
}

.swal2-compact-btn {
    border-radius: 10px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    padding: 0.45rem 1.15rem !important;
    min-width: 80px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: var(--transition) !important;
    box-shadow: none !important;
}
