:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  font-family: "Outfit", "Noto Sans KR", system-ui, -apple-system, sans-serif;
  color: var(--text-main);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.05) 0px, transparent 50%);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.6;
}

.site-header {
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand strong {
  font-size: 1.5rem;
}

.brand span {
  display: inline-block;
  font-size: 0.9rem;
  color: #9ca3af;
}

.summary {
  display: none;
  /* Hide summary by default, show in footer or sub-header if needed */
}

.app-nav {
  display: flex;
  gap: 0.5rem;
}

.app-nav a {
  color: #94a3b8;
  font-weight: 500;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.app-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.app-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.layout {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}

.panel {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel h2 {
  margin-top: 0;
}

.panel-group {
  display: grid;
  gap: 1.5rem;
}

.panel-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.panel-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.panel-card h3 {
  margin-top: 0;
}

.vote-item {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 0.5rem;
  background: #fff;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
  box-sizing: border-box;
}

.vote-item.active {
  border-color: #5b8fd8;
  box-shadow: 0 8px 16px rgba(91, 143, 216, 0.15);
}

.vote-item strong {
  display: block;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

.vote-item>div,
.vote-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
  margin: 0;
  padding: 0;
  height: 100%;
}

.vote-item-body>div {
  margin: 0;
  padding: 0;
  line-height: 1.4;
  font-size: 0.85rem;
  color: #6b7280;
}

.vote-selector-button {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}

.vote-selector-button:hover {
  border-color: #5b8fd8;
  box-shadow: 0 4px 8px rgba(91, 143, 216, 0.1);
}

.vote-selector-button.active {
  border-color: #5b8fd8;
  background: #e8f0f8;
  box-shadow: 0 4px 8px rgba(91, 143, 216, 0.15);
}

.vote-selector-button strong {
  color: #0f172a;
  font-size: 1rem;
}

.vote-selector-button>div {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.vote-selector-button>div>* {
  display: inline;
}

.status-pill {
  flex-shrink: 0;
  white-space: nowrap;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="date"],
select {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  width: 100%;
  background: #fff;
  transition: all 0.3s ease;
  font-family: inherit;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  background: #fff;
}

textarea {
  min-height: 4rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 0.65rem;
  font-size: 0.95rem;
  font-family: inherit;
}

.agenda-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#agenda-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.agenda-field {
  position: relative;
}

.agenda-field-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.agenda-textarea-wrapper {
  flex: 1;
  position: relative;
}

.agenda-textarea-wrapper textarea {
  width: 100%;
  resize: vertical;
}

.agenda-parent-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  margin-top: 0.5rem;
}

.char-count {
  position: absolute;
  bottom: 0.4rem;
  right: 0.8rem;
  font-size: 0.75rem;
  color: #6b7280;
}

button {
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  /* Unified border for sizing consistency */
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: #f1f5f9;
  color: var(--text-main);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  /* Explicit height for better vertical alignment */
}

button:hover:not(:disabled) {
  background: #e2e8f0;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button.primary {
  background: var(--primary);
  color: #fff;
}

button.primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

button.danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
}

button.danger:hover:not(:disabled) {
  background: #fee2e2;
  color: #b91c1c;
  box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.1);
}

button:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.panel-card .form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.5rem;
}

