* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: #f4f6f9;
  color: #1b1b1b;
}

/* ===== LOGIN PAGE ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d1b2a, #12314f);
}

.login-box {
  background: #fff;
  width: 100%;
  max-width: 380px;
  padding: 36px 32px;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.login-box h1 {
  font-size: 20px;
  color: #0d1b2a;
  margin-bottom: 4px;
}

.login-box p.sub {
  color: #777;
  font-size: 13px;
  margin-bottom: 24px;
}

.login-box label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.login-box input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 14px;
}

.login-box button {
  width: 100%;
  padding: 13px;
  background: #0077ff;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
}

.login-box button:hover {
  background: #005fd1;
}

.login-error {
  background: #fff0f0;
  color: #c92a2a;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ===== ADMIN LAYOUT ===== */
.admin-header {
  background: #0d1b2a;
  color: #fff;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header h1 {
  font-size: 18px;
}

.admin-header .logout-link {
  color: #fff;
  background: rgba(255,255,255,0.12);
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
}

.admin-header .logout-link:hover {
  background: rgba(255,255,255,0.22);
}

.admin-main {
  max-width: 1200px;
  margin: 28px auto;
  padding: 0 20px;
}

/* ===== STAT CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  border-left: 4px solid #0077ff;
}

.stat-card.new { border-left-color: #f08c00; }
.stat-card.selected { border-left-color: #2f9e44; }
.stat-card.rejected { border-left-color: #e03131; }

.stat-card .num {
  font-size: 28px;
  font-weight: 700;
  color: #0d1b2a;
}

.stat-card .label {
  font-size: 13px;
  color: #777;
  margin-top: 4px;
}

/* ===== TOOLBAR ===== */
.toolbar {
  background: #fff;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  align-items: center;
}

.toolbar input[type="text"],
.toolbar select {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 13px;
}

.toolbar input[type="text"] {
  flex: 1;
  min-width: 200px;
}

.toolbar button, .toolbar a.btn-link {
  padding: 10px 16px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #0077ff;
  color: #fff;
}

.btn-primary:hover { background: #005fd1; }

.btn-export {
  background: #2f9e44;
  color: #fff;
}

.btn-export:hover { background: #268038; }

/* ===== TABLE ===== */
.table-wrap {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: #f1f4f8;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
}

tbody tr {
  border-top: 1px solid #eef1f5;
}

tbody tr:hover {
  background: #fafcff;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-block;
}

.badge.New { background: #fff4e0; color: #f08c00; }
.badge.Reviewed { background: #e7f1ff; color: #0077ff; }
.badge.Selected { background: #e6f8ea; color: #2f9e44; }
.badge.Rejected { background: #fdeaea; color: #e03131; }

.action-link {
  color: #0077ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  margin-right: 10px;
}

.status-select {
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 12px;
}

.empty-row td {
  text-align: center;
  padding: 30px;
  color: #999;
}

.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 16px;
}

.pagination a {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #333;
  font-size: 13px;
}

.pagination a.active {
  background: #0077ff;
  color: #fff;
  border-color: #0077ff;
}

/* ===== DETAIL VIEW ===== */
.detail-card {
  background: #fff;
  border-radius: 10px;
  padding: 26px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.detail-item .label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.detail-item .value {
  font-size: 15px;
  margin-top: 3px;
  color: #1b1b1b;
}

.doc-list {
  list-style: none;
  margin-top: 12px;
}

.doc-list li {
  padding: 10px 0;
  border-top: 1px solid #eef1f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.doc-list a {
  color: #0077ff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: #0077ff;
  text-decoration: none;
  font-size: 13px;
}

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}
