@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;900&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --color-cream: #FAF8F5;
  --color-sand: #E8E3DC;
  --color-stone: #A39B8F;
  --color-charcoal: #2C2C2C;
  --color-black: #1A1A1A;
  --color-gold: #C9A961;
  --color-gold-light: #E5D4A8;
  --color-white: #FFFFFF;
  --color-success: #6B8E5E;
  --color-error: #C85C5C;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Montserrat', -apple-system, system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 350ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-float: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-elevation-1: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-elevation-2: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-elevation-3: 0 8px 32px rgba(0, 0, 0, 0.12);
  --navbar-height: 64px;
  --bottom-nav-height: 72px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --touch-target: 48px;
  --backdrop-blur: blur(12px);
  --z-fab: 1000;
  --z-bottom-nav: 900;
  --z-bottom-sheet: 1100;
  --z-backdrop: 1050;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-charcoal);
  background: var(--color-cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: pan-y;
  overscroll-behavior: none;
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: var(--safe-area-bottom);
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-black);
}

h1 { font-size: 3rem; font-weight: 300; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; margin-bottom: var(--space-md); }
h3 { font-size: 1.75rem; margin-bottom: var(--space-sm); }
h4 { font-size: 1.375rem; }

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--color-charcoal); }

button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
  transition: all var(--transition-base);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 0;
  border: 1px solid transparent;
  text-transform: uppercase;
  min-height: 48px;
}

.btn-primary {
  background: var(--color-charcoal);
  color: var(--color-white);
  border-color: var(--color-charcoal);
}

.btn-primary:hover {
  background: var(--color-black);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-charcoal);
  border-color: var(--color-stone);
}

.btn-secondary:hover {
  background: var(--color-sand);
  border-color: var(--color-charcoal);
}

.btn-gold {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

.btn-gold:hover {
  background: var(--color-black);
  border-color: var(--color-black);
}

.btn-small {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  min-height: 36px;
}

.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

input, textarea, select {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-sand);
  background: var(--color-white);
  color: var(--color-charcoal);
  border-radius: 0;
  transition: all var(--transition-base);
  width: 100%;
  min-height: 48px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23A39B8F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 14px 8px;
  padding-right: 2.5rem;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.01em;
}

select:hover {
  border-color: var(--color-stone);
  background-color: var(--color-cream);
}

select:focus {
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='8' viewBox='0 0 14 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 7L13 1' stroke='%23C9A961' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

select:active {
  transform: scale(0.995);
}

select option {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-white);
  color: var(--color-charcoal);
  font-weight: 400;
}

select option:hover,
select option:focus,
select option:checked {
  background: linear-gradient(90deg, var(--color-gold-light) 0%, var(--color-cream) 100%);
  color: var(--color-black);
  font-weight: 500;
}

select option:disabled {
  color: var(--color-stone);
  font-style: italic;
}

input::placeholder, textarea::placeholder {
  color: var(--color-stone);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-stone);
  margin-bottom: 0.5rem;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.text-muted { color: var(--color-stone); }
.text-gold { color: var(--color-gold); }
.text-right { text-align: right; }

.loading {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--color-sand);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Auth */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-sand) 100%);
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.auth-header h1 {
  font-size: 2.5rem;
  margin-bottom: var(--space-xs);
}

.auth-form {
  margin-bottom: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-md);
}

.error-message {
  padding: var(--space-sm);
  background: rgba(200, 92, 92, 0.1);
  border: 1px solid var(--color-error);
  color: var(--color-error);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
  text-align: center;
}

.success-message {
  padding: var(--space-sm);
  background: rgba(107, 142, 94, 0.1);
  border: 1px solid var(--color-success);
  color: var(--color-success);
  font-size: 0.875rem;
  margin-bottom: var(--space-md);
  text-align: center;
}

.auth-footer {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-sand);
  font-size: 0.8125rem;
}

/* Navigation Desktop */
.navbar {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-sand);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  gap: var(--space-lg);
}

.navbar-brand h3 {
  font-size: 1.5rem;
  margin: 0;
}

.navbar-links {
  display: flex;
  gap: var(--space-lg);
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-stone);
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-link:hover {
  color: var(--color-charcoal);
}

