:root {
  --navy: #17233c;
  --blue: #3158a6;
  --blue-dark: #24467f;
  --sky: #eef4ff;
  --green: #198754;
  --amber: #b7791f;
  --red: #b42318;
  --text: #172033;
  --muted: #687386;
  --border: #dfe5ee;
  --surface: #ffffff;
  --background: #f4f7fb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #edf3fb 0%, #f8fafc 100%);
}

.hidden { display: none !important; }
.app-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.card, .modal-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 45px rgba(23, 35, 60, .10);
}
.login-card { width: min(420px, 100%); padding: 42px; text-align: center; }
.brand-mark {
  width: 58px; height: 58px; margin: 0 auto 18px; display: grid; place-items: center;
  border-radius: 14px; background: var(--navy); color: #fff; font-weight: 800; letter-spacing: 1px;
}
.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.login-card h1 { margin-bottom: 6px; font-size: 28px; }
.subtitle { color: var(--muted); margin-bottom: 28px; }
.form-stack { display: flex; flex-direction: column; gap: 10px; text-align: left; }
label { color: #3d4657; font-size: 13px; font-weight: 700; }
input, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  color: var(--text); font: inherit; padding: 12px 13px; outline: none;
}
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49, 88, 166, .12); }
.primary-button, .secondary-button, .ghost-button {
  border: 0; border-radius: 8px; min-height: 44px; padding: 10px 16px; font-weight: 800; cursor: pointer;
}
.primary-button { background: var(--blue); color: #fff; }
.primary-button:hover { background: var(--blue-dark); }
.secondary-button { background: #edf0f5; color: var(--text); }
.ghost-button { border: 1px solid var(--border); background: #fff; color: var(--navy); }
.message { min-height: 20px; color: var(--red); font-size: 13px; margin: 12px 0 0; text-align: left; }

.dashboard { width: min(980px, 100%); align-self: start; margin: 48px auto; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dashboard-header h1 { margin: 0; }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.profile-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.profile-card span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .7px; }
.profile-card strong { font-size: 16px; }
.actions-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.action-button { min-height: 110px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); display: flex; align-items: center; gap: 16px; padding: 20px; text-align: left; cursor: pointer; }
.action-button:hover { border-color: var(--blue); transform: translateY(-1px); }
.action-button span:last-child { display: flex; flex-direction: column; gap: 6px; }
.action-button small { color: var(--muted); }
.action-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 50%; background: var(--sky); color: var(--blue); font-size: 18px; font-weight: 800; }
.leave-action .action-icon { background: #fff6df; color: #9a6700; }
.weekend-notice { border: 1px solid #f1d58a; border-radius: 12px; background: #fffaf0; padding: 30px; text-align: center; color: #75520a; }
.weekend-notice strong { display: block; margin-bottom: 8px; letter-spacing: 1px; }
.weekend-notice p { margin: 4px 0; }

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 20, 38, .58); }
.modal-panel { position: relative; z-index: 1; width: min(520px, 100%); padding: 28px; max-height: 92vh; overflow-y: auto; }
.modal-panel h2 { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row > div { display: flex; flex-direction: column; gap: 8px; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.modal-actions button { flex: 1; }
.day-count { border: 1px solid var(--border); border-radius: 8px; background: var(--background); padding: 11px 13px; font-weight: 800; }
.success-panel { text-align: center; }
.success-icon { width: 58px; height: 58px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: #dff5e8; color: var(--green); font-size: 28px; }
.success-details { margin: 18px 0 22px; text-align: left; border-radius: 10px; background: var(--background); padding: 16px; }
.success-details p { display: flex; justify-content: space-between; gap: 12px; margin: 8px 0; }
.success-details span { color: var(--muted); }

@media (max-width: 680px) {
  .app-shell { align-items: start; padding: 14px; }
  .login-card { margin-top: 40px; padding: 28px 20px; }
  .dashboard { margin: 22px auto; }
  .dashboard-header { align-items: flex-start; }
  .profile-grid, .action-grid, .field-row { grid-template-columns: 1fr; }
  .profile-card { padding: 16px; }
  .action-button { min-height: 92px; }
  .modal-actions { flex-direction: column; }
}
