/**
 * Lift You Up — Admin Panel Styles
 */

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

:root {
  --blue:        #0c4da2;
  --blue-dark:   #083a7a;
  --blue-light:  #e8f0fb;
  --gold:        #c8973a;
  --red:         #c0392b;
  --red-light:   #fdecea;
  --green:       #1e8449;
  --green-light: #eafaf1;
  --gray-50:     #f8f9fa;
  --gray-100:    #f1f3f5;
  --gray-200:    #e9ecef;
  --gray-400:    #adb5bd;
  --gray-600:    #6c757d;
  --gray-800:    #343a40;
  --white:       #ffffff;
  --radius:      8px;
  --shadow:      0 2px 12px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --font:        'Inter', system-ui, sans-serif;
  --transition:  0.2s ease;
}

body {
  font-family: var(--font);
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Login / Setup Screen ── */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
}

.auth-box {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  justify-content: center;
}

.auth-logo svg { flex-shrink: 0; }

.auth-logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
}

.auth-logo-sub {
  font-size: 0.75rem;
  color: var(--gray-600);
  display: block;
}

.auth-box h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 0.4rem;
  text-align: center;
}

.auth-box p {
  color: var(--gray-600);
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 1.75rem;
}

/* ── Admin Shell ── */
.admin-shell {
  display: none;
  flex-direction: column;
  min-height: 100vh;
}
.admin-shell.visible { display: flex; }

.admin-topbar {
  background: var(--blue);
  color: var(--white);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1rem;
}

.topbar-brand span { opacity: 0.8; font-weight: 400; font-size: 0.85rem; }

.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.admin-content {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* ── Section header ── */
.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-800);
}

.admin-counter {
  font-size: 0.875rem;
  color: var(--gray-600);
  background: var(--gray-200);
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
}

/* ── Form Card ── */
.admin-form-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 2rem;
  border: 1px solid var(--gray-200);
}

.admin-form-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Form Elements ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

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

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

input[type="text"],
input[type="date"],
input[type="url"],
input[type="password"],
select,
textarea {
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--gray-800);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(12,77,162,0.12);
}

textarea { resize: vertical; min-height: 80px; }

.field-hint {
  font-size: 0.78rem;
  color: var(--gray-600);
}

.field-error-msg {
  font-size: 0.8rem;
  color: var(--red);
  display: none;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--red);
}

.form-group.has-error .field-error-msg { display: block; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-dark); }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-800);
  border: 1.5px solid var(--gray-200);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-danger {
  background: var(--red-light);
  color: var(--red);
  border: 1.5px solid #f5c6c2;
}
.btn-danger:hover { background: #fad5d2; }

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-full { width: 100%; justify-content: center; }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.1); }

.form-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* ── News Item List ── */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-item-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1rem 1.25rem;
  border: 1px solid var(--gray-200);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem 1rem;
  align-items: start;
  transition: box-shadow var(--transition);
}

.news-item-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.12); }

.news-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.news-item-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-800);
  margin-bottom: 0.2rem;
}

.news-item-text {
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-dates {
  font-size: 0.75rem;
  color: var(--gray-600);
  margin-top: 0.4rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.news-item-dates span { display: flex; align-items: center; gap: 0.3rem; }

.news-item-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* ── Tag badges ── */
.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-event { background: var(--blue-light); color: var(--blue); }
.tag-news  { background: #e6f4ea; color: var(--green); }
.tag-tip   { background: #fef3e2; color: #b45309; }

/* ── Status badge ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 99px;
}
.status-active   { background: var(--green-light); color: var(--green); }
.status-upcoming { background: var(--blue-light);  color: var(--blue);  }
.status-expired  { background: var(--gray-200);    color: var(--gray-600); }

/* ── Alert messages ── */
.alert {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.alert-success { background: var(--green-light); color: var(--green); }
.alert-error   { background: var(--red-light);   color: var(--red);   }
.alert-info    { background: var(--blue-light);   color: var(--blue);  }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-600);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.4; display: block; }
.empty-state p { font-size: 0.9rem; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 1.5rem 0;
}

/* ── Limit warning ── */
.limit-reached {
  background: #fef3e2;
  border: 1px solid #fcd38d;
  color: #b45309;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .admin-content { padding: 1rem; }
  .admin-form-card { padding: 1.25rem 1rem; }
  .news-item-card { grid-template-columns: 1fr; }
  .news-item-actions { justify-content: flex-end; }
}
