/* Friendly8.Posts UI theme */
:root {
  --ink: #1b1b1b;
  --ink-muted: #4b4b4b;
  --paper: #f6f3ee;
  --paper-deep: #efe9df;
  --accent: #d06f4f;
  --accent-dark: #a6523a;
  --accent-2: #2b6f6b;
  --line: #d8cfc2;
  --shadow: rgba(23, 20, 16, 0.12);
  --card: #fffaf2;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 20% -10%, #f7e9d3 0%, transparent 60%),
              radial-gradient(900px 600px at 100% 10%, #e4f1ea 0%, transparent 65%),
              linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #1f1a14;
  color: #f4ede2;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  color: #f4ede2;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.badge {
  background: #f6d6c6;
  color: #2a1f1a;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
}

.topbar .meta {
  display: flex;
  gap: 16px;
  align-items: center;
}

.token-pill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 0 6px 12px var(--shadow);
}

.main {
  padding: 0 28px 40px 28px;
}

.page-title {
  font-size: 2rem;
  margin: 8px 0 4px 0;
}

.page-subtitle {
  color: var(--ink-muted);
  margin-bottom: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 18px var(--shadow);
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

label {
  font-weight: 600;
}

input, select, textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
}

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

.button {
  background: var(--accent);
  color: #1f1612;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--accent-dark);
  color: var(--accent-dark);
}

.button.ghost {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--ink);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

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

.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  display: inline-block;
}

.status.draft { background: #f1e6d7; }
.status.scheduled { background: #cfe7dd; }
.status.published { background: #c8def7; }
.status.failed { background: #f2c8c8; }

.linked-preview {
  border: 1px solid #c8d7e1;
  border-radius: 16px;
  background: #ffffff;
  padding: 14px;
  font-family: "Helvetica Neue", "Segoe UI", sans-serif;
  color: #111;
}

.linked-preview .lp-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #5a5a5a;
}

.linked-preview .lp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0a66c2;
}

.linked-preview .lp-body {
  margin-top: 10px;
  white-space: pre-wrap;
}

.linked-preview .lp-footer {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: #6b6b6b;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.media-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-group {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
