/**
 * =========================================================================
 * 🪟 Modals & Overlay Stylesheet — Study Modal, User Profile Modal & Auth Overlay
 * =========================================================================
 */

/* =========================================================================
 * 🔐 Auth Overlay
 * ========================================================================= */
#authOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

#authStatusText {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1e293b;
}

/* =========================================================================
 * 🪟 Study Modal (Status / Detail / PACS Tabs)
 * ========================================================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    display: flex;
    flex-direction: column;
    width: 92%;
    max-width: 390px;
    max-height: 95vh;
    overflow: hidden;
}

.modal-header-banner {
    padding: 10px 15px;
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-banner h3 {
    margin: 0;
    font-size: 1rem;
    color: #000;
    font-weight: bold;
}

.modal-tabs-nav {
    display: flex;
    background: #e2e8f0;
    border-bottom: 2px solid #cbd5e1;
}

.modal-tab-btn {
    flex: 1;
    text-align: center;
    padding: 8px 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    color: #475569;
    transition: 0.2s;
    border-bottom: 2px solid transparent;
}

.modal-tab-btn.tab-active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: white;
}

.modal-tab-body {
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.tab-content-pane {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.tab-content-pane.pane-active {
    display: flex;
}

.time-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* =========================================================================
 * 🎛️ Status Edit Tiles
 * ========================================================================= */
.tile-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.status-tile {
    padding: 8px;
    text-align: center;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    color: #64748b;
    background: #f8fafc;
    transition: 0.2s;
}

