/* ================================================================
   PLACEMENT AGENCY ATS — style.css
   Full responsive stylesheet — Mobile / Tablet / Desktop
   ================================================================ */

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

/* ---- CSS Variables ---- */
:root {
  --primary:   #3498db;
  --primary-d: #2176ae;
  --primary-l: #ebf5fb;
  --bg:        #f4f8fb;
  --white:     #ffffff;
  --sb-bg:     #0f1e35;
  --sb-w:      245px;
  --text:      #2c3e50;
  --muted:     #7f8fa4;
  --border:    #dce8f4;
  --shadow:    0 2px 14px rgba(52,152,219,.09);
  --r:         12px;
  --rsm:       8px;
  --success:   #27ae60;
  --warning:   #f39c12;
  --danger:    #e74c3c;
  --purple:    #8e44ad;
  --tr:        .2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; scroll-behavior: smooth; }
body  { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a     { text-decoration: none; color: inherit; }
img   { max-width: 100%; }

/* ================================================================
   LAYOUT
   ================================================================ */
.app-wrap { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
#sidebar {
  width: var(--sb-w);
  background: var(--sb-bg);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
  overflow-y: auto; overflow-x: hidden;
  transition: transform var(--tr);
  box-shadow: 2px 0 20px rgba(0,0,0,.15);
}
.sb-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sb-logo-ic {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary); display: flex; align-items: center;
  justify-content: center; font-size: 20px; flex-shrink: 0;
}
.sb-logo-text { color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; line-height: 1.2; }
.sb-logo-sub  { color: rgba(255,255,255,.4); font-size: 10px; }
.sb-section { color: rgba(184,199,217,.4); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; padding: 16px 18px 6px; }
.sb-nav { flex: 1; padding: 6px 0; }
.sb-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 18px; color: rgba(184,199,217,.75); font-size: 13px;
  border-left: 3px solid transparent; white-space: nowrap;
  transition: all var(--tr);
}
.sb-nav a:hover, .sb-nav a.active {
  background: rgba(52,152,219,.12); color: #fff; border-left-color: var(--primary);
}
.sb-nav .ic { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.sb-footer { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.07); flex-shrink: 0; }
.logout-btn {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: rgba(231,76,60,.15); color: #e87070; border: none;
  border-radius: var(--rsm); padding: 9px 14px; cursor: pointer; font-size: 13px;
  font-family: 'Poppins', sans-serif; transition: background var(--tr);
}
.logout-btn:hover { background: rgba(231,76,60,.28); }

/* Mobile overlay */
#sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 299; }
#sb-overlay.show { display: block; }

