body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    background: #f0f4f8;
}

.min-vh-100 { min-height: 100vh; }

.login-icon {
    font-size: 3rem;
}

.stat-card {
    border-radius: 12px;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.card {
    border-radius: 12px;
}

.form-control, .form-select {
    border-radius: 8px;
}

.navbar-brand {
    font-size: 0.85rem;
}

.navbar .nav-link {
    font-size: 0.82rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.navbar .dropdown-menu {
    font-size: 0.85rem;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.navbar .dropdown-item {
    padding: 0.45rem 1rem;
}

.navbar .nav-link.active,
.navbar .nav-link.dropdown-toggle.active {
    font-weight: 700;
}

.navbar .navbar-text {
    font-size: 0.8rem;
}

.navbar .btn-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.55rem;
}

.table th {
    font-weight: 600;
    white-space: nowrap;
}

input[readonly] {
    background-color: #f8f9fa;
}

.personnel-avatar-btn {
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    line-height: 0;
}

.personnel-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dee2e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, transform 0.2s;
}

.personnel-avatar-btn:hover .personnel-avatar {
    border-color: #0d6efd;
    transform: scale(1.05);
}

.personnel-avatar-empty {
    background: #e9ecef;
    color: #6c757d;
}

.batch-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.batch-slot.filled {
    background: #f0f7ff;
    border-color: #b6d4fe;
}

.batch-slot.empty {
    background: #f8f9fa;
    border-style: dashed;
    color: #adb5bd;
}

.batch-slot .slot-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    flex-shrink: 0;
}

.batch-slot-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #b6d4fe;
    flex-shrink: 0;
}

.batch-slot-photo-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #adb5bd;
    border: 2px dashed #ced4da;
}

.batch-slot.empty .slot-num {
    background: #ced4da;
}

.personnel-full-table {
    font-size: 0.82rem;
    white-space: nowrap;
}

.personnel-table .sort-link {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.personnel-table .sort-link:hover {
    color: #0d6efd;
}

.personnel-table .sort-link.active {
    color: #0d6efd;
    font-weight: 700;
}

.personnel-table .sort-ind {
    font-size: 0.7em;
    opacity: 0.85;
}


.personnel-table tbody tr:hover {
    background-color: #eef5fc !important;
}

.personnel-table tbody td {
    transition: background-color 0.12s;
}

.personnel-table tbody td:hover {
    background-color: #dbeafe !important;
    box-shadow: inset 0 0 0 1px #93c5fd;
}

.personnel-table .col-row {
    width: 42px;
    min-width: 42px;
    text-align: center;
    background: #f8f9fa;
    font-size: 0.8rem;
}

.personnel-table thead .col-row,
.personnel-table thead .sticky-col-row {
    background: #e9ecef;
}

.personnel-table .col-select {
    width: 36px;
    min-width: 36px;
    text-align: center;
    background: #f8f9fa;
}

.personnel-table thead .col-select,
.personnel-table thead .sticky-col-select {
    background: #e9ecef;
}

.sticky-col-select {
    position: sticky;
    right: 0;
    z-index: 4;
    box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}

.sticky-col-row {
    position: sticky;
    right: 36px;
    z-index: 3;
    box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}

.personnel-table .sticky-col-row + .sticky-col,
.personnel-full-table .sticky-col-row + th.sticky-col,
.personnel-full-table .sticky-col-row + td.sticky-col {
    right: 78px;
}

.personnel-full-table .sticky-col {
    position: sticky;
    right: 78px;
    background: #fff;
    z-index: 2;
    box-shadow: -2px 0 4px rgba(0,0,0,0.06);
}

.personnel-table tbody tr:hover .sticky-col-select,
.personnel-table tbody td:hover.sticky-col-select {
    background-color: #eef5fc !important;
}

.personnel-table tbody td:hover.sticky-col-select {
    background-color: #dbeafe !important;
}

.personnel-table-card {
    overflow: hidden;
}

.table-scroll-outer {
    position: relative;
}

.table-scroll-area {
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.table-scroll-area::-webkit-scrollbar {
    height: 8px;
}

.table-scroll-area::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.table-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 48px;
    border: none;
    background: rgba(13, 110, 253, 0.85);
    color: white;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: background 0.2s;
}

.table-scroll-btn:hover {
    background: rgba(13, 110, 253, 1);
}

.table-scroll-btn-right {
    right: 8px;
}

.table-scroll-btn-left {
    left: 8px;
}

.column-picker-menu {
    min-width: 220px;
    max-height: 360px;
    overflow-y: auto;
}

.personnel-full-table th,
.personnel-full-table td {
    vertical-align: middle;
}

.personnel-full-table .sticky-col-end {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0,0,0,0.06);
}

.personnel-full-table thead .sticky-col,
.personnel-full-table thead .sticky-col-end,
.personnel-full-table thead .sticky-col-row,
.personnel-full-table thead .sticky-col-select {
    background: #f8f9fa;
}

.personnel-table tbody tr:hover .sticky-col,
.personnel-table tbody tr:hover .sticky-col-row,
.personnel-table tbody tr:hover .sticky-col-select,
.personnel-table tbody tr:hover .sticky-col-end {
    background-color: #eef5fc !important;
}

.personnel-table tbody td:hover.sticky-col,
.personnel-table tbody td:hover.sticky-col-row,
.personnel-table tbody td:hover.sticky-col-select,
.personnel-table tbody td:hover.sticky-col-end {
    background-color: #dbeafe !important;
}

.text-truncate-cell {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-toggle .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
}

.detail-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 12px;
    height: 100%;
}

.detail-label {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 2px;
}

.detail-value {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}
