* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1a6f5c;
  --primary-dark: #145344;
  --accent: #e8a33d;
  --bg: #f2f5f4;
  --card-bg: #ffffff;
  --text: #23312d;
  --text-muted: #64736d;
  --border: #d8e0dd;
  --error: #b3261e;
  --success: #1b7a43;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-align: center;
  padding: 2.5rem 1rem;
}

.site-header h1 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.site-header p {
  opacity: 0.9;
  font-size: 0.95rem;
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  flex: 1;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card h2 {
  font-size: 1.15rem;
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.section-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field:last-child {
  margin-bottom: 0;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
}

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

input,
select,
textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 111, 92, 0.15);
}

textarea {
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-block {
  width: 100%;
  padding: 0.9rem;
  font-size: 1.02rem;
  margin-top: 1rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn .btn-loading {
  display: none;
}

.btn.busy .btn-label {
  display: none;
}

.btn.busy .btn-loading {
  display: inline;
}

.status {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-height: 1.2em;
}

.status.success {
  color: var(--success);
}

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

.status.info {
  color: var(--text-muted);
}

/* ============================================================
   Claim Resit
   ============================================================ */

.claim-head {
  background: #f7faf9;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem 0.4rem;
  margin-bottom: 1.2rem;
}

.claim-head h3,
.claim-items h3 {
  font-size: 0.95rem;
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
}

.claim-head .field {
  margin-bottom: 0.9rem;
}

.claim-items {
  margin-bottom: 0.5rem;
}

.items-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.items-head h3 {
  margin-bottom: 0;
}

.items-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Kad item resit */
.rec-item {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  background: #fff;
  box-shadow: var(--shadow);
}

.rec-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.rec-item-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-dark);
}

.rec-item-remove {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--error);
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}

.rec-item-remove:hover {
  background: #fdecea;
  border-color: #f5c6c0;
}

.rec-item .field {
  margin-bottom: 0.8rem;
}

/* Zon seret-dan-lepas fail */
.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #b9c9c4;
  border-radius: 8px;
  background: #fbfdfc;
  padding: 1.2rem 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover,
.dropzone:focus {
  border-color: var(--primary);
  background: #f2f8f6;
  outline: none;
}

.dropzone.dragging {
  border-color: var(--primary);
  border-style: solid;
  background: #e7f4f0;
}

.zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.zone-content b {
  color: var(--primary);
}

.zone-icon {
  font-size: 1.5rem;
}

.zone-content small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.zone-error {
  font-size: 0.8rem;
  color: var(--error);
  font-weight: 600;
  min-height: 1em;
  margin-top: 0.4rem;
}

/* Pra-tonton fail */
.zone-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.4rem;
  background: #f7faf9;
  max-width: 100%;
}

.file-chip img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
}

.chip-icon {
  font-size: 1.4rem;
  padding: 0 0.3rem;
}

.chip-info {
  font-size: 0.78rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-remove {
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 50%;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
}

.chip-remove:hover {
  color: var(--error);
  background: #fdecea;
}

/* Butang tambah resit */
.add-item-btn {
  width: 100%;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary);
  background: #f2f8f6;
  border: 2px dashed var(--primary);
  border-radius: 8px;
  padding: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.add-item-btn:hover {
  background: #e7f4f0;
}

/* Bar ringkasan */
.claim-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  margin-top: 1rem;
}

.summary-label {
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.95;
}

.summary-total {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.site-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 1rem;
}
