* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f8fc;
  color: #172033;
  font-family: "Malgun Gothic", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px max(32px, calc((100vw - 1500px) / 2));
  background: #fff;
  border-bottom: 1px solid #e5eaf2;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

main {
  max-width: 1500px;
  margin: 25px auto;
  padding: 0 32px;
}

/* Tabs Navigation */
.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 2px;
}

.tab-btn {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  color: #64748b;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  border-radius: 6px 6px 0 0;
}

.tab-btn:hover {
  color: #2563eb;
  background: #f1f5f9;
}

.tab-btn.active {
  color: #2563eb;
  border-bottom: 3px solid #2563eb;
  background: #eff6ff;
}

/* Buttons */
.button, button {
  background: #2563eb;
  border: 0;
  border-radius: 7px;
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:hover, button:hover {
  background: #1d4ed8;
}

.secondary {
  background: #0f766e;
}
.secondary:hover {
  background: #0d9488;
}

.ghost {
  background: #e8edf7;
  color: #334155;
  margin-left: 6px;
}
.ghost:hover {
  background: #cbd5e1;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 5px;
}

/* Filters */
.filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.filters input {
  height: 39px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 8px 12px;
  font: inherit;
}

.filters input[name=q] {
  width: 340px;
}

.filters label {
  font-size: 12px;
  color: #64748b;
  display: grid;
  gap: 3px;
  font-weight: 600;
}

.filters a {
  color: #475569;
  font-size: 14px;
  margin-left: 5px;
}

/* Card */
.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.manager-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #1e293b;
}

.card-desc {
  margin: 0 0 20px;
  font-size: 13px;
  color: #64748b;
}

.manager-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.form-group input, .form-group select {
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  min-width: 180px;
  background: #fff;
}

.form-group input:focus, .form-group select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Table */
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1000px;
  font-size: 14px;
}

th {
  background: #f8fafc;
  text-align: left;
  white-space: nowrap;
  color: #475569;
  font-weight: 700;
  border-bottom: 2px solid #e2e8f0;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

td {
  word-break: break-word;
}

code {
  background: #f1f5f9;
  padding: 3px 7px;
  border-radius: 4px;
  font-family: Consolas, monospace;
  color: #0f172a;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.badge-gray {
  background: #f1f5f9;
  color: #64748b;
}

.action-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.summary {
  min-width: 230px;
}

.date {
  white-space: nowrap;
}

.delete {
  background: #fee2e2;
  color: #b91c1c;
}
.delete:hover {
  background: #fca5a5;
}

.empty {
  text-align: center;
  padding: 45px;
  color: #64748b;
}

.alert {
  padding: 12px 16px;
  margin: 16px 0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-box {
  background: #fff;
  padding: 38px;
  width: min(390px, 90vw);
  border-radius: 13px;
  box-shadow: 0 12px 35px rgba(203,213,225,0.5);
}

.login-box label {
  display: grid;
  gap: 7px;
  font-size: 14px;
  margin: 26px 0 14px;
}

.login-box input {
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 8px;
  font: inherit;
  width: 100%;
}

.login-box button {
  width: 100%;
}

@media(max-width: 750px) {
  header {
    padding: 20px;
    display: block;
  }
  nav {
    margin-top: 18px;
  }
  main {
    padding: 0 16px;
  }
  .filters {
    display: grid;
    align-items: stretch;
  }
  .filters input[name=q] {
    width: 100%;
  }
  .manager-form {
    flex-direction: column;
    align-items: stretch;
  }
  .form-group input, .form-group select {
    min-width: 100%;
  }
}
