/* ===================================================================
   WORKMINT — CORE DESIGN SYSTEM & RESPONSIVE LAYOUT ENGINE
   Designed for all devices: Mobile (<768px), Tablet (768px-1023px), Laptop & Desktop (1024px+)
=================================================================== */

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

:root {
  --teal: #0B5D5A;
  --teal-dark: #073E3C;
  --teal-light: #127975;
  --mint: #00B899;
  --mint-dark: #00967D;
  --mint-light: #E3F7F2;
  --amber: #FFB020;
  --amber-light: #FFF4E0;
  --red: #FF5252;
  --blue: #2952CC;
  --blue-light: #E9F0FF;

  --bg: #F4F7F6;
  --surface: #FFFFFF;
  --surface-2: #EAF0EE;
  --border: #E0E7E5;
  --border-hover: #B8D6D2;

  --ink: #0F1E1D;
  --ink-dim: #506361;
  --ink-faint: #8E9E9C;

  --font-display: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 10px;
  --tabbar-h: 68px;
  --topbar-h: 60px;
  
  --maxw-mobile: 500px;
  --maxw-desktop: 1280px;
  --shadow-sm: 0 2px 8px rgba(11, 93, 90, 0.04);
  --shadow-md: 0 8px 24px rgba(11, 93, 90, 0.07);
  --shadow-lg: 0 16px 40px rgba(11, 93, 90, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Master Frame Container */
.app-frame {
  width: 100%;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (max-width: 767px) {
  .app-frame {
    max-width: var(--maxw-mobile);
    padding-bottom: calc(var(--tabbar-h) + 16px);
    box-shadow: 0 0 50px rgba(11,93,90,0.06);
  }
  .desktop-nav { display: none !important; }
  .desktop-footer { display: none !important; }
}

@media (min-width: 768px) {
  .app-frame {
    max-width: 100%;
    min-height: 100vh;
  }
  .topbar { display: none !important; }
  .tabbar { display: none !important; }
  .desktop-nav { display: flex !important; }
  .desktop-footer { display: block !important; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; color: var(--ink); line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { color: var(--ink-dim); }

.wrap {
  width: 100%;
  max-width: var(--maxw-desktop);
  margin: 0 auto;
  padding: 0 18px;
  flex: 1;
}

@media (min-width: 768px) {
  .wrap { padding: 32px 28px; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.15rem; }
}

@media (min-width: 1024px) {
  .wrap { padding: 40px 36px; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.6rem; }
}

/* ===== Desktop Navigation Header ===== */
.desktop-nav {
  width: 100%;
  height: 78px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(11, 93, 90, 0.03);
}
.desktop-nav-inner {
  max-width: var(--maxw-desktop);
  width: 100%;
  margin: 0 auto;
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.desktop-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform 0.18s ease;
}
.desktop-nav-brand:hover { transform: scale(1.02); }
.desktop-nav-brand img.brand-logo {
  height: 40px;
  width: auto;
}
.desktop-nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  padding: 5px;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.desktop-nav-menu .nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-dim);
  transition: all 0.18s ease;
}
.desktop-nav-menu .nav-link svg {
  width: 18px;
  height: 18px;
}
.desktop-nav-menu .nav-link:hover {
  color: var(--teal);
  background: rgba(255,255,255,0.7);
}
.desktop-nav-menu .nav-link.active {
  color: var(--teal);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  font-weight: 700;
}
.desktop-nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ===== Desktop Footer ===== */
.desktop-footer {
  background: var(--teal-dark);
  color: #fff;
  padding: 48px 0 32px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.df-inner {
  max-width: var(--maxw-desktop);
  margin: 0 auto;
  padding: 0 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.df-brand p { color: rgba(255,255,255,0.7); font-size: 0.88rem; margin-top: 12px; max-width: 320px; }
.df-col h4 { color: #fff; font-size: 0.95rem; margin-bottom: 16px; }
.df-col a { display: block; color: rgba(255,255,255,0.75); font-size: 0.88rem; margin-bottom: 10px; transition: color 0.15s ease; }
.df-col a:hover { color: var(--mint); }
.df-bottom {
  max-width: var(--maxw-desktop);
  margin: 36px auto 0;
  padding: 24px 36px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

/* ===== Top bar (Mobile) ===== */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  background: var(--bg);
  position: sticky; top: 0; z-index: 40;
}
.topbar-brand { display: flex; align-items: center; gap: 9px; }
.topbar-brand img.brand-logo { height: 32px; width: auto; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: var(--ink-dim);
  border: 1px solid var(--border); position: relative;
  transition: all 0.18s ease;
}
.icon-btn:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 1.5px solid var(--bg); }

/* Page header */
.page-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: var(--bg); position: sticky; top: 0; z-index: 40;
}
.page-header .back { width: 36px; height: 36px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s ease; }
.page-header .back:hover { border-color: var(--teal); color: var(--teal); }
.page-header .back svg { width: 16px; height: 16px; }
.page-header h1 { font-size: 1.2rem; }

@media (min-width: 768px) {
  .page-header {
    position: static;
    padding: 0 0 20px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
  }
  .page-header h1 { font-size: 1.75rem; }
}

/* ===== Bottom Tab Bar (Mobile) ===== */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw-mobile);
  height: var(--tabbar-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-faint); flex: 1; padding: 8px 0; position: relative; transition: color 0.15s ease; }
.tab-item svg { width: 22px; height: 22px; }
.tab-item span { font-family: var(--font-body); font-size: 0.65rem; font-weight: 600; }
.tab-item.active { color: var(--teal); }
.tab-item.active::before { content: ''; position: absolute; top: 0; width: 24px; height: 3px; background: var(--mint); border-radius: 0 0 3px 3px; }
.tab-item.post-tab .post-fab {
  width: 44px; height: 44px; border-radius: 50%; background: var(--teal);
  display: flex; align-items: center; justify-content: center; margin-bottom: -2px;
  box-shadow: 0 4px 14px rgba(11,93,90,0.35); transition: transform 0.18s ease;
}
.tab-item.post-tab:hover .post-fab { transform: scale(1.08); }
.tab-item.post-tab .post-fab svg { width: 20px; height: 20px; color: #fff; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; font-family: var(--font-body); font-weight: 700; font-size: 0.9rem;
  border-radius: 12px; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(11,93,90,0.22); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(11,93,90,0.3); }
.btn-mint { background: var(--mint); color: #fff; box-shadow: 0 4px 14px rgba(0,184,153,0.28); }
.btn-mint:hover { background: var(--mint-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,184,153,0.35); }
.btn-ghost { background: var(--surface); color: var(--teal); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--teal); background: var(--mint-light); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-sm { padding: 9px 18px; font-size: 0.84rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 0.98rem; border-radius: 14px; }

/* ===== Chips & Toggles ===== */
.pill-toggle { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; border: 1px solid var(--border); }
.pill-toggle button { flex: 1; padding: 11px; border-radius: 10px; font-weight: 700; font-size: 0.88rem; color: var(--ink-dim); transition: all 0.18s ease; }
.pill-toggle button.active { background: var(--surface); color: var(--teal); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); font-size: 0.82rem; font-weight: 600; color: var(--ink-dim); white-space: nowrap; cursor: pointer; transition: all 0.18s ease; }
.chip:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 3px 10px rgba(11,93,90,0.2); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }

/* ===== Cards & Containers ===== */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease; box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }

