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

body {
  background: #0a0a0a;
  color: #00fff2;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#roof-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#ui-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 20px;
  pointer-events: none;
}

#ui-overlay > * {
  pointer-events: auto;
}

h1 {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.5em;
  margin-bottom: 24px;
  text-shadow: 0 0 20px rgba(0, 255, 242, 0.5);
}

h1 .accent {
  font-weight: 700;
}

#address-form {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 560px;
}

#address-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 255, 242, 0.05);
  border: 1px solid rgba(0, 255, 242, 0.3);
  border-right: none;
  border-radius: 4px 0 0 4px;
  color: #00fff2;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#address-input::placeholder {
  color: rgba(0, 255, 242, 0.3);
}

#address-input:focus {
  border-color: #00fff2;
  box-shadow: 0 0 12px rgba(0, 255, 242, 0.2);
}

#submit-btn {
  padding: 12px 24px;
  background: rgba(0, 255, 242, 0.1);
  border: 1px solid rgba(0, 255, 242, 0.3);
  border-radius: 0 4px 4px 0;
  color: #00fff2;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

#submit-btn:hover {
  background: rgba(0, 255, 242, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 242, 0.3);
}

#submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#status-text {
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  min-height: 1.2em;
  text-align: center;
}

#status-text.error {
  color: #ff3366;
  text-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

#progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
  max-width: 560px;
}

#progress-wrap.hidden {
  display: none;
}

#progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(0, 255, 242, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

#progress-fill {
  height: 100%;
  width: 0%;
  background: #00fff2;
  box-shadow: 0 0 8px rgba(0, 255, 242, 0.5);
  border-radius: 2px;
  transition: width 0.3s ease;
}

#progress-pct {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  min-width: 3em;
  text-align: right;
}

/* --- Login page --- */

.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-box p {
  font-size: 0.85rem;
  margin-bottom: 24px;
  opacity: 0.6;
  letter-spacing: 0.05em;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-box input {
  padding: 12px 16px;
  background: rgba(0, 255, 242, 0.05);
  border: 1px solid rgba(0, 255, 242, 0.3);
  border-radius: 4px;
  color: #00fff2;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-box input::placeholder {
  color: rgba(0, 255, 242, 0.3);
}

.login-box input:focus {
  border-color: #00fff2;
  box-shadow: 0 0 12px rgba(0, 255, 242, 0.2);
}

.login-box input[readonly] {
  opacity: 0.6;
}

.login-box button[type="submit"] {
  padding: 12px 24px;
  background: rgba(0, 255, 242, 0.1);
  border: 1px solid rgba(0, 255, 242, 0.3);
  border-radius: 4px;
  color: #00fff2;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.login-box button[type="submit"]:hover {
  background: rgba(0, 255, 242, 0.2);
  box-shadow: 0 0 15px rgba(0, 255, 242, 0.3);
}

.login-box button[type="submit"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#login-status, #set-status {
  margin-top: 16px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  min-height: 1.4em;
}

#login-status.error, #set-status.error {
  color: #ff3366;
  text-shadow: 0 0 10px rgba(255, 51, 102, 0.4);
}

#login-status.success, #set-status.success {
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}

/* --- Admin panel --- */

.admin-wrap {
  min-height: 100vh;
  padding: 40px 32px;
  max-width: 1000px;
  margin: 0 auto;
  overflow-y: auto;
}

body:has(.admin-wrap) {
  overflow: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.admin-header h1 {
  font-size: 1.5rem;
  margin: 0;
}

.admin-tag {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  opacity: 0.5;
  margin-left: 16px;
}

.admin-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-links a,
.admin-links button {
  color: #00fff2;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  background: transparent;
  border: 1px solid rgba(0, 255, 242, 0.3);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.admin-links a:hover,
.admin-links button:hover {
  background: rgba(0, 255, 242, 0.1);
}

.admin-section {
  margin-bottom: 40px;
  padding: 24px;
  border: 1px solid rgba(0, 255, 242, 0.2);
  border-radius: 4px;
}

.admin-section h2 {
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 16px;
  opacity: 0.8;
}

#add-form {
  display: flex;
  gap: 12px;
}

#add-form input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(0, 255, 242, 0.05);
  border: 1px solid rgba(0, 255, 242, 0.3);
  border-radius: 4px;
  color: #00fff2;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
}

#add-form input::placeholder {
  color: rgba(0, 255, 242, 0.3);
}

#add-form input:focus {
  border-color: #00fff2;
}

#add-form button {
  padding: 10px 20px;
  background: rgba(0, 255, 242, 0.1);
  border: 1px solid rgba(0, 255, 242, 0.3);
  border-radius: 4px;
  color: #00fff2;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
}

#add-form button:hover {
  background: rgba(0, 255, 242, 0.2);
}

#add-status, #users-status {
  margin-top: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  min-height: 1.2em;
}

#add-status.error, #users-status.error {
  color: #ff3366;
}

#add-status.success, #users-status.success {
  color: #00ff88;
}

#users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

#users-table th,
#users-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 255, 242, 0.1);
}

#users-table th {
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  opacity: 0.6;
}

.pill-active {
  color: #00ff88;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.pill-pending {
  color: #ffaa00;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

button.mini {
  padding: 6px 12px;
  background: rgba(0, 255, 242, 0.08);
  border: 1px solid rgba(0, 255, 242, 0.2);
  border-radius: 3px;
  color: #00fff2;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

button.mini:hover {
  background: rgba(0, 255, 242, 0.15);
}

button.mini.danger {
  color: #ff3366;
  border-color: rgba(255, 51, 102, 0.4);
  background: rgba(255, 51, 102, 0.05);
}

button.mini.danger:hover {
  background: rgba(255, 51, 102, 0.15);
}
