/* admin_forms_edge.v1.css
   - 관리자 관리폼(등록/수정/테이블)을 보기 좋게 + 모바일에서도 편하게
*/
body [data-admin-wrap], body.page-admin, body[class*="admin"]{ color: var(--text); }

/* Generic admin containers */
.admin-wrap, .admin-panel, .admin-box{
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}

/* Forms */
.admin-form, .admin-wrap form, form.admin-form{
  display:grid;
  gap:10px;
}
.admin-wrap form input,
.admin-wrap form select,
.admin-wrap form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid color-mix(in srgb, var(--border) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  outline:none;
}
.admin-wrap form textarea{ min-height:110px; resize:vertical; }
.admin-wrap form input:focus,
.admin-wrap form select:focus,
.admin-wrap form textarea:focus{
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Buttons */
.admin-wrap button, .admin-wrap .btn, .admin-form button, button{
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  padding: 10px 12px;
  font-weight: 850;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--text);
}
.admin-wrap button:hover, .admin-form button:hover, button:hover{
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

/* Tables (lists) */
.admin-table, table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.admin-table th, .admin-table td, table th, table td{
  padding:10px 10px;
  border-bottom:1px solid color-mix(in srgb, var(--border) 70%, transparent);
  vertical-align:top;
}
.admin-table th, table th{
  text-align:left;
  font-weight: 900;
  color: var(--text);
  background: color-mix(in srgb, var(--surface2) 85%, transparent);
  position:sticky;
  top:0;
  z-index:2;
}

/* Inline action forms inside tables */
table form[style*="display:inline"] button{
  padding:8px 10px;
  border-radius: 999px;
}

/* Make admin pages less 'blank' */
body.theme-dark .admin-wrap, body.theme-dark .admin-panel, body.theme-dark .admin-box{
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

@media (max-width: 900px){
  .admin-wrap, .admin-panel, .admin-box{ padding:12px; border-radius:14px; }
  .admin-table th, .admin-table td, table th, table td{ padding:9px 8px; }
}


/* ---- Lists: prettier tables in admin manage ---- */
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:16px;
  overflow:hidden;
  background:rgba(255,255,255,0.03);
}
.table th, .table td{
  padding:12px 12px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  vertical-align:top;
}
.table th{
  position:sticky; top:0;
  background:rgba(0,0,0,0.22);
  color:var(--text);
  font-weight:900;
  letter-spacing:-0.01em;
}
.table tr:nth-child(even) td{background:rgba(255,255,255,0.015)}
.table tr:hover td{background:rgba(255,255,255,0.04)}
.table td form{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap}
.table td button, .table td a.btn{
  border-radius:10px;
  padding:8px 10px;
  font-weight:900;
}
@media (max-width: 720px){
  .table th:nth-child(1), .table td:nth-child(1){display:none} /* hide ID on small screens */
  .table th, .table td{padding:10px}
}

/* Prettier lists inside admin manage pages */
.admin-wrap .table{
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:14px;
}
.admin-wrap .table th{
  position:sticky;
  top:0;
  z-index:1;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.06));
  color: rgba(255,255,255,0.92);
  font-weight:800;
  letter-spacing:.02em;
}
.admin-wrap .table td{
  vertical-align:middle;
}
.admin-wrap .table tr:hover td{
  background: rgba(255,255,255,0.05);
}
.admin-wrap .table button,
.admin-wrap .table .btn{
  appearance:none;
  border:1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  border-radius:10px;
  padding:8px 10px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.admin-wrap .table button:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.10);
}
.admin-wrap .table button[disabled]{
  opacity:.5;
  cursor:not-allowed;
}
.admin-wrap .table td form{margin-right:6px}
@media (max-width: 640px){
  .admin-wrap .table th:nth-child(1),
  .admin-wrap .table td:nth-child(1){
    display:none; /* hide ID on mobile */
  }
  .admin-wrap .table td form{display:inline-block;margin:4px 6px 0 0}
}