@media (min-width: 768px) {
  .card { border-radius: var(--radius-lg); }
  .card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
  }
}

/* Job Card Styling */
.job-card { padding: 20px; margin-bottom: 14px; position: relative; }
.jc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.jc-biz { display: flex; align-items: center; gap: 12px; }
.jc-logo { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; color: #fff; font-size: 1.1rem; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.jc-biz-name { display: flex; align-items: center; gap: 6px; font-size: 0.96rem; font-weight: 700; color: var(--ink); }
.jc-biz-name svg.verify { width: 15px; height: 15px; color: var(--mint); }
.jc-loc { font-size: 0.78rem; color: var(--ink-faint); margin-top: 1px; }
.jc-badge { font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.jc-badge.urgent { background: var(--amber-light); color: #9A6400; }
.jc-badge.new { background: var(--mint-light); color: var(--teal); }
.jc-title { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; margin-bottom: 12px; color: var(--ink); }
.jc-meta-row { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.jc-meta { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--ink-dim); }
.jc-meta svg { width: 15px; height: 15px; color: var(--ink-faint); }
.jc-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); }
.jc-pay { font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; color: var(--teal); }
.jc-pay span { font-size: 0.75rem; font-weight: 500; color: var(--ink-faint); }

/* Jobs Grid System for Laptop & Desktop */
.jobs-grid { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 768px) {
  .jobs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .jobs-grid .job-card { margin-bottom: 0; }
}
@media (min-width: 1280px) {
  .jobs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* Sidebar Layout for Desktop Jobs/Filters */
.desktop-filter-layout { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1024px) {
  .desktop-filter-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
  }
}

.filter-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); position: sticky; top: 100px; }
.filter-sidebar h3 { font-size: 1.05rem; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.filter-group select, .filter-group input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surface); font-size: 0.88rem; color: var(--ink); }

/* Section Headers */
.sec-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 14px; }
.sec-head h2 { font-size: 1.08rem; }
.sec-head .see-all { font-size: 0.82rem; font-weight: 700; color: var(--teal); transition: color 0.15s ease; }
.sec-head .see-all:hover { color: var(--mint); }

@media (min-width: 768px) {
  .sec-head h2 { font-size: 1.35rem; }
  .sec-head { margin: 36px 0 20px; }
}

/* Stats Row */
.stat-row { display: flex; gap: 12px; }
.stat-box { flex: 1; background: var(--surface); border-radius: var(--radius-sm); padding: 18px 14px; text-align: center; border: 1px solid var(--border); transition: all 0.18s ease; }
.stat-box:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-box .n { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; color: var(--teal); }
.stat-box .l { font-size: 0.72rem; color: var(--ink-faint); margin-top: 3px; }

/* Form Field & Form Grid */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .form-grid .field-full { grid-column: 1 / -1; }
}

.field { margin-bottom: 16px; }
.form-grid .field { margin-bottom: 0; }
.field label { display: block; font-size: 0.84rem; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--surface); font-family: var(--font-body); font-size: 0.92rem; color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--mint); box-shadow: 0 0 0 3px rgba(0,184,153,0.12); }

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; } }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 2px;
}

.divider { height: 1px; background: var(--border); margin: 6px 0; }
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state svg { width: 52px; height: 52px; color: var(--ink-faint); margin: 0 auto 16px; }
.empty-state p { font-size: 0.88rem; }
