@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f4f5f8;
  color: #1e2130;
  letter-spacing: -0.01em;
}

h1, h3, .brand, .btn { letter-spacing: -0.015em; }

a { color: #5b2a86; }

.topbar {
  background: #1f1147;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar a { color: #fff; text-decoration: none; font-size: .9rem; }
.topbar .brand { font-weight: 700; font-size: 1.1rem; }
.topbar nav { display: flex; gap: 16px; align-items: center; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.page-title h1 { font-size: 1.4rem; margin: 0; }

.btn {
  display: inline-block;
  background: #5b2a86;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .9rem;
  cursor: pointer;
  text-decoration: none;
}

.btn.secondary { background: #e4e4ec; color: #333; }
.btn.danger { background: #c62828; }

.card {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  margin-bottom: 20px;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eee; font-size: .9rem; }
th { color: #777; font-weight: 600; font-size: .8rem; text-transform: uppercase; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .75rem;
  background: #e6f4ea;
  color: #1e7a34;
}
.badge.off { background: #fbe9e7; color: #b0392a; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: .85rem; color: #555; }
.field input[type="text"], .field input[type="color"], .field input[type="password"], .field select {
  padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem;
}

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row .field { flex: 1; min-width: 140px; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.gallery figure {
  margin: 0;
  background: #fafafa;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
}

.gallery img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

.gallery figcaption { padding: 8px 10px; font-size: .78rem; }
.gallery figcaption .g-name { font-weight: 600; display: block; }
.gallery figcaption .g-msg { color: #666; display: block; margin-top: 2px; }
.gallery figcaption .g-date { color: #999; display: block; margin-top: 4px; font-size: .7rem; }

.gallery .g-actions { padding: 0 10px 10px; }
.gallery .g-actions a, .gallery .g-actions button {
  font-size: .72rem; color: #c62828; background: none; border: none; cursor: pointer; padding: 0;
  text-decoration: underline;
}

.search-bar { margin-bottom: 16px; display: flex; gap: 8px; }
.search-bar input { flex: 1; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: .9rem; }
.alert.error { background: #fbe9e7; color: #b0392a; }
.alert.success { background: #e6f4ea; color: #1e7a34; }

.qr-box { text-align: center; }
.qr-box img { max-width: 260px; width: 100%; }
.qr-link { word-break: break-all; font-size: .85rem; color: #555; }
