/* ========================================
   หางานอุบล — UbonJobs Stylesheet
   ======================================== */

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

:root {
  --font: 'IBM Plex Sans Thai', sans-serif;
  --white: #FEFDFB;
  --cream: #F7F4EF;
  --sand: #EDE8DF;
  --w100: #E2DBD0;
  --w200: #C4BAA8;
  --w400: #8A7E6D;
  --w600: #5C5347;
  --w800: #2E2922;
  --teal50: #E8F5F0; --teal100: #C1E8DA; --teal400: #2D9B78; --teal600: #1A7A5C; --teal800: #0D5A42;
  --coral50: #FEF0EC; --coral400: #E06B4A; --coral600: #C04E30;
  --amber50: #FFF7E6; --amber400: #D49A2A; --amber600: #A87720;
  --violet50: #F3EFF8; --violet400: #7B61B8; --violet600: #5B4390;
  --red50: #FEF0EF; --red500: #D64545;
  --blue50: #EEF4FB; --blue500: #3A7BD5;
  --radius: 8px; --radius-lg: 14px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--cream); color: var(--w800); font-size: 14px; line-height: 1.6; }
a { color: var(--teal600); text-decoration: none; }
a:hover { color: var(--teal800); }
img { max-width: 100%; }

/* === LAYOUT === */
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.content { padding: 24px 0; }

/* === HEADER === */
.site-header { background: var(--w800); color: var(--white); padding: 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 1000px; margin: 0 auto; }
.logo { font-size: 20px; font-weight: 700; color: var(--white); display: flex; align-items: baseline; gap: 8px; }
.logo small { font-size: 11px; font-weight: 300; color: var(--teal100); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--w200); font-size: 13px; padding: 8px 14px; border-radius: var(--radius); transition: all 0.2s; }
.nav a:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.nav a.active { background: rgba(255,255,255,0.15); color: var(--white); }

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: none; border-radius: var(--radius); font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal600); color: white; }
.btn-primary:hover { background: var(--teal800); color: white; }
.btn-coral { background: var(--coral400); color: white; }
.btn-coral:hover { background: var(--coral600); color: white; }
.btn-outline { background: var(--white); color: var(--w600); border: 1px solid var(--w100); }
.btn-outline:hover { border-color: var(--teal400); color: var(--teal600); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; font-weight: 600; }
.btn-full { width: 100%; justify-content: center; }
.btn-danger { background: var(--red500); color: white; }

/* === HERO === */
.hero { background: var(--w800); padding: 32px 20px 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 80%, rgba(45,155,120,0.12) 0%, transparent 60%); }
.hero * { position: relative; }
.hero h1 { font-size: 34px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.hero p { font-size: 14px; color: var(--w200); margin-bottom: 20px; }
.hero-search { display: flex; max-width: 600px; margin: 0 auto; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 8px 28px rgba(0,0,0,0.2); }
.hero-search input, .hero-search select { font-family: var(--font); font-size: 14px; padding: 13px 16px; border: none; outline: none; }
.hero-search input { flex: 1; min-width: 0; }
.hero-search select { border-left: 1px solid var(--sand); color: var(--w400); width: 140px; background: white; }
.hero-search button { background: var(--teal600); color: white; border: none; padding: 0 24px; font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer; }
.hero-stats { display: flex; justify-content: center; gap: 32px; margin-top: 24px; }
.hero-stat-num { font-size: 22px; font-weight: 700; color: var(--teal100); }
.hero-stat-label { font-size: 11px; color: var(--w200); }

/* === CARDS === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-lg); padding: 20px; transition: all 0.25s; position: relative; overflow: hidden; }
.card:hover { border-color: var(--teal400); box-shadow: 0 8px 28px rgba(45,155,120,0.1); transform: translateY(-2px); }
.card-accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.card-accent-hiring { background: linear-gradient(90deg, var(--teal400), var(--teal100)); }
.card-accent-seeking { background: linear-gradient(90deg, var(--violet400), var(--violet50)); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; line-height: 1.35; }
.card-title a { color: var(--w800); }
.card-title a:hover { color: var(--teal600); }
.card-company { font-size: 13px; color: var(--w400); margin-bottom: 8px; }
.card-desc { font-size: 13px; color: var(--w400); line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 14px; font-size: 11px; color: var(--w400); flex-wrap: wrap; }

/* === BADGES === */
.badge { font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 20px; display: inline-block; }
.badge-hiring { background: var(--teal50); color: var(--teal600); }
.badge-seeking { background: var(--violet50); color: var(--violet600); }
.badge-ft { background: var(--blue50); color: var(--blue500); }
.badge-pt { background: var(--amber50); color: var(--amber600); }
.badge-urgent { background: var(--red50); color: var(--red500); }
.badge-verified { background: var(--teal50); color: var(--teal600); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

/* === FORMS === */
.form-section { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px; }
.form-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12px; font-weight: 600; color: var(--w600); }
.form-input, .form-select, .form-textarea {
  font-family: var(--font); font-size: 13px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--w100); background: var(--cream); color: var(--w800); outline: none; transition: border-color 0.2s; width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--teal400); background: var(--white); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--w400); }

