/* Zenter PT — tema bersama (pt-login, pt-request, pt-schedule). Mobile-first, terang & bersih. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --ink: #111318;
  --ink-2: #374151;
  --muted: #6b7280;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --brand: #e30a17;
  --brand-ink: #b10611;
  --brand-soft: #fdecee;
  --dark: #0d0e11;
  --success: #15803d;
  --success-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --info: #1d4ed8;
  --info-soft: #dbeafe;
  --purple: #6d28d9;
  --purple-soft: #ede9fe;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.page-content {
  padding-top: 20px;
  padding-bottom: 48px;
  display: grid;
  gap: 16px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

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

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 14, 17, 0.96);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  padding: 3px;
  box-shadow: 0 4px 14px rgba(227, 10, 23, 0.35);
}

.brand small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
}

.brand span {
  color: inherit;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-actions::-webkit-scrollbar {
  display: none;
}

.link-btn,
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.15s, color 0.15s;
}

.link-btn:hover,
.home-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.link-btn.is-current,
.home-link.is-current {
  background: #fff;
  color: var(--dark);
  border-color: #fff;
}

/* ---------- Kartu ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.card-body {
  padding: 18px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(227, 10, 23, 0.14);
}

input[readonly] {
  background: var(--surface-2);
  color: var(--muted);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Tombol ---------- */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-link-primary,
.btn-outline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.06s, background 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.btn-primary,
.btn-link-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(227, 10, 23, 0.25);
}

.btn-primary:hover,
.btn-link-primary:hover {
  background: var(--brand-ink);
}

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

.btn-secondary:hover {
  background: #23252b;
}

.btn-outline,
.btn-outline-link {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover,
.btn-outline-link:hover {
  background: var(--surface-2);
}

.btn-primary:active,
.btn-secondary:active,
.btn-outline:active {
  transform: scale(0.98);
}

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

.btn-small {
  min-height: 46px;
  min-width: 46px;
  padding: 0 12px;
}

.btn-small-action,
.approve-btn,
.edit-btn,
.progress-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}

.approve-btn {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.approve-btn:hover {
  background: #166534;
}

.edit-btn:hover,
.progress-btn:hover,
.btn-small-action:hover {
  background: var(--surface-2);
}

.action-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.month-wrap {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  gap: 6px;
}

/* ---------- Tab ---------- */
.tabs-nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #e9ebef;
  border-radius: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.tab-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.tab-panel {
  margin-top: 14px;
}

/* ---------- Tabel (jadi kartu di HP) ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fcfcfd;
}

@media (max-width: 720px) {
  .table-wrap.as-cards table,
  .table-wrap.as-cards tbody,
  .table-wrap.as-cards tr,
  .table-wrap.as-cards td {
    display: block;
    width: 100%;
  }

  .table-wrap.as-cards thead {
    display: none;
  }

  .table-wrap.as-cards tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .table-wrap.as-cards tr {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px 14px;
    background: var(--surface);
  }

  .table-wrap.as-cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
    text-align: right;
  }

  .table-wrap.as-cards td:last-child {
    border-bottom: 0;
  }

  .table-wrap.as-cards td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-align: left;
  }

  .table-wrap.as-cards td.empty,
  .table-wrap.as-cards td[colspan] {
    display: block;
    text-align: center;
    border: 0;
  }

  .table-wrap.as-cards td.empty::before,
  .table-wrap.as-cards td[colspan]::before {
    content: none;
  }

  .table-wrap.as-cards tbody tr:hover td {
    background: transparent;
  }
}

/* ---------- Status ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--info-soft);
  color: var(--info);
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.status-requested {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-pill.status-scheduled {
  background: var(--info-soft);
  color: var(--info);
}

.status-pill.status-completed {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.status-cancelled {
  background: #f3f4f6;
  color: #6b7280;
}

.status-pill.status-rescheduled {
  background: var(--purple-soft);
  color: var(--purple);
}

/* ---------- Kalender matriks ---------- */
.matrix-wrap {
  overflow: auto;
  max-height: 72vh;
  -webkit-overflow-scrolling: touch;
}

.matrix-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 12px;
}

.matrix-table th,
.matrix-table td {
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0;
}

.matrix-day-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-width: 104px;
  padding: 8px 6px !important;
  text-align: center;
  background: var(--surface);
  text-transform: none;
  letter-spacing: 0;
}

.day-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}

.day-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.matrix-time-head {
  padding: 8px 10px !important;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--surface-2);
  text-transform: none;
  letter-spacing: 0;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
}

thead .sticky-col {
  z-index: 3;
}

.matrix-cell {
  min-width: 104px;
  height: 46px;
  padding: 3px !important;
  vertical-align: top;
  background: var(--surface);
}

.matrix-empty {
  background: var(--surface);
}

.slot-item {
  padding: 5px 7px;
  border-radius: 8px;
  border-left: 3px solid var(--info);
  background: var(--info-soft);
  margin-bottom: 3px;
}

.slot-item:last-child {
  margin-bottom: 0;
}

.slot-item.status-requested {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.slot-item.status-completed {
  border-left-color: var(--success);
  background: var(--success-soft);
}

.slot-item.status-cancelled {
  border-left-color: #9ca3af;
  background: #f3f4f6;
}

.slot-item.status-rescheduled {
  border-left-color: var(--purple);
  background: var(--purple-soft);
}

.slot-item.slot-continuation {
  min-height: 34px;
  opacity: 0.55;
}

.slot-item.slot-blocked {
  background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0 6px, transparent 6px 12px);
}

.slot-client {
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.3;
}

.slot-meta {
  font-size: 10.5px;
  color: var(--ink-2);
  line-height: 1.3;
}

/* ---------- Hero halaman ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 20px;
  border-radius: 20px;
  color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #c4060f 0%, #2a0a0d 55%, #121216 100%);
  box-shadow: var(--shadow-lg);
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  background: url("./pt-logo.png") center / contain no-repeat;
  opacity: 0.55;
  /* Logo berlatar putih: multiply menghilangkan putihnya di atas latar gelap. */
  mix-blend-mode: multiply;
  transform: rotate(-10deg);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  font-size: 24px;
  font-weight: 800;
}

.hero p {
  position: relative;
  margin-top: 6px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero .btn-link-primary {
  background: #fff;
  color: var(--brand);
  box-shadow: none;
}

@media (min-width: 720px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero {
    padding: 32px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .page-content {
    padding-top: 28px;
  }
}

/* Jadwal lewat tanggal yang belum ditandai Selesai/Batal. */
.overdue-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--danger-soft);
  color: var(--danger);
}

.status-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.status-group .overdue-tag {
  margin-left: 0;
}