.empty-state {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.table-wrapper {
  max-height: 24rem;
  overflow-y: auto;
  overflow-x: auto;
  /* 가로 스크롤 허용 */
  margin-top: 0.75rem;
  -webkit-overflow-scrolling: touch;
  /* 부드러운 스크롤 */
}

.data-table {
  width: 100%;
  border-spacing: 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-prep {
  background: #e0f2fe;
  color: #0c4a6e;
}

.status-open {
  background: #e0fdf4;
  color: #065f46;
}

.status-voting {
  background: #fef9c3;
  color: #92400e;
}

.status-finished {
  background: #ede9fe;
  color: #5b21b6;
}

.attendance-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.stat-block {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem;
  background: #fff;
}

.stat-block.roster-trigger {
  cursor: pointer;
  border-color: #5b8fd8;
}

.stat-block strong {
  display: block;
  font-size: 2rem;
  font-weight: 700;
}

.stat-block span {
  font-size: 0.95rem;
  color: #6b7280;
  font-weight: 500;
}

.stat-rate {
  font-size: 1.75rem;
  font-weight: 700;
}

.stat-rate.good {
  color: #1d4ed8;
}

.stat-rate.bad {
  color: #d97777;
}

.agenda-list {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.agenda-item {
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafbff;
  transition: all 0.2s ease;
}

.agenda-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.agenda-item h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
}

.agenda-votes {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 1.05rem;
  font-weight: 500;
}

.agenda-votes span {
  padding: 0.35rem 0.75rem;
  background: #f1f5f9;
  border-radius: 6px;
}

.vote-result {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  border: 2px solid;
}

.vote-result.pass {
  color: #1e40af;
  background: #dbeafe;
  border-color: #3b82f6;
}

.vote-result.fail {
  color: #991b1b;
  background: #fee2e2;
  border-color: #dc2626;
}

.vote-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.detail-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.detail-actions button {
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
}

.member-roster {
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  background: #f9fafb;
}

.member-ro .list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.list-header .select-all {
  margin-right: auto;
}

#toggle-vote-form {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  width: auto;
  margin: 0;
}

.member-roster-head h4 {
  margin: 0;
}

.member-roster-head button {
  border-radius: 999px;
  background: #1f2937;
  color: #fff;
  padding: 0.3rem 0.85rem;
}

.panel.admin-panel {
  padding-bottom: 0.5rem;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.vote-form-panel {
  margin-top: 1rem;
  border-radius: 14px;
  padding: 1rem;
}

.vote-form-panel.hidden {
  display: none;
}

.admin-layout {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 2fr;
  margin-top: 1.5rem;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-detail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: nowrap;
  /* Prevent wrapping */
}

.list-header>div,
.list-header>button,
.list-header>label {
  flex-shrink: 0;
}

.list-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.select-all {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.9rem;
}

.vote-list {
  display: flex;
  flex-direction: column;
}

.vote-select {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.vote-select input {
  accent-color: #5b8fd8;
}

.danger {
  background: #d97777;
  box-shadow: 0 12px 24px rgba(217, 119, 119, 0.25);
}

.danger:hover {
  background: #c85a5a;
}

.route-page {
  display: block;
}

.route-hidden {
  display: none;
}

.highlight {
  color: #1d4ed8;
}

.hint {
  margin: 0;
  font-size: 0.85rem;
  color: #4b5563;
}

.form-inline {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-bottom: 0.5rem;
  align-items: center;
}

.form-inline label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  margin: 0;
}

.form-inline label input,
.form-inline label select {
  min-width: 150px;
  flex-shrink: 0;
}

.form-inline select,
.form-inline button {
  flex: 1;
  min-width: 150px;
}

/* 운영자 레이아웃 */
.operator-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 회원 검색/필터 프레임 */
.member-control-frame {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

/* 섹션 헤더 (제목 + 그룹 선택) */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-header h3 {
  margin: 0;
  flex: 1;
}

.group-filter-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  white-space: nowrap;
}

.group-filter-inline select {
  min-width: 150px;
}

/* 그룹 필터 컨테이너 (체크박스 버튼 방식) */
.group-filter-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.group-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.group-filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.group-filter-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.group-filter-btn.selected {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.group-filter-btn.selected:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.select-all-btn {
  background: #f3f4f6;
  font-weight: 600;
  border-color: #9ca3af;
}

.select-all-btn:hover {
  background: #e5e7eb;
}

.select-all-btn.active {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.select-all-btn.active:hover {
  background: #059669;
  border-color: #059669;
}

/* 회원목록 프레임 */
.member-list-frame {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  max-height: 600px;
  overflow-y: auto;
}

/* 회원 리스트 */
.member-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* 그룹별 dropdown 스타일 */
.group-dropdown {
  margin-bottom: 1.5rem;
}

.group-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: #374151;
}

.group-dropdown-header:hover {
  background: #e5e7eb;
}

.group-dropdown-header.active {
  background: #dbeafe;
  border-color: #3b82f6;
}

.group-dropdown-header::after {
  content: "▼";
  font-size: 0.75rem;
  transition: transform 0.2s;
}

.group-dropdown-header.active::after {
  transform: rotate(180deg);
}

.group-dropdown-content {
  display: none;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 6px 6px;
  background: #fff;
}

.group-dropdown-content.active {
  display: block;
}

.group-member-item {
  padding: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.group-member-item:last-child {
  border-bottom: none;
}

.voter-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.agenda-choice {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem;
  background: #fff;
  justify-content: space-between;
  align-items: center;
}

.agenda-choice>p {
  flex: 1;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.agenda-choice>label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  flex-shrink: 0;
}

.checkbox-label {
  font-size: 0.85rem;
}

.vote-submit {
  display: flex;
  justify-content: flex-end;
}

footer.site-footer {
  padding: 1.5rem 4rem;
  font-size: 0.85rem;
  color: #6b7280;
}

@media (min-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .panel-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.tab-container {
  margin-top: 1rem;
}

.tab-buttons {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 1rem;
}

.tab-button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: #6b7280;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab-button:hover {
  background: #f3f4f6;
  color: #111827;
}

.tab-button.active {
  background: #fff;
  color: #5b8fd8;
  border-bottom-color: #5b8fd8;
}

.tab-content {
  position: relative;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* 모달 스타일 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.route-hidden {
  display: none !important;
}

.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  margin: 1rem;
  /* 여백 추가 */
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.modal-footer button.primary {
  background: #5b8fd8;
  color: #fff;
}

.modal-footer button.primary:hover {
  background: #1d4ed8;
}

/* 투표 생성 모달 전용 스타일 */
#vote-creation-modal .modal-content {
  max-height: 85vh;
}

#vote-creation-modal .modal-body {
  padding: 2rem;
}

#vote-creation-modal .stack {
  gap: 1.25rem;
}

#vote-creation-modal label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #111827;
}

#vote-creation-modal input[type="text"],
#vote-creation-modal input[type="date"],
#vote-creation-modal input[type="file"] {
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  width: 100%;
  background: #fff;
  transition: all 0.3s ease;
}

