* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f5f8;
  color: #1e293b;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login-card,
.dashboard {
  width: 100%;
  max-width: 1080px;
}

.login-card {
  max-width: 420px;
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.dashboard {
  display: grid;
  gap: 20px;
}

.page-header,
.history-item,
.generate-form {
  display: flex;
  gap: 16px;
}

.page-header {
  justify-content: space-between;
  align-items: center;
}

.panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.history-panel {
  min-height: 360px;
}

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

.history-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.history-item {
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid #dbe3eb;
  border-radius: 12px;
  background: #fbfcfe;
}

.history-meta {
  display: grid;
  gap: 4px;
}

.history-meta span,
.muted {
  color: #64748b;
}

.history-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.generate-form {
  align-items: end;
  flex-wrap: wrap;
}

.field-group {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.action-group {
  min-width: auto;
}

.stack {
  display: grid;
  gap: 14px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: #2563eb;
  margin-bottom: 8px;
}

h1,
h2,
p {
  margin-top: 0;
}

input[type="password"],
input[type="date"],
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  background: #ffffff;
}

button,
.button-link {
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.primary {
  background: #2563eb;
  color: #ffffff;
}

.secondary,
.button-link {
  background: #e2e8f0;
  color: #0f172a;
}

.danger {
  background: #dc2626;
  color: #ffffff;
}

.alert {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  font-weight: 600;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.alert-info {
  background: #dbeafe;
  color: #1d4ed8;
}

.empty-state {
  padding: 32px 12px;
  color: #64748b;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .app-shell {
    padding: 20px;
  }

  .page-header,
  .history-item {
    flex-direction: column;
    align-items: stretch;
  }

  .history-actions {
    justify-content: stretch;
  }
}
