@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --cream:  #f8f9eb;
  --deep:   #022c22;
  --accent: #00ffab;
  --card:   #ffffff;
  --ink:    #1a2e24;
  --muted:  #6b7566;
  --border: #e0e5d8;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--cream);
  color: var(--ink);
}

.htmx-indicator { opacity: 0; transition: opacity 150ms ease-in; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { opacity: 1; }

/* ── Layout ──────────────────────────────────────────────────────── */

.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  margin-left: 220px;
  flex: 1;
  padding: 36px 40px;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background-color: var(--deep);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 50;
}

.sidebar-logo {
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.sidebar-logo-tag {
  font-size: 0.5625rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 5px;
  display: block;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  position: relative;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
}

.sidebar-nav-item:hover {
  background-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.95);
}

.sidebar-nav-item.active {
  background-color: rgba(0,255,171,0.1);
  color: #ffffff;
  font-weight: 600;
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 54%;
  background-color: var(--accent);
  border-radius: 0 2px 2px 0;
}

.sidebar-nav-item.sidebar-disabled {
  opacity: 0.28;
  cursor: default;
  pointer-events: none;
}

.sidebar-nav-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
}

.sidebar-footer {
  padding: 12px 10px 22px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  margin-bottom: 2px;
}

.sidebar-user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: rgba(0,255,171,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
  flex-shrink: 0;
}

.sidebar-user-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.72);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout-btn {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.5);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 12px;
  width: 100%;
  text-align: left;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  transition: color 0.12s;
}

.sidebar-logout-btn:hover {
  color: rgba(255,255,255,0.8);
}

/* ── Typography ──────────────────────────────────────────────────── */

.font-display {
  font-family: 'Playfair Display', serif;
}

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--deep);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

/* ── DPE Hero Letter ─────────────────────────────────────────────── */

.dpe-hero-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3.75rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  display: block;
}

/* ── Badge Gain ──────────────────────────────────────────────────── */

.badge-gain {
  display: inline-flex;
  align-items: center;
  background-color: var(--accent);
  color: var(--deep);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  font-family: 'Inter', sans-serif;
}

/* ── Login split layout ──────────────────────────────────────────── */

.login-layout {
  display: flex;
  min-height: 100vh;
}

.login-panel-left {
  width: 55%;
  position: relative;
  background-image: url('/static/image-bg2.jpg');
  background-image: image-set(url('/static/image-bg2.webp') type('image/webp'), url('/static/image-bg2.jpg') type('image/jpeg'));
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.login-panel-left-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 48px;
  background: linear-gradient(to top, rgba(2,44,34,0.97) 0%, rgba(2,44,34,0.55) 65%, transparent 100%);
}

.login-panel-left-tag {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: block;
}

.login-panel-left-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.login-panel-left-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.88);
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.login-panel-left-features li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
}

.login-panel-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background-color: #ffffff;
  overflow-y: auto;
}

.login-form-container {
  width: 100%;
  max-width: 360px;
}

.login-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--deep);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 28px;
  font-family: 'Inter', sans-serif;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

.btn-google:hover {
  border-color: #9ca3af;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border);
}

.login-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 0.12s, box-shadow 0.12s;
  box-sizing: border-box;
}

.login-input:focus {
  outline: none;
  border-color: var(--deep);
  box-shadow: 0 0 0 3px rgba(2,44,34,0.08);
}

.login-input::placeholder {
  color: #aab5b0;
}

.btn-submit {
  width: 100%;
  padding: 11px 16px;
  background-color: var(--deep);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background-color 0.12s, box-shadow 0.12s;
}

.btn-submit:hover {
  background-color: #033d30;
  box-shadow: 0 0 0 3px rgba(0,255,171,0.2);
}