.nav-link.active {
  color: var(--color-black);
  border-bottom-color: var(--color-gold);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.user-name {
  font-size: 0.875rem;
  color: var(--color-stone);
  font-weight: 500;
}

/* Pages */
.page-container {
  min-height: calc(100vh - 80px);
  padding: var(--space-xl) 0;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.month-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.month-label {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-black);
  min-width: 180px;
  text-align: center;
  text-transform: capitalize;
}

/* Dashboard */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card.gold {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  border-color: var(--color-gold);
}

.stat-card.gold .stat-label {
  color: var(--color-charcoal);
}

.stat-card.gold .stat-value {
  color: var(--color-white);
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-stone);
  margin-bottom: var(--space-xs);
}

.stat-value {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-black);
  line-height: 1;
}

.section {
  margin-bottom: var(--space-xl);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.clients-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.client-card {
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  padding: var(--space-md);
  transition: all var(--transition-base);
}

.client-card:hover {
  box-shadow: var(--shadow-md);
}

.client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.client-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
}

.client-color {
  width: 4px;
  height: 48px;
  border-radius: 2px;
}

.client-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
}

.client-stats {
  display: flex;
  gap: var(--space-lg);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.stat-item .stat-label {
  font-size: 0.75rem;
  margin: 0;
}

.stat-item .stat-value {
  font-size: 1.5rem;
}

/* Clients Page */
.form-card {
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-actions {
  display: flex;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-sand);
}

.color-picker {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-top: var(--space-xs);
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.active {
  border-color: var(--color-black);
  box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-black);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.client-item {
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all var(--transition-base);
}

.client-item:hover {
  box-shadow: var(--shadow-md);
}

.client-item-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.client-item-color {
  width: 4px;
  height: 56px;
  border-radius: 2px;
  flex-shrink: 0;
}

.client-item-info {
  flex: 1;
}

.client-item-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.25rem;
}

.client-item-info p {
  margin: 0;
  font-size: 0.875rem;
}

.client-item-rate {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--color-gold);
}

.client-item-actions {
  display: flex;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-sand);
}

.btn-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-sand);
  color: var(--color-charcoal);
  border: none;
  cursor: pointer;
  font-size: 1.125rem;
  transition: all var(--transition-base);
}

.btn-icon:hover {
  background: var(--color-charcoal);
  color: var(--color-white);
}

.btn-icon.danger:hover {
  background: var(--color-error);
}

/* Entries Page */
.entries-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.entry-form-section {
  position: sticky;
  top: calc(80px + var(--space-md));
}

.duration-buttons {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.duration-btn {
  flex: 1;
  min-width: 120px;
  padding: var(--space-sm);
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  color: var(--color-charcoal);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
}

.duration-btn:hover {
  border-color: var(--color-gold);
  background: var(--color-sand);
}

.duration-btn.active {
  background: var(--color-charcoal);
  border-color: var(--color-charcoal);
  color: var(--color-white);
}

.entries-timeline {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.timeline-day {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.timeline-date {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-charcoal);
  text-transform: capitalize;
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-sand);
}

.timeline-entries {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.timeline-entry {
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  border-left-width: 4px;
  padding: var(--space-md);
  transition: all var(--transition-base);
  position: relative;
}

.timeline-entry:hover {
  box-shadow: var(--shadow-md);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.entry-header h4 {
  margin: 0;
  font-size: 1.125rem;
}

.btn-delete {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-stone);
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all var(--transition-base);
  border-radius: 50%;
}

.btn-delete:hover {
  background: var(--color-error);
  color: var(--color-white);
}

.entry-details {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-xs);
}

.entry-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-sand);
  color: var(--color-charcoal);
  font-size: 0.8125rem;
  font-weight: 500;
}

.entry-note {
  margin: var(--space-sm) 0 0 0;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-sand);
  font-size: 0.875rem;
  color: var(--color-stone);
}

/* Reports */
.report-controls {
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.report-tabs {
  display: flex;
  gap: var(--space-xs);
}

.tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid var(--color-sand);
  color: var(--color-stone);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all var(--transition-base);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tab:hover {
  background: var(--color-sand);
  color: var(--color-charcoal);
}

.tab.active {
  background: var(--color-charcoal);
  border-color: var(--color-charcoal);
  color: var(--color-white);
}

.client-selector {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.client-selector select {
  min-width: 250px;
  min-height: 40px;
}

.report-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.report-table {
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-sand);
}

th {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-stone);
  background: var(--color-cream);
}