#vote-creation-modal input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

#vote-creation-modal .agenda-section {
  margin-top: 0.5rem;
}

#vote-creation-modal .agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

#vote-creation-modal .agenda-header span {
  font-weight: 600;
  color: #111827;
}

#vote-creation-modal .agenda-header button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

#vote-creation-modal .modal-footer button {
  min-width: 100px;
}


/* 확인코드 팝업 스타일 */
.verification-code-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
  /* 모바일에서 꽉 차는 것 방지 */
}

.verification-code-content {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.verification-code-content h3 {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
  color: #111827;
}

.verification-code-content p {
  margin: 0 0 1.5rem 0;
  color: #6b7280;
  font-size: 1rem;
}

.verification-code-display {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: #f3f4f6;
  border-radius: 8px;
}

.code-value {
  font-size: 2rem;
  font-weight: bold;
  color: #111827;
  letter-spacing: 0.5rem;
  font-family: 'Courier New', monospace;
}

.close-popup-btn {
  margin-top: 1.5rem;
  padding: 0.75rem 2rem;
  background: #5b8fd8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.close-popup-btn:hover {
  background: #1d4ed8;
}

/* 참석여부, 위임여부 버튼 스타일 */
.attendance-toggle {
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.attendance-toggle:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.attendance-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.attendance-toggle.present {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

.attendance-toggle.absent {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.attendance-toggle.proxy {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.proxy-toggle {
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.proxy-toggle:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.proxy-toggle.active {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}

/* 초기화 버튼 스타일 */
.btn-reset {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-reset:hover:not(:disabled) {
  background: #d97777;
  box-shadow: 0 12px 24px rgba(217, 119, 119, 0.25);
}

.btn-reset:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  box-shadow: none;
}

/* 투표자 전용 화면 스타일 */
.voter-step {
  display: none;
}

.voter-step.active {
  display: block;
}

#voter-member-table tr.selected {
  background-color: #e0f2fe;
}

#voter-member-table tr:hover {
  background-color: #f3f4f6;
  cursor: pointer;
}

/* 선택된 버튼 스타일 */
#voter-member-table button.primary.selected {
  background-color: #059669;
  color: #fff;
  border-color: #059669;
}

#voter-member-table button.primary.selected:hover {
  background-color: #047857;
  border-color: #047857;
}

/* 투표 상태 색상 */
.vote-status-complete {
  color: #059669;
  font-weight: 600;
}

.vote-status-pending {
  color: #6b7280;
}

@media (max-width: 900px) {

  .site-header,
  .site-footer {
    padding: 1rem;
  }

  .panel {
    padding: 1rem;
  }

  button {
    width: 100%;
  }

  .tab-buttons {
    flex-direction: column;
    gap: 0;
  }

  .tab-button {
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .tab-button.active {
    border-left-color: #5b8fd8;
    border-bottom-color: transparent;
  }
}

.delete-vote-icon {
  background: none !important;
  border: none !important;
  cursor: pointer;
  /* 터치 영역 최소화 및 정사각형으로 조정 */
  padding: 0;
  width: 2.5rem;
  height: 2.5rem;
  color: #dc2626;
  font-size: 1.25rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  /* 우측 정렬 보장 */
  box-sizing: border-box;
  /* 패딩 포함 크기 계산 */
}

.delete-vote-icon:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.delete-vote-icon:active {
  transform: scale(0.95);
}

/* PC Admin Layout (Global/Desktop) */
.admin-main {
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "list detail"
    "creation detail";
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

.admin-detail {
  grid-area: detail;
  height: 100%;
}

.admin-list {
  grid-area: list;
}

.admin-creation-wrapper {
  grid-area: creation;
}

/* Manage 및 Operate 페이지 모바일 반응형 디자인 */
@media (max-width: 768px) {

  /* 헤더 모바일 최적화 */
  .site-header {
    padding: 1rem 1.5rem;
  }

  .brand strong {
    font-size: 1.25rem;
  }

  .summary {
    font-size: 0.85rem;
  }

  .app-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .app-nav a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  /* 레이아웃 모바일 최적화 */
  .layout {
    padding: 1rem;
    gap: 1rem;
    max-width: 100vw;
    /* 뷰포트 너비 제한 */
  }

  .panel {
    padding: 1rem;
    border-radius: 12px;
    max-width: 100vw;
    /* 뷰포트 너비 제한 */
  }

  /* Manage 페이지 모바일 최적화 */
  .admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .admin-header h2 {
    font-size: 1.25rem;
    margin: 0;
  }

  #toggle-vote-form {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    min-height: 44px;
    /* 터치하기 쉬운 크기 */
  }

  .vote-form-panel {
    margin-top: 0.75rem;
    padding: 0.75rem;
  }

  .vote-form-panel h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  /* Admin Page Mobile Optimization */
  .admin-main {
    display: flex;
    flex-direction: column;
  }

  .admin-detail {
    order: 1;
    /* Detail first */
  }

  .admin-creation-wrapper {
    order: 2;
    /* Creation second */
    margin-top: 1rem;
  }

  .admin-list {
    order: 3;
    /* List (Delete) third */
    margin-top: 1rem;
  }

  .admin-header {
    margin-bottom: 0.5rem;
  }

  /* Force full width on mobile frames */
  .admin-list,
  .admin-detail,
  .admin-creation-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
  }

  .list-header {
    flex-direction: row;
    /* Keep buttons side-by-side or wrapped */
    align-items: center;
  }

  #delete-selected-votes,
  #toggle-vote-form {
    width: auto;
    flex: 1;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  .list-title {
    font-size: 1.1rem;
    margin: 0.75rem 0;
  }

  .vote-item {
    padding: 0.75rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    min-height: auto;
  }

  .vote-item strong {
    font-size: 0.95rem;
  }

  .vote-item-body>div {
    font-size: 0.8rem;
  }

  /* 투표 상세 모바일 최적화 */
  #vote-detail-card {
    padding: 0.75rem;
  }

  #vote-detail-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .attendance-stats {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .stat-block {
    padding: 0.75rem;
  }

  .stat-block strong {
    font-size: 1.2rem;
  }

  .stat-rate {
    font-size: 1rem;
  }

  /* Operate 페이지 모바일 최적화 */
  #operator-vote-selector {
    margin-bottom: 1rem;
  }

  #operator-vote-selector>div {
    flex-direction: column;
    gap: 0.5rem;
  }

  .vote-selector-button {
    min-width: 100%;
    width: 100%;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .vote-selector-button>div {
    width: 100%;
  }

  .vote-selector-button strong {
    font-size: 0.95rem;
  }

  .tab-buttons {
    flex-wrap: wrap;
    gap: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
  }

  .tab-button {
    flex: 1;
    min-width: calc(50% - 0.125rem);
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    min-height: 44px;
    /* 터치하기 쉬운 크기 */
  }

  /* 섹션 헤더 모바일 최적화 */
  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .section-header h3 {
    font-size: 1.1rem;
    margin: 0;
  }

  .group-filter-container {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .select-all-btn {
    width: 100%;
    padding: 0.75rem;
    min-height: 44px;
    text-align: center;
  }

  .group-filter-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .group-filter-btn {
    flex: 1;
    min-width: calc(50% - 0.25rem);
    padding: 0.625rem 0.75rem;
    font-size: 0.85rem;
    text-align: center;
    min-height: 40px;
  }

  /* 회원 목록 프레임 모바일 최적화 */
  .member-control-frame {
    padding: 0.75rem;
  }

  .member-list-frame {
    padding: 0.75rem;
    max-height: 500px;
  }

  .member-list {
    gap: 0.375rem;
  }

  .group-member-item {
    padding: 0.75rem 0.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .group-member-item>div {
    width: 100%;
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  /* 폼 액션 버튼 모바일 최적화 */
  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-actions button {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    min-height: 48px;
  }

  /* 테이블 모바일 최적화 */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.75rem;
    padding: 0 0.75rem;
  }

  .data-table {
    font-size: 0.85rem;
    /* min-width 제거: 모바일에서 테이블이 뷰포트에 맞게 조정되도록 함 */
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.375rem;
    font-size: 0.8rem;
  }

  /* 투표 폼 모바일 최적화 */
  .vote-form-panel label {
    font-size: 0.9rem;
  }

  .vote-form-panel input[type="text"],
  .vote-form-panel input[type="date"],
  .vote-form-panel input[type="file"],
  .vote-form-panel textarea {
    font-size: 16px;
    /* iOS 줌 방지 */
    padding: 0.75rem;
    min-height: 44px;
  }

  .agenda-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  #add-agenda {
    width: 100%;
    padding: 0.75rem;
    min-height: 44px;
  }

  .agenda-field-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .agenda-parent-checkbox {
    margin-top: 0;
    padding: 0.5rem 0;
  }
}

/* 작은 모바일 화면 (480px 이하) */
@media (max-width: 480px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .brand strong {
    font-size: 1.1rem;
  }

  .summary {
    font-size: 0.8rem;
  }

  .layout {
    padding: 0.75rem;
  }

  .panel {
    padding: 0.75rem;
    border-radius: 8px;
  }

  .admin-header h2 {
    font-size: 1.1rem;
  }

  .vote-item {
    padding: 0.625rem;
  }

  .vote-item strong {
    font-size: 0.9rem;
  }

  .tab-button {
    font-size: 0.85rem;
    padding: 0.625rem 0.375rem;
  }

  .section-header h3 {
    font-size: 1rem;
  }

  .group-filter-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.625rem;
    min-height: 36px;
  }

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.375rem;
    font-size: 0.85rem;
  }
}

