/* 設計系統與變數定義 */
:root {
    --bg-color-start: #f7f6f2;
    --bg-color-end: #efece6;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(0, 0, 0, 0.05);
    --text-primary: #2a2927;
    --text-secondary: #7c7a75;
    --text-muted: #acaba7;
    
    /* 精緻色彩 */
    --accent-color: #4f46e5;
    --accent-hover: #4338ca;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    
    /* 字體 */
    --font-sans: 'Outfit', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* 陰影 */
    --shadow-soft: 0 10px 30px -10px rgba(139, 132, 116, 0.15), 
                   0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.05),
                   0 0 0 1px rgba(0, 0, 0, 0.02);
}

/* 全域重設與背景 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--bg-color-start) 0%, var(--bg-color-end) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* 登入容器 */
.login-container {
    width: 100%;
    max-width: 480px;
    padding: 24px;
    perspective: 1000px;
}

/* 登入卡片 */
.login-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 28px;
    box-shadow: var(--shadow-card);
    padding: 40px 32px 32px 32px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.08), 
                0 0 0 1px rgba(0, 0, 0, 0.01);
}

/* 卡片頭部 */
.card-header {
    text-align: center;
    margin-bottom: 32px;
}

.system-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.system-subtitle {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* 仿圖中精緻的 Tab 區塊 */
.login-tabs {
    background-color: #ededeb;
    border-radius: 14px;
    padding: 4px;
    display: flex;
    gap: 4px;
    margin-bottom: 32px;
}

.tab-item {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 4px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    font-family: var(--font-sans);
}

.tab-icon {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.tab-text {
    font-size: 0.72rem;
    font-weight: 500;
}

/* Active 狀態：白底、圓角、微微投影 */
.tab-item.active {
    background-color: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Disabled 狀態：置灰、滑鼠禁用 */
.tab-item.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tab-item.disabled:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 卡片內容區 */
.card-body {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-action-area {
    width: 100%;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

.login-prompt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}

/* Google 按鈕包裹器 */
.google-btn-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 16px 0;
    transition: transform 0.2s ease;
}

.google-btn-wrapper:active {
    transform: scale(0.98);
}

/* 狀態頁面樣式 */
.status-view {
    text-align: center;
    animation: scaleIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
}

.status-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.status-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 0 16px;
}

.btn {
    border: none;
    border-radius: 12px;
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.btn-secondary {
    background-color: #ededeb;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #e2e0dc;
}

/* 狀態圖標與背景色 */
.status-pending .status-icon-wrapper {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}
.status-pending .status-icon::before {
    content: "⌛";
    font-size: 2rem;
    display: block;
    animation: spin 2.5s infinite linear;
}

.status-rejected .status-icon-wrapper {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}
.status-rejected .status-icon::before {
    content: "❌";
    font-size: 1.8rem;
    display: block;
}

.status-inactive .status-icon-wrapper {
    background-color: rgba(124, 122, 117, 0.1);
    color: var(--text-secondary);
}
.status-inactive .status-icon::before {
    content: "🔒";
    font-size: 1.8rem;
    display: block;
}

/* 卡片底部 */
.card-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.version-text {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* 動態動畫 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Dashboard Page Styles
   ========================================================================== */

.dashboard-body {
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    background: linear-gradient(135deg, var(--bg-color-start) 0%, var(--bg-color-end) 100%);
}

.dashboard-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding-left: 8px;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.logo-sub {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    font-weight: 600;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}

.menu-item.active {
    background: #ffffff;
    color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 
                0 1px 2px rgba(0, 0, 0, 0.02);
    font-weight: 600;
}

.menu-icon {
    font-size: 1.1rem;
}

.menu-loading {
    padding: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.25);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.user-labels {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.badge {
    font-size: 0.6rem;
    padding: 1px 6px;
    border-radius: 6px;
    font-weight: 600;
}

.badge-dept {
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent-color);
}

.badge-role {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.btn-logout {
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-sans);
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--danger-color);
    border-color: rgba(239, 68, 68, 0.15);
}

.content-body {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* Card Styling */
.card.panel-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    padding: 32px;
    margin-bottom: 24px;
    animation: fadeIn 0.4s ease-out;
}

.card-title-area {
    margin-bottom: 24px;
}

.card-title-area h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Tables styling */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
    background: #ffffff;
}

.data-table th {
    font-weight: 600;
    color: var(--text-secondary);
    padding: 14px 18px;
    background: #fbfbfa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-table td {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    vertical-align: middle;
    color: var(--text-primary);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.badge-status {
    font-weight: 600;
    font-size: 0.68rem;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-block;
}

.badge-status.APPROVED { background-color: rgba(16, 185, 129, 0.1); color: var(--success-color); }
.badge-status.PENDING { background-color: rgba(245, 158, 11, 0.1); color: var(--warning-color); }
.badge-status.REJECTED { background-color: rgba(239, 68, 68, 0.1); color: var(--danger-color); }
.badge-status.INACTIVE { background-color: rgba(124, 122, 117, 0.1); color: var(--text-secondary); }

/* Chat Module Styling */
.chat-container {
    display: flex;
    height: calc(100vh - 164px);
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    animation: fadeIn 0.4s ease-out;
}

.chat-history-sidebar {
    width: 250px;
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    background: #fafaf9;
    flex-shrink: 0;
}

.btn-new-chat {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    font-family: var(--font-sans);
}

.btn-new-chat:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.05);
}

.chat-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.history-item:hover {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-primary);
}

