/** * Layout Styles - 布局樣式 * Two-Column Layout: 左側導航 + 右側內容 */ /* ==================== Main Layout ==================== */ .app-container { display: flex; min-height: 100vh; background: var(--bg); } /* ==================== Sidebar (左側導航欄) ==================== */ .sidebar { width: 240px; min-width: 240px; background: linear-gradient(180deg, #1a1f2e 0%, #2d3748 100%); display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; z-index: 100; box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15); } /* ==================== User Info (側邊欄頂部) ==================== */ .user-info-bar { padding: 20px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; gap: 12px; } .user-info { display: flex; align-items: center; gap: 12px; color: #ffffff; } .user-avatar { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.1rem; color: white; } .user-details { display: flex; flex-direction: column; flex: 1; overflow: hidden; } .user-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .user-role { font-size: 0.75rem; opacity: 0.7; color: #a0aec0; } .logout-btn { width: 100%; padding: 10px 16px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px; background: rgba(255, 255, 255, 0.05); color: #e2e8f0; font-family: inherit; font-size: 0.85rem; font-weight: 500; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s ease; } .logout-btn:hover { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; } .logout-btn svg { width: 16px; height: 16px; fill: currentColor; } /* ==================== Module Selector (垂直導航選單) ==================== */ .module-selector { display: flex; flex-direction: column; padding: 16px 12px; gap: 6px; flex: 1; overflow-y: auto; } .module-btn { width: 100%; padding: 12px 14px; border: none; border-radius: 8px; background: transparent; font-family: inherit; font-size: 0.875rem; font-weight: 500; color: #a0aec0; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: all 0.2s ease; text-align: left; } .module-btn:hover { background: rgba(255, 255, 255, 0.08); color: #e2e8f0; } .module-btn.active { background: linear-gradient(135deg, var(--module-position) 0%, var(--module-position-dark) 100%); color: white; box-shadow: 0 4px 12px var(--module-position-shadow); } .module-btn.active.job-active { background: linear-gradient(135deg, var(--module-job) 0%, var(--module-job-dark) 100%); box-shadow: 0 4px 12px var(--module-job-shadow); } .module-btn.active.deptfunc-active { background: linear-gradient(135deg, var(--module-deptfunc) 0%, var(--module-deptfunc-dark) 100%); box-shadow: 0 4px 12px var(--module-deptfunc-shadow); } .module-btn.active.desc-active { background: linear-gradient(135deg, var(--module-desc) 0%, var(--module-desc-dark) 100%); box-shadow: 0 4px 12px var(--module-desc-shadow); } .module-btn.active.list-active { background: linear-gradient(135deg, var(--module-list) 0%, var(--module-list-dark) 100%); box-shadow: 0 4px 12px var(--module-list-shadow); } .module-btn.active.admin-active { background: linear-gradient(135deg, var(--module-admin) 0%, var(--module-admin-dark) 100%); box-shadow: 0 4px 12px var(--module-admin-shadow); } .module-btn svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; } /* ==================== Main Content (右側內容區) ==================== */ .main-content { flex: 1; margin-left: 240px; padding: 24px 32px; min-height: 100vh; background: var(--bg); } .module-content { display: none; } .module-content.active { display: block; animation: fadeIn 0.3s ease; } /* ==================== App Header ==================== */ .app-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding: 20px 28px; background: linear-gradient(135deg, var(--module-position) 0%, var(--module-position-dark) 100%); border-radius: var(--radius); box-shadow: var(--shadow); } .app-header.job-header { background: linear-gradient(135deg, var(--module-job) 0%, var(--module-job-dark) 100%); } .app-header.deptfunc-header { background: linear-gradient(135deg, var(--module-deptfunc) 0%, var(--module-deptfunc-dark) 100%); } .app-header.desc-header { background: linear-gradient(135deg, var(--module-desc) 0%, var(--module-desc-dark) 100%); } .app-header.list-header { background: linear-gradient(135deg, var(--module-list) 0%, var(--module-list-dark) 100%); } .app-header.admin-header { background: linear-gradient(135deg, var(--module-admin) 0%, var(--module-admin-dark) 100%); } .app-header .icon { width: 48px; height: 48px; background: rgba(255, 255, 255, 0.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; } .app-header .icon svg { width: 28px; height: 28px; fill: #ffffff; } .app-header h1 { color: #ffffff; font-size: 1.5rem; font-weight: 600; } .app-header .subtitle { color: rgba(255, 255, 255, 0.7); font-size: 0.875rem; margin-top: 2px; } /* ==================== Form Card ==================== */ .form-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; } /* ==================== Sections ==================== */ .section-box { background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; } .section-header { padding: 12px 16px; background: linear-gradient(135deg, #e8f4fc 0%, #f0f4f8 100%); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9rem; color: var(--primary); } .section-header.green { background: linear-gradient(135deg, #e8f8f0 0%, #f0f8f4 100%); color: var(--green-dark); } .section-body { padding: 20px; } .section-divider { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin: 8px 0; } .section-divider span { font-size: 0.85rem; font-weight: 600; color: var(--primary); white-space: nowrap; } .section-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, var(--border), transparent); } /* ==================== Sidebar Footer ==================== */ .sidebar-footer { padding: 16px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.75rem; color: #64748b; text-align: center; } /* ==================== Responsive Design ==================== */ /* Large Tablets & Small Desktops (1024px) */ @media (max-width: 1024px) { .sidebar { width: 200px; min-width: 200px; } .main-content { margin-left: 200px; padding: 20px 24px; } .app-header { padding: 16px 20px; } .app-header h1 { font-size: 1.3rem; } } /* Tablets (768px) */ @media (max-width: 768px) { .app-container { flex-direction: column; } .sidebar { position: relative; width: 100%; min-width: 100%; flex-direction: row; flex-wrap: wrap; padding: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); } .user-info-bar { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding: 12px; border-bottom: none; } .user-info { flex: 1; } .logout-btn { width: auto; padding: 8px 16px; } .module-selector { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 8px 0; gap: 8px; overflow-x: auto; } .module-btn { flex: 1; min-width: calc(33.33% - 8px); padding: 10px; justify-content: center; font-size: 0.75rem; } .module-btn span { display: none; } .main-content { margin-left: 0; padding: 16px; } .app-header { padding: 16px; margin-bottom: 16px; flex-wrap: wrap; } .app-header .icon { width: 40px; height: 40px; } .app-header .icon svg { width: 22px; height: 22px; } .app-header h1 { font-size: 1.1rem; } .app-header .subtitle { display: none; } .sidebar-footer { display: none; } .section-body { padding: 16px; } } /* Mobile Phones (480px) */ @media (max-width: 480px) { .sidebar { padding: 8px; } .user-info-bar { padding: 8px; gap: 8px; } .user-avatar { width: 36px; height: 36px; font-size: 0.9rem; } .user-name { font-size: 0.85rem; } .user-role { font-size: 0.7rem; } .logout-btn { padding: 6px 12px; font-size: 0.8rem; } .logout-btn span { display: none; } .module-selector { gap: 6px; } .module-btn { min-width: calc(50% - 6px); padding: 8px; } .module-btn svg { width: 18px; height: 18px; } .main-content { padding: 12px; } .app-header { padding: 12px; gap: 12px; } .app-header .icon { width: 36px; height: 36px; border-radius: 8px; } .app-header .icon svg { width: 20px; height: 20px; } .app-header h1 { font-size: 1rem; } .section-box { margin-bottom: 12px; } .section-header { padding: 10px 12px; font-size: 0.85rem; } .section-body { padding: 12px; } }