tr:hover td {
  background: var(--color-sand);
}

tbody tr:last-child td {
  border-bottom: none;
}

tfoot tr {
  background: var(--color-cream);
}

tfoot tr:hover td {
  background: var(--color-cream);
}

tfoot td {
  font-weight: 600;
  border-bottom: none;
  border-top: 2px solid var(--color-gold);
}

.client-cell {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.client-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.type-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-sand);
  color: var(--color-charcoal);
  font-size: 0.8125rem;
  font-weight: 500;
}

.empty-state {
  background: var(--color-white);
  border: 1px solid var(--color-sand);
  padding: var(--space-xl);
  text-align: center;
}

/* ==============================================
   MOBILE COMPONENTS (Hidden on Desktop)
   ============================================== */

/* Desktop: Hide mobile components */
.bottom-nav,
.fab,
.bottom-sheet,
.bottom-sheet-backdrop,
.toast,
.pull-to-refresh {
  display: none;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-top: 1px solid var(--color-sand);
  padding-bottom: var(--safe-area-bottom);
  z-index: var(--z-bottom-nav);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

.bottom-nav-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--bottom-nav-height);
  padding: 0 var(--space-sm);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 60px;
  height: 56px;
  color: var(--color-stone);
  cursor: pointer;
  border-radius: 12px;
  transition: all var(--transition-base);
  position: relative;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.bottom-nav-item:active {
  transform: scale(0.95);
}

.bottom-nav-item.active {
  color: var(--color-black);
}

.bottom-nav-item.active .nav-icon {
  color: var(--color-gold);
  transform: scale(1.1);
}

.nav-icon {
  width: 24px;
  height: 24px;
  transition: all var(--transition-base);
}

.nav-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background: var(--color-gold);
  border-radius: 0 0 3px 3px;
  animation: slideDown 0.3s var(--transition-smooth);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* FAB - Floating Action Button */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 16px);
  right: 20px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-float);
  cursor: pointer;
  z-index: var(--z-fab);
  border: none;
  transition: all var(--transition-base);
  -webkit-tap-highlight-color: transparent;
}

.fab:active {
  transform: scale(0.92);
  box-shadow: var(--shadow-md);
}

.fab svg {
  width: 28px;
  height: 28px;
  color: var(--color-white);
}

.fab::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: -1;
}

.fab:hover::before {
  opacity: 0.3;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.1;
  }
}

/* Bottom Sheet */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: var(--z-backdrop);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.bottom-sheet-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-white);
  border-radius: 24px 24px 0 0;
  z-index: var(--z-bottom-sheet);
  transform: translateY(100%);
  transition: transform var(--transition-smooth);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.16);
}

.bottom-sheet.active {
  transform: translateY(0);
}

.bottom-sheet-header {
  position: sticky;
  top: 0;
  background: var(--color-white);
  padding: var(--space-md) var(--space-md) var(--space-sm);
  border-bottom: 1px solid var(--color-sand);
  z-index: 10;
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--color-stone);
  border-radius: 2px;
  margin: 0 auto var(--space-sm);
  opacity: 0.4;
}

.bottom-sheet-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bottom-sheet-title h3 {
  margin: 0;
  font-size: 1.5rem;
}

.bottom-sheet-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-sand);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  color: var(--color-charcoal);
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.bottom-sheet-close:active {
  transform: scale(0.9);
  background: var(--color-stone);
  color: var(--color-white);
}

.bottom-sheet-content {
  padding: var(--space-md);
  padding-bottom: calc(var(--space-xl) + var(--safe-area-bottom));
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-charcoal);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: 12px;
  box-shadow: var(--shadow-float);
  z-index: 1200;
  transition: transform var(--transition-smooth);
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--color-success);
}

.toast.error {
  background: var(--color-error);
}

/* Pull to refresh */
.pull-to-refresh {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-white);
  border-radius: 0 0 12px 12px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-smooth);
  z-index: 800;
}

.pull-to-refresh.visible {
  transform: translateX(-50%) translateY(0);
}

