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

:root {
  --color-bg: #f3f4f6;
  --color-card: #ffffff;
  --color-accent: #e85b5b;
  --color-text: #2c2c2c;
  --color-text-muted: #6b7280;
  --color-online: #62b369;
  --color-offline: #b8b8b8;
  --color-disabled: #d1d5db;
  --color-border: #e5e7eb;
  --radius: 14px;
  --blur: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

html, body {
  height: 100%;
  font-family: -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hidden {
  display: none !important;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 12px 200px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 12px;
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 10;
}

.app-title {
  font-size: 23px;
  font-weight: 700;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: var(--color-text-muted);
  transition: background 0.15s;
}

.btn-icon:hover {
  background: var(--color-border);
}

.action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: 8px;
}

.btn-action {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--color-accent);
  transition: opacity 0.15s;
}

.btn-action:hover:not(:disabled) {
  opacity: 0.88;
}

.grid-placeholder {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 0;
}


.unauthorized-screen {
  text-align: center;
  padding: 60px 16px;
}

.unauthorized-screen h2 {
  font-size: 16px;
  color: #b91c1c;
  margin-bottom: 8px;
}

.unauthorized-screen p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.unauthorized-screen button {
  color: var(--color-accent);
  font-weight: 600;
}
