Files
hr-position-system/styles/utilities.css
DonaldFang 方士碩 a6af297623 backup: 完成 HR_position_ 表格前綴重命名與欄位對照表整理
變更內容:
- 所有資料表加上 HR_position_ 前綴
- 整理完整欄位顯示名稱與 ID 對照表
- 模組化 JS 檔案 (admin.js, ai.js, csv.js 等)
- 專案結構優化 (docs/, scripts/, tests/ 等)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 12:05:20 +08:00

245 lines
5.8 KiB
CSS

/**
* Utilities Styles - 工具類別與額外響應式設計
* 包含快速工具類別、表格響應式、額外斷點調整
*/
/* ==================== Utility Classes ==================== */
/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
/* Flexbox */
.flex-wrap { flex-wrap: wrap !important; }
.flex-column { flex-direction: column !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.align-center { align-items: center !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.gap-4 { gap: 16px !important; }
/* Margin */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
/* Padding */
.p-0 { padding: 0 !important; }
.p-1 { padding: 4px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 12px !important; }
.p-4 { padding: 16px !important; }
/* Text */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-sm { font-size: 0.875rem !important; }
.text-xs { font-size: 0.75rem !important; }
.text-muted { color: var(--text-secondary) !important; }
.text-primary { color: var(--primary) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.fw-bold { font-weight: 600 !important; }
.fw-normal { font-weight: 400 !important; }
/* Width */
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
/* Overflow */
.overflow-auto { overflow: auto !important; }
.overflow-hidden { overflow: hidden !important; }
.overflow-x-auto { overflow-x: auto !important; }
/* Visibility */
.visible { visibility: visible !important; }
.invisible { visibility: hidden !important; }
/* ==================== Table Responsive ==================== */
.table-responsive {
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.table-responsive table {
min-width: 600px;
}
/* ==================== Position List Specific ==================== */
.position-table {
width: 100%;
border-collapse: collapse;
}
.position-table th,
.position-table td {
padding: 12px 16px;
text-align: left;
border-bottom: 1px solid var(--border);
}
.position-table th {
background: #f8fafc;
font-weight: 600;
color: var(--text-secondary);
font-size: 0.85rem;
white-space: nowrap;
}
.position-table td {
font-size: 0.9rem;
}
.position-table tr:hover {
background: rgba(41, 128, 185, 0.05);
}
/* ==================== Responsive Hide/Show ==================== */
@media (min-width: 769px) {
.hide-desktop { display: none !important; }
}
@media (max-width: 768px) {
.hide-tablet { display: none !important; }
}
@media (max-width: 480px) {
.hide-mobile { display: none !important; }
}
@media (min-width: 481px) {
.show-mobile-only { display: none !important; }
}
/* ==================== Extra Responsive Adjustments ==================== */
/* Tablets (768px) */
@media (max-width: 768px) {
/* Table */
.position-table th,
.position-table td {
padding: 10px 12px;
font-size: 0.85rem;
}
/* Utility overrides */
.text-sm { font-size: 0.8rem !important; }
.text-xs { font-size: 0.7rem !important; }
/* Form wrapper for side-by-side elements */
.input-with-button {
flex-direction: column;
}
.input-with-button .btn-lookup {
width: 100%;
justify-content: center;
}
}
/* Mobile Phones (480px) */
@media (max-width: 480px) {
/* Table */
.position-table th,
.position-table td {
padding: 8px 10px;
font-size: 0.8rem;
}
/* Stack buttons on very small screens */
.btn-group-vertical {
flex-direction: column;
width: 100%;
}
.btn-group-vertical .btn {
width: 100%;
}
/* Hide less important table columns */
.position-table .hide-xs {
display: none;
}
}
/* ==================== Print Styles ==================== */
@media print {
.sidebar,
.logout-btn,
.module-selector,
.form-actions,
.ai-bags-container,
.ai-generate-btn,
.nav-buttons,
.toast,
.modal-overlay {
display: none !important;
}
.main-content {
margin-left: 0 !important;
padding: 0 !important;
}
.app-container {
display: block;
}
.form-card {
box-shadow: none;
border: 1px solid #ddd;
}
.tab-content {
display: block !important;
page-break-inside: avoid;
}
.tabs {
display: none;
}
}
/* ==================== Safe Area for notched devices ==================== */
@supports (padding: max(0px)) {
.sidebar {
padding-left: max(12px, env(safe-area-inset-left));
padding-right: max(12px, env(safe-area-inset-right));
}
.main-content {
padding-left: max(16px, env(safe-area-inset-left));
padding-right: max(16px, env(safe-area-inset-right));
}
@media (max-width: 768px) {
.sidebar {
padding-bottom: max(12px, env(safe-area-inset-bottom));
}
}
}
/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}