.pull-to-refresh-icon {
  width: 24px;
  height: 24px;
  color: var(--color-gold);
  animation: spin 1s linear infinite;
}

/* Swipe to delete */
.timeline-entry.swiping {
  transition: none;
}

.entry-delete-reveal {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80px;
  background: var(--color-error);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.timeline-entry.reveal-delete .entry-delete-reveal {
  opacity: 1;
}

/* Skeleton loaders */
.skeleton {
  background: linear-gradient(90deg, var(--color-sand) 25%, var(--color-cream) 50%, var(--color-sand) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-line {
  height: 16px;
  margin-bottom: var(--space-xs);
}

.skeleton-card {
  height: 120px;
  margin-bottom: var(--space-sm);
}

/* ==============================================
   MOBILE RESPONSIVE
   ============================================== */

@media (max-width: 768px) {
  /* Hide desktop navbar */
  .navbar {
    display: none !important;
  }
  
  /* Show mobile components */
  .bottom-nav {
    display: block !important;
  }
  
  .fab {
    display: flex !important;
  }
  
  .bottom-sheet,
  .bottom-sheet-backdrop,
  .toast,
  .pull-to-refresh {
    display: block;
  }

  /* Adjust body padding */
  body {
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  }

  /* Page adjustments */
  .page-container {
    padding: var(--space-md) 0;
    padding-bottom: var(--space-xl);
  }

  .page-header {
    padding: 0 var(--space-md);
    margin-bottom: var(--space-md);
    text-align: center;
    flex-direction: column;
    align-items: center;
  }

  .page-header > div:first-child {
    text-align: center;
    margin-bottom: var(--space-sm);
  }

  h2 {
    font-size: 1.75rem;
  }

  .container {
    padding: 0 var(--space-md);
  }
  
  .entries-layout {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .entry-form-section {
    position: static;
    display: none; /* Hidden on mobile, use bottom sheet instead */
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .clients-grid {
    grid-template-columns: 1fr;
  }
  
  .duration-buttons {
    flex-direction: column;
  }
  
  .duration-btn {
    width: 100%;
  }

  /* Stats grid mobile */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .stat-card {
    padding: var(--space-md);
  }

  .stat-value {
    font-size: 2rem;
  }

  /* Form improvements */
  .form-card {
    border: none;
    border-radius: 0;
    padding: 0;
    background: transparent;
  }

  /* Enhanced mobile select */
  select {
    font-size: 1rem;
    padding: 1rem 2.5rem 1rem 1rem;
    border: 1.5px solid var(--color-sand);
    border-radius: 8px;
    min-height: 52px;
    box-shadow: var(--shadow-sm);
  }

  select:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15), var(--shadow-md);
    transform: translateY(-1px);
  }

  select:active {
    transform: translateY(0) scale(0.995);
  }

  /* Input improvements */
  input[type="date"],
  input[type="text"],
  input[type="number"],
  textarea {
    border-radius: 8px;
    border-width: 1.5px;
    box-shadow: var(--shadow-sm);
  }

  input[type="date"]:focus,
  input[type="text"]:focus,
  input[type="number"]:focus,
  textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.15), var(--shadow-md);
  }

  /* Empty states */
  .empty-state {
    padding: var(--space-lg) var(--space-md);
    border-radius: 16px;
  }

  /* Card enhancements */
  .client-card, .client-item, .timeline-entry {
    transition: all var(--transition-base);
    position: relative;
  }

  .client-card:active, .client-item:active, .timeline-entry:active {
    transform: scale(0.98);
  }

  /* Client stats responsive */
  .client-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .client-stats {
    width: 100%;
    justify-content: space-between;
  }

  /* Month selector */
  .month-label {
    font-size: 1rem;
    min-width: 140px;
  }

  /* Report controls */
  .report-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .report-tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }

  .client-selector {
    width: 100%;
    flex-direction: column;
  }

  .client-selector select {
    width: 100%;
    min-width: 100%;
  }

  /* Table responsive */
  .report-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 600px;
  }

  th, td {
    padding: var(--space-sm);
    font-size: 0.875rem;
  }
}

/* Very small screens */
@media (max-width: 375px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .fab {
    width: 56px;
    height: 56px;
    bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 12px);
    right: 16px;
  }

  .fab svg {
    width: 24px;
    height: 24px;
  }
}