.status-tile.active-schedule { border-color: #b45309; background: #fef9c3; color: #b45309; }
.status-tile.active-start { border-color: #0284c7; background: #e0f2fe; color: #0284c7; }
.status-tile.active-complete { border-color: #16a34a; background: #dcfce7; color: #16a34a; }
.status-tile.active-delete { border-color: #64748b; background: #f1f5f9; color: #475569; }
.status-tile.active-import { border-color: #ea580c; background: #fff7ed; color: #ea580c; }
.status-tile.active-pending { border-color: #db2777; background: #fce7f3; color: #db2777; }
.status-tile.disabled-tile { opacity: 0.4; cursor: not-allowed; pointer-events: none; background: #e2e8f0 !important; border-color: #cbd5e1 !important; color: #94a3b8 !important; }

/* =========================================================================
 * 🚨 Offline Card & Real-Time Server Offline Banner
 * ========================================================================= */
.offline-card {
    background: #ffffff;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    padding: 24px 20px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 10px 25px -5px rgba(234, 88, 12, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.offline-icon-pulse {
    width: 64px;
    height: 64px;
    background: #ffedd5;
    color: #ea580c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 16px;
    animation: pulseOrange 2s infinite;
}

@keyframes pulseOrange {
    0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(234, 88, 12, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
}

.offline-title {
    color: #9a3412;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.offline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.offline-desc {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 14px;
}

.offline-reasons {
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 18px;
    border-left: 3px solid #ea580c;
}

.offline-reasons ul {
    margin: 4px 0 0 0;
    padding-left: 18px;
}

.offline-reasons li {
    margin-bottom: 3px;
}

.offline-btn-retry {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.offline-btn-retry:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.offline-btn-retry:active {
    transform: translateY(0);
}

#offlineBanner {
    display: none;
    position: fixed;
    top: calc(var(--tg-content-safe-area-inset-top, var(--tg-safe-area-inset-top, 0px)) + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    background: #ea580c;
    color: white;
    padding: 8px 16px;
    border-radius: 24px;
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.35);
    font-size: 0.85rem;
    font-weight: 600;
    align-items: center;
    gap: 8px;
    max-width: 90%;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================================================
 * 👤 User Profile Modal & Top Menu Button Styles
 * ========================================================================= */
.user-profile-btn {
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-modal-content {
    max-width: 420px;
    width: 92%;
    border-radius: 12px;
    overflow: hidden;
}

.modal-profile-body {
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 75vh;
}

.profile-header-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 12px 14px;
}

.profile-avatar-container {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border: 2px solid white;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-icon {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.profile-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex-grow: 1;
}

.profile-display-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-tg-username {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.profile-role-badge {
    margin-top: 4px;
    display: flex;
}

.profile-section-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.profile-field-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.profile-field-item.full-width {
    grid-column: 1 / -1;
}

.profile-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.profile-field-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 8px;
    min-height: 28px;
    display: flex;
    align-items: center;
    word-break: break-word;
    user-select: text;
}

.profile-readonly-notice {
    font-size: 0.75rem;
    color: #64748b;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    padding: 8px 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
}

/* =========================================================================
 * 📜 User Activity History Styles (Timeline & Cards)
 * ========================================================================= */
.profile-activity-container {
    margin-top: 4px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 8px;
}

.profile-activity-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.profile-activity-list::-webkit-scrollbar {
    width: 4px;
}

.profile-activity-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.activity-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.78rem;
    transition: all 0.15s ease;
}

.activity-item:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.activity-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.activity-action-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.activity-action-LOGIN {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.activity-action-VIEW_WORKLIST {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.activity-action-UPDATE_STATUS {
    background: #fefce8;
    color: #ca8a04;
    border: 1px solid #fef08a;
}

.activity-action-UPDATE_DETAIL {
    background: #faf5ff;
    color: #9333ea;
    border: 1px solid #e9d5ff;
}

.activity-action-VIEW_PACS,
.activity-action-VIEW_PACS_IMAGES,
.activity-action-QUERY_PACS_STUDIES {
    background: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

.activity-time {
    font-size: 0.7rem;
    color: #64748b;
    white-space: nowrap;
}

.activity-detail-text {
    font-size: 0.73rem;
    color: #334155;
    line-height: 1.35;
    word-break: break-word;
}

/* =========================================================================
 * 📝 Auth Registration Card & Input Form (Inside Auth Overlay)
 * ========================================================================= */
.auth-reg-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px 18px;
    max-width: 420px;
    width: 95%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.12), 0 4px 12px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    text-align: left;
    animation: fadeInScale 0.25s ease-out;
    box-sizing: border-box;
}

.auth-reg-header {
    text-align: center;
    margin-bottom: 12px;
}

.auth-reg-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    margin-bottom: 6px;
}

.auth-reg-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.auth-reg-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

.auth-reg-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-field-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-section-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 5px;
}

.auth-section-title i {
    color: #2563eb;
    font-size: 0.82rem;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.auth-form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.auth-input {
    width: 100%;
    height: 38px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    padding: 6px 12px;
    font-size: 0.88rem;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-family: inherit;
}

.auth-input::placeholder {
    color: #94a3b8;
    font-size: 0.82rem;
}

.auth-input:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.auth-input-password {
    padding-right: 40px !important;
}

.auth-toggle-pwd {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    border-radius: 6px;
}

.auth-toggle-pwd:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.auth-error-box {
    background: #fef2f2;
    border: 1.5px solid #f87171;
    color: #991b1b;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.82rem;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.06);
    animation: fadeInScale 0.2s ease-out;
}


.auth-notice-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.76rem;
    margin-bottom: 14px;
    line-height: 1.35;
}

.auth-btn-primary {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.auth-btn-primary:hover {
    background: #1d4ed8;
}

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn-secondary {
    width: 100%;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.auth-btn-secondary:hover {
    background: #e2e8f0;
}

/* =========================================================================
 * 👤 Already Bound Account Card Display
 * ========================================================================= */
.auth-bound-profile-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.auth-bound-avatar-wrap {
    position: relative;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}

.auth-bound-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #38bdf8;
    background: #f1f5f9;
}

.auth-bound-avatar-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 2px solid #bae6fd;
}

.auth-bound-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: left;
}

.auth-bound-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-bound-tg {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0284c7;
}

.auth-bound-sap {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.auth-help-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    text-align: left;
}

.auth-help-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-help-text {
    font-size: 0.78rem;
    color: #1e3a8a;
    line-height: 1.45;
}


/* =========================================================================
 * 👑 Admin User Manager Overlay & Modal Styles
 * ========================================================================= */
.admin-modal-content {
    max-width: 480px;
    width: 95%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
}

.admin-pending-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: white;
    border-radius: 12px;
    padding: 1px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 6px;
    line-height: 1.2;
}

.admin-filter-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    scrollbar-width: none;
}

.admin-filter-bar::-webkit-scrollbar {
    display: none;
}

.admin-filter-tab {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-filter-tab.active {
    background: #2563eb;
    color: white;
}

.admin-filter-tab .tab-count {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 0 5px;
    font-size: 0.7rem;
}

.admin-filter-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
}

.admin-search-wrapper {
    padding: 8px 12px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.admin-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-search-box input {
    width: 100%;
    height: 34px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    padding: 6px 10px 6px 32px;
    font-size: 0.85rem;
    box-sizing: border-box;
    font-family: inherit;
}

.admin-search-box input:focus {
    outline: none;
    border-color: #2563eb;
}

.admin-search-box i {
    position: absolute;
    left: 10px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.admin-user-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 52vh;
}

.admin-user-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.admin-user-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.admin-user-card.pending-border {
    border-left: 4px solid #eab308;
    background: #fffdf5;
}

.admin-user-card.blocked-border {
    border-left: 4px solid #dc2626;
    background: #fffafa;
}

.admin-user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.admin-user-profile-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.admin-user-avatar-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.admin-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #38bdf8;
    background: #f1f5f9;
}

.admin-user-avatar-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border: 1.5px solid #bae6fd;
}

.admin-user-name-row {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-user-fullname {
    font-weight: 700;
    font-size: 0.88rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-subname {
    font-size: 0.74rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-sap-info {
    font-size: 0.73rem;
    color: #475569;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.admin-user-sap-info i {
    color: #0284c7;
    font-size: 0.72rem;
}

.admin-user-sap-info b {
    color: #0f172a;
    font-weight: 700;
}

.admin-user-tg-info {
    font-size: 0.72rem;
    color: #0284c7;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.admin-protected-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: #3b82f6;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-user-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    font-size: 0.75rem;
    margin: 4px 0;
    background: #f8fafc;
    padding: 6px 8px;
    border-radius: 6px;
}

.admin-user-grid-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #475569;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-grid-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user-grid-item b {
    color: #1e293b;
}

.admin-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}

.btn-admin-act {
    font-size: 0.74rem;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-act-approve {
    background: #16a34a;
    color: white;
}
.btn-act-approve:hover { background: #15803d; }

.btn-act-admin {
    background: #ea580c;
    color: white;
}
.btn-act-admin:hover { background: #c2410c; }

.btn-act-user {
    background: #2563eb;
    color: white;
}
.btn-act-user:hover { background: #1d4ed8; }

.btn-act-block {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.btn-act-block:hover { background: #fca5a5; }

.btn-act-revoke {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}
.btn-act-revoke:hover { background: #e2e8f0; color: #dc2626; }
