/* WorkPulse brand styles – Deep navy #10243A, Teal #19B7A5 */

:root {
  --navy: #10243A;
  --teal: #19B7A5;
  --blue: #4C8DDA;
  --gold: #F5B942;
  --coral: #F07867;
  --off-white: #F5F8FC;
  --white: #FFFFFF;
  --slate: #60758A;
  --border: #E2E8F0;
  --shadow: 0 1px 3px rgba(16, 36, 58, 0.08);
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--off-white);
  color: var(--navy);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--navy);
  color: #fff;
  padding: 1.25rem 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar .brand {
  display: flex;
  columns: 2;
  align-items: center;
  padding: 0 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.sidebar .brand-icon {
  width: 36px;
  height: 36px;
  color: var(--navy);
  background: var(--teal);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 1000;
  font-size: 1.7rem;
  font-family: arial;
}

.sidebar .brand-text {
  font-family: arial;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.sidebar nav a {
  display: block;
  padding: 0.6rem 1.25rem;
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidebar nav a:hover,
.sidebar nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.06);
  border-left-color: var(--teal);
  text-decoration: none;
}

.sidebar .user-info {
  margin-top: auto;
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.main {
  flex: 1;
  padding: 1.75rem 2rem;
  overflow-x: auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 650;
  color: var(--navy);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--navy);
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
}

.stat-card .value.teal { color: var(--teal); }

/* Tables */
.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

table.data th,
table.data td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.data th {
  font-weight: 600;
  color: var(--slate);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #f8fafc;
}

table.data tr:hover td { background: #f8fafc; }

/* Forms */
.form-control, .form-select {
  display: block;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  transition: border-color 0.15s;
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(25, 183, 165, 0.2);
}

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-check-input { margin-right: 0.4rem; }

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 550;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover { background: #159e8e; text-decoration: none; color: #fff; }

.btn-secondary {
  background: var(--navy);
  color: #fff;
}
.btn-secondary:hover { background: #1a3550; text-decoration: none; color: #fff; }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--navy);
}
.btn-outline:hover { background: #f1f5f9; text-decoration: none; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.82rem; }

.btn-danger { background: var(--coral); color: #fff; }
.btn-danger:hover { background: #e05a4a; color: #fff; text-decoration: none; }

.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #e5a82e; color: var(--navy); text-decoration: none; }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--slate);
}

.badge-teal { background: rgba(25,183,165,0.15); color: #0d7a6e; }
.badge-gold { background: rgba(245,185,66,0.2); color: #9a6b00; }
.badge-coral { background: rgba(240,120,103,0.15); color: #c0392b; }
.badge-navy { background: rgba(16,36,58,0.1); color: var(--navy); }

/* Alerts / messages */
.messages { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.messages li {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.messages .success { background: rgba(25,183,165,0.12); color: #0d7a6e; }
.messages .error { background: rgba(240,120,103,0.12); color: #c0392b; }
.messages .info { background: rgba(76,141,218,0.12); color: #2a5f9e; }
.messages .warning { background: rgba(245,185,66,0.18); color: #9a6b00; }

/* Feedback form (customer-facing) */
.feedback-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, var(--navy) 0%, #1a3a5c 100%);
}

.feedback-card {
  background: var(--white);
  border-radius: 14px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.feedback-card h1 {
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}

.feedback-card .subtitle {
  color: var(--slate);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.rating-stars {
  display: flex;
  gap: 0.35rem;
  margin: 0.4rem 0 0.8rem;
}

.rating-stars button {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--slate);
  transition: all 0.12s;
}

.rating-stars button.active,
.rating-stars button:hover {
  border-color: var(--gold);
  background: rgba(245,185,66,0.15);
  color: #9a6b00;
}

/* QR display */
.qr-box {
  text-align: center;
  padding: 1rem;
}

.qr-box img {
  max-width: 200px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--slate);
}

.empty-state p { margin: 0.5rem 0 1rem; }

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--navy) 0%, #1a3a5c 100%);
  padding: 1.5rem;
}

.login-card {
  background: var(--white);
  border-radius: 14px;
  padding: 2.25rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.login-card .logo-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.login-card .logo-icon {
  width: 42px;
  height: 42px;
  background: var(--teal);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(3, 43, 129, 0.904);
  font-weight: 1000;
  font-size: 1.7rem;
}

.demo-accounts {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--slate);
}

.demo-accounts code {
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Warning banner */
.warning-banner {
  background: rgba(245,185,66,0.15);
  border: 1px solid rgba(245,185,66,0.4);
  color: #7a5500;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.75rem;
    align-items: center;
  }
  .sidebar .brand { border: none; margin: 0; padding: 0.5rem; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .sidebar nav a {
    border-left: none;
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
  }
  .sidebar .user-info { display: none; }
  .main { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
}
