/* ── ADDLY — style.css ──────────────────────────────────────────────────── */
:root {
  --bg:        #0f0f0f;
  --bg2:       #1a1a1a;
  --bg3:       #252525;
  --border:    #2e2e2e;
  --text:      #e8e8e8;
  --text2:     #9a9a9a;
  --orange:    #f7931a;
  --orange2:   #e07d10;
  --red:       #e05252;
  --green:     #4caf7d;
  --radius:    8px;
  --radius-lg: 14px;
  --shadow:    0 2px 16px rgba(0,0,0,.45);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: var(--bg3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: .85em;
  color: var(--orange);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--bg2); border-color: #444; text-decoration: none; }
.btn-primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #000;
  font-weight: 600;
}
.btn-primary:hover { background: var(--orange2); border-color: var(--orange2); }
.btn-ghost  { background: transparent; border-color: transparent; color: var(--text2); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-danger { border-color: var(--red); color: var(--red); background: transparent; }
.btn-danger:hover { background: rgba(224,82,82,.12); }
.btn-success { border-color: var(--green); color: var(--green); background: transparent; }
.btn-sm  { padding: 4px 10px; font-size: 13px; }
.btn-lg  { padding: 10px 24px; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.alert-error   { background: rgba(224,82,82,.15); border: 1px solid rgba(224,82,82,.4); color: #f08080; }
.alert-success { background: rgba(76,175,125,.12); border: 1px solid rgba(76,175,125,.35); color: #6fcf97; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.badge-recur { background: rgba(247,147,26,.18); color: var(--orange); }

/* ══════════════════════════════════════════════════════
   PUBLIC EVENT PAGE
══════════════════════════════════════════════════════ */
.event-body { background: var(--bg); }

.event-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 0 60px;
}

.event-hero {
  width: 100%;
  max-height: 360px;
  overflow: hidden;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.event-hero img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

.event-card {
  margin: 0 16px;
  padding: 32px 28px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: -24px;
  position: relative;
  box-shadow: var(--shadow);
}

.event-title {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #fff;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
}
.meta-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.tz { font-size: 12px; color: var(--text2); margin-left: 4px; }

.event-description {
  color: var(--text);
  margin-bottom: 28px;
  line-height: 1.7;
}

.calendar-section {
  margin-top: 8px;
}
.calendar-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text2);
  margin-bottom: 14px;
}

.event-footer {
  text-align: center;
  color: var(--text2);
  font-size: 12px;
  margin-top: 28px;
  opacity: .5;
}

/* ══════════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════════ */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-wrap { width: 100%; max-width: 380px; padding: 20px; }
.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.login-logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 4px;
  letter-spacing: -1px;
}
.login-sub {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 28px;
}

/* ══════════════════════════════════════════════════════
   ADMIN LAYOUT
══════════════════════════════════════════════════════ */
.admin-body { background: var(--bg); min-height: 100vh; }

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.5px;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: var(--text2);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: color .15s;
}
.nav-link:hover { color: var(--text); text-decoration: none; }

.admin-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* ── Events list ─────────────────────────────────────────────────────────── */
.events-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .15s;
}
.event-row:hover { border-color: #3a3a3a; }

.event-thumb-wrap { flex-shrink: 0; }
.event-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}
.event-thumb-placeholder {
  width: 56px;
  height: 56px;
  background: var(--bg3);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.event-info { flex: 1; min-width: 0; }
.event-name {
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-date {
  font-size: 13px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.event-link-text {
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .6;
}

.event-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text2);
}
.empty-state p { margin-bottom: 16px; }

/* ── Form ────────────────────────────────────────────────────────────────── */
.event-form { display: flex; flex-direction: column; gap: 0; }

.form-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}
.form-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.req { color: var(--orange); }
.hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text2); }

.input-full {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.input-full:focus { border-color: var(--orange); }
.input-full::placeholder { color: #555; }

select.input-full { cursor: pointer; }
select.input-full option { background: var(--bg2); }

.textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.textarea-sm { min-height: 60px; }

.hint-text { font-size: 12px; color: var(--text2); display: block; margin-top: 6px; }
.section-hint { font-size: 13px; color: var(--text2); margin-top: -12px; margin-bottom: 20px; }

.current-image { margin-bottom: 10px; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 16px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .event-row { flex-wrap: wrap; }
  .event-actions { width: 100%; flex-wrap: wrap; }
  .event-card { margin: -20px 8px 0; padding: 20px 16px; }
  .admin-main { padding: 20px 16px; }
  .event-title { font-size: 1.5rem; }
  .page-header { flex-wrap: wrap; gap: 12px; }
}

/* ── OG Link Preview Card ─────────────────────────────────────────────────── */
.og-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
  max-width: 480px;
}

.og-preview-img-wrap {
  width: 100%;
  aspect-ratio: 1200 / 630;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.og-preview-no-img {
  font-size: 12px;
  color: var(--text2);
  opacity: .5;
}

.og-preview-body {
  padding: 10px 12px 12px;
}

.og-preview-domain {
  font-size: 11px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 4px;
  opacity: .7;
}

.og-preview-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.og-preview-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
