/* Makers Tribe inspired theme — https://makerstribe.in/ */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #ea580c;
  --primary-hover: #c2410c;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 8px;
  --font: "DM Sans", system-ui, sans-serif;
  --nav-bg: #1f2937;
  --nav-text: #f9fafb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.nav {
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.75rem 1.5rem;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--nav-text);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.nav-links a:hover {
  color: #f97316;
}

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

.flashes {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.flash-success { background: rgba(46, 204, 113, 0.2); color: var(--success); }
.flash-error { background: rgba(231, 76, 60, 0.2); color: #ff6b6b; }

.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card-bordered {
  border: 1px solid var(--border);
}

.card-bordered h3 { margin: 0 0 0.25rem; font-size: 1rem; }
.card-bordered p { margin: 0.25rem 0; font-size: 0.9rem; }

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 { margin: 0 0 0.25rem; }
.page-header p { margin: 0; color: var(--muted); }
.page-header a { color: var(--primary); }

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section {
  margin-bottom: 2rem;
}

.section h2 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  color: var(--muted);
}

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

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.post-item h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.post-item h3 a { color: var(--text); text-decoration: none; }
.post-item h3 a:hover { color: var(--primary); }
.post-item p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.muted { color: var(--muted); }

.admin-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.admin-links .card-link {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

.admin-links .card-link:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.admin-links .card-link strong { display: block; margin-bottom: 0.25rem; }
.admin-links .card-link span { font-size: 0.9rem; color: var(--muted); }

.form-section { margin-bottom: 2rem; }
.form-section h2 { font-size: 1.1rem; margin: 0 0 1rem; color: var(--muted); }
.table-section h2 { font-size: 1.1rem; margin: 0 0 1rem; color: var(--muted); }

.form-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
}
.form-center .form { margin: 0; }
.page-header--center { text-align: center; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}

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

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

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

.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(231, 76, 60, 0.15);
}

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

.filter {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  background: rgba(0, 0, 0, 0.2);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted);
}

.table tr:last-child td { border-bottom: none; }
.table a { color: var(--text); text-decoration: none; }
.table a:hover { color: var(--primary); }

.inline-form {
  display: inline;
  margin-left: 0.5rem;
}

.delete-form {
  margin-left: 0;
}

.table-cell-actions {
  width: 1%;
  white-space: nowrap;
  text-align: center;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.btn-icon:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.btn-icon--danger:hover {
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger);
}

.icon--trash {
  display: block;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.badge-draft { background: rgba(136, 136, 136, 0.3); color: var(--muted); }
.badge-active { background: rgba(46, 204, 113, 0.2); color: var(--success); }
.badge-archived { background: rgba(231, 76, 60, 0.2); color: #ff6b6b; }

/* Detail list */
.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 2rem;
  max-width: 400px;
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-list dd {
  margin: 0;
}

/* Form */
.form {
  max-width: 420px;
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

/* Premium vote form */
.vote-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0.5rem 0;
}

.vote-header__title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.vote-header__subtitle {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.vote-header__subtitle strong {
  color: var(--text);
  font-weight: 600;
}

.form-center--premium {
  margin-bottom: 3rem;
}

.form--premium {
  max-width: 440px;
  margin: 0 auto;
  padding: 2.25rem 2rem;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 20px -4px rgba(0, 0, 0, 0.06);
}

.form-group--premium {
  margin-bottom: 1.35rem;
}

.form-group--premium:last-of-type {
  margin-bottom: 0;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.form-label .required {
  color: var(--primary);
  font-weight: 500;
}

.form-input--premium,
.form-select--premium {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input--premium::placeholder {
  color: #9ca3af;
}

.form-input--premium:hover,
.form-select--premium:hover {
  border-color: rgba(0, 0, 0, 0.18);
}

.form-input--premium:focus,
.form-select--premium:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.form-row--premium {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem;
}

.form-group--country {
  min-width: 0;
}

.form-group--mobile {
  min-width: 0;
}

.form-actions--premium {
  margin-top: 1.75rem;
  margin-bottom: 0;
  padding-top: 0.5rem;
}

.btn--premium {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 10px;
  border: none;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.2);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn--premium:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.footer {
  margin-top: auto;
  padding: 2rem 1.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-section {
  margin: 0;
}

.footer-heading {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.4rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-tagline {
  max-width: 960px;
  margin: 0 auto 1rem;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-copy {
  text-align: center;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Admin login */
.login-box {
  max-width: 360px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08);
}

.login-box h1 { margin: 0 0 1.5rem; font-size: 1.5rem; }

/* Nominees landing */
.nominees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.nominee-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nominee-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.12);
}

.nominee-card h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.nominee-card .meta { font-size: 0.9rem; color: var(--muted); }

.nominee-detail .detail-list { max-width: 480px; }
