Twilioapp-admin/styles/globals.css

435 lines
6.5 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
/* 导入组件样式 */
@import './components.css';
/* 全局样式重置 */
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
line-height: 1.6;
font-size: 14px;
}
* {
box-sizing: border-box;
}
/* 改进滚动条样式 */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
/* 选择文本颜色 */
::selection {
background-color: #3b82f6;
color: white;
}
::-moz-selection {
background-color: #3b82f6;
color: white;
}
/* 聚焦时的轮廓样式 */
:focus {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
/* 隐藏聚焦轮廓当不需要时 */
:focus:not(:focus-visible) {
outline: none;
}
/* 改进表单元素的默认样式 */
input, textarea, select {
font-family: inherit;
font-size: inherit;
}
/* 按钮重置 */
button {
font-family: inherit;
font-size: inherit;
border: none;
background: none;
cursor: pointer;
}
/* 链接样式 */
a {
color: inherit;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* 图片响应式 */
img {
max-width: 100%;
height: auto;
}
/* 表格样式改进 */
table {
border-collapse: collapse;
width: 100%;
}
/* 代码块样式 */
pre, code {
background-color: #f6f8fa;
border-radius: 0.25rem;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}
pre {
padding: 1rem;
overflow-x: auto;
}
code {
padding: 0.125rem 0.25rem;
font-size: 0.875em;
}
/* 无障碍改进 */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
/* 打印样式 */
@media print {
* {
background: transparent !important;
color: black !important;
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
.no-print {
display: none !important;
}
@page {
margin: 2cm;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}
/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
:root {
--bg-primary: #1f2937;
--bg-secondary: #374151;
--text-primary: #f9fafb;
--text-secondary: #d1d5db;
--border-color: #4b5563;
}
}
/* 动画偏好设置 */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
/* 高对比度模式支持 */
@media (prefers-contrast: high) {
:root {
--border-color: #000000;
}
.btn {
border: 2px solid currentColor;
}
}
/* 实用工具类 */
.text-balance {
text-wrap: balance;
}
.text-pretty {
text-wrap: pretty;
}
.full-bleed {
width: 100vw;
margin-left: calc(50% - 50vw);
}
.container-query {
container-type: inline-size;
}
/* 现代CSS重置补充 */
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
-moz-text-size-adjust: none;
-webkit-text-size-adjust: none;
text-size-adjust: none;
}
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
margin-block-end: 0;
}
ul[role='list'],
ol[role='list'] {
list-style: none;
}
h1,
h2,
h3,
h4,
button,
input,
label {
line-height: 1.1;
}
h1,
h2,
h3,
h4 {
text-wrap: balance;
}
p {
text-wrap: pretty;
max-width: 70ch;
}
input,
button,
textarea,
select {
font: inherit;
}
textarea:not([rows]) {
min-height: 10em;
}
:target {
scroll-margin-block: 5ex;
}
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96%;
--secondary-foreground: 222.2 84% 4.9%;
--muted: 210 40% 96%;
--muted-foreground: 215.4 16.3% 46.9%;
--accent: 210 40% 96%;
--accent-foreground: 222.2 84% 4.9%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--radius: 0.5rem;
}
.dark {
--background: 222.2 84% 4.9%;
--foreground: 210 40% 98%;
--card: 222.2 84% 4.9%;
--card-foreground: 210 40% 98%;
--popover: 222.2 84% 4.9%;
--popover-foreground: 210 40% 98%;
--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 11.2%;
--secondary: 217.2 32.6% 17.5%;
--secondary-foreground: 210 40% 98%;
--muted: 217.2 32.6% 17.5%;
--muted-foreground: 215 20.2% 65.1%;
--accent: 217.2 32.6% 17.5%;
--accent-foreground: 210 40% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 210 40% 98%;
--border: 217.2 32.6% 17.5%;
--input: 217.2 32.6% 17.5%;
--ring: 212.7 26.8% 83.9%;
}
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
/* 通话状态指示器 */
.call-status {
position: relative;
}
.call-status::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 50%;
animation: call-pulse 1.5s infinite;
}
.call-status.active::before {
background-color: #10b981;
}
.call-status.busy::before {
background-color: #f59e0b;
}
.call-status.ended::before {
background-color: #ef4444;
}
@keyframes call-pulse {
0% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.1);
opacity: 0.7;
}
100% {
transform: scale(1);
opacity: 1;
}
}
/* 加载动画 */
.loading-spinner {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: #fff;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* 渐变背景 */
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.gradient-bg-alt {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}