gongxiangp2/app/globals.css
2026-08-19 12:08:38 +08:00

129 lines
3.6 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--foreground-rgb: 0, 0, 0;
--background-start-rgb: 250, 250, 250;
--background-end-rgb: 255, 255, 255;
}
@media (prefers-color-scheme: dark) {
:root {
--foreground-rgb: 255, 255, 255;
--background-start-rgb: 18, 18, 18;
--background-end-rgb: 0, 0, 0;
}
}
body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
rgb(var(--background-start-rgb));
}
/* Apple-style button */
.btn-apple {
@apply px-6 py-2.5 rounded-apple font-medium transition-all duration-200 shadow-apple hover:shadow-apple-lg;
}
.btn-primary {
@apply btn-apple bg-gray-900 dark:bg-gray-700 text-white hover:bg-gray-800 dark:hover:bg-gray-600 active:scale-95;
}
.btn-secondary {
@apply btn-apple bg-gray-200 dark:bg-gray-700 text-gray-900 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 active:scale-95;
}
.btn-danger {
@apply btn-apple bg-red-600 dark:bg-red-700 text-white hover:bg-red-700 dark:hover:bg-red-600 active:scale-95;
}
/* Apple-style input */
.input-apple {
@apply w-full px-4 py-3 rounded-apple border border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:text-white focus:border-gray-900 dark:focus:border-gray-400 focus:ring-2 focus:ring-gray-200 dark:focus:ring-gray-600 outline-none transition-all;
}
/* Apple-style card */
.card-apple {
@apply bg-white dark:bg-gray-800 rounded-apple shadow-apple hover:shadow-apple-lg transition-all duration-300 border border-transparent dark:border-gray-700;
}
/* 考核调研管理端:为所有原生交互控件提供一致、清晰的键盘焦点。 */
.performance-admin-config :is(button, input, select, textarea, summary):focus-visible {
outline: 2px solid #0050cb;
outline-offset: 2px;
}
.performance-admin-config :is(button, input, select, textarea):disabled {
cursor: not-allowed;
}
/* 品牌中心门户内的素材库固定使用浅色运营工作台,不跟随系统深色媒体查询。 */
@media (prefers-color-scheme: dark) {
.department-material-light .dark\:bg-gray-900 {
background-color: #edf3fa !important;
}
.department-material-light :is(.dark\:bg-gray-800, .dark\:bg-gray-950, .dark\:bg-gray-300) {
background-color: #ffffff !important;
}
.department-material-light .dark\:bg-gray-800\/50 {
background-color: #f7f9fc !important;
}
.department-material-light :is(.dark\:text-white, .dark\:text-gray-800) {
color: #101828 !important;
}
.department-material-light .dark\:text-gray-100 {
color: #1b2738 !important;
}
.department-material-light :is(.dark\:text-gray-300, .dark\:text-slate-200) {
color: #4f6077 !important;
}
.department-material-light :is(.dark\:text-gray-400, .dark\:text-slate-400) {
color: #66758b !important;
}
.department-material-light :is(.dark\:border-gray-600, .dark\:border-gray-700, .dark\:border-gray-800, .dark\:border-slate-700) {
border-color: #dce5ef !important;
}
.department-material-light .dark\:placeholder\:text-gray-500::placeholder {
color: #8a98aa !important;
}
.department-material-light :is(.dark\:hover\:bg-gray-700:hover, .dark\:hover\:bg-gray-900:hover) {
background-color: #f1f6fc !important;
}
.department-material-light :is(.dark\:hover\:text-gray-200:hover, .dark\:hover\:text-gray-300:hover, .dark\:hover\:text-white:hover) {
color: #176fc1 !important;
}
}
/* 淡入动画 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fade-in {
animation: fadeIn 0.3s ease-out;
}