/* Voter Search Grid - 라벨과 입력창을 한 줄로 표시 */
.voter-search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.voter-search-grid .input-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
}

.voter-search-grid .input-group label {
  margin-bottom: 0;
  min-width: 80px;
  flex-shrink: 0;
}

.voter-search-grid .input-wrapper {
  flex: 1;
}

.voter-search-grid input,
.voter-search-grid select {
  width: 100%;
}

/* Voter 페이지 모바일 반응형 디자인 */
@media (max-width: 768px) {

  /* 투표 선택 버튼 모바일 최적화 */
  #voter-vote-selector {
    margin-bottom: 1rem;
  }

  #voter-vote-selector>div {
    flex-direction: column;
    gap: 0.5rem;
  }

  .vote-selector-button {
    min-width: 100%;
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .vote-selector-button>div {
    width: 100%;
  }

  .vote-selector-button strong {
    font-size: 0.95rem;
  }

  /* 회원 검색 폼 모바일 최적화 */
  #voter-step-search .voter-search-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  #voter-step-search .input-group {
    margin-bottom: 0;
  }

  #voter-step-search .input-group label {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }

  #voter-step-search input,
  #voter-step-search select {
    width: 100% !important;
    font-size: 1rem !important;
    padding: 0.875rem !important;
  }

  /* 테이블 모바일 최적화 */
  #voter-member-table {
    font-size: 0.9rem;
  }

  #voter-member-table th,
  #voter-member-table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.85rem;
  }

  #voter-member-table th:first-child,
  #voter-member-table td:first-child {
    min-width: auto;
  }

  #voter-member-table th:nth-child(2),
  #voter-member-table td:nth-child(2) {
    min-width: auto;
  }

  #voter-member-table th:last-child,
  #voter-member-table td:last-child {
    min-width: auto;
  }

  #voter-member-table button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-height: 36px;
    /* 터치하기 쉬운 크기 */
  }

  /* 확인 코드 입력 모바일 최적화 */
  #voter-step-code input[type="text"] {
    width: 100%;
    font-size: 24px;
    /* 큰 숫자 입력을 위해 */
    text-align: center;
    letter-spacing: 0.5rem;
    padding: 1rem;
    min-height: 56px;
    /* 터치하기 쉬운 크기 */
  }

  /* 폼 액션 버튼 모바일 최적화 */
  #voter-step-search .form-actions,
  #voter-step-code .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  #voter-step-code .form-actions button {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    min-height: 48px;
    /* 터치하기 쉬운 크기 */
  }

  /* 투표 폼 모바일 최적화 */
  #voter-vote-form-container .agenda-choice {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  #voter-vote-form-container .agenda-choice>p {
    width: 100%;
    font-size: 0.95rem;
    line-height: 1.5;
  }

  #voter-vote-form-container .agenda-choice>label {
    width: 100%;
    justify-content: space-between;
    padding: 0.5rem 0;
  }

  #voter-vote-form-container .agenda-choice input[type="radio"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
  }

  #voter-vote-form-container button[type="submit"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    min-height: 52px;
    /* 터치하기 쉬운 크기 */
    margin-top: 1rem;
  }

  /* 패널 카드 모바일 최적화 */
  #voter-panel .panel-card {
    padding: 1rem;
    margin: 0;
    border-radius: 0;
    max-width: 100vw;
    /* 뷰포트 너비 제한 */
  }

  #voter-panel h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  #voter-panel h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  /* 테이블 래퍼 스크롤 최적화 */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -1rem;
    padding: 0 1rem;
  }

  /* 빈 상태 메시지 모바일 최적화 */
  .empty-state {
    padding: 2rem 1rem;
    font-size: 0.9rem;
    text-align: center;
  }
}

