:root {
  color-scheme: light dark;
  --bg-page: #eef2f6;
  --bg-card: rgba(245, 247, 250, 0.96);
  --bg-card-dark: rgba(20, 24, 29, 0.85);
  --bg-soft: rgba(31, 122, 109, 0.1);
  --bg-input: #f3f6f9;
  --text-primary: #14232d;
  --text-muted: rgba(20, 35, 45, 0.72);
  --accent: #1f7a6d;
  --accent-strong: #15594f;
  --border: rgba(21, 89, 79, 0.14);
  --border-strong: rgba(21, 89, 79, 0.32);
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-soft: 0 28px 60px rgba(15, 59, 54, 0.16);
  --shadow-card: 0 16px 40px rgba(15, 59, 54, 0.12);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--bg-page) 0%, #e7eff2 45%, #edf3f8 100%);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: clamp(16px, 4vw, 48px);
}

body.dark {
  background: radial-gradient(circle at top, #10151d 0%, #0d1219 45%, #090d12 100%);
  color: #e9f6f4;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -1;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 12px 18px;
  background: var(--accent);
  color: white;
  border-radius: 999px;
  box-shadow: 0 16px 40px rgba(15, 59, 54, 0.32);
  z-index: 10;
}

.social-shell {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  gap: clamp(24px, 5vw, 40px);
}

.social-shell--wide {
  max-width: 1280px;
}

.social-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 auto 20px;
  max-width: 1240px;
}

.social-nav .ghost-action {
  text-decoration: none;
}

.social-hero {
  display: grid;
  gap: 24px;
  padding: clamp(24px, 4vw, 48px);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft);
}

body.dark .social-hero {
  background: var(--bg-card-dark);
  border-color: rgba(255, 255, 255, 0.08);
}

.social-hero--hub {
  position: relative;
  overflow: hidden;
}

.social-hero--hub::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(31, 122, 109, 0.35) 0%, rgba(31, 122, 109, 0) 70%);
  opacity: 0.7;
}

.social-hero__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.75rem;
  color: var(--accent-strong);
  font-weight: 600;
}

.social-hero__title {
  margin: 8px 0 0;
  font-size: clamp(2.2rem, 5vw, 3rem);
  letter-spacing: -0.02em;
}

.social-hero__lead {
  margin: 12px 0 0;
  max-width: 720px;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.social-hero__aside {
  padding: clamp(16px, 3vw, 24px);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(15, 59, 54, 0.12);
}

.social-hero__aside h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.social-hero__aside ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.social-grid {
  display: grid;
  gap: clamp(24px, 4vw, 36px);
}

.social-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 980px) {
  .social-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    align-items: start;
  }

  .social-grid--single {
    grid-template-columns: minmax(0, 1fr);
  }
}

.social-panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-card);
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: clamp(20px, 3vw, 28px);
}

body.dark .social-panel {
  background: var(--bg-card-dark);
  border-color: rgba(255, 255, 255, 0.08);
}

.panel-header h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.panel-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.panel-form {
  display: grid;
  gap: 18px;
}

.upload-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed var(--border-strong);
  background: rgba(31, 122, 109, 0.05);
}

.upload-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.media-preview {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(72px, 96px));
}

.media-preview--compact {
  grid-template-columns: repeat(auto-fit, minmax(60px, 80px));
}

.media-preview__item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
}

body.dark .media-preview__item {
  background: rgba(20, 24, 29, 0.7);
}