/* === TABLE === */
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; background: var(--white); border: 1px solid var(--sand); border-radius: 12px; overflow: hidden; }
.data-table th { background: var(--cream); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--w400); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--sand); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--sand); color: var(--w600); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--cream); }

/* === STATUS === */
.status { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; display: inline-block; }
.status-active { background: var(--teal50); color: var(--teal600); }
.status-pending { background: var(--amber50); color: var(--amber600); }
.status-closed { background: var(--w100); color: var(--w400); }
.status-rejected { background: var(--red50); color: var(--red500); }

/* === DASHBOARD === */
.dash-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; min-height: 500px; }
.sidebar { background: var(--white); border: 1px solid var(--sand); border-radius: var(--radius-lg); padding: 16px; height: fit-content; position: sticky; top: 20px; }
.sidebar-user { text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--sand); margin-bottom: 12px; }
.sidebar-avatar { width: 56px; height: 56px; border-radius: var(--radius-lg); margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; background: var(--teal50); color: var(--teal600); }
.sidebar-name { font-size: 14px; font-weight: 600; }
.sidebar-role { font-size: 11px; color: var(--w400); }
.sidebar-menu { display: flex; flex-direction: column; gap: 2px; }
.sidebar-menu a { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 10px 12px; border-radius: var(--radius); color: var(--w400); font-weight: 500; transition: all 0.15s; }
.sidebar-menu a:hover { background: var(--cream); color: var(--w600); }
.sidebar-menu a.active { background: var(--teal50); color: var(--teal600); font-weight: 600; }

/* === STAT CARDS === */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--white); border: 1px solid var(--sand); border-radius: 12px; padding: 16px; }
.stat-label { font-size: 11px; color: var(--w400); font-weight: 500; margin-bottom: 4px; }
.stat-val { font-size: 26px; font-weight: 700; letter-spacing: -1px; }
.stat-teal { color: var(--teal600); }
.stat-coral { color: var(--coral400); }
.stat-violet { color: var(--violet400); }
.stat-amber { color: var(--amber400); }

/* === ALERTS === */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 16px; }
.alert-success { background: var(--teal50); color: var(--teal800); border: 1px solid var(--teal100); }
.alert-error { background: var(--red50); color: var(--red500); border: 1px solid #F7C1C1; }
.alert-warning { background: var(--amber50); color: var(--amber600); }

/* === PAGINATION === */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 24px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: var(--radius); font-size: 13px; border: 1px solid var(--sand); background: var(--white); color: var(--w400); }
.pagination a:hover { border-color: var(--teal400); color: var(--teal600); }
.pagination .current { background: var(--teal600); color: white; border-color: var(--teal600); }

/* === FILTERS === */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar .form-input, .filter-bar .form-select { flex: 1; min-width: 120px; }

/* === FOOTER === */
.site-footer { text-align: center; padding: 24px 0; font-size: 11px; color: var(--w200); border-top: 1px solid var(--sand); margin-top: 32px; }

/* === SKILL TAGS === */
.skill-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.skill-tag { font-size: 10px; padding: 2px 8px; border-radius: 6px; background: var(--cream); color: var(--w600); border: 1px solid var(--sand); }

/* === SEEKER CARD === */
.seeker-card { display: flex; gap: 16px; }
.avatar { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex-shrink: 0; }

/* === PRIVACY === */
.privacy-box { background: var(--cream); border: 1px solid var(--sand); border-radius: 10px; padding: 14px; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.form-check input { accent-color: var(--teal600); width: 16px; height: 16px; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .hero-search { flex-direction: column; }
  .hero-search select { border-left: none; border-top: 1px solid var(--sand); width: 100%; }
  .hero-search button { padding: 12px; }
  .card-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 10px; }
}
