/* KBC Laporan Harian – Form Styles */
:root {
  --kbc: #ee4a23;
  --kbc-dark: #c73b1a;
  --kbc-light: #fef0ec;
}

.kbc-form-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem 0 3rem;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Header */
.kbc-header {
  background: var(--kbc);
  color: #fff;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 14px;
}
.kbc-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.kbc-header h1 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 3px;
  color: #fff;
  border: none;
  padding: 0;
}
.kbc-header p {
  font-size: 12px;
  opacity: .78;
  margin: 0;
}

/* Notices */
.kbc-notice {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 1rem;
}
.kbc-success { background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d32; }
.kbc-error   { background: #ffebee; border: 1px solid #ef9a9a; color: #c62828; }

/* Card */
.kbc-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: .85rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

/* Section title */
.kbc-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--kbc);
  text-transform: uppercase;
  letter-spacing: .9px;
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  gap: 7px;
}
.kbc-section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 13px;
  background: var(--kbc);
  border-radius: 2px;
}

/* Fields */
.kbc-field { margin-bottom: 0; }
.kbc-field label,
.kbc-sublabel {
  font-size: 11px;
  color: #666;
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}
.kbc-sublabel { margin-top: 2px; }
.req { color: var(--kbc); }

.kbc-field input,
.kbc-field select,
.kbc-field textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 11px;
  font-size: 13px;
  font-family: inherit;
  background: #f9f9f9;
  color: #1a1a1a;
  outline: none;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
}
.kbc-field input:focus,
.kbc-field select:focus,
.kbc-field textarea:focus {
  border-color: var(--kbc);
  background: #fff;
}
.kbc-field textarea {
  resize: vertical;
  min-height: 56px;
  line-height: 1.5;
}

/* Grid rows */
.kbc-row { display: grid; gap: 10px; margin-bottom: 10px; }
.kbc-row:last-child { margin-bottom: 0; }
.kbc-row-2 { grid-template-columns: 1fr 1fr; }
.kbc-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Suhu grid */
.kbc-suhu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.kbc-suhu-item {
  background: #f9f9f9;
  border-radius: 7px;
  padding: 9px 10px;
  border: 1px solid #e5e5e5;
  text-align: center;
}
.kbc-suhu-item label {
  font-size: 10px;
  color: #888;
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}
.kbc-suhu-item input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  font-family: inherit;
  text-align: center;
  outline: none;
}

/* Chips */
.kbc-chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.kbc-chip input[type="checkbox"],
.kbc-chip input[type="radio"] { display: none; }
.kbc-chip-label {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  color: #888;
  transition: all .12s;
  cursor: pointer;
  background: #f9f9f9;
  display: block;
  user-select: none;
}
.kbc-chip input:checked + .kbc-chip-label {
  background: var(--kbc);
  color: #fff;
  border-color: var(--kbc);
}
.kbc-chip-label:hover { border-color: var(--kbc); color: var(--kbc); }
.kbc-chip input:checked + .kbc-chip-label:hover { color: #fff; }

/* Masa chips */
.kbc-masa-grid { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.kbc-masa-chip input { display: none; }
.kbc-masa-chip label {
  font-size: 11px;
  padding: 4px 9px;
  border: 1px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  background: #f9f9f9;
  color: #888;
  display: block;
  transition: all .12s;
  user-select: none;
}
.kbc-masa-chip input:checked + label {
  background: var(--kbc-light);
  color: var(--kbc-dark);
  border-color: var(--kbc);
}

/* Toggle */
.kbc-divider { height: 1px; background: #eee; margin: 10px 0; }
.kbc-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.kbc-toggle-label { font-size: 13px; color: #1a1a1a; font-weight: 500; }
.kbc-toggle-sub   { font-size: 11px; color: #888; margin-top: 2px; }

.kbc-switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.kbc-switch input { display: none; }
.kbc-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.kbc-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.kbc-switch input:checked + .kbc-slider { background: var(--kbc); }
.kbc-switch input:checked + .kbc-slider::before { transform: translateX(18px); }

/* Qty row */
.kbc-qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.kbc-qty-row label {
  font-size: 11px;
  color: #666;
  min-width: 95px;
  font-weight: 500;
}
.kbc-qty-row input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 7px 11px;
  font-size: 13px;
  font-family: inherit;
  background: #f9f9f9;
  color: #1a1a1a;
  outline: none;
}
.kbc-qty-row input:focus { border-color: var(--kbc); background: #fff; }

/* Aktiviti */
.kbc-aktiviti-item {
  background: #f9f9f9;
  border-radius: 7px;
  padding: 10px 13px;
  margin-bottom: 8px;
  border-left: 3px solid var(--kbc);
  border-top: 1px solid #e5e5e5;
  border-right: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}
.kbc-aktiviti-item:last-child { margin-bottom: 0; }
.kbc-aktiviti-item label {
  font-size: 10px;
  color: #888;
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.kbc-aktiviti-item textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  color: #1a1a1a;
  resize: none;
  outline: none;
  min-height: 40px;
  line-height: 1.5;
  box-sizing: border-box;
}

/* Perakuan */
.kbc-perakuan-box {
  background: var(--kbc-light);
  border: 1px solid #f5c3b3;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 1rem;
}
.kbc-perakuan-box p {
  font-size: 11px;
  color: #7a3020;
  line-height: 1.65;
  margin: 0;
}

/* Submit */
.kbc-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--kbc);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .3px;
  transition: background .15s;
}
.kbc-submit-btn:hover    { background: var(--kbc-dark); }
.kbc-submit-btn:disabled { opacity: .65; cursor: not-allowed; }

/* Send info */
.kbc-send-info { margin-top: 10px; }
.kbc-send-item {
  font-size: 11px;
  color: #888;
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kbc-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--kbc);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 520px) {
  .kbc-row-2   { grid-template-columns: 1fr; }
  .kbc-suhu-grid { grid-template-columns: repeat(2, 1fr); }
  .kbc-header h1 { font-size: 14px; }
}
