:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --bg: #eef0f7;
  --card-bg: #ffffff;
  --text: #1f2330;
  --muted: #6b7280;
  --border: #e2e4eb;
  --success: #16a34a;
  --error: #dc2626;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  min-height: 100%;
  margin: 0;
}

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #eef1fb 0%, #f7f4fb 100%);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 24px;
}

.card {
  position: relative;
  width: 100%;
  max-width: 1040px;
  height: 640px;
  display: grid;
  grid-template-columns: 310px 1fr;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(31, 35, 48, 0.14);
  overflow: hidden;
  flex-shrink: 0;
}

/* ---- Side panel ---- */
.side-panel {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
}

.side-copy h1 {
  margin: 0 0 12px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.side-copy p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.side-points {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-points li {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  padding-left: 20px;
  position: relative;
}

.side-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
}

/* ---- Form panel ---- */
.form-panel {
  padding: 32px 40px;
  overflow-y: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.req {
  color: var(--error);
}

input, select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #fbfbfd;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  background: #fff;
}

input:invalid:not(:placeholder-shown) {
  border-color: var(--error);
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
}

.btn {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .05s, background .15s, opacity .15s;
}

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

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: #f1f2f6;
  color: #444;
}
.btn-secondary:hover { background: #e6e7ee; }

.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { background: var(--success); }
.toast.error { background: var(--error); }

/* ---- Entries card ---- */
.entries-card {
  width: 100%;
  max-width: 1040px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(31, 35, 48, 0.14);
  overflow: hidden;
  margin-bottom: 24px;
}

.entries-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
}

.entries-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
}

.entries-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.entries-count {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entries-table-wrap {
  overflow: auto;
  max-height: 420px;
}

.entries-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.entries-table th, .entries-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.entries-table thead th {
  background: #f7f7fb;
  font-weight: 600;
  color: #374151;
  position: sticky;
  top: 0;
  z-index: 1;
}

.entries-table tbody tr:hover {
  background: #fafafe;
}

.entries-table tbody tr:last-child td {
  border-bottom: none;
}

.entries-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 16px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f2f6;
  color: #444;
}

.status-badge.confirmed {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

@media (max-width: 760px) {
  html, body { overflow: auto; }
  .page { height: auto; min-height: 100vh; padding: 20px; align-items: flex-start; }
  .card { grid-template-columns: 1fr; height: auto; max-height: none; }
  .side-panel { padding: 24px; }
  .side-points { margin-top: 24px; }
  .form-panel { padding: 24px; }
  .form-grid { grid-template-columns: 1fr; }
}
