/* -------------------------------------------------------------
 * Success Center Digital Timesheet - Glass UI Redesign
 * ------------------------------------------------------------- */

:root {
  --bg-main: #ffffff;
  --bg-card: #ffffff;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;
  
  /* Brand Navy & Blue/Purple Accents */
  --color-navy: #002060;
  --color-navy-light: #0b2c6f;
  --color-blue-vibrant: #4f46e5;
  --color-blue-accent: #e0e9f6;
  --color-blue-accent-light: #f0f4fa;
  --color-purple: #7c3aed;
  
  /* Text colors */
  --text-dark: #0f172a;
  --text-medium: #1e293b;
  --text-light: #475569;
  
  /* Action statuses */
  --color-danger: #ef4444;
  --color-success: #10b981;

  /* Typography */
  --font-display: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Transitions */
  --transition-smooth: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  /* Glass — high contrast light background */
  --glass-bg: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(203, 213, 225, 0.8);
  --glass-shadow: 0 4px 24px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --glass-blur: blur(20px);
}

/* Base resets */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg-main);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Soft Animated Blue/Purple Aura Blobs */
.aura-blob {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(95px);
  opacity: 0.72;
  mix-blend-mode: multiply;
  transition: var(--transition-smooth);
}

/* Blob 1: Top Left (Indigo-Blue) */
.aura-1 {
  width: 600px;
  height: 600px;
  top: -10%;
  left: -5%;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.38) 0%, rgba(99, 102, 241, 0.15) 50%, transparent 70%);
  animation: aura-drift-1 12s ease-in-out infinite alternate;
}

/* Blob 2: Bottom Right (Vivid Violet) */
.aura-2 {
  width: 550px;
  height: 550px;
  bottom: -8%;
  right: -5%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.42) 0%, rgba(139, 92, 246, 0.18) 50%, transparent 70%);
  animation: aura-drift-2 14s ease-in-out infinite alternate;
}

/* Blob 3: Middle Right (Vivid Purple-Magenta) */
.aura-3 {
  width: 450px;
  height: 450px;
  top: 25%;
  right: -10%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.38) 0%, rgba(192, 132, 252, 0.15) 50%, transparent 70%);
  animation: aura-drift-3 16s ease-in-out infinite alternate;
}

/* Blob 4: Bottom Left (Deep Royal Blue) */
.aura-4 {
  width: 500px;
  height: 500px;
  bottom: -10%;
  left: -8%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, rgba(96, 165, 250, 0.12) 50%, transparent 70%);
  animation: aura-drift-4 18s ease-in-out infinite alternate;
}

@keyframes aura-drift-1 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(70px, 40px) scale(1.08); }
  66%  { transform: translate(-30px, 80px) scale(0.94); }
  100% { transform: translate(40px, -20px) scale(1.05); }
}

@keyframes aura-drift-2 {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-60px, -40px) scale(1.1); }
  66%  { transform: translate(40px, -70px) scale(0.95); }
  100% { transform: translate(-30px, 30px) scale(1.04); }
}

@keyframes aura-drift-3 {
  0%   { transform: translate(0, 0) scale(1.02); }
  50%  { transform: translate(-50px, 60px) scale(0.92); }
  100% { transform: translate(60px, -40px) scale(1.1); }
}

@keyframes aura-drift-4 {
  0%   { transform: translate(0, 0) scale(0.95); }
  50%  { transform: translate(80px, -50px) scale(1.08); }
  100% { transform: translate(-40px, 40px) scale(1.0); }
}

/* Main container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* -------------------------------------------------------------
 * Utility Layout Classes
 * ------------------------------------------------------------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow { flex-grow: 1; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.relative { position: relative; }
.hidden { display: none !important; }
.block { display: block; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:flex-row { flex-direction: row; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* -------------------------------------------------------------
 * Glass Card Component
 * ------------------------------------------------------------- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* -------------------------------------------------------------
 * Top Navigation Bar
 * ------------------------------------------------------------- */
.top-nav {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-blue-vibrant), var(--color-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.nav-brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.nav-brand-text span {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-blue-vibrant);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-badge {
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-medium);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-blue-vibrant), var(--color-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
}

/* Auto-save status pill */
.autosave-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 9999px;
  padding: 6px 13px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease;
  user-select: none;
}

.autosave-pill.saving {
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.35);
  background: rgba(238, 242, 255, 0.85);
}

