/* assets/css/admin.css — RecrutePro Admin Panel */

@import url('style.css');

/* ── ADMIN LAYOUT ─────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  box-shadow: 1px 0 0 var(--border);
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-weight: 700;
  font-size: 16px; color: var(--text);
}

.sidebar-logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
}

.sidebar-org-badge {
  margin: 12px 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted);
}
.sidebar-org-badge strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 2px; }

.sidebar-nav { padding: 8px 0; flex: 1; }

.sidebar-section-label {
  padding: 16px 20px 6px;
  font-size: 10px; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 1px;
}

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; margin: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-muted);
  transition: all var(--transition);
  text-decoration: none;
}
.sidebar-link svg { flex-shrink: 0; opacity: 0.6; }
.sidebar-link:hover { color: var(--text); background: var(--surface2); }
.sidebar-link:hover svg { opacity: 1; }
.sidebar-link.active {
  color: var(--accent); background: rgba(79,70,229,0.08);
  border: 1px solid rgba(79,70,229,0.15);
}
.sidebar-link.active svg { opacity: 1; }

.sidebar-badge {
  margin-left: auto; padding: 2px 7px; border-radius: 50px;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface2);
}
.sidebar-user-avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sidebar-user-name { font-size: 13px; font-weight: 600; }
.sidebar-user-role { font-size: 11px; color: var(--text-dim); }
.sidebar-logout {
  margin-left: auto; width: 28px; height: 28px;
  border-radius: 6px; background: none; border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.sidebar-logout:hover { color: var(--red); border-color: var(--red); background: rgba(239,68,68,0.08); }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.admin-main { overflow: auto; background: var(--bg); }

.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}

.admin-topbar-left {
  display: flex; align-items: center; gap: 8px;
}
.breadcrumb-sep { color: var(--text-dim); }
.breadcrumb-item { font-size: 14px; color: var(--text-dim); }
.breadcrumb-item.active { color: var(--text); font-weight: 600; }

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

.topbar-btn {
  padding: 7px 14px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  font-family: var(--font); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.topbar-btn:hover { color: var(--text); background: var(--surface3); }

.topbar-btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.topbar-btn-primary:hover { background: var(--accent2); color: #fff; border-color: var(--accent2); }

/* ── ADMIN PAGE ───────────────────────────────────────────── */
.admin-page { padding: 32px; }

.page-header { margin-bottom: 28px; }
.page-header h1 { font-family: var(--font-display); font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.page-header p { font-size: 14px; color: var(--text-muted); }

/* ── STATS CARDS ──────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative; overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute; bottom: -20px; right: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(79,70,229,0.06); filter: blur(20px);
}

.stat-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 12px;
}
.stat-card-label { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.stat-card-value { font-family: var(--font-display); font-size: 28px; font-weight: 800; }
.stat-card-delta { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.stat-card-delta.up { color: var(--green); }

/* ── TABLE ────────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.table-title { font-weight: 700; font-size: 15px; }

.table-search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: var(--radius-sm);
  background: var(--surface2); border: 1px solid var(--border2);
}
.table-search input {
  background: none; border: none; outline: none; color: var(--text);
  font-size: 13px; width: 180px; font-family: var(--font);
}
.table-search svg { color: var(--text-dim); }

table { width: 100%; border-collapse: collapse; }

thead th {
  padding: 11px 16px; text-align: left;
  font-size: 11px; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

tbody tr {
  transition: background var(--transition);
}
tbody tr:hover { background: var(--surface2); }
tbody tr + tr { border-top: 1px solid var(--border); }

td {
  padding: 13px 16px; font-size: 13px; color: var(--text-muted);
  vertical-align: middle;
}

td strong { color: var(--text); font-weight: 600; }

.table-actions { display: flex; gap: 6px; align-items: center; }

.action-btn {
  padding: 5px 10px; border-radius: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; cursor: pointer;
  transition: all var(--transition); font-family: var(--font);
  text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.action-btn:hover { color: var(--text); background: var(--surface3); }
.action-btn.danger:hover { color: var(--red); border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.05); }
.action-btn.success:hover { color: var(--green); border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.05); }

.table-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-dim);
}

/* ── RATING STARS ─────────────────────────────────────────── */
.stars { color: var(--amber); font-size: 13px; letter-spacing: 1px; }
.stars .empty { color: var(--surface3); }

/* ── PANEL FORM ───────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.panel-title { font-weight: 700; font-size: 16px; }

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: var(--bg);
  position: relative;
}
.login-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 40%, rgba(79,70,229,0.06) 0%, transparent 70%);
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%; max-width: 420px;
  position: relative;
}
.login-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 32px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
}
.login-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff;
}
.login-card h1 { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin-bottom: 6px; text-align: center; }
.login-card .login-sub { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 28px; }

.login-error {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.25);
  color: var(--red); font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

/* ── APP CARD (detail) ────────────────────────────────────── */
.app-detail-grid {
  display: grid; grid-template-columns: 1fr 300px; gap: 20px;
}

.info-row {
  display: flex; padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-label { width: 140px; flex-shrink: 0; color: var(--text-dim); }
.info-value { color: var(--text); font-weight: 500; }

.motivation-box {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  font-size: 13px; color: var(--text-muted); line-height: 1.8;
  white-space: pre-wrap;
}

/* ── TABS ─────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab-btn {
  padding: 10px 16px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-dim); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  font-family: var(--font);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── PIPELINE KANBAN ──────────────────────────────────────── */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.kanban-col {
  background: var(--bg); border-radius: var(--radius);
  padding: 16px; border: 1px solid var(--border);
}
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted);
}
.kanban-count {
  padding: 2px 8px; border-radius: 50px;
  background: var(--surface2); font-size: 11px;
}
.kanban-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px;
  cursor: pointer; transition: all var(--transition);
}
.kanban-card:hover { border-color: var(--border2); transform: translateY(-1px); box-shadow: var(--shadow); }
.kanban-card-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.kanban-card-job { font-size: 11px; color: var(--text-dim); }
.kanban-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

/* ── RESPONSIVE ADMIN ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .admin-layout { grid-template-columns: 200px 1fr; }
}
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .admin-page { padding: 20px 16px; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
  .app-detail-grid { grid-template-columns: 1fr; }
}
