/* 铜雀台达人管理系统 - 编译后的CSS样式 */

/* 全局样式重置 */
* {
    box-sizing: border-box;
}

/* 页面布局 */
.page-container {
    min-height: 100vh;
    background-color: #f9fafb;
}

.main-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 14rem;
    background-color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-right: 1px solid #e5e7eb;
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 30;
    transition: width 0.3s ease;
}

/* 折叠状态的侧边栏 */
.sidebar.collapsed {
    width: 4rem;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-header {
    padding: 0.75rem;
    justify-content: center;
    border-bottom: none;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-brand {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
}

.sidebar-logo-full {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-text {
    margin-left: 0.5rem;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-text {
    opacity: 0;
    width: 0;
    margin-left: 0;
}

/* 折叠状态下的简化头部 */
.sidebar-collapsed-header {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0 0.75rem;
    gap: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar.collapsed .sidebar-collapsed-header {
    display: flex;
}

.sidebar-logo-mini {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.sidebar-toggle-btn {
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border-radius: 0.5rem;
    font-size: 1.125rem;
}

.sidebar-toggle-btn:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

.sidebar.collapsed .sidebar-toggle-btn {
    display: none;
}

.sidebar-toggle-btn-mini {
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.sidebar-toggle-btn-mini:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

.sidebar-nav {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    color: #374151;
    border-radius: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
    position: relative;
}

.sidebar-nav-item:hover {
    background-color: #eff6ff;
    color: #1d4ed8;
    text-decoration: none;
}

.sidebar-nav-item.active {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.sidebar-nav-item i {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    color: #9ca3af;
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-nav-item i {
    margin-right: 0;
}

.sidebar-nav-item:hover i {
    color: #3b82f6;
}

.sidebar-nav-item.active i {
    color: white;
}

.sidebar-nav-item span {
    margin-left: 0.75rem;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-nav-item span {
    opacity: 0;
    width: 0;
    margin-left: 0;
}

/* 折叠状态下的提示文字 */
.sidebar.collapsed .sidebar-nav-item {
    justify-content: center;
}

.sidebar.collapsed .sidebar-nav-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    margin-left: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #111827;
    color: white;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    z-index: 50;
}

/* 主内容区域 */
.main-content {
    margin-left: 14rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    background-color: #f9fafb;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 4rem;
}

.top-bar {
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-dropdown {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    background-color: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-left: 0.75rem;
}

/* 用户下拉菜单样式 - 使用更高优先级的选择器 */
.user-dropdown .dropdown-menu,
.relative.group .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background-color: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    padding: 0.5rem 0 !important;
    min-width: 10rem !important;
    z-index: 50 !important;
    text-align: left !important;
    display: block !important;
}

.user-dropdown .dropdown-item,
.relative.group .dropdown-item {
    display: block !important;
    padding: 0.5rem 1rem !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: background-color 0.2s !important;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.user-dropdown .dropdown-item:hover,
.relative.group .dropdown-item:hover {
    background-color: #f3f4f6 !important;
    text-decoration: none !important;
    color: #374151 !important;
}

/* 通用下拉菜单样式 */
.dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background-color: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    padding: 0.5rem 0 !important;
    min-width: 10rem !important;
    z-index: 50 !important;
    text-align: left !important;
}

.dropdown-item {
    display: block !important;
    padding: 0.5rem 1rem !important;
    color: #374151 !important;
    text-decoration: none !important;
    transition: background-color 0.2s !important;
    text-align: left !important;
    width: 100% !important;
}

.dropdown-item:hover {
    background-color: #f3f4f6 !important;
    text-decoration: none !important;
    color: #374151 !important;
}

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

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
    color: white;
    text-decoration: none;
}

.btn-outline {
    background-color: white;
    color: #374151;
    border-color: #d1d5db;
}

.btn-outline:hover {
    background-color: #f9fafb;
    color: #374151;
    text-decoration: none;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
    color: white;
    text-decoration: none;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.stats-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stats-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
}

.stats-value {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stats-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.stats-change {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    background-color: rgba(255, 255, 255, 0.2);
}

/* 表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

/* 表单样式 */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.form-checkbox {
    width: 1rem;
    height: 1rem;
    color: #3b82f6;
    border-radius: 0.25rem;
}

/* 徽章样式 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #e0f2fe;
    color: #0c4a6e;
}

/* 警告框样式 */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* 快速操作区域 */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.quick-action-icon {
    width: 3rem;
    height: 3rem;
    background-color: #eff6ff;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #3b82f6;
    font-size: 1.25rem;
}

.quick-action-title {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.quick-action-desc {
    font-size: 0.875rem;
    color: #6b7280;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    background-color: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #9ca3af;
    font-size: 1.5rem;
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.25rem;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background-color: #f9fafb;
    text-decoration: none;
}

.pagination-btn-active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-btn-disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 工具提示 */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #111827;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 100;
}

/* 搜索容器 */
.search-container {
    position: relative;
}

/* 错误消息 */
.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 成功消息 */
.success-message {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* 登录页面特定样式 */
.form-group {
    margin-bottom: 1.5rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Tailwind 替代类 */
.min-h-screen {
    min-height: 100vh;
}

.bg-gradient-to-br {
    background: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-blue-50 {
    --tw-gradient-from: #eff6ff;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 246, 255, 0));
}

.to-indigo-100 {
    --tw-gradient-to: #e0e7ff;
}

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-0\.5 {
    margin-top: 0.125rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.w-20 {
    width: 5rem;
}

.h-20 {
    height: 5rem;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-blue-500 {
    --tw-gradient-from: #3b82f6;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(59, 130, 246, 0));
}

.to-blue-600 {
    --tw-gradient-to: #2563eb;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-white {
    color: white;
}

.text-gray-900 {
    color: #111827;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-700 {
    color: #374151;
}

.text-blue-800 {
    color: #1e40af;
}

.text-blue-700 {
    color: #1d4ed8;
}

.text-blue-600 {
    color: #2563eb;
}

.text-blue-500 {
    color: #3b82f6;
}

.text-green-600 {
    color: #059669;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.p-4 {
    padding: 1rem;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.border {
    border-width: 1px;
}

.border-blue-200 {
    border-color: #bfdbfe;
}

.border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2);
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

.bg-white\/50 {
    background-color: rgba(255, 255, 255, 0.5);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}
