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

/* ── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #14a800;
  --green-dark:  #108a00;
  --blue:        #1c85e8;
  --blue-dark:   #1570cc;
  --text:        #1f1f1f;
  --text-muted:  #6e6e6e;
  --text-light:  #999;
  --border:      #e0e0e0;
  --surface:     #fafafa;
  --white:       #ffffff;
  --danger:      #d93025;
  --warning:     #e67e22;
  --info:        #2980b9;
  --radius:      4px;
  --shadow:      0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 2px 8px rgba(0,0,0,.10);
  --nav-h:       64px;
}

body.dark-theme,
html.dark-theme body {
  --text:        #e4e4e4;
  --text-muted:  #a1a1a1;
  --text-light:  #777777;
  --border:      #333333;
  --surface:     #121212;
  --white:       #1e1e1e;
  --shadow:      0 1px 4px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.6);
}

body.dark-theme .badge-real   { background: #102640; color: #64b5f6; }
body.dark-theme .badge-open   { background: #0b3310; color: var(--green); }
body.dark-theme .badge-closed { background: #3d1515; color: #e57373; }
body.dark-theme .badge-fixed  { background: #3d2b0e; color: #ffb74d; }
body.dark-theme .badge-hourly { background: #102640; color: #64b5f6; }
body.dark-theme .badge-daily  { background: #0b3310; color: var(--green); }

body.dark-theme .alert-success{ background: #0b3310; border-color: var(--green); color: #81c784; }
body.dark-theme .alert-error  { background: #3d1515; border-color: var(--danger); color: #e57373; }
body.dark-theme .alert-warning{ background: #3d2b0e; border-color: var(--warning); color: #ffb74d; }
body.dark-theme .alert-info   { background: #102640; border-color: var(--blue); color: #64b5f6; }

body.dark-theme .skill-tag    { background: #2c2c2c; }
body.dark-theme .winner-box   { background: #242424; }
body.dark-theme .sidebar-nav li a:hover { background: #2a2a2a; }
body.dark-theme .sidebar-nav li a.active { background: #0b3310; }
body.dark-theme .btn-secondary { background: #1e1e1e; color: #e4e4e4; }
body.dark-theme .btn-secondary:hover { background: #2a2a2a; }
body.dark-theme .filters-bar .btn-sm[style*="background:#f0f0f0"] { background: #333 !important; color: #fff !important; }
body.dark-theme .job-card .btn-sm[style*="background:#f0f0f0"] { background: #333 !important; color: #888 !important; }
body.dark-theme tr:hover td { background: #262626; }

/* Dark theme for mobile drawer */
body.dark-theme .mobile-drawer-panel { background: #1e1e1e; }
body.dark-theme .mobile-drawer-link { color: var(--text-muted); }
body.dark-theme .mobile-drawer-link:hover,
body.dark-theme .mobile-drawer-link:active { background: #2a2a2a; color: var(--text); }
body.dark-theme .mobile-drawer-link.active { background: #0b3310; color: var(--green); }
body.dark-theme .mobile-drawer-divider { background: #333333; }

/* Message styling for light/dark theme */
.msg-sent { color: #1f1f1f; }
body.dark-theme .msg-sent { color: #e4e4e4; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  min-height: 100vh;
}

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

img { max-width: 100%; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p  { color: var(--text-muted); }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.page-wrap { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 48px; min-height: 100vh; }

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.nav-brand { font-size: 1.2rem; font-weight: 700; color: var(--text); letter-spacing: -0.3px; white-space: nowrap; }
.nav-brand span { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.mobile-menu-btn { display: none; background: transparent; border: none; cursor: pointer; color: var(--text); font-size: 1.5rem; padding: 8px; border-radius: var(--radius); transition: background 0.2s; }
.mobile-menu-btn:active { background: var(--surface); }

/* ── Mobile Drawer Menu ─────────────────────────────────────────────────── */
.mobile-drawer { display: none; }
.mobile-drawer-overlay { 
  display: none;
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0; 
  background: rgba(0,0,0,0.5); 
  z-index: 150;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-drawer-overlay.active { display: block; opacity: 1; }
.mobile-drawer-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--white);
  z-index: 160;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.mobile-drawer-panel.active { transform: translateX(0); }
.mobile-drawer-close {
  align-self: flex-end;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  padding: 12px;
  cursor: pointer;
}
.mobile-drawer-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-drawer-link {
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mobile-drawer-link:hover,
.mobile-drawer-link:active { background: #f3f3f3; color: var(--text); }
.mobile-drawer-link.active { background: #ebf8e6; color: var(--green); font-weight: 600; }
.mobile-drawer-divider { height: 1px; background: var(--border); margin: 8px 0; }
.mobile-drawer-button { padding: 10px 14px; margin: 4px 0; width: 100%; }
.nav-links a {
  padding: 6px 14px; border-radius: var(--radius);
  color: var(--text-muted); font-size: .9rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--text); }
.nav-connects {
  display: flex; align-items: center; gap: 6px;
  font-size: .85rem; font-weight: 600; color: var(--green);
  border: 1px solid var(--green); border-radius: 20px; padding: 4px 12px;
}
.nav-notif { position: relative; cursor: pointer; }
.notif-badge {
  position: absolute; top: -5px; right: -5px;
  background: var(--danger); color: #fff; font-size: .65rem;
  border-radius: 9px; padding: 1px 5px; min-width: 16px; text-align: center;
}
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}

/* ── Sidebar Layout ─────────────────────────────────────────────────────────── */
.layout-2col {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start;
}
.sidebar { position: sticky; top: calc(var(--nav-h) + 24px); }
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: var(--radius);
  color: var(--text-muted); font-size: .9rem; font-weight: 500;
  transition: background .12s, color .12s;
}
.sidebar-nav li a:hover { background: #f3f3f3; color: var(--text); text-decoration: none; }
.sidebar-nav li a.active { background: #ebf8e6; color: var(--green); font-weight: 600; }
.sidebar-nav li a svg { flex-shrink: 0; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 20px; border-radius: var(--radius); border: none;
  font-family: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: background .15s, opacity .15s; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn-primary  { background: var(--green); color: #fff; }
.btn-secondary{ background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-blue     { background: var(--blue); color: #fff; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-sm       { padding: 6px 14px; font-size: .82rem; }
.btn-block    { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.card + .card { margin-top: 16px; }

/* ── Job Cards ──────────────────────────────────────────────────────────────── */
.job-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  transition: box-shadow .15s;
}
.job-card:hover { box-shadow: var(--shadow-md); }
.job-card + .job-card { margin-top: 12px; }
.job-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.job-title { font-size: 1rem; font-weight: 600; color: var(--text); word-break: break-word; }
.job-title:hover { color: var(--blue); }
.job-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.job-meta span { font-size: .82rem; color: var(--text-muted); }
.job-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 20px;
  font-size: .76rem; font-weight: 600; line-height: 1.6;
}
.badge-robot  { background: #f0f0f0; color: #555; }
.badge-real   { background: #e6f4ff; color: var(--blue); }
.badge-open   { background: #ebfae6; color: var(--green); }
.badge-closed { background: #fee; color: var(--danger); }
.badge-fixed  { background: #fff7e6; color: #b06000; }
.badge-hourly { background: #e6f0ff; color: var(--blue); }
.badge-daily  { background: #e6ffe6; color: var(--green); }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .88rem; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: .9rem; color: var(--text);
  background: var(--white); outline: none;
  transition: border-color .15s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--green); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: .78rem; color: var(--text-light); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
  padding: 11px 16px; border-radius: var(--radius);
  font-size: .88rem; margin-bottom: 16px; border-left: 3px solid;
}
.alert-success { background: #f0faf0; border-color: var(--green); color: #1a5c00; }
.alert-error   { background: #fff2f2; border-color: var(--danger); color: #990000; }
.alert-warning { background: #fffbf0; border-color: var(--warning); color: #7a4500; }
.alert-info    { background: #eff6ff; border-color: var(--blue); color: #0c4080; }

/* ── Tables ─────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text); background: var(--surface); }
tr:hover td { background: #fafafa; }

/* ── Stats Grid ─────────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { font-size: .8rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .4px; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--text); margin-top: 4px; }
.stat-sub   { font-size: .78rem; color: var(--text-light); margin-top: 2px; }

/* ── Connect Packages ───────────────────────────────────────────────────────── */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }
.pkg-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 20px; cursor: pointer; transition: border-color .15s;
}
.pkg-card:hover { border-color: var(--green); }
.pkg-card.selected { border-color: var(--green); border-width: 2px; }
.pkg-connects { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.pkg-price { font-size: 1.1rem; font-weight: 600; color: var(--green); margin-top: 4px; }
.pkg-name  { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 6px; margin-top: 24px; }
.pagination a, .pagination span {
  padding: 6px 12px; border-radius: var(--radius);
  border: 1px solid var(--border); font-size: .85rem; color: var(--text-muted);
  transition: background .12s;
}
.pagination a:hover { background: var(--surface); text-decoration: none; }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); font-weight: 600; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Profile Avatar ─────────────────────────────────────────────────────────── */
.avatar-lg {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
}
.avatar-placeholder {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700;
}

/* ── Skills Tags ────────────────────────────────────────────────────────────── */
.skills-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.skill-tag {
  padding: 3px 12px; border-radius: 20px;
  background: #f3f3f3; color: var(--text-muted);
  font-size: .8rem; font-weight: 500;
}

/* ── Notification List ──────────────────────────────────────────────────────── */
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .88rem;
}
.notif-content { min-width: 0; }
.notif-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.notif-link:hover { color: var(--green); text-decoration: underline; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; margin-top: 6px; }
.notif-time { font-size: .76rem; color: var(--text-light); margin-top: 2px; }

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: background .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { background: var(--surface); }
.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.link-list-builder {
  display: grid;
  gap: 8px;
}
.link-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.link-input-row .form-input {
  flex: 1 1 320px;
}

/* ── Landing Page ───────────────────────────────────────────────────────────── */
.hero {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 80px 0 60px;
}
.hero h1 { font-size: 2.4rem; font-weight: 700; color: var(--text); max-width: 600px; }
.hero h1 span { color: var(--green); }
.hero p { font-size: 1.05rem; max-width: 520px; margin-top: 14px; color: var(--text-muted); }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; }
.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.role-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.role-card:hover { border-color: var(--green); box-shadow: var(--shadow-md); }
.role-card h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 8px; }
.role-card p { font-size: .88rem; color: var(--text-muted); }

/* ── Page Sections ──────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.page-header h1 { font-size: 1.4rem; }
.section-title { font-size: 1rem; font-weight: 600; margin-bottom: 14px; }
.empty-state { text-align: center; padding: 48px 0; color: var(--text-muted); }
.empty-state p { margin-top: 8px; font-size: .95rem; }

/* ── Filters Bar ────────────────────────────────────────────────────────────── */
.filters-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 20px; padding: 14px 18px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
}
.filters-bar .form-select, .filters-bar .form-input {
  width: auto; min-width: 160px; padding: 7px 10px;
}

/* ── Winner Box (robot) ─────────────────────────────────────────────────────── */
.winner-box {
  background: #f8f8f8; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-top: 12px;
  display: flex; align-items: center; gap: 14px;
}
.winner-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #ddd; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.winner-label { font-size: .78rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .4px; }
.winner-name  { font-size: .95rem; font-weight: 600; color: var(--text); }
.winner-conn  { font-size: .82rem; color: var(--green); font-weight: 600; }

/* ── Team Grid (About) ───────────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.team-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.team-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.team-photo {
  aspect-ratio: 4 / 3;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-meta { padding: 12px 14px; }
.team-name { font-weight: 700; color: var(--text); font-size: .95rem; }
.team-role { color: var(--text-muted); font-size: .82rem; margin-top: 2px; }

/* ── Markdown Job Description ────────────────────────────────────────────── */
.job-description-md h2 { font-size: 1.1rem; font-weight: 700; margin: 20px 0 8px; color: var(--text); }
.job-description-md h3 { font-size: .95rem; font-weight: 600; margin: 16px 0 6px; color: var(--text); }
.job-description-md p  { color: var(--text); margin-bottom: 10px; }
.job-description-md ul, .job-description-md ol { padding-left: 22px; margin-bottom: 12px; color: var(--text); }
.job-description-md li { margin-bottom: 4px; }
.job-description-md hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.job-description-md strong { font-weight: 600; color: var(--text); }
.job-description-md code { background: var(--surface); padding: 1px 6px; border-radius: 3px; font-size: .85rem; }

/* ── Utility ────────────────────────────────────────────────────────────────── */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-muted  { color: var(--text-muted); }
.text-green  { color: var(--green); }
.text-danger { color: var(--danger); }
.text-sm     { font-size: .82rem; }
.fw-600      { font-weight: 600; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-2       { gap: 12px; }
.flex-1      { flex: 1; }
.text-right  { text-align: right; }
.divider     { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Mobile Utility Classes ─────────────────────────────────────────────────── */
.hide-mobile { display: none !important; }
.show-mobile { display: block !important; }
.w-full { width: 100%; }
.h-full { height: 100%; }

/* Stack layout on mobile */
.stack-mobile { display: flex; flex-direction: column; }
.stack-mobile > * + * { margin-top: 12px; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */

/* Mobile: Extra Small (< 480px) */
@media (max-width: 479px) {
  :root { --nav-h: 56px; }
  
  html { font-size: 14px; }
  
  .container { padding: 0 12px; }
  .page-wrap { padding-top: calc(var(--nav-h) + 16px); padding-bottom: 24px; }
  
  /* Navbar adjustments */
  .navbar { height: var(--nav-h); }
  .nav-brand { font-size: 1rem; }
  .mobile-menu-btn { display: block; }
  .nav-links { display: none; }
  
  /* Mobile drawer visible */
  .mobile-drawer { display: block; }
  .mobile-drawer-panel { width: 85%; max-width: 320px; }
  
  /* Sidebar hidden on mobile */
  .sidebar { display: none !important; }
  .layout-2col { grid-template-columns: 1fr !important; gap: 16px !important; }
  
  /* Typography */
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.1rem; }
  h3 { font-size: 0.95rem; }
  
  /* Buttons */
  .btn { padding: 10px 16px; font-size: .85rem; }
  .btn-sm { padding: 8px 12px; font-size: .75rem; }
  
  /* Cards */
  .card { padding: 14px; }
  .job-card { padding: 14px; }
  .job-card-header { flex-direction: column; gap: 8px; }
  .job-card-header > div:last-child { width: 100%; text-align: left; }
  
  /* Forms */
  .form-group { margin-bottom: 14px; }
  .form-input, .form-textarea, .form-select { padding: 10px 8px; font-size: .9rem; }
  .form-textarea { min-height: 80px; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .form-label { font-size: .82rem; }
  
  /* Filters bar */
  .filters-bar { 
    flex-direction: column; 
    gap: 8px; 
    padding: 10px; 
    align-items: stretch;
  }
  .filters-bar .form-select, 
  .filters-bar .form-input,
  .filters-bar .btn { 
    width: 100%; 
    min-width: unset;
  }
  
  /* Job meta */
  .job-meta { gap: 8px; }
  .job-badge { padding: 2px 8px; font-size: .7rem; }
  
  /* Stats grid */
  .stats-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 1.4rem; }
  
  /* Package grid */
  .pkg-grid { grid-template-columns: 1fr; gap: 12px; }
  .pkg-card { padding: 18px; }
  
  /* Team grid */
  .team-grid { grid-template-columns: 1fr; }
  
  /* Hero section */
  .hero { padding: 40px 0 30px; }
  .hero h1 { font-size: 1.4rem; max-width: 100%; }
  .hero p { font-size: .95rem; }
  .hero-actions { flex-direction: column; gap: 8px; }
  .hero-actions .btn { width: 100%; }
  .role-cards { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  
  /* Pagination */
  .pagination { gap: 4px; }
  .pagination a, .pagination span { padding: 4px 8px; font-size: .75rem; }
  
  /* Page header */
  .page-header h1 { font-size: 1.2rem; }
  
  /* Avatar */
  .avatar-lg, .avatar-placeholder { width: 60px; height: 60px; font-size: 1.2rem; }
  
  /* Winner box */
  .winner-box { padding: 10px 12px; gap: 10px; }
  .winner-avatar { width: 32px; height: 32px; font-size: .9rem; }
  
  /* Table responsive */
  table { font-size: .75rem; }
  th, td { padding: 6px 8px; }
  
  /* Alert */
  .alert { padding: 8px 12px; font-size: .8rem; }
  
  /* Footer */
  .footer-grid { grid-template-columns: 1fr !important; }
  footer { padding: 16px 0 !important; margin-top: 32px !important; }
}

/* Tablet: Small (480px - 768px) */
@media (min-width: 480px) and (max-width: 768px) {
  :root { --nav-h: 60px; }
  
  html { font-size: 14.5px; }
  
  .container { padding: 0 16px; }
  .page-wrap { padding-top: calc(var(--nav-h) + 24px); padding-bottom: 32px; }
  
  /* Navbar */
  .nav-brand { font-size: 1.1rem; }
  .mobile-menu-btn { display: none; }
  .nav-links { 
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
  }
  .mobile-drawer { display: none; }
  
  /* Sidebar shown on tablet */
  .sidebar { display: block; }
  .layout-2col { grid-template-columns: 220px 1fr; }
  
  .nav-links a { padding: 5px 10px; font-size: .85rem; }
  
  /* Footer */
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* Typography */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
  
  /* Layout */
  .layout-2col { grid-template-columns: 1fr; gap: 20px; }
  .sidebar { display: none; }
  
  /* Buttons */
  .btn { padding: 8px 16px; font-size: .85rem; }
  
  /* Cards */
  .card { padding: 16px; }
  .job-card { padding: 16px; }
  .job-card-header { flex-direction: column; gap: 10px; }
  
  /* Forms */
  .form-row { grid-template-columns: 1fr; }
  .form-input, .form-textarea { padding: 8px 10px; }
  
  /* Filters bar */
  .filters-bar { 
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .filters-bar .form-select, 
  .filters-bar .form-input {
    flex: 1 1 45%;
    min-width: unset;
  }
  
  /* Stats grid */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* Package grid */
  .pkg-grid { grid-template-columns: 1fr; }
  
  /* Team grid */
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  
  /* Hero section */
  .hero { padding: 60px 0 40px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .role-cards { grid-template-columns: 1fr; gap: 16px; }
  
  /* Page header */
  .page-header h1 { font-size: 1.3rem; }
  
  /* Footer */
  footer { padding: 18px 0; margin-top: 40px; }
}

/* Desktop: Large (> 768px) */
@media (min-width: 769px) {
  /* Show sidebar on larger screens */
  .layout-2col { grid-template-columns: 220px 1fr; }
  .sidebar { display: block; }
  .mobile-menu-toggle { display: none; }
  
  /* Forms */
  .form-row { grid-template-columns: 1fr 1fr; }
  
  /* Navbar */
  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    width: auto !important;
    position: static !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
  }
  
  /* Filters bar */
  .filters-bar { gap: 10px; }
  .filters-bar .form-select, 
  .filters-bar .form-input {
    width: auto;
    min-width: 160px;
  }
  
  /* Stats grid */
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  
  /* Package grid */
  .pkg-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  
  /* Team grid */
  .team-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
  
  /* Role cards */
  .role-cards { grid-template-columns: 1fr 1fr; }
  
  /* Footer */
  .footer-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .btn { min-height: 44px; min-width: 44px; padding: 10px 16px; }
  .form-input, .form-textarea, .form-select { padding: 12px 10px; min-height: 44px; }
  
  /* Remove hover effects */
  .btn:hover { opacity: 1; }
  .job-card:hover { box-shadow: var(--shadow); }
  .role-card:hover { border-color: var(--border); box-shadow: none; }
  
  /* Better tap targets for links */
  .pagination a, .pagination span { padding: 8px 12px; }
  .nav-links a { padding: 8px 12px; }
}
