/* ============================================
   SocialSync SaaS — Design System
   Clean, Professional Agency Tool
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #e0e7ff;
  --primary-hover: #5457e8;

  /* Status Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #3b82f6;
  --info-light: #dbeafe;
  --secondary: #6b7280;
  --secondary-light: #f3f4f6;

  /* Neutrals */
  --white: #ffffff;
  --bg: #f8fafc;
  --bg2: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Platforms */
  --instagram: #E1306C;
  --facebook: #1877F2;
  --linkedin: #0A66C2;
  --twitter: #1DA1F2;
  --youtube: #FF0000;
  --tiktok: #000000;

  /* Layout */
  --sidebar-w: 260px;
  --header-h: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
  --transition: all 0.2s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
ul { list-style: none; }
input, select, textarea, button { font-family: inherit; }

/* ===== LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { position: fixed; top: 0; left: 0; width: var(--sidebar-w); height: 100vh; background: var(--white); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; overflow-y: auto; }
.main-content { margin-left: var(--sidebar-w); flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.top-bar { height: var(--header-h); background: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 24px; gap: 12px; position: sticky; top: 0; z-index: 90; }
.page-content { flex: 1; padding: 28px; }

/* ===== SIDEBAR ===== */
.sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid var(--border-light); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo-icon { width: 36px; height: 36px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; font-weight: 700; }
.sidebar-logo-text { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 18px; color: var(--text); }
.sidebar-logo-text span { color: var(--primary); }
.sidebar-agency { padding: 12px 16px; margin: 8px 12px; background: var(--primary-light); border-radius: var(--radius); }
.sidebar-agency-name { font-size: 12px; font-weight: 600; color: var(--primary-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-agency-plan { font-size: 11px; color: var(--primary); }

.sidebar-nav { flex: 1; padding: 8px 12px; }
.nav-section { margin-bottom: 4px; }
.nav-section-label { font-size: 10.5px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.6px; padding: 12px 8px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: var(--transition); margin-bottom: 2px; }
.nav-item:hover, .nav-item.active { background: var(--primary-light); color: var(--primary); }
.nav-item.active { font-weight: 600; }
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-item .badge-count { margin-left: auto; background: var(--danger); color: white; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 20px; min-width: 18px; text-align: center; }
.sidebar-footer { padding: 12px; border-top: 1px solid var(--border-light); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); }
.sidebar-user:hover { background: var(--bg2); }
.sidebar-user-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; overflow: hidden; }
.sidebar-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sidebar-user-role { font-size: 11px; color: var(--text-muted); }

/* ===== TOP BAR ===== */
.topbar-title { font-size: 17px; font-weight: 700; color: var(--text); flex: 1; }
.topbar-title small { font-size: 13px; font-weight: 400; color: var(--text-muted); display: block; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn { width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted); transition: var(--transition); position: relative; }
.topbar-btn:hover { background: var(--bg2); color: var(--primary); }
.topbar-btn .notif-dot { width: 8px; height: 8px; background: var(--danger); border-radius: 50%; position: absolute; top: 6px; right: 6px; border: 2px solid white; }

/* ===== CARDS ===== */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-md); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-subtitle { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* Stat Cards */
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .stat-label { font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--text); margin: 6px 0 4px; font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1; }
.stat-card .stat-change { font-size: 12px; color: var(--text-muted); }
.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }
.stat-card .stat-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }

/* ===== GRID LAYOUTS ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* ===== PAGE HEADER ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 22px; font-weight: 800; color: var(--text); font-family: 'Plus Jakarta Sans', sans-serif; }
.page-header .breadcrumb { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.page-header .breadcrumb a { color: var(--text-muted); }
.page-header .breadcrumb a:hover { color: var(--primary); }

/* ===== TABLES ===== */
.table-wrap { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-toolbar { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
thead th { padding: 11px 16px; text-align: left; font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border-light); font-size: 13.5px; color: var(--text); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg); }
.table-actions { display: flex; gap: 6px; align-items: center; }