.autosave-dot {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.autosave-pill.saving .autosave-dot {
  background: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
  animation: pulse-dot 0.8s infinite alternate ease-in-out;
}

@keyframes pulse-dot {
  from { opacity: 0.6; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1.25); }
}

/* History Card */
.history-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}

.history-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.history-card.current {
  border-color: #818cf8;
  background: #f8faff;
}

.history-badge-hours {
  font-family: var(--font-body);
  font-feature-settings: 'tnum';
  font-weight: 800;
  font-size: 13px;
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

/* -------------------------------------------------------------
 * Hero Title Section
 * ------------------------------------------------------------- */
.hero-title {
  padding: 2.5rem 0 1.5rem;
}

.hero-title h2 {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-title h2 span {
  background: linear-gradient(135deg, var(--color-blue-vibrant), var(--color-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #475569;
  font-weight: 400;
  margin-top: 0.4rem;
}

/* -------------------------------------------------------------
 * Section Headers (Employee Info, Reporting Period labels)
 * ------------------------------------------------------------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 1.25rem;
}

.section-label i {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--color-blue-vibrant);
}

/* -------------------------------------------------------------
 * Form Inputs & Labels
 * ------------------------------------------------------------- */
.label-mono {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
  display: block;
  margin-bottom: 6px;
}

.input-flat {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: #0f172a;
  background: #ffffff;
  transition: var(--transition-smooth);
}

.input-flat:focus {
  outline: none;
  border-color: var(--color-blue-vibrant);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  background: #ffffff;
}

.input-flat::placeholder {
  color: #94a3b8;
  font-weight: 400;
  opacity: 1;
}

/* Select dropdowns */
select.input-flat {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 2.2rem;
}

/* -------------------------------------------------------------
 * Buttons System (Glass UI)
 * ------------------------------------------------------------- */
.btn-primary {
  background: rgba(0, 32, 96, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 32, 96, 0.15);
  transition: var(--transition-smooth);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.btn-primary:hover {
  background: #002060;
  box-shadow: 0 6px 20px rgba(0, 32, 96, 0.25);
  transform: translateY(-1px);
}

.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background: #ffffff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #1e293b;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: var(--transition-smooth);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}

.btn-secondary:active { transform: scale(0.98); }

.btn-submit {
  background: linear-gradient(135deg, #002060, #4f46e5, #7c3aed);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
  transition: var(--transition-smooth);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.btn-submit:hover {
  box-shadow: 0 6px 24px rgba(79, 70, 229, 0.45);
  transform: translateY(-1px);
}

.btn-submit:active { transform: scale(0.98); }

/* Week Selection Tabs */
.tab-week {
  background: rgba(241, 245, 249, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  color: #1e293b;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-week.active {
  background: linear-gradient(135deg, var(--color-blue-vibrant), var(--color-purple));
  border-color: transparent;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.tab-week.active .tab-hours-badge {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.tab-week:hover:not(.active) {
  background: #ffffff;
  border-color: var(--color-blue-vibrant);
  color: #0f172a;
}

.tab-hours-badge {
  margin-left: 6px;
  font-family: var(--font-body);
  font-feature-settings: 'tnum';
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-blue-vibrant);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.btn-delete-week {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(148, 163, 184, 0.3);
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  margin-left: 4px;
  transition: var(--transition-smooth);
}

.tab-week.active .btn-delete-week {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.btn-delete-week:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
  transform: scale(1.1);
}

/* -------------------------------------------------------------
 * Spreadsheet Table Styling
 * ------------------------------------------------------------- */
.table-card {
  overflow: hidden;
}

table {
  border-spacing: 0;
  width: 100%;
}

thead tr {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
}

th {
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  padding: 14px 12px;
}

td {
  border-bottom: 1px solid #cbd5e1;
  border-right: 1px solid #e2e8f0;
  padding: 10px 12px;
  transition: var(--transition-smooth);
}

tr:nth-child(odd) td {
  background: #ffffff;
}

tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.85);
}

td:last-child { border-right: none; }

tr:hover td {
  background: #f1f5f9;
}

/* Input Fields inside Table Cells */
.table-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 11px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: #0f172a;
  background: #ffffff;
  transition: var(--transition-smooth);
}

.table-input:focus {
  outline: none;
  border-color: var(--color-blue-vibrant);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background: #ffffff;
}

.table-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  opacity: 1;
}

textarea.table-input {
  resize: vertical;
  min-height: 38px;
  line-height: 1.4;
}

/* Weekly Total Footer */
.week-footer {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  background: rgba(248, 250, 252, 0.5);
}

/* Tab Header Controls */
.tab-header {
  padding: 1rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--color-border);
  background: rgba(248, 250, 252, 0.5);
}

/* Session Controls */
.cell-sessions-container { display: flex; flex-direction: column; gap: 6px; }

.cell-session-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-delete-session {
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.btn-delete-session:hover {
  color: var(--color-danger);
  background: rgba(239, 68, 68, 0.08);
}

.btn-add-session-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-blue-vibrant);
  background: rgba(79, 70, 229, 0.06);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px dashed rgba(79, 70, 229, 0.3);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition-smooth);
  margin-top: 4px;
}

.btn-add-session-inline:hover {
  background: rgba(79, 70, 229, 0.12);
  border-color: var(--color-blue-vibrant);
}

/* Search Dropdown Selector */
.search-dropdown { position: relative; width: 100%; }

.dropdown-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(248, 250, 252, 0.6);
  font-size: 13px;
  color: var(--text-medium);
  transition: var(--transition-smooth);
}

.dropdown-selected:hover { border-color: var(--color-blue-vibrant); }

.dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 20;
  overflow: hidden;
}

.dropdown-search-input {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-medium);
  outline: none;
}

