/* Custom Tailwind configuration for consistent colors and fonts */
:root {
    --color-primary-blue: #3B82F6; /* Blue */
    --color-light-gray: #F3F4F6;   /* Light gray background */
    --color-medium-gray: #E5E7EB;  /* Medium gray border/divider */
    --color-dark-gray-text: #4B5563; /* Dark gray text */
    --color-white: #FFFFFF;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Hide scrollbar but allow scrolling */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Modal specific styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding: 20px 0; /* 添加顶部和底部内边距 */
}

.modal-content {
    background-color: var(--color-white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto; /* 水平居中 */
    max-height: calc(100vh - 40px); /* 限制最大高度，留出上下边距 */
    overflow-y: auto; /* 内容过长时可滚动 */
    position: relative; /* 相对定位 */
}

/* Increased max-width for larger modals if needed */
.modal-content.large-modal {
    max-width: 700px;
    max-height: calc(100vh - 40px); /* 确保大模态框也有合适的高度限制 */
}

/* 响应式设计 - 移动设备优化 */
@media (max-width: 768px) {
    .modal {
        padding: 10px 0; /* 移动设备上减少内边距 */
    }
    
    .modal-content {
        width: 95%; /* 移动设备上占更多宽度 */
        max-height: calc(100vh - 20px); /* 移动设备上调整高度 */
        padding: 1rem; /* 减少内边距 */
    }
    
    .modal-content.large-modal {
        width: 98%; /* 大模态框在移动设备上几乎全屏 */
        max-height: calc(100vh - 20px);
    }
}

/* 确保表单元素在模态框中正常显示 */
.modal .form-input {
    width: 100%;
    box-sizing: border-box;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-medium-gray);
    padding-bottom: 0.5rem;
    position: sticky; /* 让标题栏在滚动时保持顶部 */
    top: 0;
    background-color: var(--color-white);
    z-index: 10;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    gap: 0.75rem;
    position: sticky; /* 让底部按钮在滚动时保持底部 */
    bottom: 0;
    background-color: var(--color-white);
    padding-top: 1rem;
    border-top: 1px solid var(--color-medium-gray);
    z-index: 10;
}

.close-button {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--color-dark-gray-text);
}
.close-button:hover {
    color: var(--color-primary-blue);
}

/* Navigation styles */
.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-link:hover {
    background-color: #f3f4f6;
}

.nav-link.active {
    color: #2563eb;
    background-color: #dbeafe;
    font-weight: 500;
}

.nav-link svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
}

/* Submenu styles for MenuRenderer */
.menu-item .submenu {
    list-style: none;
}

.menu-item .submenu .nav-link {
    font-size: 0.875rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

.menu-item .menu-arrow {
    margin-left: auto;
}

.menu-item.open > .nav-link {
    background-color: #f9fafb;
}

.menu-item.active > .nav-link {
    color: #2563eb;
    background-color: #dbeafe;
    font-weight: 500;
}

/* Form styles */
.form-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.form-input:focus {
    box-shadow: 0 0 0 2px #3b82f6;
    border-color: #3b82f6;
}

.btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

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

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

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

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

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

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

/* Table styles */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.table {
    min-width: 100%;
    divide-y: 1px solid #e5e7eb;
}

.table-header {
    background-color: #f9fafb;
}

.table-header th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-body {
    background-color: white;
    divide-y: 1px solid #e5e7eb;
}

.table-body td {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    display: inline-flex;
    font-size: 0.75rem;
    line-height: 1.25;
    font-weight: 600;
    border-radius: 9999px;
}

.status-normal {
    background-color: #dcfce7;
    color: #166534;
}

.status-disabled {
    background-color: #fecaca;
    color: #991b1b;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-confirmed {
    background-color: #dcfce7;
    color: #166534;
}

.status-waiting {
    background-color: #fed7aa;
    color: #9a3412;
}

.status-queue {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Loading spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 审核相关样式 */
.tab-link.active {
    border-color: #3B82F6 !important;
    color: #3B82F6 !important;
}

.priority-badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.priority-normal {
    @apply bg-gray-100 text-gray-800;
}

.priority-urgent {
    @apply bg-yellow-100 text-yellow-800;
}

.priority-critical {
    @apply bg-red-100 text-red-800;
}

/* 审核状态样式增强 */
.status-badge.status-warning {
    @apply bg-yellow-100 text-yellow-800 border-yellow-200;
}

.status-badge.status-info {
    @apply bg-blue-100 text-blue-800 border-blue-200;
}

.status-badge.status-success {
    @apply bg-green-100 text-green-800 border-green-200;
}

.status-badge.status-danger {
    @apply bg-red-100 text-red-800 border-red-200;
}

.audit-action-section {
    @apply border-t border-gray-200 pt-4 mt-4;
}

.audit-history-item {
    @apply bg-gray-50 border border-gray-200 rounded-md p-3 mb-2;
}

.audit-history-item:last-child {
    @apply mb-0;
}

/* 审核按钮样式 */
.btn.btn-success {
    @apply bg-green-600 text-white px-4 py-2 rounded-md hover:bg-green-700 transition-colors;
}

.btn.btn-danger {
    @apply bg-red-600 text-white px-4 py-2 rounded-md hover:bg-red-700 transition-colors;
}

.btn.btn-info {
    @apply bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition-colors;
}

/* Responsive utilities */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .table-container {
        font-size: 0.75rem;
    }
    
    .table-header th,
    .table-body td {
        padding: 0.5rem;
    }
    
    /* 移动端审核按钮优化 */
    .audit-action-section .btn {
        @apply w-full mb-2;
    }
    
    .audit-action-section .flex {
        @apply flex-col;
    }
} 