/* 작은 모바일 화면 (480px 이하) */
@media (max-width: 480px) {
  #voter-panel .panel-card {
    padding: 0.75rem;
  }

  #voter-member-table {
    font-size: 0.8rem;
  }

  #voter-member-table th,
  #voter-member-table td {
    padding: 0.4rem 0.2rem;
    font-size: 0.8rem;
  }

  .vote-selector-button strong {
    font-size: 0.9rem;
  }

  .vote-selector-button>div>div {
    font-size: 0.8rem;
  }

  #voter-step-code input[type="text"] {
    font-size: 20px;
    letter-spacing: 0.3rem;
  }
}

/* Vote Segmented Control */
.vote-segment-container {
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  width: fit-content;
}

@media (max-width: 768px) {
  .vote-segment-container {
    width: 100%;
  }
}

.vote-segment-label {
  flex: 1;
  position: relative;
  cursor: pointer;
  margin: 0;
  text-align: center;
  border-right: 1px solid #d1d5db;
}

.vote-segment-label:last-child {
  border-right: none;
}

/* High specificity to hide on mobile */
#voter-vote-form-container .vote-segment-label input[type="radio"],
.vote-segment-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0 !important;
  height: 0 !important;
  margin: 0;
}

.vote-segment-text {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.2s;
  background: #fff;
  white-space: normal;
  word-break: keep-all;
}

