:root {
  --bg: #050510;
  --surface: #0a0a1a;
  --surface-2: #12122a;
  --border: #1a1a3a;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --primary: #6c5ce7;
  --primary-hover: #7c6cf7;
  --success: #00b894;
  --error: #e74c3c;
  --warning: #fdcb6e;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }

.app-layout { min-height: 100vh; padding-bottom: 80px; }
.top-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.top-title { font-size: 18px; font-weight: 600; }
.back-btn { font-size: 20px; color: var(--text); padding: 4px 8px; }
.main-content { padding: 0 20px 20px; }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: rgba(10,10,26,0.95); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--border); padding: 8px 0; padding-bottom: max(8px, env(safe-area-inset-bottom)); z-index: 100; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px; color: var(--text-muted); font-size: 10px; transition: color 0.15s; }
.nav-item.active { color: var(--primary); }
.nav-icon { display: flex; align-items: center; justify-content: center; height: 24px; }
.nav-label { font-size: 10px; font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; font-family: var(--font); border: none; cursor: pointer; transition: all 0.15s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); }
.btn-danger { background: var(--error); color: white; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.form-input { width: 100%; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 14px; font-family: var(--font); transition: border-color 0.15s; }
.form-input:focus { outline: none; border-color: var(--primary); }
textarea.form-input { min-height: 100px; resize: vertical; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 500px; max-height: 80vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; }
.modal-actions { display: flex; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--border); }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px); background: var(--surface-2); border: 1px solid var(--border); padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; z-index: 9999; transition: transform 0.3s ease; white-space: nowrap; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-success { border-color: var(--success); color: var(--success); }
.toast-error { border-color: var(--error); color: var(--error); }

.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-success { background: rgba(0,184,148,0.15); color: var(--success); }
.badge-error { background: rgba(231,76,60,0.15); color: var(--error); }
.badge-warning { background: rgba(253,203,110,0.15); color: var(--warning); }
.badge-info { background: rgba(108,92,231,0.15); color: var(--primary); }

.platform-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; }
.platform-icon.facebook { background: rgba(24,119,242,0.15); color: #1877F2; }
.platform-icon.instagram { background: rgba(228,64,95,0.15); color: #E4405F; }
.platform-icon.linkedin { background: rgba(10,102,194,0.15); color: #0A66C2; }
.platform-icon.tiktok { background: rgba(255,255,255,0.1); color: #fff; }
.platform-icon.youtube { background: rgba(255,0,0,0.15); color: #FF0000; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.stat-card { text-align: center; padding: 16px 8px; }
.stat-number { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* Media drop zone */
.media-drop-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 24px; text-align: center; cursor: pointer; transition: border-color 0.15s; }
.media-drop-zone:hover { border-color: var(--text-muted); }

/* Calendar grid */
.cal-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.cal-day-name { text-align: center; font-size: 11px; color: var(--text-muted); font-weight: 600; padding: 4px; }
.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface); border-radius: 6px; position: relative; font-size: 13px; }
.cal-cell.empty { background: transparent; }
.cal-cell.today { border: 2px solid var(--primary); }
.cal-cell.has-posts { cursor: pointer; background: var(--surface-2); }
.cal-cell.has-posts:hover { background: var(--border); }
.cal-date { font-weight: 500; }
.cal-count { position: absolute; top: 2px; right: 4px; font-size: 9px; background: var(--primary); color: white; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.cal-platforms { display: flex; gap: 2px; margin-top: 2px; }

/* Account checkbox */
.account-checkbox input[type="checkbox"] { accent-color: var(--primary); width: 18px; height: 18px; }
