html,
body {
  height: 100%;
  overflow: hidden;
  background-color: #18191d;
}

.work-app {
  height: 100%;
  min-height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  --work-card: #2e2e3c;
  --work-border: rgba(212, 175, 88, 0.38);
  --work-accent: #d4b06a;
  --work-blue: #5b9cf5;
}

.work-app .topbar {
  background: rgba(24, 25, 29, 0.94);
  border-bottom-color: var(--work-border);
}

.work-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 24px;
}

.work-intro {
  font-size: 0.88rem;
  color: #a1a1aa;
  margin-bottom: 14px;
  line-height: 1.45;
}

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

.work-tab {
  flex: 1;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--work-border);
  background: rgba(255, 255, 255, 0.04);
  color: #d4d4d8;
  cursor: pointer;
}

.work-tab--active {
  background: rgba(212, 175, 88, 0.14);
  color: var(--work-accent);
  border-color: rgba(212, 175, 88, 0.55);
}

.work-panel[hidden] {
  display: none !important;
}

.work-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-input,
.work-select,
.work-textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.95rem;
  color: #f4f4f5;
  background: var(--work-card);
  border: 1.5px solid var(--work-border);
  border-radius: 12px;
  padding: 12px 14px;
}

.work-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
}

.work-input:focus,
.work-select:focus,
.work-textarea:focus {
  outline: none;
  border-color: rgba(91, 156, 245, 0.55);
}

.work-submit {
  margin-top: 6px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.work-submit:disabled {
  opacity: 0.5;
  box-shadow: none;
}

.work-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.work-card {
  background: var(--work-card);
  border: 1.5px solid var(--work-border);
  border-radius: 14px;
  padding: 12px 14px;
}

.work-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.work-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f4f4f5;
  line-height: 1.3;
}

.work-status {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(91, 156, 245, 0.15);
  color: var(--work-blue);
}

.work-status--done {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.work-status--progress {
  background: rgba(234, 179, 8, 0.15);
  color: #fde68a;
}

.work-card-meta {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-bottom: 8px;
}

.work-card-text {
  font-size: 0.9rem;
  color: #d4d4d8;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.work-empty {
  text-align: center;
  color: #9ca3af;
  padding: 24px 8px;
  font-size: 0.9rem;
}

.work-error {
  color: #f87171;
  text-align: center;
  padding: 16px;
  font-size: 0.9rem;
}

.work-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.92);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  z-index: 20;
  transform: translateY(120%);
  transition: transform 0.2s ease;
}

.work-toast--show {
  transform: translateY(0);
}

.work-footer-link {
  margin-top: 16px;
  text-align: center;
  font-size: 0.8rem;
}

.work-footer-link a {
  color: var(--work-blue);
  text-decoration: none;
}
