:root {
  --brand: #714b67;
  --brand-dark: #5b3b53;
  --bg: #f0eeee;
  --card: #ffffff;
  --border: #e2dfe1;
  --text: #2b2523;
  --muted: #7c7570;
  --success: #28a745;
  --error: #d9534f;
  --warning: #e0a638;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.navbar {
  background: var(--brand);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 46px;
}

.navbar .brand {
  font-weight: 600;
  margin-right: 24px;
  white-space: nowrap;
}

.navbar a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0 12px;
  height: 46px;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.navbar a:hover, .navbar a.active {
  background: var(--brand-dark);
  color: white;
}

.navbar .spacer { flex: 1; }

.navbar form { margin: 0; }

.navbar .btn-sync {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  padding: 6px 14px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
}
.navbar .btn-sync:hover { background: rgba(255, 255, 255, 0.28); }

.content { padding: 20px 28px; max-width: 1200px; margin: 0 auto; }

h1 { font-size: 20px; font-weight: 600; margin: 0 0 16px; }
h2 { font-size: 16px; font-weight: 600; }

.flash {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 14px;
  font-size: 14px;
}
.flash.success { background: #e6f4ea; color: #1e7e34; border: 1px solid #bde3c8; }
.flash.error { background: #fbeaea; color: #a12622; border: 1px solid #f0c4c2; }
.flash.info { background: #eaf1fb; color: #2c5aa0; border: 1px solid #c6dcf5; }

.stat-row { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 20px;
  min-width: 160px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.stat-card .num { font-size: 26px; font-weight: 700; color: var(--brand); }
.stat-card .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
th, td { padding: 8px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); }
th { background: #f7f5f6; color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 11px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #faf8f9; }

.filters {
  display: flex; gap: 10px; align-items: end; margin-bottom: 16px; flex-wrap: wrap;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: var(--muted); text-transform: uppercase; }
input, select, textarea {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 13px;
  font-family: inherit;
}
textarea { resize: vertical; }

.btn {
  background: var(--brand);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { background: var(--brand-dark); }
.btn-outline {
  background: white;
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn-outline:hover { background: #f5eef3; }
.btn-danger { background: var(--error); }
.btn-danger:hover { background: #b52b27; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px;
  max-width: 480px;
}
.form-card .field { margin-bottom: 14px; width: 100%; }
.form-card input, .form-card textarea { width: 100%; }

.kanban { display: flex; gap: 16px; align-items: flex-start; }
.kanban-col { flex: 1; min-width: 260px; }
.kanban-col h2 {
  background: #e7e2e5; padding: 8px 12px; border-radius: 4px 4px 0 0; margin: 0;
  display: flex; justify-content: space-between;
}
.kanban-col .count { color: var(--muted); font-weight: 400; }
.kanban-cards { background: #e9e6e7; padding: 10px; border-radius: 0 0 4px 4px; min-height: 60px; }

.kcard {
  background: var(--card);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  font-size: 13px;
}
.kcard .emp { font-weight: 600; }
.kcard .date { color: var(--muted); font-size: 12px; }
.kcard .reason { margin: 6px 0; }
.kcard .meta { color: var(--muted); font-size: 11px; }
.kcard .actions { margin-top: 8px; display: flex; gap: 6px; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
}
.badge.pending { background: #fdf1dc; color: var(--warning); }
.badge.approved { background: #e6f4ea; color: var(--success); }
.badge.rejected { background: #fbeaea; color: var(--error); }

.login-wrap {
  display: flex; align-items: center; justify-content: center; height: 100vh;
}
.login-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 32px; width: 320px; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.login-card h1 { color: var(--brand); text-align: center; }

.pagination { margin-top: 14px; display: flex; gap: 8px; }
.muted { color: var(--muted); }
