/* ============================================
   PostOut — Gumroad-inspired Light Theme
   Clean, readable, playful, professional
   ============================================ */

:root {
  --sidebar-width: 250px;
  --topbar-height: 56px;
  --bg: #f4f4f0;
  --bg-white: #ffffff;
  --bg-input: #ffffff;
  --border: #e5e5e0;
  --border-focus: #ff90e8;
  --text: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-tertiary: #999999;
  --accent: #ff90e8;
  --accent-dark: #e070c8;
  --accent-bg: rgba(255, 144, 232, 0.08);
  --black: #000000;
  --success: #23a094;
  --danger: #dc3d43;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --transition: 0.15s ease;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-white);
  border-right: 2px solid var(--border);
  position: fixed;
  top: 0; left: 0;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
}

.sidebar hr { border-color: var(--border); opacity: 1; margin: 12px 0; }

.sidebar .fs-5 { color: var(--text) !important; }
.sidebar .text-primary { color: var(--accent) !important; }
.sidebar .text-dark { color: var(--text) !important; }

.sidebar .nav-link {
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.sidebar .nav-link:hover:not(.active) {
  color: var(--text);
  background: var(--bg);
}

.sidebar .nav-link.active {
  background: var(--black);
  color: white !important;
  border-color: var(--black);
}

.sidebar .nav-link i { font-size: 1rem; }

.sidebar .dropdown-toggle { color: var(--text) !important; }
.sidebar strong { color: var(--text) !important; }
.sidebar .text-muted { color: var(--text-tertiary) !important; }

.sidebar .dropdown-menu {
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
}

.sidebar .dropdown-item {
  color: var(--text-secondary);
  border-radius: 6px;
  font-size: 0.9rem;
  padding: 8px 12px;
}

.sidebar .dropdown-item:hover {
  background: var(--bg);
  color: var(--text);
}

.sidebar .dropdown-divider { border-color: var(--border); }

/* ---- Main content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 999;
}

.topbar h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ---- Cards ---- */
.card {
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  color: var(--text);
  box-shadow: none;
}

.card:hover {
  box-shadow: var(--shadow) !important;
}

.card-header {
  background: transparent !important;
  border-bottom: 2px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  padding: 16px 20px;
}

.card-body { padding: 16px 20px; }

.fw-bold { color: var(--text); }
.text-muted { color: var(--text-secondary) !important; }
.text-dark { color: var(--text) !important; }
small { color: var(--text-secondary); }

/* ---- List groups ---- */
.list-group-item {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
  padding: 12px 16px;
}

.list-group-item-action:hover {
  background: var(--bg);
  color: var(--text);
}

/* ---- Tables ---- */
.table { color: var(--text); --bs-table-bg: transparent; }
.table-light, .table thead th { background: var(--bg) !important; color: var(--text-secondary) !important; border-color: var(--border) !important; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table-hover > tbody > tr:hover { background: var(--bg); }
.table td, .table th { border-color: var(--border); vertical-align: middle; }

/* ---- Forms ---- */
.form-control, .form-select {
  background: var(--bg-input);
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.form-control:focus, .form-select:focus {
  background: var(--bg-input);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
  color: var(--text);
  outline: none;
}

.form-control::placeholder { color: var(--text-tertiary); }
.form-label { color: var(--text); font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-text { color: var(--text-tertiary) !important; font-size: 0.82rem; }
.form-check-label { color: var(--text-secondary); }

.form-check-input { background-color: var(--bg-input); border: 2px solid var(--border); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--accent-bg); border-color: var(--accent); }

.input-group-text {
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text-secondary);
  border-right: none;
}

/* ---- Buttons ---- */
.btn {
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  font-size: 0.9rem;
  padding: 8px 16px;
}

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

.btn-primary:hover {
  background: #333;
  border-color: #333;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-outline-primary {
  color: var(--text);
  border: 2px solid var(--border);
}

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

.btn-outline-secondary { color: var(--text-secondary); border: 2px solid var(--border); }
.btn-outline-secondary:hover { background: var(--bg); color: var(--text); border-color: #ccc; }

.btn-outline-danger { color: var(--danger); border: 2px solid #f5c6c8; }
.btn-outline-danger:hover { background: #fef2f2; color: var(--danger); border-color: var(--danger); }

.btn-outline-warning { color: #b45309; border: 2px solid #fde68a; }
.btn-outline-warning:hover { background: #fffbeb; color: #92400e; border-color: var(--warning); }

.btn-outline-success { color: var(--success); border: 2px solid #a7f3d0; }
.btn-outline-success:hover { background: #ecfdf5; color: var(--success); border-color: var(--success); }

.btn-light { background: var(--bg); border: 2px solid var(--border); color: var(--text-secondary); }
.btn-light:hover { background: #eaeae6; color: var(--text); }

.btn-sm { padding: 6px 12px; font-size: 0.85rem; }

/* ---- Alerts ---- */
.alert { border-radius: var(--radius); font-size: 0.9rem; font-weight: 500; }
.alert-success { background: #ecfdf5; color: #065f46; border: 2px solid #a7f3d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 2px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 2px solid #fde68a; }
.alert-light { background: var(--bg); color: var(--text-secondary); border: 2px solid var(--border); }
.alert-info { background: #eff6ff; color: #1e40af; border: 2px solid #bfdbfe; }

/* ---- Badges ---- */
.badge { font-weight: 600; padding: 4px 10px; border-radius: 999px; font-size: 0.78rem; letter-spacing: 0.01em; }
.bg-success { background: #ecfdf5 !important; color: #065f46 !important; }
.bg-danger { background: #fef2f2 !important; color: #991b1b !important; }
.bg-primary { background: var(--accent-bg) !important; color: #a855a0 !important; }
.bg-secondary { background: var(--bg) !important; color: var(--text-secondary) !important; }
.bg-warning { background: #fffbeb !important; color: #92400e !important; }
.bg-info { background: #eff6ff !important; color: #1e40af !important; }

.bg-opacity-10 { --bs-bg-opacity: 1 !important; }

/* Stat icon circles */
.rounded-circle.bg-primary { background: var(--accent-bg) !important; }
.rounded-circle.bg-success { background: #ecfdf5 !important; }
.rounded-circle.bg-danger { background: #fef2f2 !important; }
.rounded-circle.bg-info { background: #eff6ff !important; }
.rounded-circle.bg-warning { background: #fffbeb !important; }

.text-primary { color: var(--accent) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: #b45309 !important; }
.text-info { color: var(--info) !important; }

/* ---- Progress ---- */
.progress { background: var(--bg); border-radius: 999px; height: 8px; }
.progress-bar { background: var(--accent); border-radius: 999px; }
.progress-bar.bg-success { background: var(--success) !important; }
.progress-bar.bg-info { background: var(--info) !important; }

/* ---- Dropdowns ---- */
.dropdown-menu {
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
}

.dropdown-item { color: var(--text-secondary); border-radius: 6px; font-size: 0.9rem; }
.dropdown-item:hover { background: var(--bg); color: var(--text); }
.dropdown-item.text-danger { color: var(--danger) !important; }
.dropdown-divider { border-color: var(--border); }

/* ---- Nav/Tabs ---- */
.queue-tabs .nav-link {
  color: var(--text-tertiary);
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: 0;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.queue-tabs .nav-link:hover { color: var(--text-secondary); }
.queue-tabs .nav-link.active { color: var(--text); border-bottom: 3px solid var(--black); background: transparent; }

.nav-pills .nav-link { color: var(--text-secondary); border-radius: var(--radius); }
.nav-pills .nav-link.active { background: var(--black); color: white; }
.nav-pills .nav-link.text-start { color: var(--text-secondary) !important; }
.nav-pills .nav-link.text-start:hover { background: var(--bg); }
.nav-pills .nav-link.text-start.active { background: var(--black) !important; color: white !important; }

/* ---- Platform cards ---- */
.platform-card {
  transition: all var(--transition);
  border-radius: var(--radius-lg) !important;
}

.platform-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg) !important;
  border-color: var(--accent);
}

/* ---- Compose ---- */
.compose-textarea {
  min-height: 150px;
  resize: vertical;
  border-radius: var(--radius);
}

.char-count { font-size: 0.85rem; color: var(--text-tertiary); }
.char-count.warning { color: var(--warning); }
.char-count.danger { color: var(--danger); }

.account-select-item { border-color: var(--border) !important; transition: all var(--transition); cursor: pointer; }
.account-select-item:hover { background: var(--bg); border-color: var(--accent) !important; }

/* ---- Feed status ---- */
.feed-status { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.feed-status.active { background: var(--success); }
.feed-status.error { background: var(--danger); }
.feed-status.inactive { background: var(--text-tertiary); }

/* ---- Post preview ---- */
.post-content-preview { white-space: pre-wrap; word-break: break-word; font-size: 0.95rem; line-height: 1.6; }

/* ---- Pagination ---- */
.page-link { background: var(--bg-white); border: 2px solid var(--border); color: var(--text-secondary); }
.page-link:hover { background: var(--bg); color: var(--text); }
.page-item.active .page-link { background: var(--black); border-color: var(--black); color: white; }

/* ---- Misc ---- */
.border { border-color: var(--border) !important; }
hr { border-color: var(--border); opacity: 0.8; }
code { color: var(--danger); background: #fef2f2; padding: 2px 6px; border-radius: 4px; font-size: 0.85em; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }


/* ============================================
   Auth Pages — Gumroad-style clean/light
   ============================================ */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 20px;
  background: var(--bg);
}

.auth-container {
  width: 100%;
  max-width: 400px;
  animation: authFadeUp 0.4s ease forwards;
}

@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-glass-card {
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
}

.auth-logo { display: flex; justify-content: center; margin-bottom: 24px; }

.auth-logo-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
  color: white;
}

.auth-title {
  font-size: 24px; font-weight: 700; color: var(--text);
  text-align: center; margin: 0 0 4px; letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 15px; color: var(--text-secondary);
  text-align: center; margin: 0 0 28px;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field { position: relative; }

.auth-input-wrapper {
  position: relative;
  display: flex; align-items: center;
  background: var(--bg-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.auth-input-wrapper:focus-within {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-bg) !important;
}

.auth-input-wrapper > i:first-child {
  position: absolute; left: 14px;
  color: var(--text-tertiary);
  font-size: 15px; pointer-events: none;
  transition: color 0.2s;
  z-index: 1;
}

.auth-input-wrapper:focus-within > i:first-child {
  color: var(--accent-dark) !important;
}

.auth-input-wrapper input {
  width: 100%;
  padding: 13px 40px 13px 42px;
  background: none !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.auth-input-wrapper input::placeholder { color: var(--text-tertiary); }

.auth-toggle-pw {
  position: absolute; right: 12px;
  background: none; border: none;
  color: var(--text-tertiary); cursor: pointer;
  padding: 4px; font-size: 15px; display: flex;
  transition: color 0.2s; z-index: 1;
}
.auth-toggle-pw:hover { color: var(--text-secondary); }

.auth-pw-strength {
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transition: opacity 0.3s; margin-top: -2px;
}
.auth-pw-bar { flex: 1; height: 4px; background: var(--bg); border-radius: 2px; overflow: hidden; }
.auth-pw-fill { height: 100%; width: 0; border-radius: 2px; transition: all 0.4s ease; }
.auth-pw-label { font-size: 12px; font-weight: 600; min-width: 60px; text-align: right; }

.auth-btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 13px 24px; margin-top: 6px;
  background: var(--black);
  color: white; border: 2px solid var(--black); border-radius: var(--radius);
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.auth-btn-primary:hover {
  background: #333;
  border-color: #333;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.auth-btn-primary:active { transform: translateY(0); box-shadow: none; }
.auth-btn-primary i { font-size: 15px; transition: transform 0.2s; }
.auth-btn-primary:hover i { transform: translateX(3px); }

.auth-divider { display: flex; align-items: center; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 2px; background: var(--border); }
.auth-divider span { padding: 0 14px; color: var(--text-tertiary); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.auth-btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 24px;
  background: var(--bg-white);
  color: var(--text); border: 2px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all var(--transition); text-decoration: none; font-family: inherit;
}

.auth-btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text);
  color: var(--text);
}

.auth-btn-secondary i { font-size: 14px; transition: transform 0.2s; }
.auth-btn-secondary:hover i { transform: translateX(3px); }

.auth-terms { font-size: 12px; color: var(--text-tertiary); text-align: center; margin: 16px 0 0; line-height: 1.5; }

.auth-wrapper .alert { max-width: 400px; width: 100%; margin-bottom: 16px; }

/* Remove decorative orbs for clean Gumroad look */
.auth-bg-orb { display: none; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .sidebar { width: 100%; min-height: auto; position: relative; }
  .main-content { margin-left: 0; }
}

@media (max-width: 480px) {
  .auth-glass-card { padding: 32px 20px; }
  .auth-title { font-size: 22px; }
}
