Files
CRM_Montzar/apps/web/src/styles/main.css
T
MahdiandCursor 6c6e32e099 feat(web): adopt vuesax icons and shared skeleton loading
Replace the inline SVG icon set with the vuesax linear pack, add skeleton primitives for loading states, and keep page scroll inside the app shell.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-05 14:46:35 +03:30

330 lines
6.7 KiB
CSS

@layer theme, base, components, utilities;
@import "tailwindcss/theme.css" layer(theme);
@import "tailwindcss/utilities.css" layer(utilities);
@source "../";
@import "./tokens.css";
:root {
--mobile-tabbar-h: 0px;
/* Surface & Background */
--bg: #f8fafc;
--surface: #ffffff;
--surface-subtle: #f1f5f9;
--surface-hover: #f8fafc;
/* Typography & Foreground */
--font: "IRANSans", Tahoma, sans-serif;
--ink: #0f172a;
--ink-secondary: #334155;
--muted: #64748b;
--muted-light: #94a3b8;
--line: #e2e8f0;
--line-light: #f1f5f9;
--line-strong: #cbd5e1;
/* Accent / Primary (Teal) */
--accent: #14b8a6;
--accent-hover: #0d9488;
--accent-deep: #0f766e;
--accent-soft: #ccfbf1;
--accent-subtle: #f0fdfa;
--accent-contrast: #ffffff;
/* Semantics */
--danger: #b42318;
--danger-hover: #991b1b;
--danger-soft: #fee2e2;
--danger-deep: #7f1d1d;
--success: #10b981;
--success-soft: #d1fae5;
--success-deep: #047857;
--warning: #f59e0b;
--warning-soft: #fef3c7;
--warning-deep: #b45309;
--info: #0284c7;
--info-soft: #e0f2fe;
--info-deep: #0369a1;
/* Typography Scale */
--fs-xs: 0.75rem; /* 12px */
--fs-sm: 0.8125rem; /* 13px */
--fs-base: 0.875rem; /* 14px */
--fs-md: 0.9375rem; /* 15px */
--fs-lg: 1.0625rem; /* 17px */
--fs-xl: 1.25rem; /* 20px */
--fs-2xl: 1.5rem; /* 24px */
--fs-3xl: 1.75rem; /* 28px */
--fw-normal: 400;
--fw-medium: 500;
--fw-semibold: 600;
--fw-bold: 700;
--fw-extrabold: 700;
--lh-tight: 1.25;
--lh-normal: 1.5;
--lh-relaxed: 1.625;
/* Spacing Scale */
--sp-1: 0.25rem; /* 4px */
--sp-2: 0.5rem; /* 8px */
--sp-3: 0.75rem; /* 12px */
--sp-4: 1rem; /* 16px */
--sp-5: 1.25rem; /* 20px */
--sp-6: 1.5rem; /* 24px */
--sp-8: 2rem; /* 32px */
--sp-10: 2.5rem; /* 40px */
/* Radius - Single Source of Truth (Globally 10px as requested) */
--radius: 10px;
--radius-xs: var(--radius);
--radius-sm: var(--radius);
--radius-md: var(--radius);
--radius-lg: var(--radius);
--radius-xl: var(--radius);
--radius-2xl: var(--radius);
--radius-full: 9999px;
/* Control Dimensions */
--control-h-sm: 30px;
--control-h: 36px;
--control-h-md: 36px;
--control-h-lg: 42px;
--pad-modal: 16px;
/* Shadows */
--shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
--shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
--shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
--shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
--shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
--shadow-xl: 0 20px 48px rgba(15, 23, 42, 0.16);
/* Transitions */
--transition-fast: 150ms ease;
--transition-normal: 200ms ease;
/* Z-index */
--z-dropdown: 50;
--z-sticky: 60;
--z-modal-backdrop: 80;
--z-modal: 90;
--z-toast: 100;
/* Compatibility aliases for legacy views */
--color-border: var(--line);
--color-border-light: var(--line-light);
--color-text: var(--ink);
--color-text-primary: var(--ink);
--color-text-secondary: var(--ink-secondary);
--color-text-muted: var(--muted);
--color-text-emphasis: var(--ink);
--color-surface: var(--surface);
--color-surface-sunken: var(--surface-subtle);
--color-primary: var(--accent);
--color-primary-dark: var(--accent-deep);
--color-primary-light: var(--accent-soft);
--color-primary-surface: var(--accent-subtle);
--color-danger: var(--danger);
--color-danger-surface: var(--danger-soft);
--color-warning: var(--warning);
}
* {
box-sizing: border-box;
}
html {
-webkit-text-size-adjust: 100%;
}
html,
body,
#app {
height: 100%;
max-width: 100%;
overflow: hidden;
}
body {
margin: 0;
font-family: var(--font);
color: var(--ink);
background: var(--bg);
}
img,
svg,
video,
canvas {
max-width: 100%;
height: auto;
}
a {
color: inherit;
text-decoration: none;
}
button,
input,
select,
textarea {
font: inherit;
max-width: 100%;
}
.btn {
border: 0;
border-radius: var(--radius);
height: var(--control-h);
min-height: var(--control-h);
padding: 0 0.85rem;
cursor: pointer;
background: var(--accent);
color: white;
font-weight: 600;
font-size: var(--fs-sm);
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.35rem;
box-sizing: border-box;
transition: background var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
}
.btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.btn-ghost {
background: transparent;
color: var(--accent);
border: 1px solid var(--line);
}
.btn.ghost {
background: #fff;
color: var(--ink);
border: 1px solid var(--line);
}
.btn-danger {
background: transparent;
color: var(--danger);
border: 1px solid color-mix(in srgb, var(--danger) 35%, white);
}
.field {
display: grid;
gap: 0.35rem;
min-width: 0;
}
.field label {
font-size: 0.9rem;
color: var(--muted);
}
.field input,
.field select {
border: 1px solid var(--line);
border-radius: var(--radius);
min-height: var(--control-h);
padding: 0 0.85rem;
background: #fff;
width: 100%;
}
.field textarea {
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 0.7rem 0.85rem;
background: #fff;
width: 100%;
min-height: 88px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
outline: 2px solid var(--accent-soft);
border-color: var(--accent);
}
input::placeholder,
textarea::placeholder {
color: #c0c8d4;
}
.error {
color: var(--danger);
font-size: 0.9rem;
}
.tc-row {
display: flex;
justify-content: flex-end;
margin: 0 0 0.5rem;
}
th.num-col,
td.num-col {
width: 2.6rem;
text-align: center;
color: #94a3b8;
font-size: 0.8rem;
font-weight: 500;
font-variant-numeric: tabular-nums;
}
/* شماره ردیف خودکار برای جدول‌های دارای v-table-cols؛ شروع با --row-start (آفست صفحه) */
table[data-rownum] > tbody {
counter-reset: tc-row var(--row-start, 0);
}
table[data-rownum] > tbody > tr:not(:has(> td[colspan])) {
counter-increment: tc-row;
}
table[data-rownum] > thead > tr::before,
table[data-rownum] > tbody > tr::before {
display: table-cell;
width: 2.6rem;
padding: 0.6rem 0.4rem;
text-align: center;
vertical-align: middle;
color: #94a3b8;
font-size: 0.8rem;
font-weight: 500;
font-variant-numeric: tabular-nums;
border-bottom: 1px solid #f1f5f9;
}
table[data-rownum] > thead > tr::before {
content: '#';
}
table[data-rownum] > tbody > tr::before {
content: counter(tc-row, persian);
}
table[data-rownum] > tbody > tr:has(> td[colspan])::before {
content: '';
}
@media (max-width: 900px) {
:root {
--mobile-tabbar-h: calc(3.65rem + env(safe-area-inset-bottom, 0px));
}
h1 {
font-size: clamp(1.35rem, 5vw, 1.75rem);
}
}