.dropdown-search-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  opacity: 1;
}

.dropdown-options-container { max-height: 150px; overflow-y: auto; }

.dropdown-option {
  padding: 8px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dropdown-option:hover { background: var(--color-blue-accent-light); }

/* -------------------------------------------------------------
 * Bottom Section: Total Hours + Signatures Row
 * ------------------------------------------------------------- */
.bottom-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .bottom-row {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

.total-hours-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.total-hours-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(124, 58, 237, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-blue-vibrant);
}

.sig-card {
  padding: 1.25rem;
}

.sig-canvas-wrap {
  position: relative;
  background: rgba(248, 250, 252, 0.6);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  height: 70px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
}

.sig-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sig-placeholder {
  pointer-events: none;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
}

.sig-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* -------------------------------------------------------------
 * Footer Actions
 * ------------------------------------------------------------- */
.footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0;
  flex-wrap: wrap;
}

.footer-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 180px;
}

.footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding-bottom: 1rem;
}

/* -------------------------------------------------------------
 * Splash Screen (preserved)
 * ------------------------------------------------------------- */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(135deg, #f8fafc 0%, #e8ecf4 50%, #f0f4fa 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-out-splash {
  opacity: 0 !important;
  transform: scale(1.03) !important;
  pointer-events: none !important;
}

.text-script-blue {
  color: #1e60d5;
}

.font-handwritten {
  font-family: 'Caveat', cursive;
  font-size: 3.5rem;
  font-weight: 700;
}

.splash-loader-container {
  position: relative;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: #1e60d5;
  animation: spin-ring 1.2s linear infinite;
}

@keyframes spin-ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.splash-loader-clock {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1.5px solid #475569;
  position: relative;
  background-color: transparent;
}

.clock-hand-hour {
  position: absolute;
  top: 50%; left: 50%;
  width: 1.5px; height: 8px;
  background-color: #0f172a;
  transform-origin: bottom;
  transform: translate(-50%, -100%) rotate(30deg);
}

.clock-hand-minute {
  position: absolute;
  top: 50%; left: 50%;
  width: 1.5px; height: 12px;
  background-color: #0f172a;
  transform-origin: bottom;
  transform: translate(-50%, -100%) rotate(90deg);
}

.splash-slogan {
  position: absolute;
  bottom: 2.5rem;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.875rem;
  color: #475569;
  text-align: center;
}

/* -------------------------------------------------------------
 * Modal (preserved)
 * ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border: 1px solid var(--color-border);
  max-width: 28rem;
  width: 100%;
  padding: 2rem;
  text-align: center;
  border-radius: 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
}

/* Cursor */
.cursor-crosshair { cursor: crosshair; }
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Print-only layout hidden on screen */
#print-layout { display: none; }

/* -------------------------------------------------------------
 * Smartphone Responsive Adaptations
 * ------------------------------------------------------------- */
