:root {
  --navy: #2B3A4A;
  --navy-dark: #1E3A5C;
  --accent: #4A90C2;
  --bg-light-1: #D7EAF9;
  --bg-light-2: #E4EEFB;
  --bg-light-3: #F2F5FC;
  --danger: #B3261E;
  --ok: #1A7A3C;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-light-3);
  color: var(--navy);
  padding-bottom: 72px; /* chừa chỗ cho thanh tab dưới cùng */
}

.app-header {
  background: var(--navy);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-header h1 { font-size: 18px; margin: 0; font-weight: 600; }
.app-header button.link { background: none; border: none; color: var(--bg-light-1); font-size: 14px; cursor: pointer; }

.container { max-width: 480px; margin: 0 auto; padding: 16px; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(43, 58, 74, 0.08);
}

label { display: block; font-size: 14px; margin: 12px 0 4px; color: var(--navy); }
input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--bg-light-1);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: var(--navy);
}
textarea { resize: vertical; min-height: 70px; }

button.primary {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}
button.primary:disabled { opacity: 0.6; cursor: default; }
button.secondary {
  width: 100%;
  padding: 12px;
  background: var(--bg-light-2);
  color: var(--navy);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
}

.msg-error { color: var(--danger); font-size: 14px; margin-top: 8px; }
.msg-ok { color: var(--ok); font-size: 14px; margin-top: 8px; }

.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--bg-light-1);
  display: flex;
  z-index: 10;
}
.tabbar button {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  font-size: 13px;
  color: var(--navy);
  cursor: pointer;
}
.tabbar button.active { color: var(--accent); font-weight: 700; }

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.badge-staff { background: var(--bg-light-1); color: var(--navy-dark); }
.badge-customer { background: #F5E9D7; color: #7A5A1A; }
.badge-scheduled { background: var(--bg-light-1); color: var(--navy-dark); }
.badge-completed { background: #D9F0DE; color: var(--ok); }
.badge-cancelled, .badge-no_show { background: #F5D9D7; color: var(--danger); }

.photo-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.photo-grid img {
  width: 84px; height: 84px; object-fit: cover; border-radius: 8px;
  background: var(--bg-light-2);
}

.timeline-item { border-left: 3px solid var(--bg-light-1); padding-left: 12px; margin-bottom: 18px; }
.timeline-date { font-size: 13px; color: var(--navy-dark); font-weight: 600; margin-bottom: 4px; }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(30, 58, 92, 0.45);
  display: flex; align-items: flex-end; justify-content: center; z-index: 20;
}
.modal-sheet {
  background: #fff; width: 100%; max-width: 480px; border-radius: 16px 16px 0 0;
  padding: 20px; max-height: 85vh; overflow-y: auto;
}
.modal-sheet h2 { margin-top: 0; font-size: 17px; }

.empty-state { text-align: center; color: var(--navy-dark); opacity: 0.7; padding: 32px 0; font-size: 14px; }

.hidden { display: none !important; }