.history-item.active {
    background: rgba(79, 70, 229, 0.06);
    color: var(--accent-color);
    font-weight: 600;
}

.history-item-icon {
    font-size: 1rem;
}

.history-item-title {
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fbfbfa;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.message.assistant-message {
    align-self: flex-start;
}

.message.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    flex-shrink: 0;
}

.message-content {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.assistant-message .message-content {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-top-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

.user-message .message-content {
    background: var(--accent-color);
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.chat-input-wrapper {
    padding: 16px 24px;
    border-top: 1px solid var(--card-border);
    display: flex;
    gap: 12px;
    align-items: center;
    background: #ffffff;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    resize: none;
    max-height: 120px;
    outline: none;
    transition: border-color 0.2s ease;
    background: #fafaf9;
}

.chat-input:focus {
    border-color: var(--accent-color);
    background: #ffffff;
}

.btn-send {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 0.85rem;
    font-family: var(--font-sans);
}

.btn-send:hover {
    background: var(--accent-hover);
}

.loading-dots {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Modals / Overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.25s ease-out;
}

.modal-card {
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--card-border);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.form-group input, .form-group select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    outline: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    background: #fafaf9;
}

.form-group select {
    cursor: pointer;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-color);
    background: #ffffff;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--card-border);
    background: #fbfbfa;
}

/* ==========================================================================
   Role Menu Configuration Accordion Styles
   ========================================================================== */

/* 角色表格中的選單 Badge 樣式 (Accordion Header 中展示用) */
.menu-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.menu-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.menu-badge-chat {
    background: rgba(79, 70, 229, 0.08);
    color: var(--accent-color);
    border-color: rgba(79, 70, 229, 0.15);
}

.menu-badge-users {
    background: rgba(16, 185, 129, 0.08);
    color: var(--success-color);
    border-color: rgba(16, 185, 129, 0.15);
}

.menu-badge-roles {
    background: rgba(245, 158, 11, 0.08);
    color: var(--warning-color);
    border-color: rgba(245, 158, 11, 0.15);
}

.menu-badge-departments {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.15);
}

/* Accordion 結構 */
.roles-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.role-acc-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-acc-card:hover {
    box-shadow: 0 14px 28px -8px rgba(0, 0, 0, 0.04), 
                0 0 0 1px rgba(0, 0, 0, 0.01);
}

.role-acc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    cursor: pointer;
    background: #ffffff;
    user-select: none;
    transition: background 0.2s ease;
}

.role-acc-header:hover {
    background: #fafaf9;
}

.role-acc-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.role-acc-id {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    background: #f1f0ec;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.role-acc-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.role-acc-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.role-acc-arrow {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-acc-card.expanded .role-acc-arrow {
    transform: rotate(180deg);
}

/* Accordion Body */
.role-acc-body {
    display: none;
    padding: 24px;
    background: #fbfbfa;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.role-acc-body-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.role-menus-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.role-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.role-menu-item:hover:not(.read-only) {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.07);
}

.role-menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.role-menu-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    cursor: pointer;
    accent-color: var(--accent-color);
    transition: all 0.15s ease;
}

.role-menu-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-menu-item-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-order {
    background: #f1f0ec;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.btn-order:hover:not(:disabled) {
    background: #e2e0dc;
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-order:active:not(:disabled) {
    transform: translateY(0) scale(0.95);
}

.btn-order:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    box-shadow: none;
}

.role-acc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    padding-top: 16px;
}

.role-acc-status-hint {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}


