KLEINUILTIES-WEBAPP/css/styles.css

1949 lines
38 KiB
CSS
Raw Permalink Normal View History

/* ============================================
Slim Uiltjies AfterCare — Design System
Branded invoice & payment app
============================================ */
:root {
/* Brand palette — inspired by the original receipt */
--cream: #FFF8E7;
--cream-soft: #FFFCF1;
--paper: #FFFFFF;
--ink: #2C1F4A;
--ink-soft: #4A3B6B;
--purple: #6B4FE0;
--purple-deep: #4A2FB8;
--purple-soft: #E6D7F5;
--purple-tint: #F2EBFC;
--pink: #FF6B9D;
--pink-soft: #FFE0EC;
--pink-tint: #FFF0F6;
--yellow: #FFC93C;
--yellow-soft: #FFF1C9;
--yellow-tint: #FFFBEB;
--green: #4CD080;
--green-soft: #D4F5E2;
--green-tint: #EBFBF1;
--blue: #4FB8E8;
--blue-soft: #D5EFFA;
--blue-tint: #EBF7FC;
--orange: #FF8C42;
--red: #E84A5F;
--red-soft: #FFE0E4;
--shadow-sm: 0 2px 4px rgba(74, 47, 184, 0.06);
--shadow: 0 4px 12px rgba(74, 47, 184, 0.08), 0 2px 4px rgba(74, 47, 184, 0.04);
--shadow-lg: 0 12px 32px rgba(74, 47, 184, 0.12), 0 4px 8px rgba(74, 47, 184, 0.06);
--shadow-xl: 0 24px 48px rgba(74, 47, 184, 0.18);
--radius-sm: 10px;
--radius: 14px;
--radius-lg: 22px;
--radius-xl: 28px;
--font-display: 'Grandstander', system-ui, -apple-system, sans-serif;
--font-body: 'Nunito', system-ui, -apple-system, sans-serif;
--header-h: 64px;
--tabbar-h: 68px;
--safe-top: env(safe-area-inset-top, 0px);
--safe-bottom: env(safe-area-inset-bottom, 0px);
}
/* ============================================
Reset
============================================ */
*,
*::before,
*::after { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
height: 100%;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
overscroll-behavior-y: none;
}
body {
font-family: var(--font-body);
font-size: 16px;
line-height: 1.5;
color: var(--ink);
background: var(--cream);
background-image:
radial-gradient(circle at 20% 10%, rgba(255, 201, 60, 0.10) 0%, transparent 35%),
radial-gradient(circle at 85% 15%, rgba(255, 107, 157, 0.10) 0%, transparent 35%),
radial-gradient(circle at 75% 90%, rgba(79, 184, 232, 0.10) 0%, transparent 35%),
radial-gradient(circle at 10% 80%, rgba(76, 208, 128, 0.10) 0%, transparent 35%);
background-attachment: fixed;
min-height: 100vh;
min-height: 100dvh;
}
h1, h2, h3, h4, h5 {
font-family: var(--font-display);
font-weight: 600;
line-height: 1.2;
margin: 0;
color: var(--ink);
letter-spacing: -0.01em;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 0.5rem; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 1rem; }
a { color: var(--purple); text-decoration: none; }
.hidden { display: none !important; }
/* ============================================
PIN login screen
============================================ */
.login-screen {
position: fixed;
inset: 0;
background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
display: flex;
align-items: center;
justify-content: center;
z-index: 200;
padding: 1.5rem;
}
.login-card {
background: var(--paper);
border-radius: 28px;
padding: 2.5rem 2rem 2rem;
max-width: 380px;
width: 100%;
text-align: center;
box-shadow: var(--shadow-xl);
}
.login-owl {
width: 96px;
height: 96px;
margin: 0 auto 1.25rem;
animation: float 2s ease-in-out infinite;
}
.login-title {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.75rem;
color: var(--ink);
margin: 0 0 0.25rem;
letter-spacing: -0.01em;
}
.login-sub {
font-size: 0.85rem;
color: var(--ink-soft);
margin: 0 0 1.5rem;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.login-prompt {
font-size: 0.9rem;
color: var(--ink);
margin: 0 0 0.75rem;
font-weight: 600;
}
.pin-input {
width: 100%;
font-size: 1.75rem;
letter-spacing: 0.4rem;
text-align: center;
font-family: ui-monospace, 'SF Mono', Menlo, monospace;
font-weight: 700;
padding: 1rem;
border: 2px solid rgba(74, 47, 184, 0.15);
border-radius: var(--radius);
background: var(--cream-soft);
color: var(--ink);
margin-bottom: 1rem;
transition: border-color 0.15s, box-shadow 0.15s;
-webkit-appearance: none;
appearance: none;
}
.pin-input:focus {
outline: none;
border-color: var(--purple);
background: var(--paper);
box-shadow: 0 0 0 4px rgba(107, 79, 224, 0.15);
}
.pin-input.shake {
animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
border-color: var(--red);
}
@keyframes shake {
10%, 90% { transform: translateX(-2px); }
20%, 80% { transform: translateX(4px); }
30%, 50%, 70% { transform: translateX(-6px); }
40%, 60% { transform: translateX(6px); }
}
.pin-hint {
font-size: 0.82rem;
color: var(--ink-soft);
margin: 1.25rem 0 0;
display: flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
}
.pin-hint strong {
font-family: ui-monospace, 'SF Mono', Menlo, monospace;
letter-spacing: 0.2rem;
color: var(--purple-deep);
}
.pin-reveal {
background: transparent;
border: none;
cursor: pointer;
font-size: 1rem;
padding: 2px 6px;
border-radius: 4px;
line-height: 1;
}
.pin-reveal:hover {
background: var(--purple-tint);
}
.pin-error {
color: var(--red);
font-size: 0.85rem;
font-weight: 700;
margin: 0.75rem 0 0;
min-height: 1.2rem;
opacity: 0;
transition: opacity 0.2s;
}
.pin-error.show { opacity: 1; }
.server-hint {
font-size: 0.8rem;
color: var(--ink-soft);
margin: 0.75rem 0 0;
font-weight: 600;
opacity: 0.7;
}
@media (max-width: 380px) {
.login-card { padding: 2rem 1.5rem 1.5rem; }
.pin-input { font-size: 1.5rem; letter-spacing: 0.3rem; }
}
/* ============================================
Splash screen
============================================ */
.splash {
position: fixed;
inset: 0;
background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
transition: opacity 0.4s ease;
}
.splash.fade-out {
opacity: 0;
pointer-events: none;
}
.splash-inner {
text-align: center;
color: white;
}
.splash-owl {
width: 120px;
height: 120px;
margin: 0 auto 1.5rem;
animation: float 2s ease-in-out infinite;
}
.splash-title {
font-family: var(--font-display);
font-weight: 700;
font-size: 2.4rem;
margin: 0 0 0.25rem;
color: white;
text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.splash-sub {
font-size: 1rem;
opacity: 0.85;
margin: 0 0 2rem;
}
.splash-spinner {
width: 28px;
height: 28px;
margin: 0 auto;
border: 3px solid rgba(255, 255, 255, 0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* ============================================
App shell
============================================ */
.app {
display: flex;
flex-direction: column;
min-height: 100vh;
min-height: 100dvh;
max-width: 720px;
margin: 0 auto;
position: relative;
}
.app-header {
position: sticky;
top: 0;
z-index: 50;
display: flex;
align-items: center;
justify-content: space-between;
height: calc(var(--header-h) + var(--safe-top));
padding: var(--safe-top) 0.75rem 0 0.75rem;
background: rgba(255, 248, 231, 0.92);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-bottom: 1px solid rgba(74, 47, 184, 0.06);
}
.brand {
display: flex;
align-items: center;
gap: 0.75rem;
flex: 1;
min-width: 0;
}
.brand-mark {
width: 42px;
height: 42px;
flex-shrink: 0;
}
.brand-text {
min-width: 0;
}
.brand-name {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.1rem;
color: var(--ink);
line-height: 1.1;
}
.brand-sub {
font-size: 0.78rem;
color: var(--ink-soft);
line-height: 1.1;
margin-top: 2px;
}
.view {
flex: 1;
padding: 1rem 1rem calc(var(--tabbar-h) + var(--safe-bottom) + 2rem) 1rem;
padding-bottom: max(calc(var(--tabbar-h) + var(--safe-bottom) + 2rem), 2rem);
}
/* ============================================
Tab bar
============================================ */
.tabbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 50;
display: flex;
align-items: stretch;
height: calc(var(--tabbar-h) + var(--safe-bottom));
padding-bottom: var(--safe-bottom);
background: var(--paper);
border-top: 1px solid rgba(74, 47, 184, 0.08);
box-shadow: 0 -4px 16px rgba(74, 47, 184, 0.06);
max-width: 720px;
margin: 0 auto;
}
.tab {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
padding: 0.5rem 0.25rem;
color: var(--ink-soft);
text-decoration: none;
font-size: 0.7rem;
font-weight: 600;
transition: color 0.15s;
-webkit-tap-highlight-color: transparent;
}
.tab svg {
transition: transform 0.15s;
}
.tab.active {
color: var(--purple);
}
.tab.active svg {
transform: translateY(-2px);
}
/* ============================================
Buttons
============================================ */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
min-height: 44px;
padding: 0 1.1rem;
border: 1px solid transparent;
border-radius: var(--radius);
background: transparent;
color: var(--ink);
font-family: var(--font-body);
font-weight: 700;
font-size: 0.95rem;
text-decoration: none;
cursor: pointer;
transition: transform 0.1s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
-webkit-tap-highlight-color: transparent;
white-space: nowrap;
}
.btn:active {
transform: scale(0.97);
}
.btn:focus-visible {
outline: 2px solid var(--purple);
outline-offset: 2px;
}
.btn-primary {
background: var(--purple);
color: white;
box-shadow: var(--shadow);
}
.btn-primary:hover {
background: var(--purple-deep);
}
.btn-pink {
background: var(--pink);
color: white;
box-shadow: var(--shadow);
}
.btn-yellow {
background: var(--yellow);
color: var(--ink);
box-shadow: var(--shadow);
}
.btn-green {
background: var(--green);
color: white;
box-shadow: var(--shadow);
}
.btn-blue {
background: var(--blue);
color: white;
box-shadow: var(--shadow);
}
.btn-ghost {
background: transparent;
color: var(--ink);
}
.btn-ghost:hover {
background: rgba(74, 47, 184, 0.06);
}
.btn-soft {
background: var(--purple-tint);
color: var(--purple-deep);
}
.btn-soft:hover {
background: var(--purple-soft);
}
.btn-outline {
background: var(--paper);
border-color: rgba(74, 47, 184, 0.15);
color: var(--ink);
}
.btn-outline:hover {
background: var(--purple-tint);
border-color: var(--purple);
}
.btn-danger {
background: var(--red);
color: white;
border-color: var(--red);
}
.btn-danger:hover {
background: #C73B4E;
border-color: #C73B4E;
}
.btn-icon {
width: 44px;
min-height: 44px;
padding: 0;
flex-shrink: 0;
}
.btn-sm {
min-height: 36px;
padding: 0 0.85rem;
font-size: 0.85rem;
}
.btn-lg {
min-height: 52px;
padding: 0 1.4rem;
font-size: 1.05rem;
}
.btn-block {
width: 100%;
}
/* ============================================
Cards
============================================ */
.card {
background: var(--paper);
border-radius: var(--radius-lg);
padding: 1.25rem;
box-shadow: var(--shadow);
margin-bottom: 1rem;
}
.card-flat {
background: var(--paper);
border-radius: var(--radius);
padding: 1rem;
border: 1px solid rgba(74, 47, 184, 0.06);
}
.card-soft {
background: var(--cream-soft);
border-radius: var(--radius);
padding: 1rem;
}
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
margin-bottom: 1rem;
}
.card-title {
font-family: var(--font-display);
font-weight: 600;
font-size: 1.1rem;
color: var(--ink);
margin: 0;
}
.card-subtitle {
font-size: 0.85rem;
color: var(--ink-soft);
margin: 0.25rem 0 0;
}
/* ============================================
Stats grid
============================================ */
.stats {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0.75rem;
margin-bottom: 1.25rem;
}
.stat {
background: var(--paper);
border-radius: var(--radius);
padding: 1rem;
box-shadow: var(--shadow-sm);
position: relative;
overflow: hidden;
}
.stat-icon {
width: 36px;
height: 36px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 0.6rem;
}
.stat-label {
font-size: 0.78rem;
font-weight: 600;
color: var(--ink-soft);
text-transform: uppercase;
letter-spacing: 0.04em;
margin-bottom: 0.25rem;
}
.stat-value {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.5rem;
color: var(--ink);
line-height: 1.1;
}
.stat-value-sm {
font-size: 1.1rem;
}
/* Color variants */
.bg-purple-soft { background: var(--purple-soft); color: var(--purple-deep); }
.bg-pink-soft { background: var(--pink-soft); color: var(--pink); }
.bg-yellow-soft { background: var(--yellow-soft); color: #B07D00; }
.bg-green-soft { background: var(--green-soft); color: #1F8A4D; }
.bg-blue-soft { background: var(--blue-soft); color: #1B7BAB; }
.text-purple { color: var(--purple); }
.text-pink { color: var(--pink); }
.text-green { color: #1F8A4D; }
.text-red { color: var(--red); }
.text-muted { color: var(--ink-soft); }
/* ============================================
Lists
============================================ */
.list {
display: flex;
flex-direction: column;
gap: 0.6rem;
}
.list-item {
display: flex;
align-items: center;
gap: 0.85rem;
background: var(--paper);
border-radius: var(--radius);
padding: 0.9rem 1rem;
box-shadow: var(--shadow-sm);
cursor: pointer;
transition: transform 0.1s, box-shadow 0.15s;
text-decoration: none;
color: inherit;
-webkit-tap-highlight-color: transparent;
}
.list-item:active {
transform: scale(0.99);
}
.list-item:hover {
box-shadow: var(--shadow);
}
.avatar {
width: 44px;
height: 44px;
border-radius: 50%;
background: var(--purple-tint);
color: var(--purple-deep);
display: flex;
align-items: center;
justify-content: center;
font-family: var(--font-display);
font-weight: 700;
font-size: 1.05rem;
flex-shrink: 0;
}
.avatar-sm {
width: 36px;
height: 36px;
font-size: 0.9rem;
}
.avatar-lg {
width: 64px;
height: 64px;
font-size: 1.4rem;
}
.avatar-pink { background: var(--pink-soft); color: var(--pink); }
.avatar-yellow { background: var(--yellow-soft); color: #B07D00; }
.avatar-green { background: var(--green-soft); color: #1F8A4D; }
.avatar-blue { background: var(--blue-soft); color: #1B7BAB; }
.list-item-body {
flex: 1;
min-width: 0;
}
.list-item-title {
font-weight: 700;
color: var(--ink);
font-size: 0.95rem;
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.list-item-sub {
font-size: 0.82rem;
color: var(--ink-soft);
margin: 0.15rem 0 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.list-item-meta {
font-size: 0.82rem;
color: var(--ink-soft);
text-align: right;
flex-shrink: 0;
font-weight: 600;
}
.list-item-arrow {
color: var(--ink-soft);
flex-shrink: 0;
}
/* ============================================
Section headers
============================================ */
.section-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
margin: 1.5rem 0 0.75rem;
}
.section-title {
font-family: var(--font-display);
font-weight: 600;
font-size: 1.05rem;
color: var(--ink);
}
/* Page title — used at top of desktop views */
.page-title {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 1rem;
margin: 0 0 1.25rem;
}
.page-title h1 {
font-family: var(--font-display);
font-weight: 600;
font-size: 1.75rem;
color: var(--ink);
margin: 0;
display: flex;
align-items: center;
gap: 0.5rem;
}
.page-title .count {
font-family: var(--font-body);
font-weight: 700;
font-size: 0.95rem;
color: var(--ink-soft);
background: var(--purple-tint);
padding: 4px 12px;
border-radius: 999px;
}
.page-title-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
.hero {
background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
border-radius: var(--radius-lg);
padding: 1.5rem;
color: white;
position: relative;
overflow: hidden;
margin-bottom: 1.25rem;
box-shadow: var(--shadow-lg);
}
.hero::before {
content: '';
position: absolute;
top: -30%;
right: -10%;
width: 200px;
height: 200px;
background: radial-gradient(circle, rgba(255, 201, 60, 0.4) 0%, transparent 70%);
border-radius: 50%;
}
.hero::after {
content: '';
position: absolute;
bottom: -30%;
left: -10%;
width: 180px;
height: 180px;
background: radial-gradient(circle, rgba(255, 107, 157, 0.3) 0%, transparent 70%);
border-radius: 50%;
}
.hero-greeting {
font-size: 0.85rem;
opacity: 0.9;
margin-bottom: 0.25rem;
position: relative;
}
.hero-title {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.5rem;
margin: 0 0 0.5rem;
color: white;
position: relative;
}
.hero-sub {
font-size: 0.9rem;
opacity: 0.9;
margin: 0;
position: relative;
}
/* ============================================
Forms
============================================ */
.form {
display: flex;
flex-direction: column;
gap: 1rem;
}
.form-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
}
@media (max-width: 480px) {
.form-row { grid-template-columns: 1fr; }
}
.field {
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.label {
font-size: 0.85rem;
font-weight: 700;
color: var(--ink);
}
.hint {
font-size: 0.78rem;
color: var(--ink-soft);
}
.input,
.textarea,
.select {
width: 100%;
min-height: 44px;
padding: 0.7rem 0.9rem;
border: 1.5px solid rgba(74, 47, 184, 0.12);
border-radius: var(--radius);
background: var(--paper);
color: var(--ink);
font-size: 0.95rem;
-webkit-appearance: none;
appearance: none;
transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus,
.textarea:focus,
.select:focus {
outline: none;
border-color: var(--purple);
box-shadow: 0 0 0 3px rgba(107, 79, 224, 0.15);
}
.textarea {
min-height: 80px;
resize: vertical;
line-height: 1.5;
}
.select {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%234A3B6B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 1rem center;
padding-right: 2.5rem;
}
/* Checkbox / radio */
.check {
display: flex;
align-items: center;
gap: 0.6rem;
padding: 0.7rem 0.9rem;
border: 1.5px solid rgba(74, 47, 184, 0.12);
border-radius: var(--radius);
background: var(--paper);
cursor: pointer;
transition: all 0.15s;
}
.check input { display: none; }
.check-box {
width: 22px;
height: 22px;
border-radius: 7px;
border: 2px solid rgba(74, 47, 184, 0.25);
background: var(--paper);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.15s;
}
.check input:checked + .check-box {
background: var(--purple);
border-color: var(--purple);
}
.check input:checked + .check-box::after {
content: '';
width: 6px;
height: 11px;
border: solid white;
border-width: 0 2.5px 2.5px 0;
transform: rotate(45deg);
margin-top: -2px;
}
.check.checked {
background: var(--purple-tint);
border-color: var(--purple);
}
.check-label {
font-weight: 600;
font-size: 0.95rem;
}
/* Segmented control */
.segmented {
display: flex;
background: var(--purple-tint);
border-radius: var(--radius);
padding: 4px;
gap: 4px;
}
.segmented button {
flex: 1;
min-height: 38px;
border: none;
background: transparent;
color: var(--ink-soft);
font-weight: 700;
font-size: 0.85rem;
border-radius: 10px;
transition: all 0.15s;
cursor: pointer;
}
.segmented button.active {
background: var(--paper);
color: var(--purple-deep);
box-shadow: var(--shadow-sm);
}
/* ============================================
Badges
============================================ */
.badge {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 9px;
border-radius: 999px;
font-size: 0.72rem;
font-weight: 700;
background: var(--purple-soft);
color: var(--purple-deep);
text-transform: uppercase;
letter-spacing: 0.04em;
}
.badge-pink { background: var(--pink-soft); color: var(--pink); }
.badge-yellow { background: var(--yellow-soft); color: #B07D00; }
.badge-green { background: var(--green-soft); color: #1F8A4D; }
.badge-blue { background: var(--blue-soft); color: #1B7BAB; }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-muted { background: rgba(74, 59, 107, 0.1); color: var(--ink-soft); }
/* ============================================
Empty state
============================================ */
.empty {
text-align: center;
padding: 3rem 1rem;
color: var(--ink-soft);
}
.empty-emoji {
font-size: 3rem;
margin-bottom: 0.75rem;
display: block;
}
.empty-title {
font-family: var(--font-display);
font-weight: 600;
font-size: 1.1rem;
color: var(--ink);
margin: 0 0 0.4rem;
}
.empty-sub {
font-size: 0.9rem;
margin: 0 0 1.25rem;
}
/* ============================================
Floating action button
============================================ */
.fab {
position: fixed;
bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 1rem);
right: 1rem;
z-index: 40;
width: 60px;
height: 60px;
border-radius: 50%;
border: none;
background: var(--purple);
color: white;
font-size: 1.6rem;
box-shadow: var(--shadow-lg);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.1s;
}
.fab:active {
transform: scale(0.94);
}
/* ============================================
Modal
============================================ */
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(44, 31, 74, 0.55);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
z-index: 100;
display: flex;
align-items: flex-end;
justify-content: center;
animation: fade-in 0.2s ease;
}
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slide-up {
from { transform: translateY(100%); }
to { transform: translateY(0); }
}
.modal {
background: var(--paper);
width: 100%;
max-width: 720px;
max-height: 92dvh;
border-radius: var(--radius-xl) var(--radius-xl) 0 0;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: var(--shadow-xl);
animation: slide-up 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (min-width: 720px) {
.modal-backdrop {
align-items: center;
}
.modal {
border-radius: var(--radius-xl);
max-width: 540px;
}
}
.modal-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1.1rem 1.25rem;
border-bottom: 1px solid rgba(74, 47, 184, 0.08);
flex-shrink: 0;
}
.modal-title {
font-family: var(--font-display);
font-weight: 600;
font-size: 1.2rem;
margin: 0;
}
.modal-body {
flex: 1;
overflow-y: auto;
padding: 1.25rem;
-webkit-overflow-scrolling: touch;
}
.modal-foot {
display: flex;
gap: 0.6rem;
padding: 1rem 1.25rem;
border-top: 1px solid rgba(74, 47, 184, 0.08);
background: var(--cream-soft);
flex-shrink: 0;
}
.modal-foot .btn { flex: 1; }
/* ============================================
Toast
============================================ */
.toast-root {
position: fixed;
bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 1rem);
left: 1rem;
right: 1rem;
z-index: 200;
display: flex;
flex-direction: column;
gap: 0.5rem;
align-items: center;
pointer-events: none;
}
.toast {
background: var(--ink);
color: white;
padding: 0.85rem 1.1rem;
border-radius: var(--radius);
font-weight: 600;
font-size: 0.9rem;
box-shadow: var(--shadow-lg);
pointer-events: auto;
max-width: 100%;
animation: slide-up 0.25s ease;
display: flex;
align-items: center;
gap: 0.5rem;
}
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast-info { background: var(--purple); }
/* ============================================
Render root (hidden PDF staging area)
============================================ */
.render-root {
position: fixed;
left: -10000px;
top: 0;
pointer-events: none;
z-index: -1;
}
/* ============================================
Invoice PDF preview styles
(used both on-screen preview and PDF export)
============================================ */
.invoice-doc {
width: 794px; /* A4-ish at 96dpi */
min-height: 1123px;
background: var(--cream);
color: var(--ink);
font-family: var(--font-body);
font-size: 14px;
line-height: 1.4;
position: relative;
padding: 0;
box-sizing: border-box;
}
.invoice-header {
background: var(--cream);
padding: 28px 36px 16px;
position: relative;
}
.invoice-brand {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
}
.invoice-brand-info {
display: flex;
align-items: center;
gap: 14px;
}
.invoice-logo {
width: 92px;
height: 92px;
flex-shrink: 0;
}
.invoice-business-name {
font-family: var(--font-display);
font-weight: 700;
font-size: 28px;
line-height: 1;
color: var(--purple-deep);
margin: 0 0 4px;
}
.invoice-tagline {
display: inline-block;
background: var(--yellow);
color: var(--ink);
padding: 4px 12px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
font-style: italic;
}
.invoice-meta {
text-align: right;
flex-shrink: 0;
}
.invoice-meta-row {
font-size: 12px;
margin: 2px 0;
}
.invoice-meta-row strong {
display: inline-block;
min-width: 70px;
text-align: left;
font-weight: 700;
}
.invoice-meta-label {
color: var(--ink-soft);
font-weight: 700;
font-size: 11px;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.invoice-no {
display: inline-block;
background: var(--purple-soft);
color: var(--purple-deep);
padding: 6px 14px;
border-radius: 999px;
font-weight: 700;
font-size: 13px;
margin-bottom: 6px;
}
.invoice-title {
font-family: var(--font-display);
font-weight: 700;
font-size: 22px;
text-align: center;
color: var(--purple-deep);
margin: 18px 0 16px;
letter-spacing: 0.02em;
}
.invoice-title-pink {
color: var(--pink);
}
.invoice-body {
padding: 0 36px;
}
.invoice-info-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
margin-bottom: 18px;
padding: 16px;
background: var(--paper);
border-radius: 16px;
box-shadow: 0 2px 8px rgba(74, 47, 184, 0.06);
}
.invoice-info-block .label {
font-size: 10px;
color: var(--ink-soft);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 4px;
font-weight: 700;
}
.invoice-info-block .value {
font-size: 14px;
font-weight: 700;
color: var(--ink);
}
.invoice-info-block.right { text-align: right; }
.invoice-table {
width: 100%;
border-collapse: collapse;
background: var(--paper);
border-radius: 16px;
overflow: hidden;
margin-bottom: 16px;
box-shadow: 0 2px 8px rgba(74, 47, 184, 0.06);
}
.invoice-table th {
background: var(--purple-tint);
color: var(--purple-deep);
padding: 10px 12px;
text-align: left;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.invoice-table td {
padding: 12px;
border-bottom: 1px solid rgba(74, 47, 184, 0.06);
font-size: 13px;
}
.invoice-table tr:last-child td {
border-bottom: none;
}
.invoice-table .desc {
font-weight: 700;
color: var(--ink);
}
.invoice-table .amount {
text-align: right;
font-weight: 700;
}
.invoice-totals {
display: flex;
justify-content: flex-end;
margin-bottom: 16px;
}
.invoice-totals-box {
background: var(--paper);
border-radius: 14px;
padding: 14px 18px;
min-width: 260px;
box-shadow: 0 2px 8px rgba(74, 47, 184, 0.06);
}
.invoice-total-row {
display: flex;
justify-content: space-between;
padding: 4px 0;
font-size: 13px;
}
.invoice-total-row.grand {
border-top: 2px dashed var(--purple);
margin-top: 6px;
padding-top: 10px;
font-family: var(--font-display);
font-weight: 700;
font-size: 18px;
color: var(--purple-deep);
}
.invoice-status-pill {
display: inline-block;
padding: 4px 12px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.invoice-status-paid { background: var(--green-soft); color: #1F8A4D; }
.invoice-status-unpaid { background: var(--pink-soft); color: var(--pink); }
.invoice-status-partial { background: var(--yellow-soft); color: #B07D00; }
.invoice-notes {
background: var(--paper);
border-radius: 14px;
padding: 14px 18px;
margin-bottom: 16px;
box-shadow: 0 2px 8px rgba(74, 47, 184, 0.06);
}
.invoice-notes .label {
font-size: 10px;
color: var(--ink-soft);
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 700;
margin-bottom: 4px;
}
.invoice-notes .value {
font-size: 12px;
color: var(--ink-soft);
}
.invoice-footer {
text-align: center;
padding: 20px 36px 30px;
font-size: 11px;
color: var(--ink-soft);
}
.invoice-footer-row {
margin: 2px 0;
}
.invoice-payment-info {
background: var(--green-tint);
border-left: 4px solid var(--green);
padding: 12px 16px;
border-radius: 10px;
margin-bottom: 16px;
font-size: 12px;
}
.invoice-payment-info .label {
font-size: 10px;
color: #1F8A4D;
text-transform: uppercase;
letter-spacing: 0.05em;
font-weight: 700;
margin-bottom: 4px;
}
.invoice-payment-info .value {
font-weight: 700;
color: var(--ink);
}
/* ============================================
Statement styles (statement of payments)
============================================ */
.statement-table {
width: 100%;
border-collapse: collapse;
background: var(--paper);
border-radius: 14px;
overflow: hidden;
margin-bottom: 16px;
box-shadow: 0 2px 8px rgba(74, 47, 184, 0.06);
}
.statement-table th {
background: var(--purple-tint);
color: var(--purple-deep);
padding: 10px 10px;
text-align: left;
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
}
.statement-table th.right { text-align: right; }
.statement-table td {
padding: 10px;
border-bottom: 1px solid rgba(74, 47, 184, 0.06);
font-size: 12px;
}
.statement-table tr:last-child td { border-bottom: none; }
.statement-table .right { text-align: right; font-weight: 700; }
.statement-total {
display: inline-block;
background: var(--pink-soft);
color: var(--pink);
padding: 8px 18px;
border-radius: 999px;
font-family: var(--font-display);
font-weight: 700;
font-size: 16px;
margin-top: 6px;
}
/* ============================================
Misc utilities
============================================ */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.78rem; }
.text-lg { font-size: 1.1rem; }
.font-bold { font-weight: 700; }
.font-display { font-family: var(--font-display); }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; letter-spacing: 0.04em; }
.divider {
height: 1px;
background: rgba(74, 47, 184, 0.08);
margin: 1rem 0;
}
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 0.75rem; }
.col { display: flex; flex-direction: column; gap: 0.4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 480px) {
.grid-2 { grid-template-columns: 1fr; }
}
/* ============================================
Desktop layout (>= 1024px)
============================================ */
.sidebar {
display: none;
}
.header-right {
display: flex;
align-items: center;
gap: 0.25rem;
margin-left: auto;
}
.sync-status {
font-size: 0.95rem;
padding: 0 0.4rem;
line-height: 1;
user-select: none;
cursor: help;
}
/* Header actions slot (desktop only) */
.header-actions {
display: none;
}
@media (min-width: 1024px) {
/* App becomes a 2-column grid: sidebar | main */
.app {
display: grid;
grid-template-columns: 260px 1fr;
grid-template-rows: auto 1fr;
max-width: 1400px;
height: 100vh;
height: 100dvh;
overflow: hidden;
background: var(--cream-soft);
}
.app-header {
grid-column: 1 / -1;
padding: 0 1.5rem;
height: 64px;
border-bottom: 1px solid rgba(74, 47, 184, 0.08);
}
.sidebar {
display: flex;
flex-direction: column;
background: var(--paper);
border-right: 1px solid rgba(74, 47, 184, 0.08);
padding: 1.25rem 1rem;
gap: 1rem;
overflow-y: auto;
}
.sidebar-nav {
display: flex;
flex-direction: column;
gap: 2px;
flex: 1;
}
.sidebar-link {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.65rem 0.85rem;
border-radius: 10px;
color: var(--ink-soft);
text-decoration: none;
font-weight: 600;
font-size: 0.95rem;
transition: background 0.15s, color 0.15s;
}
.sidebar-link:hover {
background: var(--purple-tint);
color: var(--ink);
}
.sidebar-link.active {
background: var(--purple);
color: white;
}
.sidebar-link.active svg {
stroke: white;
}
.sidebar-foot {
border-top: 1px solid rgba(74, 47, 184, 0.08);
padding-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.sync-indicator {
font-size: 0.8rem;
color: var(--ink-soft);
padding: 0.4rem 0.6rem;
background: var(--cream-soft);
border-radius: var(--radius-sm);
text-align: center;
font-weight: 600;
}
/* Desktop sidebar gets a brand accent strip on top */
.sidebar::before {
content: '';
display: block;
height: 3px;
background: linear-gradient(90deg, var(--purple) 0%, var(--pink) 50%, var(--yellow) 100%);
margin: -1.25rem -1rem 0;
border-radius: 0 0 0 0;
}
/* Hide mobile tab bar */
.tabbar {
display: none !important;
}
/* Header actions become the primary CTA on desktop */
.header-actions {
display: flex;
align-items: center;
gap: 0.5rem;
margin-left: auto;
margin-right: 0.75rem;
}
.header-actions:empty {
display: none;
}
.header-actions .btn {
box-shadow: var(--shadow-sm);
}
/* Wider main view with overflow scrolling */
.view {
padding: 2rem 2.5rem;
overflow-y: auto;
max-width: none;
}
/* The back button is hidden on desktop — sidebar handles nav */
#backBtn {
display: none;
}
/* Stats grid → 4 columns */
.stats {
grid-template-columns: repeat(4, 1fr);
gap: 1rem;
}
.stat {
padding: 1.25rem;
}
.stat-value {
font-size: 1.75rem;
}
/* Hero card → side-by-side on very wide screens */
.hero {
padding: 2rem 2.5rem;
}
.hero-title {
font-size: 2rem;
}
/* Lists can be wider, more info per row */
.list-item {
padding: 1rem 1.25rem;
}
/* Forms: 2-column when wide */
.form-row {
grid-template-columns: 1fr 1fr;
}
/* Settings: side-by-side cards */
.view > .card + .card {
margin-top: 0;
}
/* Cards: bigger padding */
.card {
padding: 1.5rem 1.75rem;
}
/* Card headers more spacious */
.card-title {
font-size: 1.2rem;
}
/* Modal: always centered */
.modal-backdrop {
align-items: center;
}
.modal {
max-width: 540px;
border-radius: var(--radius-xl);
}
/* FAB: still floats but desktop-friendly position */
.fab {
bottom: 2rem;
right: 2rem;
}
/* Hide the header "•••" menu button on desktop (sidebar handles nav) */
#menuBtn {
display: none;
}
}
@media (min-width: 1024px) and (max-width: 1199px) {
/* Slightly tighter on laptop screens */
.stats {
grid-template-columns: repeat(2, 1fr);
}
}
/* Wider screens: 2-column home layout */
@media (min-width: 1200px) {
.home-grid {
display: grid;
grid-template-columns: 1.4fr 1fr;
gap: 1.5rem;
align-items: start;
}
.home-grid > .card:first-child {
grid-column: 1 / -1;
}
}
/* Invoices list: table view on desktop */
@media (min-width: 1024px) {
.invoice-table { table-layout: auto; }
.invoice-table th, .invoice-table td {
padding: 14px 16px;
}
/* Settings page: 2-column grid for form cards */
.settings-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
}
.settings-grid > .card {
margin-bottom: 0;
}
/* On desktop: hide the old inline logout (sidebar handles it) */
#logoutBtn {
display: none;
}
/* Make page title prominent on desktop */
.page-title h1 {
font-size: 2rem;
}
.page-title .count {
font-size: 1rem;
padding: 6px 14px;
}
/* List items: bigger on desktop, more breathing room */
.list-item {
padding: 1rem 1.25rem;
transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
border: 1px solid transparent;
}
.list-item:hover {
box-shadow: var(--shadow);
border-color: var(--purple-soft);
}
/* Empty states: more inviting on desktop */
.empty {
padding: 4rem 2rem;
}
/* Hide FAB on desktop — desktop uses header buttons or sidebar */
.fab {
display: none !important;
}
/* Add "+" header button for desktop */
.header-actions {
display: flex;
gap: 0.5rem;
align-items: center;
}
/* Wider section head spacing */
.section-head {
margin-top: 2rem;
}
}
/* ============================================
Print styles (for the browser's native print dialog)
============================================ */
@media print {
body { background: white; }
.app, .tabbar, .modal-backdrop, .toast-root, .splash, .app-header, .fab { display: none !important; }
.render-root { position: static; left: auto; }
}
/* ============================================
Tiny screens
============================================ */
@media (max-width: 380px) {
.stats { grid-template-columns: 1fr; }
.brand-name { font-size: 1rem; }
}