/* Checked state */
.vote-segment-label input[type="radio"]:checked+.vote-segment-text {
  background-color: #2563eb;
  color: white;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hover state */
.vote-segment-label:hover .vote-segment-text {
  background-color: #f9fafb;
}

.vote-segment-label input[type="radio"]:checked+.vote-segment-text:hover {
  background-color: #1d4ed8;
}

/* Disabled state */
.agenda-choice.disabled .vote-segment-container {
  opacity: 0.6;
  cursor: not-allowed;
}

.agenda-choice.disabled .vote-segment-label {
  cursor: not-allowed;
}

.agenda-choice.disabled .vote-segment-text {
  background-color: #f3f4f6;
  color: #9ca3af;
}

.agenda-choice.disabled input[type="radio"]:checked+.vote-segment-text {
  background-color: #9ca3af;
  color: #fff;
}

/* ==========================================================================
   Login Redesign Styles
   ========================================================================== */

#login-panel:not(.route-hidden) {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
}

#login-panel.route-hidden {
  display: none;
}

.login-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  overflow: hidden;
  padding: 2rem;
}

/* Login Card */
.login-card-glass {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 3rem 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.login-header h2 {
  color: #0f172a;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.025em;
}

.login-header .hint {
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Form Styles */
.input-group {
  margin-bottom: 1.5rem;
}

.input-group label {
  display: block;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.login-card-glass input[type="password"] {
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.875rem 1rem;
  color: #0f172a;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.login-card-glass input[type="password"]::placeholder {
  color: #94a3b8;
}

.login-card-glass input[type="password"]:focus {
  background: #fff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-focus-border {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
}

.login-card-glass input[type="password"]:focus~.input-focus-border {
  width: 80%;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  min-height: 1.25rem;
  margin-top: -0.75rem;
  margin-bottom: 1rem;
  padding-left: 0.25rem;
}

.login-submit {
  position: relative;
  width: 100%;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.875rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-submit:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.login-submit:active {
  transform: translateY(0);
}

.login-footer {
  margin-top: 2.5rem;
  text-align: center;
}

.login-footer p {
  color: #64748b;
  font-size: 0.8rem;
  margin: 0;
}

/* Adjustments for the main app UI to not conflict */
body:has(#login-panel:not(.route-hidden)) {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.card-header-icon {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.card-header-icon .icon {
  font-size: 1.25rem;
  background: var(--bg-main);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}

.card-header-icon h2,
.card-header-icon h3 {
  margin: 0 !important;
  line-height: normal;
  display: flex;
  align-items: center;
}

.full-width {
  width: 100%;
}

.admin-list-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.status-message {
  font-size: 0.875rem;
  min-height: 1.25rem;
  margin-top: 0.25rem;
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.input-wrapper {
  position: relative;
}

.input-focus-border {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
}

input:focus~.input-focus-border {
  width: 100%;
}
/* 투표 수정 버튼 */
.edit-vote-btn {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  height: auto;
  flex-shrink: 0;
}

.edit-vote-btn:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.2);
}

/* 의안 삭제 버튼 (수정 모달용) */
.delete-agenda-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  height: auto;
  white-space: nowrap;
}

.delete-agenda-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

/* 수정 모달의 의안 필드 레이아웃 */
#agenda-fields-edit {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
