/* Pop The Cap — shared app styles (extracted from the old inline dashboard theme) */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 2rem;
  color: #1a1a1a;
}

.container { max-width: 1100px; margin: 0 auto; }

.header {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.header .brand { display: flex; align-items: center; gap: 1rem; }
.header h1 { color: #1a1a1a; font-size: 1.6rem; }
.header a.brand-link { text-decoration: none; color: inherit; }

.account-type, .pill {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, opacity .15s;
  background: #667eea;
  color: white;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,.15); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-danger { background: #f44336; }
.btn-secondary { background: #6c757d; }
.btn-block { width: 100%; }

.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}
.card h2 { color: #333; margin-bottom: 1.25rem; font-size: 1.35rem; }

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

.stat { display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid #eee; }
.stat:last-child { border-bottom: none; }
.stat-label { color: #666; font-weight: 500; }
.stat-value { color: #1a1a1a; font-weight: 700; font-size: 1.05rem; }
.balance-highlight { color: #4CAF50; font-size: 1.75rem; font-weight: 700; }

.activity-item { padding: 0.85rem 1rem; border-left: 3px solid #667eea; background: #f8f9ff; margin-bottom: 0.75rem; border-radius: 0.25rem; }
.activity-type { font-weight: 600; color: #667eea; margin-bottom: 0.2rem; font-size: .9rem; }
.activity-desc { color: #666; font-size: .9rem; }
.activity-time { color: #999; font-size: .78rem; margin-top: .35rem; }

.loading { text-align: center; padding: 3rem; color: white; font-size: 1.1rem; }
.error { background: #fee; color: #c00; padding: 1rem; border-radius: 0.5rem; margin-bottom: 1rem; }
.muted { color: #999; text-align: center; }
.center { text-align: center; }

/* Auth forms */
.auth-wrap { display: flex; justify-content: center; align-items: flex-start; padding-top: 3rem; }
.auth-card { background: rgba(255,255,255,.97); border-radius: 1rem; padding: 2.5rem; box-shadow: 0 20px 50px rgba(0,0,0,.2); width: 100%; max-width: 440px; }
.auth-card h1 { margin-bottom: .5rem; font-size: 1.6rem; }
.auth-card .sub { color: #666; margin-bottom: 1.75rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; color: #444; }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .9rem; border: 1px solid #ccc; border-radius: .5rem; font-size: 1rem; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,.15); }
.role-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.1rem; }
.role-toggle label {
  border: 2px solid #ddd; border-radius: .6rem; padding: 1rem; cursor: pointer; text-align: center; transition: all .15s;
}
.role-toggle input { display: none; }
.role-toggle input:checked + .role-box { border-color: #667eea; background: #f0f2ff; }
.role-box .role-name { font-weight: 700; color: #333; }
.role-box .role-desc { font-size: .78rem; color: #777; margin-top: .2rem; }
.auth-foot { text-align: center; margin-top: 1.25rem; font-size: .9rem; color: #666; }
.auth-foot a { color: #667eea; font-weight: 600; text-decoration: none; }

/* Tables */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .7rem .6rem; text-align: left; border-bottom: 1px solid #eee; font-size: .92rem; }
.table th { color: #666; font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
.table tr:hover td { background: #fafafe; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; }
.tag { display: inline-block; padding: .15rem .6rem; border-radius: 1rem; font-size: .75rem; font-weight: 600; }
.tag-active { background: #e6f4ea; color: #1e7e34; }
.tag-pending { background: #fff8e1; color: #b8860b; }
.tag-paused { background: #f0f0f0; color: #555; }
.tag-other { background: #eef; color: #667eea; }

/* Toast */
#toast-root { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; }
.toast { padding: .85rem 1.2rem; border-radius: .5rem; color: white; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: slidein .2s ease; max-width: 360px; }
.toast-error { background: #f44336; }
.toast-success { background: #4CAF50; }
.toast-info { background: #333; }
@keyframes slidein { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

code.copy-block { display: block; background: #1e1e2e; color: #e0e0e0; padding: .85rem 1rem; border-radius: .4rem; font-family: ui-monospace, monospace; font-size: .82rem; white-space: pre-wrap; word-break: break-all; }
