:root {
  --hermes-orange: #f37022;
  --hermes-orange-dark: #cf5e1c;
  --bg: #fffaf6;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #f1e3d7;
  --success: #0f9d58;
  --warn: #f59e0b;
  --danger: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fff7f1 0%, var(--bg) 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 540px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(243, 112, 34, 0.12);
}

.brand-login {
  text-align: center;
  margin-bottom: 16px;
}

.logo-frame {
  width: 110px;
  height: 110px;
  margin: 0 auto 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
}

.logo-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-placeholder {
  font-weight: 800;
  color: var(--hermes-orange);
}

.brand-login h1 {
  margin: 0;
  font-size: 24px;
}

.brand-login p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.header {
  background: #fff;
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-small {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fff;
  font-weight: 800;
  color: var(--hermes-orange);
}

.logo-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand h1 {
  font-size: 18px;
  margin: 0;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.session-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.tab-btn.active {
  background: var(--hermes-orange);
  color: white;
  border-color: var(--hermes-orange);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.03);
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #4b5563;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--hermes-orange);
  box-shadow: 0 0 0 3px rgba(243, 112, 34, 0.12);
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

button.primary {
  background: var(--hermes-orange);
  color: #fff;
}

button.primary:hover {
  background: var(--hermes-orange-dark);
}

button.ghost {
  background: #fff;
  border: 1px solid #e5e7eb;
}

button.danger {
  background: var(--danger);
  color: #fff;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status.pending_manager {
  color: #7c2d12;
  background: #ffedd5;
}

.status.approved {
  color: #064e3b;
  background: #d1fae5;
}

.status.rejected {
  color: #7f1d1d;
  background: #fee2e2;
}

.request-list {
  display: grid;
  gap: 10px;
}

.request-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.unread-mail {
  border-left: 4px solid var(--hermes-orange);
  background: #fff8f2;
}

.kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi .card h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.kpi .card p {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 700;
}

.org-node {
  border-left: 4px solid var(--hermes-orange);
  background: #fff8f3;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.calendar {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.cal-head {
  font-weight: 700;
  margin-bottom: 8px;
  color: #374151;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.cal-cell {
  border: 1px solid #f1f3f5;
  border-radius: 8px;
  min-height: 34px;
  display: grid;
  place-items: center;
  font-size: 12px;
  background: #fff;
}

.cal-cell.empty {
  background: #fafafa;
}

.cal-cell.next-trip {
  border-color: var(--hermes-orange);
  background: #fff4ec;
  color: #9a3412;
  font-weight: 700;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.48);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 16px;
}

.modal-card {
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 16px;
}

@media (max-width: 900px) {
  .grid.two,
  .grid.three,
  .kpi {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .session-box {
    width: 100%;
    justify-content: space-between;
  }
}