.media-preview__media {
  width: 100%;
  height: 72px;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(31, 122, 109, 0.08);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.filter-pill input {
  accent-color: var(--accent);
}

.calendar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.calendar-controls {
  display: flex;
  gap: 10px;
}

.calendar-month__label {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--accent-strong);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.calendar-cell {
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px;
  min-height: 110px;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 6px;
}

body.dark .calendar-cell {
  background: rgba(20, 24, 29, 0.75);
}

.calendar-cell--header {
  background: transparent;
  border: none;
  padding: 0;
  min-height: auto;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.calendar-cell__date {
  font-weight: 600;
  font-size: 0.9rem;
}

.calendar-event {
  display: grid;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(31, 122, 109, 0.12);
  font-size: 0.78rem;
}

.calendar-event__status {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.65rem;
  color: var(--accent-strong);
}

.calendar-event__title {
  font-weight: 600;
}

.calendar-event__meta {
  color: var(--text-muted);
}

.hub-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tool-card {
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 16px;
}

body.dark .tool-card {
  background: rgba(20, 24, 29, 0.85);
}

.tool-card--primary {
  border-color: rgba(31, 122, 109, 0.35);
  background: linear-gradient(145deg, rgba(31, 122, 109, 0.12), rgba(255, 255, 255, 0.92));
}

.tool-card__list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--text-muted);
}

.tool-card__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hub-guidance {
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  background: rgba(31, 122, 109, 0.08);
  border: 1px solid var(--border);
  display: grid;
  gap: 18px;
}

.hub-guidance h2 {
  margin: 0;
}

.hub-guidance__grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .hub-guidance__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

.field {
  display: grid;
  gap: 6px;
}

.field__label {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.field__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 109, 0.18);
}

.primary-action {
  justify-self: start;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 16px 28px rgba(15, 59, 54, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 36px rgba(15, 59, 54, 0.28);
}

.ghost-action {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--accent-strong);
  font-weight: 600;
  cursor: pointer;
}

.key-form {
  display: grid;
  gap: 16px;
}

.key-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.key-feedback {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.panel-list {
  display: grid;
  gap: 18px;
}

.empty-state {
  margin: 0;
  padding: 20px;
  border-radius: 16px;
  background: rgba(31, 122, 109, 0.08);
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
}

.campaign-card,
.credential-card,
.schedule-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  box-shadow: 0 16px 30px rgba(15, 59, 54, 0.12);
  display: grid;
  gap: 14px;
}

body.dark .campaign-card,
body.dark .credential-card,
body.dark .schedule-card {
  background: rgba(20, 24, 29, 0.85);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.card-meta {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.card-meta span {
  display: flex;
  gap: 8px;
  align-items: center;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.card-actions select {
  width: auto;
  min-width: 160px;
}

.card-edit {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(31, 122, 109, 0.06);
}

.card-edit[hidden] {
  display: none;
}

textarea[data-field],
textarea[data-credential-id] {
  min-height: 90px;
}

textarea[data-schedule-edit-field] {
  min-height: 96px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(31, 122, 109, 0.12);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-strong);
  font-weight: 600;
}

.delete-button {
  border: none;
  background: none;
  color: rgba(220, 53, 69, 0.85);
  font-weight: 600;
  cursor: pointer;
}

.secret-wrapper {
  display: grid;
  gap: 10px;
}

.schedule-summary {
  display: grid;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.schedule-summary p {
  margin: 0;
}

.card-feedback {
  margin: 0;
  font-size: 0.85rem;
  color: var(--accent-strong);
}

.list-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  padding: 18px;
  display: grid;
  gap: 10px;
  box-shadow: 0 12px 24px rgba(15, 59, 54, 0.12);
}

body.dark .list-card {
  background: rgba(20, 24, 29, 0.85);
}

.list-card__title {
  margin: 0;
  font-size: 1.05rem;
}

.list-card__meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.list-card__form {
  margin-top: 6px;
}

.secret-details {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(31, 122, 109, 0.12);
  border: 1px solid var(--border);
}

.secret-details span {
  display: flex;
  gap: 8px;
}

.locked-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
}

a.card-link {
  color: var(--accent-strong);
  text-decoration: none;
}

a.card-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  body {
    padding: 16px;
  }

  .social-hero__aside ul {
    padding-left: 16px;
  }

  .card-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-actions select {
    width: 100%;
  }

  .social-nav {
    margin-bottom: 16px;
  }

  .calendar-grid {
    gap: 6px;
  }

  .calendar-cell {
    min-height: 90px;
    padding: 8px;
  }
}
