:root {
  --kaju: #e85d04;
  --kaju-dark: #c44d00;
  --nexum: #1a2744;
  --bg: #f0f2f6;
  --card: #fff;
  --text: #1a1a1a;
  --muted: #6c757d;
  --danger: #c1121f;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: linear-gradient(165deg, #fff8f3 0%, var(--bg) 45%, #e8edf5 100%);
  color: var(--text);
  min-height: 100dvh;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: none;
}

main {
  flex: 1;
  padding: 20px 16px 32px;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.login-shell {
  padding-top: 12px;
}

.login-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.login-logos img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.login-logos .sep {
  width: 1px;
  height: 36px;
  background: #d1d5db;
}

.login-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0 8px 32px rgba(26, 39, 68, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-card h1 {
  font-size: 1.35rem;
  margin: 0 0 6px;
  color: var(--nexum);
}

.login-card .lead {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

h1 { font-size: 1.25rem; margin: 0 0 8px; }
h2 { font-size: 1rem; margin: 0 0 8px; }
p { margin: 0 0 8px; line-height: 1.45; }
.muted { color: var(--muted); font-size: 0.9rem; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--nexum);
}

input, textarea {
  width: 100%;
  padding: 14px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 14px;
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--kaju);
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.15);
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--kaju) 0%, var(--kaju-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(232, 93, 4, 0.35);
}

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

.btn-secondary {
  background: #e9ecef;
  color: var(--text);
  margin-top: 8px;
}

.btn-danger { background: var(--danger); color: #fff; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--kaju); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #fff3cd;
  color: #856404;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
  aspect-ratio: 1;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; }

.thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.alert-error { background: #fde8e8; color: var(--danger); }
.alert-success { background: #d1fae5; color: #065f46; }

.file-input { margin: 12px 0; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.app-header .brand-mini {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header .brand-mini img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tabs .btn { flex: 1; font-size: 0.9rem; padding: 10px; min-height: 42px; }

.warning {
  color: var(--danger);
  font-size: 0.88rem;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff5f5;
  border-radius: 8px;
}

.signature-preview {
  font-family: "Segoe Script", "Brush Script MT", cursive;
  font-size: 1.75rem;
  color: #1e3a5f;
  border-bottom: 2px solid #1e3a5f;
  padding: 8px 0;
  min-height: 48px;
}

.done {
  text-align: center;
  padding: 40px 16px;
}

.done h1 {
  color: var(--danger);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
}

.item-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}