@media (max-width: 768px) {
  .app-container {
    padding: 0 0.75rem 3rem;
  }

  .hero-title h2 { font-size: 1.75rem; }

  .top-nav {
    padding: 0.75rem 1rem;
  }

  /* Keep table normal size on mobile with smooth horizontal scrolling */
  .table-card > div {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #timesheet-table {
    min-width: 1100px;
    table-layout: auto !important;
  }

  .bottom-row {
    grid-template-columns: 1fr;
  }

  .footer-actions {
    flex-direction: column;
  }

  .footer-actions button {
    width: 100%;
  }
}

/* -------------------------------------------------------------
 * Print Stylesheet (1:1 Visual App Mirror — All Weeks Visible)
 * ------------------------------------------------------------- */
#print-layout {
  display: none;
}

@media print {
  @page {
    size: letter landscape;
    margin: 0.25in 0.35in;
  }

  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    padding: 0 !important;
    margin: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    font-family: var(--font-body), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    overflow: visible !important;
  }
  body::before { display: none !important; }

  /* Hide screen-only interactive UI */
  #splash-screen, 
  .aura-blob,
  .top-nav,
  .hero-title,
  .app-container,
  .modal-overlay,
  .footer-actions, 
  .footer-note {
    display: none !important;
  }

  /* Reveal dedicated 1:1 print layout */
  #print-layout {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .pdf-document-root {
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* Each week page */
  .pdf-week-page {
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    box-sizing: border-box !important;
    padding: 0 0 4px !important;
    margin: 0 !important;
  }

  .pdf-week-page:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  /* Top Navigation Bar */
  .pdf-nav-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 0 8px 0 !important;
    background: transparent !important;
    border: none !important;
    margin-bottom: 6px !important;
  }

  .pdf-nav-brand {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .pdf-nav-logo {
    height: 2.6rem !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  .pdf-nav-text h1 {
    font-family: var(--font-display), 'Manrope', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #002060 !important;
    margin: 0 !important;
    line-height: 1.15 !important;
  }

  .pdf-nav-text span {
    font-family: var(--font-body), 'Inter', sans-serif !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #4f46e5 !important;
  }

  .pdf-page-indicator {
    font-family: var(--font-mono), monospace !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 3px 10px !important;
  }

  /* Subpage Meta Bar (Pages 2+) */
  .pdf-subpage-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 12px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
    font-size: 11px !important;
    color: #475569 !important;
  }

  .pdf-subpage-header strong {
    color: #0f172a !important;
  }

  /* Hero Section */
  .pdf-hero-section {
    margin-bottom: 8px !important;
  }

  .pdf-hero-title {
    font-family: var(--font-display), 'Manrope', sans-serif !important;
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
  }

  .pdf-hero-title span {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: #4f46e5 !important;
    color: #4f46e5 !important;
  }

  .pdf-hero-subtitle {
    font-size: 0.85rem !important;
    color: #64748b !important;
    margin: 2px 0 0 0 !important;
    font-weight: 400 !important;
  }

  /* 2 Meta Cards (Tutor Information & Reporting Period) */
  .pdf-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 10px !important;
  }

  .pdf-glass-card {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    box-sizing: border-box !important;
  }

  .pdf-section-label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-family: var(--font-display), 'Manrope', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #002060 !important;
    margin-bottom: 8px !important;
  }

  .pdf-section-label svg,
  .pdf-section-label i {
    width: 14px !important;
    height: 14px !important;
    color: #4f46e5 !important;
  }

  .pdf-label-mono {
    font-family: var(--font-body), 'Inter', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: -0.01em !important;
    color: #1e293b !important;
    margin-bottom: 4px !important;
    display: block !important;
  }

  .pdf-input-box {
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 7px 10px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    background: #ffffff !important;
    min-height: 28px !important;
    display: flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .pdf-input-box.readonly-box {
    background: #f8fafc !important;
    color: #475569 !important;
  }

  /* Spreadsheet Table Card */
  .pdf-table-card {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 8px !important;
  }

  .pdf-tab-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    background: #f8fafc !important;
    border-bottom: 1.5px solid #cbd5e1 !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
  }

  .pdf-tab-pills-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  .pdf-tab-pill {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 12px !important;
    border-radius: 8px !important;
    font-family: var(--font-display), 'Manrope', sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
  }

  .pdf-tab-pill.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-color: transparent !important;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3) !important;
  }

  .pdf-tab-pill-badge {
    margin-left: 5px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    padding: 1px 6px !important;
    border-radius: 5px !important;
    background: rgba(79, 70, 229, 0.1) !important;
    color: #4f46e5 !important;
  }

  .pdf-tab-pill.active .pdf-tab-pill-badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
  }

  .pdf-week-start-date {
    font-size: 11px !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
  }

  .pdf-week-start-date strong {
    color: #0f172a !important;
  }

  /* Table Grid */
  .pdf-table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
    margin: 0 !important;
  }

  .pdf-table thead tr {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%) !important;
  }

  .pdf-table th {
    color: #ffffff !important;
    font-family: var(--font-display), 'Manrope', sans-serif !important;
    font-weight: 800 !important;
    font-size: 10px !important;
    letter-spacing: -0.01em !important;
    padding: 7px 5px !important;
    text-align: center !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
  }

  .pdf-table th:last-child {
    border-right: none !important;
  }

  .pdf-table td {
    border-bottom: 1px solid #cbd5e1 !important;
    border-right: 1px solid #cbd5e1 !important;
    padding: 4px 5px !important;
    vertical-align: middle !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
  }

  .pdf-table tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.8) !important;
  }

  .pdf-table td:last-child {
    border-right: none !important;
  }

  /* Table cells */
  .pdf-cell-date {
    text-align: center !important;
    background: #f8fafc !important;
  }

  .pdf-date-day {
    font-family: var(--font-display), 'Manrope', sans-serif !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    color: #0f172a !important;
  }

  .pdf-date-val {
    font-size: 9.5px !important;
    color: #64748b !important;
    margin-top: 1px !important;
  }

  .pdf-shift-cell {
    padding: 3.5px !important;
  }

  .pdf-shift-box {
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    padding: 5px 3px !important;
    text-align: center !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    min-height: 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .pdf-shift-box.empty {
    background: #fdfdfd !important;
    border-color: #cbd5e1 !important;
  }

  .pdf-hours-cell {
    text-align: center !important;
    padding: 3.5px !important;
  }

  .pdf-daily-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(79, 70, 229, 0.08) !important;
    color: #4338ca !important;
    border: 1px solid rgba(79, 70, 229, 0.18) !important;
    border-radius: 6px !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    padding: 3px 6px !important;
    min-width: 32px !important;
  }

  .pdf-weekly-total-cell {
    text-align: center !important;
    vertical-align: middle !important;
    background: rgba(79, 70, 229, 0.03) !important;
    border-left: 1px solid #cbd5e1 !important;
    border-right: 1px solid #cbd5e1 !important;
    padding: 8px !important;
  }

  .pdf-weekly-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(79, 70, 229, 0.08) !important;
    border: 1px solid rgba(79, 70, 229, 0.22) !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-family: var(--font-body), sans-serif !important;
    font-feature-settings: 'tnum' !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #4f46e5 !important;
  }

  .pdf-text-cell {
    padding: 3.5px !important;
  }

  .pdf-text-box {
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    padding: 4px 6px !important;
    font-size: 9.5px !important;
    color: #0f172a !important;
    min-height: 25px !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    white-space: pre-wrap !important;
    display: flex !important;
    align-items: center !important;
  }

  .pdf-text-box.placeholder {
    color: #94a3b8 !important;
    font-style: italic !important;
  }

  /* Week Footer */
  .pdf-week-footer {
    padding: 6px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #f8fafc !important;
    border-top: 1px solid #cbd5e1 !important;
  }

  .pdf-week-footer-label {
    font-family: var(--font-display), 'Manrope', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: #475569 !important;
  }

  .pdf-week-footer-value {
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    color: #4f46e5 !important;
  }

  /* Bottom Signatures Row */
  .pdf-bottom-row {
    display: grid !important;
    grid-template-columns: 1.1fr 1fr 1fr 1fr !important;
    gap: 8px !important;
    margin-top: 6px !important;
    margin-bottom: 4px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .pdf-total-hours-card {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 8px 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .pdf-total-hours-icon {
    width: 2rem !important;
    height: 2rem !important;
    border-radius: 8px !important;
    background: rgba(79, 70, 229, 0.1) !important;
    color: #4f46e5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .pdf-sig-card {
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 8px 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .pdf-sig-canvas-box {
    height: 44px !important;
    border: 1px dashed #cbd5e1 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 4px !important;
    overflow: hidden !important;
  }

  .pdf-sig-img {
    max-height: 40px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  .pdf-sig-date-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 9.5px !important;
  }

  .pdf-doc-footer-note {
    font-size: 9.5px !important;
    color: #64748b !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    margin-top: 4px !important;
  }
}

