* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f1115;
  color: #e8eaed;
  min-height: 100vh;
}
a { color: #4f7cff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: #1f2230;
  border: 1px solid #2a2e3f;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.login-card h1 { margin: 0 0 24px; font-size: 22px; }

/* Layout */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: #14161e;
  border-right: 1px solid #2a2e3f;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}
.brand { font-size: 18px; font-weight: 700; padding: 0 12px 24px; }
.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: #c5c8d4;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 4px;
}
.nav-link:hover { background: #1f2230; text-decoration: none; }
.nav-link.active { background: #2a2e3f; color: #fff; }
.nav-section {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #6b7290;
  padding: 16px 12px 6px;
  font-weight: 600;
}
.sidebar-footer { margin-top: auto; padding: 12px; font-size: 13px; color: #6b7290; }
.sidebar-footer button { background: transparent; color: #ff8fa3; border: 0; cursor: pointer; padding: 4px 0; font-size: 13px; }

.content { flex: 1; padding: 32px; overflow: auto; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.page-header h2 { margin: 0; font-size: 22px; }

/* Forms */
label { display: block; font-size: 13px; color: #c5c8d4; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  background: #14161e;
  border: 1px solid #2a2e3f;
  border-radius: 8px;
  padding: 10px 12px;
  color: #e8eaed;
  font-size: 14px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #4f7cff; }
.field { margin-bottom: 14px; }

button.primary {
  background: #4f7cff;
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
button.primary:hover { background: #3d6bee; }
button.primary:disabled { background: #3a3f55; cursor: not-allowed; }
button.ghost, a.ghost {
  background: transparent;
  color: #c5c8d4;
  border: 1px solid #2a2e3f;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.ghost:hover, a.ghost:hover { background: #1f2230; text-decoration: none; }
button.danger {
  background: transparent;
  color: #ff8fa3;
  border: 1px solid #5c1f30;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}
button.danger:hover { background: #2a1620; }
button.success {
  background: #1f5c43;
  color: #6ee7b7;
  border: 0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
button.success:hover { background: #267354; }

/* Tables / Cards */
.card {
  background: #1f2230;
  border: 1px solid #2a2e3f;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.meta { font-size: 12px; color: #6b7290; margin-top: 4px; }
.reason { color: #c5c8d4; margin: 8px 0; font-size: 14px; line-height: 1.5; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-pending { background: #3a2e16; color: #f5c97c; }
.badge-approved { background: #163a2a; color: #6ee7b7; }
.badge-denied { background: #3a1620; color: #ff8fa3; }
.actions { display: flex; gap: 8px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #2a2e3f; font-size: 14px; }
th { color: #6b7290; font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
tr:last-child td { border-bottom: 0; }
.table-card { background: #1f2230; border: 1px solid #2a2e3f; border-radius: 12px; overflow: hidden; }

.error { background: #3a1620; border: 1px solid #5c1f30; color: #ff8fa3; padding: 12px; border-radius: 8px; font-size: 13px; margin-bottom: 12px; }
.empty { text-align: center; color: #6b7290; padding: 48px 24px; font-size: 14px; }
.spacer { flex: 1; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal {
  background: #1f2230;
  border: 1px solid #2a2e3f;
  border-radius: 12px;
  padding: 24px;
  max-width: 440px;
  width: 100%;
}
.modal h3 { margin: 0 0 16px; font-size: 18px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.filters { display: flex; gap: 12px; align-items: end; margin-bottom: 16px; flex-wrap: wrap; }
.filters .field { margin-bottom: 0; min-width: 160px; }

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: #c5c8d4;
  cursor: pointer;
}
.toggle-row input[type=checkbox] { width: auto; margin: 0; cursor: pointer; }

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #14161e;
  border: 1px solid #2a2e3f;
  border-radius: 8px;
  margin-bottom: 6px;
}

.config-banner {
  background: #3a2e16;
  border: 1px solid #5c4823;
  color: #f5c97c;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
