fmproService / frontend /src /styles /globals.css
Hkoradiya123
feat: Initialize frontend with Zustand for state management, Tailwind CSS for styling, and TypeScript for type safety
4854e2b
Raw History Blame Contribute Delete
10.3 kB
/**
* Global Styles
*/
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
color-scheme: light;
--ink: #17201b;
--muted: #66736c;
--panel: #fbfaf5;
--panel-strong: #ffffff;
--line: #d9ded6;
--field: #f6f4ed;
--brand: #0f766e;
--brand-strong: #115e59;
--accent: #d97706;
--danger: #b42318;
--success: #167a45;
--shadow: 0 18px 50px rgba(23, 32, 27, 0.12);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
min-width: 320px;
background: #eeece3;
color: var(--ink);
font-family: "Aptos", "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
html {
scroll-behavior: smooth;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
/* Input focus styling */
input:focus,
select:focus,
textarea:focus {
outline: 2px solid rgba(15, 118, 110, 0.28);
outline-offset: 2px;
}
/* Button hover effects */
button {
transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease,
transform 0.18s ease, box-shadow 0.18s ease;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
outline: 2px solid var(--brand);
outline-offset: 3px;
}
button:active:not(:disabled) {
transform: translateY(1px);
}
button:disabled,
input:disabled {
cursor: not-allowed;
}
.app-shell {
min-height: 100vh;
background:
linear-gradient(90deg, rgba(23, 32, 27, 0.05) 1px, transparent 1px),
linear-gradient(rgba(23, 32, 27, 0.04) 1px, transparent 1px),
#eeece3;
background-size: 28px 28px;
}
.auth-shell {
min-height: 100vh;
display: grid;
grid-template-columns: minmax(0, 1.05fr) minmax(340px, 480px);
background:
linear-gradient(90deg, rgba(23, 32, 27, 0.08) 1px, transparent 1px),
linear-gradient(rgba(23, 32, 27, 0.06) 1px, transparent 1px),
#eeece3;
background-size: 32px 32px;
}
.auth-brand {
padding: clamp(2rem, 5vw, 5rem);
display: flex;
flex-direction: column;
justify-content: space-between;
border-right: 1px solid var(--line);
}
.auth-card {
align-self: center;
margin: 2rem;
background: var(--panel-strong);
border: 1px solid var(--line);
border-radius: 8px;
box-shadow: var(--shadow);
padding: clamp(1.5rem, 4vw, 2.5rem);
}
.eyebrow {
color: var(--brand-strong);
font-family: "Cascadia Mono", "Consolas", monospace;
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0;
text-transform: uppercase;
}
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-quiet {
min-height: 42px;
border-radius: 6px;
font-weight: 700;
}
.btn-primary {
background: var(--brand);
color: white;
border: 1px solid var(--brand);
}
.btn-primary:hover:not(:disabled) {
background: var(--brand-strong);
}
.btn-secondary {
background: var(--ink);
color: white;
border: 1px solid var(--ink);
}
.btn-danger {
background: var(--danger);
color: white;
border: 1px solid var(--danger);
}
.btn-quiet {
background: var(--panel);
color: var(--ink);
border: 1px solid var(--line);
}
.field {
width: 100%;
border: 1px solid var(--line);
border-radius: 6px;
background: var(--field);
color: var(--ink);
padding: 0.72rem 0.86rem;
}
.field::placeholder {
color: #8b948c;
}
.panel {
background: rgba(255, 255, 255, 0.82);
border: 1px solid var(--line);
border-radius: 8px;
box-shadow: 0 1px 0 rgba(23, 32, 27, 0.04);
}
.dashboard-nav {
display: flex;
align-items: stretch;
gap: 0.5rem;
overflow-x: auto;
padding-bottom: 0.15rem;
scrollbar-width: thin;
}
.dashboard-topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
.dashboard-brand {
min-width: 0;
}
.dashboard-title-row {
display: flex;
align-items: baseline;
gap: 0.75rem;
min-width: 0;
}
.dashboard-title {
font-size: 2rem;
line-height: 1;
font-weight: 900;
letter-spacing: -0.03em;
color: var(--ink);
}
.dashboard-divider {
flex: 0 0 auto;
width: 1px;
height: 1.2rem;
background: var(--line);
}
.dashboard-subtitle {
min-width: 0;
font-size: 0.92rem;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dashboard-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.75rem;
flex-wrap: wrap;
}
.dashboard-nav-button {
display: inline-flex;
align-items: center;
gap: 0.65rem;
flex: 0 0 auto;
min-height: 48px;
padding: 0.8rem 1rem;
border-radius: 10px;
border: 1px solid transparent;
text-align: left;
white-space: nowrap;
}
.dashboard-nav-button.is-active {
background: var(--brand);
border-color: var(--brand);
color: white;
box-shadow: 0 10px 24px rgba(15, 118, 110, 0.16);
}
.dashboard-nav-button.is-inactive {
background: rgba(255, 255, 255, 0.95);
color: var(--muted);
}
.dashboard-nav-button.is-inactive:hover:not(:disabled) {
border-color: var(--line);
background: white;
color: var(--ink);
}
.profile-menu-wrap {
position: relative;
display: inline-flex;
}
.profile-menu-trigger {
display: inline-flex;
align-items: center;
gap: 0.75rem;
min-height: 52px;
padding: 0.6rem 0.85rem 0.6rem 0.65rem;
border: 1px solid var(--line);
border-radius: 999px;
background: rgba(255, 255, 255, 0.82);
color: var(--ink);
box-shadow: 0 8px 22px rgba(23, 32, 27, 0.05);
}
.profile-menu-trigger:hover:not(:disabled) {
background: white;
border-color: rgba(15, 118, 110, 0.22);
}
.profile-menu-avatar {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 999px;
background: linear-gradient(135deg, var(--brand), var(--brand-strong));
color: white;
font-size: 0.72rem;
font-weight: 900;
letter-spacing: 0.08em;
}
.profile-menu-label {
display: block;
font-size: 0.74rem;
font-weight: 900;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.profile-menu-subtitle {
display: block;
max-width: 18rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 0.78rem;
color: var(--muted);
}
.profile-menu-caret {
width: 18px;
height: 18px;
color: var(--muted);
flex: 0 0 auto;
}
.profile-menu-panel {
position: absolute;
right: 0;
top: calc(100% + 0.6rem);
width: min(21rem, calc(100vw - 2rem));
border: 1px solid var(--line);
border-radius: 16px;
background: rgba(255, 255, 255, 0.98);
box-shadow: 0 24px 60px rgba(23, 32, 27, 0.18);
overflow: hidden;
z-index: 60;
}
.profile-menu-header {
padding: 1rem 1rem 0.85rem;
border-bottom: 1px solid var(--line);
background: linear-gradient(180deg, rgba(15, 118, 110, 0.06), transparent);
}
.profile-menu-name {
font-size: 0.98rem;
font-weight: 900;
color: var(--ink);
}
.profile-menu-email {
margin-top: 0.15rem;
font-size: 0.82rem;
color: var(--muted);
}
.profile-menu-section {
padding: 0.55rem;
display: grid;
gap: 0.35rem;
}
.profile-menu-item,
.profile-menu-logout {
display: flex;
width: 100%;
align-items: center;
justify-content: flex-start;
border: 1px solid transparent;
border-radius: 12px;
padding: 0.8rem 0.9rem;
font-size: 0.92rem;
font-weight: 700;
color: var(--ink);
background: transparent;
}
.profile-menu-item:hover,
.profile-menu-logout:hover {
background: #f4f7f4;
border-color: var(--line);
}
.profile-menu-footer {
padding: 0.55rem;
border-top: 1px solid var(--line);
background: #fcfcfa;
}
.profile-menu-logout {
color: var(--danger);
}
.dashboard-nav-meta {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 64px;
padding: 0.18rem 0.5rem;
border-radius: 999px;
background: rgba(23, 32, 27, 0.08);
font-size: 0.68rem;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.dashboard-nav-button.is-active .dashboard-nav-meta {
background: rgba(255, 255, 255, 0.16);
}
.dashboard-nav-label {
font-size: 0.95rem;
font-weight: 800;
}
.metric-card {
background: var(--panel-strong);
border: 1px solid var(--line);
border-left: 4px solid var(--brand);
border-radius: 6px;
padding: 1.15rem;
position: relative;
overflow: hidden;
}
.metric-card::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 42%);
pointer-events: none;
}
.metric-card-strong {
box-shadow: 0 12px 32px rgba(15, 118, 110, 0.06);
}
.metric-card-accent {
border-left-color: var(--accent);
}
.metric-card-success {
border-left-color: var(--success);
}
.status-pill {
display: inline-flex;
align-items: center;
min-height: 24px;
border-radius: 999px;
border: 1px solid var(--line);
padding: 0 0.58rem;
font-size: 0.75rem;
font-weight: 700;
}
.data-table {
width: 100%;
min-width: 760px;
border-collapse: collapse;
}
.data-table th {
background: #f1efe6;
color: #4d5a52;
font-size: 0.75rem;
font-weight: 800;
text-align: left;
text-transform: uppercase;
}
.data-table th,
.data-table td {
border-bottom: 1px solid var(--line);
padding: 0.85rem 1rem;
}
.data-table tbody tr:hover {
background: rgba(15, 118, 110, 0.06);
}
@media (max-width: 860px) {
.auth-shell {
grid-template-columns: 1fr;
}
.auth-brand {
border-right: 0;
border-bottom: 1px solid var(--line);
gap: 2rem;
}
.auth-card {
margin: 1rem;
}
.dashboard-topbar {
align-items: flex-start;
flex-direction: column;
}
.dashboard-title-row {
flex-wrap: wrap;
gap: 0.5rem;
}
.dashboard-divider {
display: none;
}
.dashboard-actions {
width: 100%;
justify-content: flex-start;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
scroll-behavior: auto !important;
transition-duration: 0.01ms !important;
}
}
/* Custom animations */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.fade-in {
animation: fadeIn 0.3s ease-in-out;
}