/* ===== FORMS ===== */
.form-section { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.form-section-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.form-row-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
label .req { color: var(--danger); margin-left: 2px; }
.form-control { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text); background: var(--white); transition: var(--transition); outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.input-group { position: relative; }
.input-group .form-control { padding-left: 36px; }
.input-group .input-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
.input-group-suffix .form-control { padding-right: 36px; }
.input-group-suffix .input-suffix { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }

/* Checkbox & Radio */
.check-group { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check-group input[type="checkbox"], .check-group input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.check-group label { margin-bottom: 0; cursor: pointer; font-weight: 400; }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600; cursor: pointer; border: none; transition: var(--transition); white-space: nowrap; text-decoration: none; }
.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
.btn-sm { padding: 5px 12px; font-size: 12.5px; gap: 5px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: var(--radius-sm); }
.btn-icon.btn-sm { width: 28px; height: 28px; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d97706; color: white; }
.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #2563eb; color: white; }
.btn-secondary { background: var(--secondary-light); color: var(--text); }
.btn-secondary:hover { background: var(--border); color: var(--text); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-outline-secondary { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-outline-secondary:hover { background: var(--bg2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); border: none; }
.btn-ghost:hover { background: var(--bg2); color: var(--text); }
.btn-white { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-white:hover { background: var(--bg2); color: var(--text); }
.btn[disabled], .btn.disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* ===== BADGES ===== */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; white-space: nowrap; gap: 4px; }
.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-info { background: var(--info-light); color: #1e3a8a; }
.badge-primary { background: var(--primary-light); color: #3730a3; }
.badge-secondary { background: var(--secondary-light); color: var(--text-muted); }
.badge-dark { background: #1e293b; color: white; }
.badge i { font-size: 10px; }

/* Platform badges */
.badge-instagram { background: #fce4ec; color: #c2185b; }
.badge-facebook { background: #e3f2fd; color: #1565c0; }
.badge-linkedin { background: #e8f4fd; color: #0a66c2; }
.badge-twitter { background: #e1f5fe; color: #0277bd; }
.badge-youtube { background: #ffebee; color: #c62828; }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.alert i { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: var(--danger-light); color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background: var(--info-light); color: #1e40af; border: 1px solid #93c5fd; }
.alert-close { margin-left: auto; cursor: pointer; opacity: 0.7; }
.alert-close:hover { opacity: 1; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 18px; font-size: 13.5px; font-weight: 500; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: var(--transition); display: flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab .tab-count { background: var(--secondary-light); color: var(--text-muted); padding: 1px 6px; border-radius: 20px; font-size: 11px; }
.tab.active .tab-count { background: var(--primary-light); color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== FILTERS / SEARCH BAR ===== */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.search-input { position: relative; }
.search-input input { padding-left: 36px; min-width: 220px; }
.search-input i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 14px; }
.filter-select { min-width: 140px; }
.filter-bar .btn-group { display: flex; gap: 4px; }

/* ===== AVATAR ===== */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; }
.avatar-group { display: flex; }
.avatar-group .avatar { border: 2px solid white; margin-left: -8px; }
.avatar-group .avatar:first-child { margin-left: 0; }

/* ===== PROGRESS ===== */
.progress-bar { height: 8px; background: var(--bg2); border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 20px; background: var(--primary); transition: width 0.6s ease; }
.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger { background: var(--danger); }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }

/* ===== STATUS INDICATORS ===== */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.status-dot.active, .status-dot.posted, .status-dot.success { background: var(--success); }
.status-dot.warning, .status-dot.in_review, .status-dot.pending { background: var(--warning); }
.status-dot.danger, .status-dot.missed, .status-dot.lost { background: var(--danger); }
.status-dot.info, .status-dot.scheduled { background: var(--info); }
.status-dot.secondary, .status-dot.draft { background: var(--secondary); }

/* ===== POST CARD ===== */
.post-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card-media { aspect-ratio: 1; background: var(--bg2); position: relative; overflow: hidden; }
.post-card-media img, .post-card-media video { width: 100%; height: 100%; object-fit: cover; }
.post-card-media .post-type-pill { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: white; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; backdrop-filter: blur(4px); display: flex; align-items: center; gap: 4px; }
.post-card-media .platform-icon { top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: white; display: flex; align-items: center; justify-content: center; font-size: 14px; box-shadow: var(--shadow); }
.post-card-media .no-media { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-light); gap: 8px; font-size: 12px; }
.post-card-media .no-media i { font-size: 28px; }
.post-card-body { padding: 14px; }
.post-card-client { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; display: flex; align-items: center; gap: 4px; }
.post-card-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 8px; line-clamp: 2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--border-light); }
.post-card-meta { font-size: 11.5px; color: var(--text-muted); }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* ===== TIMELINE / WORKFLOW ===== */
.workflow-steps { display: flex; align-items: center; gap: 0; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; }
.workflow-step { display: flex; align-items: center; gap: 0; flex-shrink: 0; }
.workflow-step-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border: 2px solid var(--border); background: white; color: var(--text-muted); position: relative; z-index: 1; flex-shrink: 0; }
.workflow-step.done .workflow-step-dot { background: var(--success); border-color: var(--success); color: white; }
.workflow-step.active .workflow-step-dot { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 0 0 4px var(--primary-light); }
.workflow-step-label { font-size: 11px; font-weight: 500; color: var(--text-muted); text-align: center; margin-top: 6px; }
.workflow-step.active .workflow-step-label { color: var(--primary); font-weight: 700; }
.workflow-step.done .workflow-step-label { color: var(--success); }
.workflow-step-wrap { display: flex; flex-direction: column; align-items: center; }
.workflow-connector { height: 2px; width: 40px; background: var(--border); flex-shrink: 0; }
.workflow-connector.done { background: var(--success); }

/* ===== ONBOARDING CHECKLIST ===== */
.onboarding-list { display: flex; flex-direction: column; gap: 8px; }
.onboarding-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: white; cursor: pointer; transition: var(--transition); }
.onboarding-item:hover { border-color: var(--primary); }
.onboarding-item.done { background: var(--success-light); border-color: #a7f3d0; }
.onboarding-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: var(--transition); }
.onboarding-item.done .onboarding-check { background: var(--success); border-color: var(--success); color: white; }
.onboarding-label { font-size: 13.5px; font-weight: 500; flex: 1; }
.onboarding-item.done .onboarding-label { color: #065f46; }
.onboarding-meta { font-size: 11px; color: var(--text-muted); }

/* ===== CALENDAR ===== */
.cal-header { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--bg2); border-radius: var(--radius-sm) var(--radius-sm) 0 0; overflow: hidden; }
.cal-header-day { padding: 10px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--white); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); }
.cal-cell { background: var(--white); min-height: 110px; padding: 6px; cursor: pointer; transition: var(--transition); }
.cal-cell:hover { background: var(--bg); }
.cal-cell.other-month { background: var(--bg); }
.cal-cell.today { background: var(--primary-light); }
.cal-date { font-size: 12px; font-weight: 600; color: var(--text-muted); width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-cell.today .cal-date { background: var(--primary); color: white; }
.cal-events { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.cal-event { font-size: 11px; padding: 2px 6px; border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; transition: var(--transition); }
.cal-event:hover { opacity: 0.85; }
.cal-event.posted { background: var(--success-light); color: #065f46; }
.cal-event.scheduled { background: var(--info-light); color: #1e3a8a; }
.cal-event.draft { background: var(--secondary-light); color: var(--text-muted); }
.cal-event.in_review { background: var(--warning-light); color: #92400e; }
.cal-event.missed { background: var(--danger-light); color: #991b1b; }
.cal-event.client_approved { background: var(--success-light); color: #065f46; }

/* ===== QC PANEL ===== */
.qc-criteria { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qc-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); }
.qc-item-label { font-size: 13px; font-weight: 500; }
.qc-toggle { display: flex; gap: 6px; }
.qc-btn { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: white; transition: var(--transition); }
.qc-btn.pass.active { background: var(--success-light); border-color: var(--success); color: #065f46; }
.qc-btn.fail.active { background: var(--danger-light); border-color: var(--danger); color: #991b1b; }
.qc-score-input { width: 60px; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; text-align: center; }

/* ===== APPROVAL CARD ===== */
.approval-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: white; }
.approval-card-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.approval-card-body { padding: 18px; }
.approval-card-preview { display: grid; grid-template-columns: 200px 1fr; gap: 20px; }
.approval-img { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: var(--bg2); }
.approval-img img { width: 100%; height: 100%; object-fit: cover; }
.approval-caption { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13.5px; color: var(--text); line-height: 1.7; max-height: 200px; overflow-y: auto; }
.approval-actions { padding: 14px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ===== ANALYTICS CHARTS ===== */
.chart-container { position: relative; background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; }
.chart-container canvas { max-height: 280px; }

/* ===== PLATFORM COLORS ===== */
.platform-instagram { color: var(--instagram); }
.platform-facebook { color: var(--facebook); }
.platform-linkedin { color: var(--linkedin); }
.platform-twitter { color: var(--twitter); }
.platform-youtube { color: var(--youtube); }
.bg-instagram { background: var(--instagram); }
.bg-facebook { background: var(--facebook); }
.bg-linkedin { background: var(--linkedin); }
.bg-twitter { background: var(--twitter); }

/* ===== NOTIFICATION PANEL ===== */
.notif-panel { position: fixed; top: var(--header-h); right: 0; width: 360px; height: calc(100vh - var(--header-h)); background: white; border-left: 1px solid var(--border); z-index: 200; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; box-shadow: var(--shadow-xl); }
.notif-panel.open { transform: translateX(0); }
.notif-panel-header { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: white; z-index: 1; }
.notif-item { padding: 14px 18px; border-bottom: 1px solid var(--border-light); display: flex; gap: 12px; cursor: pointer; transition: var(--transition); }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--primary-light); }
.notif-item.unread:hover { background: #dde4ff; }
.notif-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.notif-text { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal { background: white; border-radius: var(--radius-lg); width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl); animation: slideUp 0.25s ease; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }
.modal-header { padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--bg2); cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body { padding: 0 24px 20px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ===== EMPTY STATE ===== */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.empty-state-icon { width: 72px; height: 72px; background: var(--bg2); border-radius: var(--radius-xl); display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--text-light); margin-bottom: 16px; }
.empty-state h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; color: var(--text-muted); max-width: 320px; line-height: 1.6; margin-bottom: 20px; }

/* ===== DROPDOWN ===== */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); right: 0; background: white; border: 1px solid var(--border); border-radius: var(--radius); min-width: 180px; box-shadow: var(--shadow-lg); z-index: 150; display: none; overflow: hidden; }
.dropdown-menu.open { display: block; animation: fadeIn 0.15s ease; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 13.5px; color: var(--text); cursor: pointer; transition: var(--transition); }
.dropdown-item:hover { background: var(--bg); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-light); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ===== SCORING ===== */
.score-ring { position: relative; width: 80px; height: 80px; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring .score-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; }
.score-bar { height: 6px; background: var(--bg2); border-radius: 20px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 20px; }
.score-excellent { color: var(--success); }
.score-good { color: var(--info); }
.score-average { color: var(--warning); }
.score-poor { color: var(--danger); }

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-left { background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%); padding: 60px; display: flex; flex-direction: column; justify-content: center; color: white; }
.auth-left h1 { font-size: 36px; font-weight: 800; font-family: 'Plus Jakarta Sans', sans-serif; margin-bottom: 16px; line-height: 1.2; }
.auth-left p { font-size: 16px; opacity: 0.9; line-height: 1.7; margin-bottom: 32px; }
.auth-features { display: flex; flex-direction: column; gap: 16px; }
.auth-feature { display: flex; align-items: center; gap: 12px; }
.auth-feature-icon { width: 40px; height: 40px; background: rgba(255,255,255,.15); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.auth-feature-text h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.auth-feature-text p { font-size: 12.5px; opacity: 0.8; }
.auth-right { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.auth-box { width: 100%; max-width: 400px; }
.auth-logo { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 22px; color: var(--text); margin-bottom: 32px; display: flex; align-items: center; gap: 10px; }
.auth-logo-icon { width: 38px; height: 38px; background: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; }
.auth-title { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 6px; font-family: 'Plus Jakarta Sans', sans-serif; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.auth-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-md); }
.auth-footer-text { font-size: 13px; text-align: center; color: var(--text-muted); margin-top: 20px; }

/* ===== SUPERADMIN ===== */
.superadmin-banner { background: linear-gradient(90deg, #1e293b, #334155); color: white; padding: 4px 0; text-align: center; font-size: 12px; font-weight: 500; }
.superadmin-banner span { color: #fbbf24; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }
.fade-in { animation: fadeIn 0.3s ease; }

/* ===== UTILITIES ===== */
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.text-lg { font-size: 16px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.rounded { border-radius: var(--radius-sm); }
.rounded-full { border-radius: 50%; }
.border { border: 1px solid var(--border); }
.bg-white { background: white; }
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }
.bg-warning { background: var(--warning); }
.bg-primary { background: var(--primary); }
.text-white { color: white; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.overflow-hidden { overflow: hidden; }
.divide-y > * + * { border-top: 1px solid var(--border-light); }
.p-0 { padding: 0; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.cursor-pointer { cursor: pointer; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.relative { position: relative; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.min-w-0 { min-width: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .page-content { padding: 16px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .grid-2, .grid-3, .grid-4, .stat-grid-3 { grid-template-columns: 1fr; }
  .stat-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .approval-card-preview { grid-template-columns: 1fr; }
  .qc-criteria { grid-template-columns: 1fr; }
}
