* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
}

/* Login */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-card {
  background: #fff;
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 8px 24px rgba(0,0,0,.06);
}

.logo {
  text-align: center;
  margin-bottom: 2rem;
}

.logo h1 {
  font-size: 1.5rem;
  margin-top: .5rem;
  color: #1e293b;
}

.logo p {
  color: #64748b;
  font-size: .875rem;
  margin-top: .25rem;
}

/* Form */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: .375rem;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: .625rem .75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: .9375rem;
  transition: border-color .15s;
  outline: none;
}

input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.input-suffix {
  display: flex;
  align-items: center;
  gap: 0;
}

.input-suffix input {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.input-suffix span {
  background: #f1f5f9;
  border: 1px solid #d1d5db;
  border-left: none;
  border-radius: 0 8px 8px 0;
  padding: .625rem .75rem;
  font-size: .875rem;
  color: #64748b;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem 1rem;
  border: none;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}

.btn-primary {
  background: #4f46e5;
  color: #fff;
}

.btn-primary:hover { background: #4338ca; }

.btn-ghost {
  background: transparent;
  color: #64748b;
}

.btn-ghost:hover { background: #f1f5f9; color: #1e293b; }

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover { background: #dc2626; }

.btn-danger-ghost {
  background: transparent;
  color: #ef4444;
}

.btn-danger-ghost:hover { background: #fef2f2; }

.btn-full { width: 100%; padding: .75rem; }

.btn-sm { padding: .375rem .75rem; font-size: .8125rem; }

/* Header */
header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.header-left h1 {
  font-size: 1.125rem;
  font-weight: 600;
}

.badge {
  background: #eef2ff;
  color: #4f46e5;
  font-size: .75rem;
  font-weight: 500;
  padding: .125rem .5rem;
  border-radius: 99px;
}

/* Main */
main {
  max-width: 800px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.toolbar h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

/* Account List */
.account-list {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  overflow: hidden;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  transition: background .1s;
}

.account-row:last-child { border-bottom: none; }
.account-row:hover { background: #fafbfc; }

.account-info {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.account-email {
  font-size: .9375rem;
  font-weight: 500;
}

.account-actions {
  display: flex;
  gap: .5rem;
}

/* Loading / Empty */
.loading, .empty-state {
  text-align: center;
  padding: 3rem;
  color: #94a3b8;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.4);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

.modal-content h3 {
  font-size: 1.125rem;
  margin-bottom: .25rem;
}

.modal-sub {
  color: #64748b;
  font-size: .875rem;
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1.25rem;
}

.modal-danger h3 { color: #dc2626; }

/* Error */
.error-msg {
  margin-top: .75rem;
  padding: .625rem;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 8px;
  font-size: .875rem;
  text-align: center;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: .75rem 1.25rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  z-index: 200;
  transition: opacity .3s;
}

.toast-success { background: #059669; color: #fff; }
.toast-error { background: #dc2626; color: #fff; }

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 640px) {
  .account-row {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }
  .account-actions { align-self: flex-end; }
}
