/* ============================================================
   GoHire.online — dark theme
   Palette: deep navy (brand teget), lemon-lime accent (brand),
   white text. No external framework — this file is everything.
   ============================================================ */

:root {
  --bg:        #0c1424;   /* page background — deep teget            */
  --surface:   #131f36;   /* cards, sidebar, header                  */
  --surface-2: #1a2a47;   /* inputs, table header, hover rows        */
  --border:    #26395c;
  --text:      #eef3fb;
  --muted:     #8fa0bc;
  --accent:    #d8f04c;   /* lemon from the logo                     */
  --accent-hover: #e6fa6a;
  --accent-dark: #0c1424; /* text color on lemon buttons             */
  --danger:    #f2657a;
  --success:   #57d9a3;
  --warning:   #f0c24c;
  --radius: 10px;
  --sidebar-w: 240px;
  --font-body: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

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

/* ---------- Layout ---------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- Sidebar ---------- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.brand img { width: 34px; height: 34px; border-radius: 8px; }

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.4px;
  color: var(--text);
}
.brand-name span { color: var(--accent); }

.nav-menu { list-style: none; margin: 14px 0 0; padding: 0 10px; }

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  transition: background .15s, color .15s;
}

.nav-menu a:hover { background: var(--surface-2); color: var(--text); }

.nav-menu a.active {
  background: var(--surface-2);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-menu .nav-ico { width: 18px; text-align: center; opacity: .9; }

.sidebar-foot {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Header ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.page-title { font-size: 19px; font-weight: 600; margin: 0; }

.topbar-right { display: flex; align-items: center; gap: 14px; }

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 18px;
  padding: 4px 10px;
  cursor: pointer;
}

/* user dropdown */
.user-menu { position: relative; }

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  padding: 6px 14px 6px 8px;
  cursor: pointer;
  font: inherit;
}

.user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  padding: 6px;
  display: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.user-dropdown.open { display: block; }

.user-dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--text);
}
.user-dropdown a:hover { background: var(--surface-2); color: var(--accent); }
.user-dropdown .dd-label {
  padding: 8px 12px 4px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* ---------- Content ---------- */

.content { padding: 26px 28px 40px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 22px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 0 0 14px;
}

/* flash messages */
.flash {
  padding: 11px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border: 1px solid;
  font-weight: 500;
}
.flash-success { background: rgba(87,217,163,.1); border-color: rgba(87,217,163,.4); color: var(--success); }
.flash-danger, .flash-error { background: rgba(242,101,122,.1); border-color: rgba(242,101,122,.4); color: var(--danger); }
.flash-info, .flash-message { background: rgba(216,240,76,.08); border-color: rgba(216,240,76,.35); color: var(--accent); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}

.btn-primary { background: var(--accent); color: var(--accent-dark); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-dark); }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger { background: transparent; color: var(--danger); border-color: rgba(242,101,122,.5); }
.btn-danger:hover { background: rgba(242,101,122,.12); }

.btn-sm { padding: 5px 12px; font-size: 13px; }

/* ---------- Sheet tabs (Excel-style, the signature element) ---------- */

.sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: -1px;   /* attach to the table card below */
  padding: 0 6px;
  position: relative;
  z-index: 2;
}

.sheet-tab {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 9px 9px 0 0;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 13.5px;
}

.sheet-tab:hover { color: var(--text); }

.sheet-tab.active {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
  box-shadow: inset 0 3px 0 var(--accent);
}

.sheet-tab .count {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  margin-left: 4px;
}
.sheet-tab.active .count { color: var(--text); }

.sheet-card { border-top-left-radius: 0; }

/* ---------- Filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 18px;
}
.filters .field { flex: 1 1 160px; min-width: 140px; }
.filters .field label { font-size: 12px; }

/* ---------- Forms ---------- */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}

input::placeholder, textarea::placeholder { color: #5f7092; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(216,240,76,.15);
}

select option { background: var(--surface); color: var(--text); }

textarea { resize: vertical; min-height: 90px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-actions { margin-top: 22px; display: flex; gap: 10px; }

.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* mono treatment for passports & dates — ledger feel */
.mono, input.mono { font-family: var(--font-mono); font-size: 13.5px; letter-spacing: .3px; }

/* ---------- Table ---------- */

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data th {
  text-align: left;
  padding: 11px 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: none; }

td.num { color: var(--muted); font-family: var(--font-mono); font-size: 13px; }

.cand-name { font-weight: 600; color: var(--accent); }
.cand-name:hover { color: var(--accent-hover); text-decoration: underline; }

.comment-cell {
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}

.row-actions { display: flex; gap: 6px; white-space: nowrap; }

/* ---------- Status badges ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.badge-not_applied { color: var(--muted); border-color: var(--border); background: rgba(143,160,188,.08); }
.badge-in_process  { color: var(--warning); border-color: rgba(240,194,76,.45); background: rgba(240,194,76,.08); }
.badge-visa_issued { color: var(--success); border-color: rgba(87,217,163,.45); background: rgba(87,217,163,.08); }

/* ---------- Detail (dosije) ---------- */

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.detail-head h2 { margin: 0; font-size: 24px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.detail-grid .full { grid-column: 1 / -1; }

.dl { margin: 0; }
.dl .row-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.dl .row-line:last-child { border-bottom: none; }
.dl dt { color: var(--muted); font-size: 13px; font-weight: 500; }
.dl dd { margin: 0; text-align: right; font-weight: 500; }

.empty-value { color: #5f7092; font-style: italic; font-weight: 400; }

/* ---------- Dashboard ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .9px; color: var(--muted); }
.stat .stat-value { font-size: 30px; font-weight: 700; margin-top: 4px; font-family: var(--font-mono); }
.stat.accent .stat-value { color: var(--accent); }

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  padding: 46px 20px;
  color: var(--muted);
}
.empty-state .big { font-size: 17px; color: var(--text); margin-bottom: 6px; font-weight: 600; }

/* ---------- Login page ---------- */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(216,240,76,.07), transparent 60%),
    var(--bg);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px 32px;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}
.login-brand img { width: 40px; height: 40px; border-radius: 9px; }

.login-title { text-align: center; font-size: 21px; font-weight: 700; margin: 0 0 4px; }
.login-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0 0 24px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.login-card .field { margin-bottom: 15px; }

/* ---------- File upload ---------- */

.upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

input[type="file"] {
  width: 100%;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  padding: 8px 10px;
  font: inherit;
  cursor: pointer;
}
input[type="file"]:hover { border-color: var(--accent); }

input[type="file"]::file-selector-button {
  background: var(--accent);
  color: var(--accent-dark);
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  margin-right: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--accent-hover); }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 0;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .main { margin-left: 0; }
  .hamburger { display: inline-block; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 34px; }
  .topbar { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Row checkboxes ---------- */

.row-check {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---------- Candidate photo ---------- */

.cand-photo {
  width: 92px;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--accent);
  background: var(--surface-2);
}
