/* ── Google Fonts ────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=DM+Sans:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:         #2563EB;
  --blue-dark:    #1D4ED8;
  --blue-light:   #EFF6FF;
  --blue-mid:     #BFDBFE;
  --orange:       #F97316;
  --orange-light: #FFF7ED;
  --orange-mid:   #FED7AA;
  --green:        #10B981;
  --red:          #EF4444;
  --gray-50:      #F8FAFC;
  --gray-100:     #F1F5F9;
  --gray-200:     #E2E8F0;
  --gray-300:     #CBD5E1;
  --gray-400:     #94A3B8;
  --gray-500:     #64748B;
  --gray-600:     #475569;
  --gray-700:     #334155;
  --gray-800:     #1E293B;
  --gray-900:     #0F172A;
  --sidebar-w:    240px;
  --radius:       10px;
  --radius-lg:    14px;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: 'DM Sans', system-ui, sans-serif; background: var(--gray-50); color: var(--gray-800); line-height: 1.5; }
h1,h2,h3,h4,h5 { font-family: 'Sora', sans-serif; }
a { text-decoration: none; color: inherit; }
button, input[type=submit], input[type=button] { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; transition: border-color .15s; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }

/* ── Cards ───────────────────────────────────── */
.card { background:#fff; border:1px solid var(--gray-200); border-radius:var(--radius-lg); }

/* ── Buttons ─────────────────────────────────── */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; font-size:14px; font-weight:600; padding:10px 22px; border-radius:var(--radius); border:none; cursor:pointer; transition:all .15s; text-decoration:none; }
.btn-primary  { background:var(--blue);  color:#fff; }
.btn-primary:hover  { background:var(--blue-dark); }
.btn-primary:active { transform:scale(.98); }
.btn-primary:disabled { opacity:.5; cursor:not-allowed; }
.btn-secondary { background:#fff; color:var(--gray-700); border:1px solid var(--gray-200); }
.btn-secondary:hover  { background:var(--gray-50); }
.btn-danger   { background:#FEF2F2; color:#991B1B; border:1px solid #FECACA; }
.btn-danger:hover { background:#FEE2E2; }
.btn-sm { padding:7px 14px; font-size:12px; }
.btn-full { width:100%; }

/* ── Forms ───────────────────────────────────── */
.field { margin-bottom:18px; }
.field label { display:block; font-size:12px; font-weight:600; color:var(--gray-600); margin-bottom:6px; text-transform:uppercase; letter-spacing:.4px; }
.field input, .field select, .field textarea {
  width:100%; padding:10px 14px;
  border:1px solid var(--gray-200); border-radius:var(--radius);
  font-size:14px; color:var(--gray-800); background:#fff;
}
.field input::placeholder { color:var(--gray-400); }
.field input:disabled, .field select:disabled { background:var(--gray-50); color:var(--gray-400); cursor:not-allowed; }
.field-hint { font-size:11px; color:var(--gray-400); margin-top:4px; }
.field-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }

/* ── Alerts / Flash ──────────────────────────── */
.alert { padding:11px 16px; border-radius:var(--radius); font-size:13px; margin-bottom:18px; }
.alert-success { background:#ECFDF5; border:1px solid #A7F3D0; color:#065F46; }
.alert-error   { background:#FEF2F2; border:1px solid #FECACA; color:#991B1B; }
.alert-info    { background:var(--blue-light); border:1px solid var(--blue-mid); color:#1E40AF; }

/* ── Badge ───────────────────────────────────── */
.badge { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:600; padding:3px 10px; border-radius:20px; text-transform:capitalize; }
.badge-dot { width:6px; height:6px; border-radius:50%; }
.badge-active    { background:#ECFDF5; color:#065F46; } .badge-active    .badge-dot { background:var(--green); }
.badge-completed { background:#EFF6FF; color:#1E40AF; } .badge-completed .badge-dot { background:var(--blue); }
.badge-failed    { background:#FEF2F2; color:#991B1B; } .badge-failed    .badge-dot { background:var(--red); }

/* ── App layout ──────────────────────────────── */
.app-layout { display:flex; min-height:100vh; }
.app-sidebar {
  width:var(--sidebar-w); background:var(--gray-900);
  display:flex; flex-direction:column;
  position:fixed; top:0; left:0; height:100vh; z-index:100; overflow-y:auto;
}
.app-main { margin-left:var(--sidebar-w); flex:1; min-height:100vh; }
.page-content { padding:32px 36px; max-width:1100px; }

/* ── Sidebar ─────────────────────────────────── */
.sidebar-logo { padding:22px 18px 18px; border-bottom:1px solid rgba(255,255,255,.07); display:flex; align-items:center; gap:10px; }
.sidebar-logo-icon { width:34px; height:34px; border-radius:8px; background:var(--blue); display:flex; align-items:center; justify-content:center; font-size:17px; flex-shrink:0; }
.sidebar-logo-text { font-family:'Sora',sans-serif; font-size:17px; font-weight:700; color:#fff; }
.sidebar-nav { padding:12px 10px; flex:1; }
.sidebar-nav-item {
  display:flex; align-items:center; gap:10px;
  width:100%; padding:10px 12px; border-radius:8px; margin-bottom:2px;
  font-size:13.5px; font-weight:400; color:var(--gray-400);
  transition:background .15s,color .15s;
  cursor:pointer; text-align:left; border:none; background:none; text-decoration:none;
}
.sidebar-nav-item:hover  { background:rgba(255,255,255,.06); color:var(--gray-200); }
.sidebar-nav-item.active { background:var(--blue); color:#fff; font-weight:600; }
.sidebar-nav-item svg    { flex-shrink:0; }
.sidebar-footer { padding:14px 10px; border-top:1px solid rgba(255,255,255,.07); }
.sidebar-user   { display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:8px; margin-bottom:6px; }
.sidebar-avatar { width:32px; height:32px; border-radius:50%; background:var(--blue); display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:#fff; flex-shrink:0; }
.sidebar-user-name  { font-size:13px; color:#fff; font-weight:500; }
.sidebar-user-email { font-size:11px; color:var(--gray-500); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:140px; }

/* ── Page header ─────────────────────────────── */
.page-header { margin-bottom:28px; }
.page-header h1 { font-size:22px; font-weight:700; color:var(--gray-900); margin-bottom:4px; }
.page-header p  { font-size:14px; color:var(--gray-500); }

/* ── Stats grid ──────────────────────────────── */
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:28px; }
.stat-card  { padding:18px 20px; }
.stat-icon  { width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:17px; margin-bottom:10px; }
.stat-label { font-size:12px; color:var(--gray-500); font-weight:500; margin-bottom:4px; }
.stat-value { font-family:'Sora',sans-serif; font-size:28px; font-weight:700; color:var(--gray-900); }

/* ── Table ───────────────────────────────────── */
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
thead tr { background:var(--gray-50); border-bottom:1px solid var(--gray-200); }
th { padding:11px 16px; font-size:11px; font-weight:700; color:var(--gray-500); text-align:left; text-transform:uppercase; letter-spacing:.5px; white-space:nowrap; }
td { padding:13px 16px; font-size:13px; color:var(--gray-700); vertical-align:middle; }
tbody tr { border-bottom:1px solid var(--gray-100); transition:background .1s; }
tbody tr:last-child { border-bottom:none; }
tbody tr:hover { background:var(--gray-50); }

/* ── Filter tabs ─────────────────────────────── */
.filter-tabs { display:flex; gap:8px; margin-bottom:18px; flex-wrap:wrap; }
.filter-tab  { padding:7px 16px; border-radius:20px; font-size:12px; font-weight:500; border:1px solid var(--gray-200); background:#fff; color:var(--gray-500); cursor:pointer; transition:all .15s; text-decoration:none; }
.filter-tab:hover, .filter-tab.active { background:var(--blue); color:#fff; border-color:var(--blue); }

/* ── Toggle switch ───────────────────────────── */
.toggle { position:relative; width:42px; height:24px; background:var(--gray-300); border-radius:12px; cursor:pointer; transition:background .2s; border:none; flex-shrink:0; display:inline-block; }
.toggle.on { background:var(--blue); }
.toggle::after { content:''; position:absolute; width:18px; height:18px; border-radius:50%; background:#fff; top:3px; left:3px; transition:left .2s; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.toggle.on::after { left:21px; }

/* ── Repeat pills ────────────────────────────── */
.repeat-options { display:flex; gap:8px; flex-wrap:wrap; }
.repeat-pill    { padding:8px 18px; border-radius:20px; font-size:13px; font-weight:500; border:1.5px solid var(--gray-200); background:#fff; color:var(--gray-500); cursor:pointer; transition:all .15s; }
.repeat-pill.active, .repeat-pill:hover { background:var(--blue); color:#fff; border-color:var(--blue); }

/* ── Channel options ─────────────────────────── */
.channel-opt { padding:10px 20px; border-radius:var(--radius); font-size:13px; border:1.5px solid var(--gray-200); background:#fff; color:var(--gray-500); cursor:pointer; transition:all .15s; }
.channel-opt.active { background:var(--blue-light); color:var(--blue); border-color:var(--blue); font-weight:600; }
.channel-opt:disabled { opacity:.5; cursor:not-allowed; }

/* ── Auth pages ──────────────────────────────── */
.auth-page   { min-height:100vh; display:flex; align-items:center; justify-content:center; background:var(--gray-50); padding:24px; }
.auth-box    { width:100%; max-width:400px; }
.auth-logo   { text-align:center; margin-bottom:28px; }
.auth-logo-icon { width:48px; height:48px; border-radius:12px; background:var(--blue); display:flex; align-items:center; justify-content:center; font-size:24px; margin:0 auto 14px; }
.auth-logo h1 { font-size:22px; font-weight:700; color:var(--gray-900); margin-bottom:4px; }
.auth-logo p  { font-size:13px; color:var(--gray-500); }
.auth-card   { padding:28px 30px; }
.auth-footer { text-align:center; margin-top:18px; font-size:13px; color:var(--gray-500); }
.auth-footer a { color:var(--blue); font-weight:600; }

/* ── Landing ─────────────────────────────────── */
.landing-nav { padding:16px 48px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--gray-100); background:#fff; position:sticky; top:0; z-index:50; }
.landing-hero { padding:80px 48px 64px; text-align:center; background:linear-gradient(180deg,#EFF6FF 0%,#fff 60%); }
.landing-hero h1 { font-size:44px; font-weight:700; line-height:1.15; color:var(--gray-900); max-width:620px; margin:0 auto 18px; }
.landing-hero p  { font-size:16px; color:var(--gray-500); max-width:500px; margin:0 auto 36px; line-height:1.7; }
.hero-badge { display:inline-block; background:var(--orange-light); color:var(--orange); font-size:11px; font-weight:700; padding:5px 14px; border-radius:20px; margin-bottom:18px; text-transform:uppercase; letter-spacing:1px; }
.hero-btns  { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.landing-section { padding:64px 48px; }
.landing-section.gray-bg { background:var(--gray-50); }
.landing-section.dark-bg { background:var(--gray-900); }
.section-title { text-align:center; font-size:26px; font-weight:700; color:var(--gray-900); margin-bottom:8px; }
.section-sub   { text-align:center; font-size:15px; color:var(--gray-500); margin-bottom:40px; }
.features-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; }
.feature-card  { padding:22px; }
.feature-icon  { font-size:26px; margin-bottom:12px; }
.feature-title { font-size:15px; font-weight:600; margin-bottom:6px; color:var(--gray-900); }
.feature-desc  { font-size:13px; color:var(--gray-500); line-height:1.6; }
.pricing-grid  { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; max-width:820px; margin:0 auto; }
.pricing-card  { padding:26px; position:relative; }
.pricing-card.highlighted { border:2px solid var(--blue); }
.pricing-badge { position:absolute; top:-12px; left:50%; transform:translateX(-50%); background:var(--blue); color:#fff; font-size:10px; font-weight:700; padding:4px 14px; border-radius:20px; white-space:nowrap; letter-spacing:.5px; }
.pricing-name  { font-size:11px; font-weight:700; color:var(--gray-500); text-transform:uppercase; letter-spacing:1px; margin-bottom:6px; }
.pricing-price { font-family:'Sora',sans-serif; font-size:32px; font-weight:700; color:var(--gray-900); margin-bottom:18px; }
.pricing-price span { font-size:14px; font-weight:400; color:var(--gray-500); }
.pricing-features { list-style:none; margin-bottom:22px; }
.pricing-features li { font-size:13px; color:var(--gray-600); padding:6px 0; display:flex; align-items:center; gap:8px; border-bottom:1px solid var(--gray-100); }
.pricing-features li::before { content:'✓'; color:var(--green); font-weight:700; }
.landing-footer { background:var(--gray-900); padding:32px 48px; display:flex; align-items:center; justify-content:space-between; }
.landing-footer p { font-size:12px; color:var(--gray-500); }

/* ── Misc ────────────────────────────────────── */
.tag-pill { font-size:11px; padding:3px 8px; border-radius:4px; font-weight:600; }
.tag-it      { background:var(--blue-light);   color:var(--blue); }
.tag-general { background:var(--orange-light);  color:var(--orange); }
.tag-finance { background:#F0FDF4; color:#166534; }
.tag-hr      { background:#FDF4FF; color:#7E22CE; }
.tag-marketing { background:#FFF7ED; color:#C2410C; }
.channel-pill { font-size:11px; background:var(--blue-light); color:var(--blue); padding:3px 8px; border-radius:4px; font-weight:600; }
.it-panel-item { background:rgba(255,255,255,.08); border-radius:8px; padding:9px 12px; margin-bottom:8px; font-size:12px; color:#fff; display:flex; align-items:center; gap:8px; }
.empty-state { text-align:center; padding:48px 24px; }
.empty-state .empty-icon { font-size:36px; margin-bottom:12px; }
.empty-state p { color:var(--gray-500); margin-bottom:16px; font-size:14px; }
.dashboard-grid  { display:grid; grid-template-columns:1fr 340px; gap:20px; }
.section-header  { padding:18px 20px; border-bottom:1px solid var(--gray-100); display:flex; justify-content:space-between; align-items:center; }
.section-header h3 { font-size:15px; font-weight:600; }
.section-header a  { font-size:12px; color:var(--blue); font-weight:500; }

@media (max-width: 900px) {
  .app-sidebar { transform:translateX(-100%); }
  .app-main { margin-left:0; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .features-grid, .pricing-grid { grid-template-columns:1fr; }
  .dashboard-grid { grid-template-columns:1fr; }
  .landing-nav, .landing-hero, .landing-section { padding-left:20px; padding-right:20px; }
  .landing-hero h1 { font-size:28px; }
}
