/* RecycleSecure Hub — shared styles. Light theme matching the compliance app. */

:root {
  --bg: #ffffff;
  --bg2: #f7f7f5;
  --bg3: #f0efe9;
  --text: #1a1a18;
  --text2: #5a5a57;
  --text3: #9a9a96;
  --border: rgba(0, 0, 0, 0.1);
  --border2: rgba(0, 0, 0, 0.18);
  --accent: #185fa5;
  --accent-light: #e6f1fb;
  --accent-dark: #0c447c;
  --success: #3b6d11;
  --success-light: #eaf3de;
  --warn: #854f0b;
  --warn-light: #faeeda;
  --danger: #a32d2d;
  --danger-light: #fcebeb;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 18px 40px rgba(18, 26, 33, 0.10);
  --shadow-sm: 0 4px 12px rgba(18, 26, 33, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg2);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

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

/* === Centred form layouts (login, first-setup, invite) === */

.center-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.brand {
  text-align: center;
  margin-bottom: 32px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
}

.brand-tagline {
  font-size: 13px;
  color: var(--text2);
  margin-top: 4px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  width: 100%;
  max-width: 420px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text2);
  margin: 0 0 24px 0;
}

label.field {
  display: block;
  margin-bottom: 16px;
}

label.field span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="email"],
input[type="password"],
input[type="text"],
select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  width: 100%;
}

.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-primary:disabled { background: var(--text3); border-color: var(--text3); cursor: not-allowed; }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border2);
}

.btn-secondary:hover { background: var(--bg2); }

.btn-danger {
  background: var(--bg);
  color: var(--danger);
  border-color: var(--danger-light);
}

.btn-danger:hover { background: var(--danger-light); }

.error-message {
  background: var(--danger-light);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.info-message {
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.success-message {
  background: var(--success-light);
  color: var(--success);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.foot-link {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text2);
}

/* === Landing page (tile grid) === */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-brand .brand-logo {
  width: 36px;
  height: 36px;
  font-size: 15px;
  border-radius: 10px;
  margin-bottom: 0;
}

.topbar-brand .label {
  display: flex;
  flex-direction: column;
}

.topbar-brand .label .name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.topbar-brand .label .role {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text2);
}

.topbar-user a {
  color: var(--text2);
}

.main-content {
  flex: 1;
  padding: 48px 24px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text2);
  margin: 0 0 32px 0;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent-light);
  text-decoration: none;
}

.tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.tile-icon.compliance { background: var(--accent); }
.tile-icon.operations { background: var(--success); }
.tile-icon.admin { background: var(--text2); }

.tile-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.tile-description {
  font-size: 13px;
  color: var(--text2);
  margin: 0;
  flex: 1;
}

.tile-footer {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* === Admin users table === */

.data-table {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  text-align: left;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.data-table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-admin { background: var(--accent-light); color: var(--accent); }
.badge-member { background: var(--bg3); color: var(--text2); }
.badge-active { background: var(--success-light); color: var(--success); }
.badge-disabled { background: var(--danger-light); color: var(--danger); }

.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 18px 0;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}

/* === Responsive === */

@media (max-width: 600px) {
  .main-content { padding: 24px 16px; }
  .card { padding: 24px; }
  .topbar { padding: 12px 16px; }
}
