* { box-sizing: border-box; }
body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px;
  color: #1b1f23;
  background: #f6f7f9;
}
a { color: #0b5fff; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin-top: 0; }
header.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #dde1e6;
  margin-bottom: 20px;
  padding-bottom: 12px;
}
table { width: 100%; border-collapse: collapse; margin: 12px 0; background: #fff; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #ebedf0; font-size: 14px; }
th { background: #f0f2f5; }
.card {
  background: #fff;
  border: 1px solid #dde1e6;
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
}
label { display: block; font-size: 13px; margin: 10px 0 4px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #c9ced6;
  border-radius: 5px;
  font-size: 14px;
}
button, .btn {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  background: #0b5fff;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}
button.secondary, .btn.secondary { background: #6b7280; }
button.danger, .btn.danger { background: #d33; }
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.badge.pending { background: #d69e2e; }
.badge.active { background: #2f9e44; }
.badge.suspended { background: #d33; }
.badge.cancelled { background: #4a5568; }
.muted { color: #6b7280; font-size: 13px; }

/* Signed-in navigation */
nav.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 10px 0 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid #dde1e6;
  font-size: 14px;
}
nav.nav .spacer { flex: 1; }
nav.nav form { display: inline; }
button.small { margin-top: 0; padding: 4px 10px; font-size: 13px; }
body.wide { max-width: 1100px; }

/* AutoKhata dashboard */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid #dde1e6; border-radius: 8px; padding: 12px 14px; }
.tile .n { font-size: 24px; font-weight: 700; }
.tile .l { font-size: 13px; color: #6b7280; }
.tile.warn .n { color: #b45309; }
.tile.bad .n { color: #d33; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; }
.msg.ok { background: #e6f6ea; color: #1f6f33; border: 1px solid #b7e1c1; }
.msg.err { background: #fdecec; color: #a12020; border: 1px solid #f3c1c1; }
.badge.pro { background: #2f9e44; }
.badge.trial { background: #0b5fff; }
.badge.grace { background: #d69e2e; }
.badge.free { background: #6b7280; }
.badge.flag { background: #d33; }
.badge.void { background: #4a5568; }
.code { font-family: Consolas, Menlo, monospace; font-size: 15px; letter-spacing: 1px; }
textarea.pass { font-family: Consolas, Menlo, monospace; font-size: 12px; height: 90px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 140px; }
.inline { display: inline; }
details summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
tr.void td { color: #9aa0a6; text-decoration: line-through; }
.right { text-align: right; }
