
/* SENSE BY VASUNDHARAM CAFE - ELEGANT THEME */
:root {
  --bg-milkmaid: #faf7f2;
  --bg-surface: #ffffff;
  --primary-darkblue: #1a365d;
  --accent-teal: #0d9488;
  --accent-teal-hover: #0f766e;
  --text-main: #1f2937;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(26, 54, 93, 0.04);
  --shadow-md: 0 8px 24px rgba(26, 54, 93, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-milkmaid);
  color: var(--text-main);
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 24px;
  padding-bottom: env(safe-area-inset-bottom, 24px);
  -webkit-tap-highlight-color: transparent;
  font-synthesis: none;
}

/* TOPBAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 32px 0 24px;
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; border-radius: 14px; box-shadow: var(--shadow-sm); }
.header-dark-logo { height: 14px; margin-bottom: 6px; display: block; object-fit: contain; }
.topbar h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.8rem); color: var(--primary-darkblue); font-weight: 800; letter-spacing: -0.02em; }
.brand-subtitle { margin: 2px 0 0; color: var(--text-muted); font-size: 0.85rem; font-weight: 500; }
.account { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.user-email { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

/* NAVIGATION TABS */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 24px;
  -ms-overflow-style: none; 
  scrollbar-width: none; 
  -webkit-overflow-scrolling: touch;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 99px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.tab:hover { background: rgba(13, 148, 136, 0.05); color: var(--accent-teal); }
.tab.active {
  background: var(--primary-darkblue);
  color: #fff;
  border-color: var(--primary-darkblue);
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.15);
}

/* BUTTONS */
.primary, .secondary, .light-button, .file-button {
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.primary { background: var(--accent-teal); color: #fff; box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2); }
.primary:hover { background: var(--accent-teal-hover); transform: translateY(-1px); }
.secondary { background: #fff; color: var(--primary-darkblue); border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); }
.secondary:hover { border-color: var(--primary-darkblue); background: #f8fafc; }
.light-button { background: rgba(255,255,255,0.15); color: #fff; backdrop-filter: blur(4px); }
.light-button:hover { background: rgba(255,255,255,0.25); }

/* LAYOUT & CARDS */
.view { padding-bottom: 40px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.hero {
  background: linear-gradient(135deg, var(--primary-darkblue) 0%, #2a4b7c 100%);
  color: #fff;
  padding: 32px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -50px; top: -100px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(13,148,136,0.15) 0%, transparent 70%); border-radius: 50%;
}
.eyebrow { font-size: 0.75rem; letter-spacing: 0.15em; font-weight: 700; text-transform: uppercase; }
.eyebrow.light { color: #94a3b8; }
.hero h2 { margin: 8px 0; font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; letter-spacing: -0.03em; }
.hero p { margin: 0; max-width: 600px; line-height: 1.6; color: #cbd5e1; font-size: 0.95rem; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.stat, .panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.stat span { display: block; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat strong { display: block; font-size: 1.6rem; font-weight: 800; margin-top: 8px; color: var(--primary-darkblue); }

.panel { margin: 20px 0; }
.panel h2, .panel h3 { margin-top: 0; color: var(--primary-darkblue); font-weight: 750; letter-spacing: -0.02em; }
.panel h2 { font-size: 1.4rem; }
.panel h3 { font-size: 1.1rem; }
.panel-heading, .section-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.panel-heading p, .section-title p { margin: 4px 0 0; }
.grid-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-two > .panel { margin: 0; }

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; line-height: 1.5; }
.notice { padding: 14px 20px; background: #e0f2fe; border-left: 4px solid #0284c7; border-radius: 12px; margin: 0 0 20px; color: #075985; font-weight: 500; }
.notice.error { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.warning { background: #fffbeb; border-color: #fde68a; }

/* FORMS */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid.compact { padding: 0; border: 0; margin: 0; box-shadow: none; background: transparent; }
.form-grid label { display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; font-weight: 600; color: var(--primary-darkblue); }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border-color); border-radius: 10px;
  background: #f8fafc; font: inherit; color: var(--text-main); transition: all 0.2s; outline: none;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  background: #fff; border-color: var(--accent-teal); box-shadow: 0 0 0 3px rgba(13,148,136,0.15);
}
.full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }

/* TABLES & LISTS */
.table-wrap { overflow-x: auto; width: 100%; border-radius: 12px; border: 1px solid var(--border-color); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: #fff; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
th { color: var(--text-muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; background: #f8fafc; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td input { min-width: 100px !important; padding: 10px !important; margin: 0; }
.empty { padding: 32px 0; color: var(--text-muted); text-align: center; font-style: italic; }

.item-list .item-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border-color); }
.item-row:last-child { border-bottom: 0; padding-bottom: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }

.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.hidden { display: none !important; }
footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.8rem; padding: 24px 0 40px; border-top: 1px solid var(--border-color); margin-top: 40px; }
.pill { display: inline-block; background: var(--bg-milkmaid); border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; color: var(--primary-darkblue); }

/* LOGIN SCREEN (SIMPLIFIED & ELEGANT) */
.login-layout { min-height: calc(100vh - 120px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; animation: fadeIn 0.5s ease; }
.login-container { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 32px; }
.login-header { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.login-brand-logo { height: 32px; object-fit: contain; margin-bottom: 12px; }
.login-title { font-size: 2.5rem; margin: 0; font-weight: 800; letter-spacing: -0.04em; color: var(--primary-darkblue); }
.login-subtitle { margin: 0; color: var(--accent-teal); font-size: 1rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.login-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 24px; padding: 40px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 20px; }
.google-button { width: 100%; display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--border-color); border-radius: 14px; background: #fff; color: var(--text-main); font: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); transition: all 0.2s ease; }
.google-button:hover { transform: translateY(-2px); border-color: #cbd5e1; box-shadow: var(--shadow-md); }
.google-button:disabled { opacity: 0.6; cursor: wait; transform: none; }
.google-g { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; color: #4285f4; background: #f1f5f9; }
.button-arrow { margin-left: auto; color: var(--text-muted); font-size: 1.2rem; }
.login-status { margin: 0; min-height: 48px; padding: 14px 16px; background: #f8fafc; border-radius: 12px; font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; text-align: center; }
.login-status.error { background: #fef2f2; color: #991b1b; }
.login-status.success { background: #f0fdf4; color: #166534; }
.setup-help { padding: 16px; border: 1px solid #fde68a; background: #fffbeb; color: #92400e; border-radius: 12px; font-size: 0.85rem; line-height: 1.6; }
.login-footer { text-align: center; font-size: 0.8rem; color: var(--text-muted); margin: 0; font-weight: 500; }
.lock-dot { font-size: 0.6rem; color: var(--accent-teal); margin-right: 6px; vertical-align: middle; }

/* RESPONSIVE */
@media(max-width: 800px) {
  body { padding: 0 16px; }
  .topbar { padding: 24px 0 16px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .account { justify-content: flex-start; width: 100%; }
  .hero { flex-direction: column; align-items: flex-start; padding: 24px; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .grid-two { grid-template-columns: 1fr; gap: 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 16px; }
  .form-grid.compact { grid-template-columns: 1fr; }
  .panel-heading, .section-title { flex-direction: column; align-items: flex-start; gap: 12px; }
  .stat, .panel { padding: 20px; }
  .table-wrap { margin-inline: -4px; border-radius: 8px; }
  .item-row { flex-direction: column; align-items: flex-start !important; gap: 12px; }
  .item-row .button-row { justify-content: flex-start; width: 100%; }
  .login-card { padding: 32px 24px; }
}