/* ---- Main ---- */
.main { margin-left: var(--sb-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ---- Topbar ---- */
.topbar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 62px; display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 8px rgba(52,152,219,.07);
}
#sidebar-toggle {
  background: none; border: none; cursor: pointer; font-size: 20px;
  color: var(--muted); padding: 6px; border-radius: 8px; display: flex;
  align-items: center; transition: all var(--tr);
}
#sidebar-toggle:hover { background: var(--primary-l); color: var(--primary); }
.topbar-search {
  flex: 1; max-width: 360px; display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 24px; padding: 0 14px;
}
.topbar-search input { border: none; background: none; padding: 8px 0; font-size: 13px; font-family: 'Poppins', sans-serif; color: var(--text); outline: none; flex: 1; }
.topbar-search input::placeholder { color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-badge { background: var(--primary-l); color: var(--primary); padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; }

/* ---- Page ---- */
.page { padding: 24px; flex: 1; }
.ph { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.ph-title { font-size: 21px; font-weight: 700; }
.ph-sub   { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ================================================================
   COMPONENTS
   ================================================================ */

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat  { background: var(--white); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-ic  { font-size: 26px; margin-bottom: 6px; }
.stat-val { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-lbl { font-size: 12px; color: var(--muted); }

/* Card */
.card { background: var(--white); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.card-head { padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 14px; flex-wrap: wrap; gap: 8px; }
.card-body { padding: 18px 20px; }

/* Grid */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--rsm); font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: all var(--tr); white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary   { background: var(--primary);  color: #fff; }
.btn-primary:hover  { background: var(--primary-d); }
.btn-success   { background: var(--success);  color: #fff; }
.btn-success:hover  { background: #1e9651; }
.btn-danger    { background: var(--danger);   color: #fff; }
.btn-danger:hover   { background: #c0392b; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-sm  { padding: 5px 11px; font-size: 11.5px; }
.btn-xs  { padding: 3px 9px;  font-size: 11px; }

/* Tables */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 520px; }
th { background: var(--bg); color: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f7fbff; }

/* Forms */
.fg   { margin-bottom: 14px; }
label { display: block; font-size: 12.5px; font-weight: 500; color: var(--text); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=tel], select, textarea {
  width: 100%; padding: 9px 13px; border: 1px solid var(--border); border-radius: var(--rsm);
  font-family: 'Poppins', sans-serif; font-size: 13px; background: var(--white);
  color: var(--text); outline: none; transition: border-color var(--tr);
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(52,152,219,.1); }
input[readonly] { background: var(--bg); cursor: not-allowed; }
textarea { resize: vertical; min-height: 76px; }
.fr { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

/* Badges */
.badge        { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-blue   { background: var(--primary-l); color: var(--primary); }
.badge-green  { background: #eafaf1; color: var(--success); }
.badge-red    { background: #fce8e8; color: var(--danger); }
.badge-yellow { background: #fef9e7; color: var(--warning); }
.badge-purple { background: #f4e8fc; color: var(--purple); }
.badge-dark   { background: #d5f5e3; color: #145a32; }

/* Modal */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,30,53,.52); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal  { background: var(--white); border-radius: var(--r); width: 100%; max-width: 540px; max-height: 92vh; overflow-y: auto; box-shadow: 0 24px 60px rgba(0,0,0,.2); animation: mIn .22s ease; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 920px; }
@keyframes mIn { from { opacity: 0; transform: translateY(-14px) scale(.97) } to { opacity: 1; transform: none } }
.mh { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.mh h3 { font-size: 16px; font-weight: 600; }
.mc { padding: 18px 22px; }
.mf { padding: 12px 22px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--border); flex-wrap: wrap; }
.mclose { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--muted); line-height: 1; transition: color var(--tr); }
.mclose:hover { color: var(--danger); }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--primary); border-radius: var(--r); padding: 20px 16px;
  text-align: center; cursor: pointer; background: var(--primary-l); transition: all var(--tr);
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--primary-d); background: #dbeefa; }
.uz-ic { font-size: 30px; margin-bottom: 6px; }
.uz-t  { font-weight: 600; color: var(--primary-d); font-size: 13px; }
.uz-s  { font-size: 11px; color: var(--muted); margin-top: 3px; }
.parse-status { display: none; margin-top: 10px; padding: 9px 13px; border-radius: var(--rsm); font-size: 12.5px; }

/* Skill tags */
.skill-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.skill-tag  { background: var(--primary-l); color: var(--primary); padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 500; }

/* Timeline */
.timeline { list-style: none; position: relative; }
.timeline::before { content: ''; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-item { display: flex; gap: 12px; padding-bottom: 16px; }
.tl-dot  { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-l); border: 2px solid var(--primary); display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; z-index: 1; }
.tl-ev   { font-weight: 600; font-size: 13px; }
.tl-date { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.tl-note { font-size: 12px; color: var(--muted); }

/* Pipeline steps */
.pipeline { display: flex; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.ps { display: flex; align-items: center; }
.ps-inner { display: flex; flex-direction: column; align-items: center; }
.pd { width: 32px; height: 32px; border-radius: 50%; background: var(--border); color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.pd.done   { background: var(--success); color: #fff; }
.pd.active { background: var(--primary); color: #fff; }
.pd.rejected { background: var(--danger); color: #fff; }
.pl { font-size: 10px; color: var(--muted); margin-top: 3px; text-align: center; white-space: nowrap; }
.pline { height: 2px; width: 38px; background: var(--border); margin-bottom: 18px; }
.pline.done { background: var(--success); }

/* Bar chart */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row   { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.bar-lbl   { min-width: 100px; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; background: var(--bg); border-radius: 8px; height: 18px; overflow: hidden; min-width: 60px; }
.bar-fill  { height: 100%; border-radius: 8px; background: var(--primary); transition: width .6s ease; }
.bar-val   { min-width: 28px; text-align: right; font-weight: 600; font-size: 12px; }

/* Empty state */
.empty    { text-align: center; padding: 36px 20px; color: var(--muted); font-size: 13px; }
.empty-ic { font-size: 40px; margin-bottom: 10px; }

/* Action row */
.arow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.sinp { display: flex; align-items: center; gap: 7px; background: var(--bg); border: 1px solid var(--border); border-radius: 24px; padding: 0 13px; }
.sinp input { border: none; background: none; padding: 8px 0; font-size: 12.5px; font-family: 'Poppins', sans-serif; outline: none; width: 200px; }

/* ================================================================
   KANBAN BOARD
   ================================================================ */
.kanban-outer { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }
.kanban-board { display: flex; gap: 14px; min-width: max-content; padding: 4px 2px; }

.k-col {
  background: var(--bg); border-radius: var(--r); border: 1px solid var(--border);
  width: 230px; flex-shrink: 0; display: flex; flex-direction: column;
}
.k-col-header {
  padding: 11px 13px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 3px solid transparent; border-radius: var(--r) var(--r) 0 0;
}
.k-col-count {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.15);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
}
.k-col-body {
  flex: 1; padding: 10px 8px; min-height: 200px;
  display: flex; flex-direction: column; gap: 9px;
  transition: background var(--tr);
}
.k-col-body.drag-over {
  background: rgba(52,152,219,.08) !important;
  border-radius: 0 0 var(--r) var(--r);
  outline: 2px dashed var(--primary);
  outline-offset: -4px;
}

/* Kanban cards */
.k-card {
  background: var(--white); border-radius: 10px; border: 1px solid var(--border);
  padding: 12px 13px; cursor: grab;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: box-shadow var(--tr), transform var(--tr), opacity var(--tr);
  user-select: none;
  -webkit-user-drag: element;
}
.k-card:hover {
  box-shadow: 0 6px 20px rgba(52,152,219,.16);
  transform: translateY(-2px);
}
.k-card.dragging {
  opacity: .45; cursor: grabbing; transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.k-card-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.k-card-name { font-weight: 600; font-size: 13px; }
.k-card-code { font-size: 11px; color: var(--muted); margin: 3px 0; }
.k-card-skills {
  font-size: 10.5px; color: var(--muted); margin-top: 4px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 180px;
}
.k-card-foot { display: flex; gap: 5px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.k-drop-hint { text-align: center; padding: 16px 10px; font-size: 11px; color: var(--muted); }

/* Interview badge on card */
.iv-badge { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; background: #eafaf1; color: #1e8449; padding: 2px 7px; border-radius: 20px; font-weight: 600; }

/* ================================================================
   COLUMN COLORS
   ================================================================ */
[data-stage="Applied"]   .k-col-header { background: #ebf5fb; border-bottom-color: #3498db; color: #1a5276; }
[data-stage="Screening"] .k-col-header { background: #fef9e7; border-bottom-color: #f39c12; color: #7d6608; }
[data-stage="Interview"] .k-col-header { background: #eafaf1; border-bottom-color: #27ae60; color: #1d6a39; }
[data-stage="Offer"]     .k-col-header { background: #fdf2f8; border-bottom-color: #8e44ad; color: #6c3483; }
[data-stage="Selected"]  .k-col-header { background: #d5f5e3; border-bottom-color: #1abc9c; color: #0e6655; }
[data-stage="Rejected"]  .k-col-header { background: #fce8e8; border-bottom-color: #e74c3c; color: #922b21; }

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f1e35 0%, #1a3a5c 50%, #2563a8 100%); padding: 16px; position: relative; overflow: hidden; }
.login-page::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(52,152,219,.08) 0%, transparent 60%); animation: rotateBg 20s linear infinite; }
@keyframes rotateBg { to { transform: rotate(360deg); } }
.login-card { background: var(--white); border-radius: 18px; padding: 38px 40px; width: 100%; max-width: 420px; box-shadow: 0 30px 80px rgba(0,0,0,.3); position: relative; z-index: 1; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-ic { width: 60px; height: 60px; background: linear-gradient(135deg, var(--primary), var(--primary-d)); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 12px; box-shadow: 0 8px 24px rgba(52,152,219,.3); }
.login-logo h1 { font-size: 22px; font-weight: 700; }
.login-logo p  { font-size: 12px; color: var(--muted); margin-top: 4px; }
.login-creds { margin-top: 16px; padding: 13px 16px; background: var(--bg); border-radius: var(--rsm); font-size: 12px; color: var(--muted); }
.login-creds strong { color: var(--primary); display: block; margin-bottom: 4px; }

/* ================================================================
   INTERVIEW SCHEDULE CARD
   ================================================================ */
.iv-card { background: #f0fdf9; border: 1px solid #a7f3d0; border-radius: var(--rsm); padding: 13px; margin-top: 10px; }
.iv-card h4 { font-size: 13px; font-weight: 600; color: #065f46; margin-bottom: 8px; }

/* ================================================================
   SCROLLBAR
   ================================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c0d0e0; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .g3 { grid-template-columns: 1fr 1fr; }
  .k-col { width: 210px; }
}

@media (max-width: 768px) {
  :root { --sb-w: 265px; }
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  .main { margin-left: 0 !important; }

  .g2, .g3 { grid-template-columns: 1fr; }
  .fr { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .page { padding: 14px; }
  .topbar { padding: 0 14px; height: 56px; }
  .topbar-search { max-width: 180px; }
  .login-card { padding: 28px 22px; }
  .k-col { width: 200px; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
  .modal { max-height: 96vh; }
  .k-col { width: 190px; }
}
