:root {
  --border: #e6e6e6;
  --text: #222;
  --muted: #6b6b6b;
  --bg: #fafafa;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
}
.brand {
  font-weight: 700;
  font-size: 22px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
}
.page-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.card {
  width: 240px;
  min-height: 120px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.card:hover {
  border-color: #cfcfcf;
}
.card__title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 6px;
}
.card__sub {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card.add {
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.card__icon {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}
.card__label {
  font-weight: 600;
}

.form {
  max-width: 640px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
label {
  font-weight: 600;
  font-size: 13px;
}
input[type="text"],
input[type="url"] {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}
input[type="file"] {
  font-size: 14px;
}
.error {
  color: #b00020;
  font-size: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
.btn.primary {
  background: #111;
  color: #fff;
  border-color: #111;
}
.btn.secondary {
  background: #fff;
  color: #111;
}

.alert {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  margin-bottom: 14px;
}
.alert.success {
  border-color: #bfe7c3;
  background: #f3fff4;
}

.card--resource {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-decoration: none;
}

.card__media {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  border-radius: 12px;
  overflow: hidden;
  background: #f4f6f8;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__mediaPlaceholder {
  font-size: 28px;
  opacity: 0.7;
}

.card__body {
  flex: 1;
  min-width: 0;
}

.card__meta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metaRow {
  display: flex;
  gap: 10px;
  line-height: 1.25;
}

.metaLabel {
  min-width: 110px;
  color: var(--muted);
  font-size: 12px;
}

.metaValue {
  font-size: 12px;
  color: #111;
}
.btn-logout {
  margin-left: auto;
  background: #f3f4f6;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}
.btn-logout:hover {
  background: #e5e7eb;
}
