/* Squared Away Employee Portal — shared design system (no build step). */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --nav: #0b1f3a;
  --nav-2: #12294d;
  --surface: #ffffff;
  --surface-soft: #f6f9fc;
  --line: #dbe7f1;
  --line-soft: #edf3f8;
  --text: #102033;
  --muted: #667085;
  --danger: #dc2626;
  --success: #16a34a;
  --warn: #d97706;
  --primary: #0077ff;
  --primary-ink: #ffffff;
  --shadow: rgba(16, 32, 51, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --tap: 48px;
}
html, body { height: 100%; }
body {
  min-height: 100%;
  background: var(--surface-soft);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
h1 { font-size: 22px; letter-spacing: -0.01em; }
h2 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Buttons — large tap targets for mobile */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border: 1px solid transparent;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 600;
  cursor: pointer; background: var(--surface); color: var(--text);
  border-color: var(--line); transition: filter .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: transparent; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 1px 2px var(--shadow);
}
.pad { padding: 16px; }

/* Inputs */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input, select, textarea {
  width: 100%; min-height: var(--tap); padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-soft); color: var(--muted); }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-err { background: #fee2e2; color: #991b1b; }

/* Employee mobile app frame */
.app { max-width: 520px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
.app-top {
  position: sticky; top: 0; z-index: 20; background: var(--nav); color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top));
}
.app-top .brand { font-weight: 700; font-size: 16px; letter-spacing: .01em; }
.app-top .spacer { flex: 1; }
.app-body { flex: 1; padding: 16px; }
.app-tabs {
  position: sticky; bottom: 0; z-index: 20; background: var(--surface);
  border-top: 1px solid var(--line); display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.app-tabs a {
  flex: 1; text-align: center; padding: 10px 4px 8px; color: var(--muted);
  font-size: 11px; font-weight: 600; display: flex; flex-direction: column; gap: 3px;
}
.app-tabs a .fa-duotone { font-size: 20px; }
.app-tabs a.active { color: var(--primary); }

/* Admin desktop frame */
.admin { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side { background: var(--nav); color: #cdd9e8; padding: 18px 12px; }
.admin-side .brand { color: #fff; font-weight: 700; font-size: 16px; padding: 6px 10px 16px; display: flex; align-items: center; gap: 10px; }
.admin-side nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: #cdd9e8; font-weight: 600; font-size: 14px; }
.admin-side nav a:hover { background: var(--nav-2); color: #fff; }
.admin-side nav a.active { background: var(--primary); color: #fff; }
.admin-main { padding: 24px 28px; }
.admin-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.admin-header .spacer { flex: 1; }
@media (max-width: 820px) { .admin { grid-template-columns: 1fr; } .admin-side { display: none; } }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.stat { padding: 16px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }

.center-screen { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom)); background: var(--nav); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; z-index: 100; box-shadow: 0 6px 20px var(--shadow); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
