/* 기본 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-image: url("../images/main-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  height: 100vh;
  min-height: 710px;
  min-width: 1140px;
  overflow: hidden;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 헤더 */
.header {
  background: #fff;
  z-index: 100;
  flex-shrink: 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  max-width: 100%;
  margin: 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #2563eb;
  line-height: 1;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-right: 0;
}

.nav-link {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-link:hover {
  color: #2563eb;
}

/* 사용자 프로필 표시 */
.user-profile-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.user-profile-display .profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-profile-display .avatar-text {
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
}

.user-profile-display .profile-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.user-profile-display .profile-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
}

.user-profile-display .profile-detail {
  font-size: 0.75rem;
  color: #6b7280;
}

/* 설정 드롭다운 */
.settings-dropdown {
  position: relative;
}

.settings-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  color: #374151;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.settings-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: rotate(90deg);
  color: #2563eb;
}

.settings-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 240px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 1001;
  overflow: hidden;
}

.settings-menu.active {
  display: block;
}

.settings-section {
  padding: 0.75rem;
}

.settings-section.admin-section {
  background: rgba(37, 99, 235, 0.05);
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  letter-spacing: 0.05em;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
}

.settings-item:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.settings-item.logout-item:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.item-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.menu-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 0.25rem 0;
}

/* 메인 콘텐츠 */
.main {
  flex: 1;
  padding: 1.5rem 0 1.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.main .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  justify-content: center;
}

.hero {
  text-align: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.hero p {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

/* AI 프롬프트 입력창 */
.ai-prompt-container {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  flex-shrink: 0;
}

.ai-prompt-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.ai-prompt-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.ai-prompt-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15),
    0 0 0 3px rgba(37, 99, 235, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.ai-prompt-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: #1f2937;
  position: relative;
  z-index: 2;
}

.ai-prompt-input::placeholder {
  color: #9ca3af;
}

.ai-prompt-submit {
  padding: 0.7rem;
  margin: 0.5rem;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ai-prompt-submit:hover {
  background: #2563eb;
  color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ai-prompt-submit:active {
  transform: scale(0.98);
}

/* 대시보드 위젯 */
.dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  flex-shrink: 0;
  height: 400px;
}

.widget-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.widget-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.02) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.widget-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.widget-header {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.widget-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  text-align: left;
}

.widget-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* TODO 위젯만 flex 설정 */
.widget-content.checklist-content {
  flex: 1;
  min-height: 0;
}

/* 앱 아이콘 그리드 */
.app-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  gap: 0.75rem;
  align-items: start;
}

.app-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  transition: all 0.3s;
}

.app-icon-item:hover .app-icon {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.app-icon-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

.app-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
  text-align: center;
  max-width: 80px;
  word-break: keep-all;
  line-height: 1.2;
}

/* Add 버튼 */
.add-button {
  border: none;
  background: none;
  padding: 0;
}

.add-icon {
  background: rgba(37, 99, 235, 0.1);
  border: 2px dashed rgba(37, 99, 235, 0.3);
  box-shadow: none;
}

.add-icon .app-icon-text {
  color: #2563eb;
  font-size: 2rem;
  font-weight: 300;
}

.add-button:hover .add-icon {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.5);
  transform: scale(1.1);
}

.add-button .app-name {
  color: #2563eb;
}

/* 위젯 2: 공지사항 */
.notice-item {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
}

.notice-item:hover {
  background: rgba(37, 99, 235, 0.1);
}

.notice-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.notice-date {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* TODO */
.checklist-content {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-bottom: 1rem;
}

/* 스크롤바 숨기기 */
.checklist-content::-webkit-scrollbar {
  width: 0;
  display: none;
}

.checklist-content {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.checklist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  transition: all 0.2s;
}

.checklist-item:last-child {
  margin-bottom: 0;
}

.checklist-item:hover {
  background: rgba(37, 99, 235, 0.1);
}

.checklist-item:hover .checklist-edit-btn {
  opacity: 1;
}

.checklist-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  cursor: pointer;
}

.checklist-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  background: white;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checklist-checkbox:hover {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.checklist-checkbox:checked {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: #2563eb;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  transform: scale(1.1);
}

.checklist-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  color: white;
  font-size: 13px;
  font-weight: bold;
  animation: checkPop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes checkPop {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.checklist-text {
  flex: 1;
  font-size: 0.875rem;
  color: #374151;
  user-select: none;
  word-break: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.checklist-text.completed {
  text-decoration: line-through;
  color: #9ca3af;
}

.checklist-label:has(.checklist-checkbox:checked) .checklist-text {
  text-decoration: line-through;
  color: #9ca3af;
}

.checklist-edit-btn,
.checklist-delete-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0;
}

.checklist-edit-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.checklist-delete-btn:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.checklist-item:hover .checklist-edit-btn {
  opacity: 1;
}

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

.checklist-add-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  border: none;
  color: #2563eb;
  font-size: 1.25rem;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checklist-add-icon-btn:hover {
  background: #2563eb;
  color: white;
  transform: rotate(90deg);
}

/* ============================================
   Meeting Room Widget Styles
   ============================================ */

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

.refresh-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 1);
}

.refresh-btn.rotating {
  animation: rotate360 0.5s ease-in-out;
}

@keyframes rotate360 {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.meeting-room-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

/* Custom Scrollbar for Meeting Room Content */
.meeting-room-content::-webkit-scrollbar {
  width: 6px;
}

.meeting-room-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.meeting-room-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.meeting-room-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Reservation Card (공통) */
.meeting-room-card,
.vehicle-card {
  background: rgba(255, 255, 255, 0.568);
  border-radius: 8px;
  padding: 10px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.meeting-room-card.available,
.vehicle-card.available {
  border: 2px solid #69bb33;
}

.meeting-room-card.occupied,
.vehicle-card.occupied {
  border: 2px solid #ca3131;
}

.meeting-room-card:hover,
.vehicle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

/* Card Icon */
.card-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.card-icon.meeting-icon {
  color: #3b82f6;
}

.card-icon.vehicle-icon {
  color: #8b5cf6;
}

/* Room/Vehicle Info */
.room-info,
.vehicle-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

/* Single line layout for available resources */
.room-info.single-line,
.vehicle-info.single-line {
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.room-name,
.vehicle-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  flex: 1;
  min-width: 0;
}

/* Status (기존 capacity 위치) */
.room-status,
.vehicle-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.available .room-status,
.available .vehicle-status {
  color: #2d5016;
  background: rgba(45, 80, 22, 0.15);
}

.occupied .room-status,
.occupied .vehicle-status {
  color: #7f1d1d;
  background: rgba(127, 29, 29, 0.15);
}

/* Schedule Info */
.schedule-info {
  margin-top: 6px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.schedule-title {
  font-size: 12px;
  color: #374151;
  font-weight: 500;
  margin-bottom: 2px;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.schedule-organizer {
  font-size: 10px;
  color: #9ca3af;
  margin-bottom: 3px;
}

.schedule-time {
  font-size: 11px;
  color: #6b7280;
}

.next-schedule-line {
  font-size: 11px;
  color: #6b7280;
  margin-top: 6px;
}

/* Inline next schedule for available cards */
.next-schedule-inline {
  font-size: 10px;
  color: #6b7280;
  white-space: nowrap;
  padding: 2px 6px;
  background: rgba(107, 114, 128, 0.1);
  border-radius: 4px;
  flex-shrink: 0;
}

/* Empty/Error/Loading States */
.empty-state,
.error-state,
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.error-state {
  color: rgba(239, 68, 68, 0.8);
}

/* Responsive: 1 column on smaller widgets */
@media (max-width: 1400px) {
  .meeting-room-content {
    grid-template-columns: 1fr;
  }
}

/* 태블릿 모드 (1140px 이하) */
@media (max-width: 1140px) {
  body {
    height: auto;
    min-height: 100vh;
    min-width: unset;
    overflow-y: auto;
    overflow-x: hidden;
  }

  #app {
    height: auto;
    min-height: 100vh;
  }

  .main {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2rem 0 1.5rem;
  }

  .main .container {
    overflow: visible;
    padding: 0;
    max-width: 100%;
    width: 100%;
  }

  .hero {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero h2 {
    font-size: 1.75rem;
  }

  .ai-prompt-container {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .dashboard-widgets {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1.5rem;
    width: 90%;
    margin: 0 auto;
  }

  .widget-card {
    min-height: 280px;
    padding: 2rem;
  }

  .app-icons-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
  }
}

/* 시스템 그리드 */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.system-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.system-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.system-icon {
  width: 60px;
  height: 60px;
  background: #f3f4f6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.system-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1f2937;
}

.system-description {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.system-category {
  display: inline-block;
  background: #e5e7eb;
  color: #374151;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* 버튼 */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

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

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-danger {
  background: #dc2626;
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

/* 사용자 프로필 */
.user-profile {
  position: relative;
}

.profile-dropdown {
  position: relative;
  display: inline-block;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.profile-trigger:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.profile-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.profile-name {
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.profile-role {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.profile-arrow {
  font-size: 0.75rem;
  color: #6b7280;
  transition: transform 0.2s;
}

.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
}

.profile-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-header {
  padding: 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  gap: 1rem;
}

.profile-avatar-large {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  flex-shrink: 0;
}

.profile-avatar-large .avatar-text {
  font-size: 1.25rem;
}

.profile-details {
  flex: 1;
  min-width: 0;
}

.profile-details .profile-name {
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
}

.profile-email {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.profile-dept {
  font-size: 0.875rem;
  color: #6b7280;
}

.admin-badge {
  display: inline-block;
  background: #dc2626;
  color: white;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  margin-top: 0.5rem;
}

.admin-badge.operator-badge {
  background: #f59e0b;
}

.profile-menu-items {
  padding: 0.5rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: left;
}

.menu-item:hover {
  background: #f9fafb;
}

.menu-item.logout-item:hover {
  background: #fef2f2;
  color: #dc2626;
}

.menu-icon {
  font-size: 1rem;
}

.menu-divider {
  height: 1px;
  background: #f3f4f6;
  margin: 0.5rem 0;
}

/* 모달 스타일 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
}

.close-btn:hover {
  color: #374151;
}

.modal-body {
  padding: 1.5rem;
}

.profile-avatar-xl {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  margin: 0 auto 1rem;
}

.profile-avatar-xl .avatar-text {
  font-size: 1.5rem;
}

.admin-badge-large {
  background: #dc2626;
  color: white;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.admin-badge-large.operator-badge {
  background: #f59e0b;
  text-align: center;
  margin-bottom: 1rem;
}

.info-group {
  margin-bottom: 1rem;
}

.info-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.info-value {
  color: #6b7280;
}

/* 푸터 */
.footer {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.75rem 0;
  text-align: center;
  color: #6b7280;
  position: relative;
  overflow: hidden;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  pointer-events: none;
}

.footer .container {
  position: relative;
  z-index: 1;
}

/* 배경화면 설정 스타일 */
.settings-modal .modal-content {
  max-width: 600px;
}

.settings-form .settings-section {
  margin-bottom: 2rem;
}

.settings-form .settings-section:last-child {
  margin-bottom: 0;
}

.settings-form h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.settings-form .form-group {
  margin-bottom: 1.5rem;
}

.settings-form .form-group:last-child {
  margin-bottom: 0;
}

.settings-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.settings-form input[type="text"],
.settings-form input[type="email"],
.settings-form select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  transition: all 0.2s;
}

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

.background-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.background-option {
  flex: 1;
  padding: 0;
  background: none;
  border: 3px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  overflow: hidden;
}

.background-option:hover {
  border-color: #9ca3af;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.background-option.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.background-preview {
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
  position: relative;
}

.background-preview.bg-default1 {
  background-image: url("../images/main-bg1.jpg");
  background-size: cover;
  background-position: center;
}

.background-preview.bg-default2 {
  background-image: url("../images/main-bg2.jpg");
  background-size: cover;
  background-position: center;
}

.background-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  backdrop-filter: blur(10px);
}

.custom-background-upload {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  color: #374151;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: fit-content;
}

.upload-btn:hover {
  background: #e5e7eb;
  border-color: #2563eb;
  color: #2563eb;
}

.upload-icon {
  font-size: 1.25rem;
}

.custom-background-preview {
  position: relative;
  width: 100%;
  max-width: 300px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-background-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.remove-custom-bg {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.remove-custom-bg:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f3f4f6;
}

/* 배경화면 클래스 */
body.bg-default1 {
  background-image: url("../images/main-bg1.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.bg-default2 {
  background-image: url("../images/main-bg2.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.bg-custom {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* 모바일 모드 (620px 미만) */
@media (max-width: 619px) {
  body {
    height: auto;
    min-height: 100vh;
    min-width: unset;
    overflow-y: auto;
    overflow-x: hidden;
  }

  #app {
    height: auto;
    min-height: 100vh;
  }

  .header-container {
    flex-direction: row;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .logo img {
    height: 32px;
  }

  .nav {
    gap: 0.75rem;
  }

  .nav-link {
    font-size: 0.875rem;
  }

  .user-profile-display {
    gap: 0.5rem;
  }

  .user-profile-display .profile-avatar {
    width: 32px;
    height: 32px;
  }

  .user-profile-display .profile-info {
    display: none;
  }

  .settings-btn {
    width: 32px;
    height: 32px;
  }

  .main {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem 0 1rem;
  }

  .main .container {
    overflow: visible;
    justify-content: flex-start;
    padding: 0;
    max-width: 100%;
    width: 100%;
  }

  .hero {
    margin-bottom: 1rem;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero h2 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.875rem;
  }

  .ai-prompt-container {
    margin-bottom: 1rem;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
  }

  .ai-prompt-input {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
  }

  .dashboard-widgets {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1.25rem;
    width: 90%;
    margin: 0 auto;
  }

  .widget-card {
    padding: 1.5rem;
    min-height: 220px;
  }

  .widget-title {
    font-size: 0.9375rem;
  }

  .app-icons-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.125rem;
  }

  .app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .app-icon-text {
    font-size: 1.125rem;
  }

  .app-name {
    font-size: 0.6875rem;
  }

  .notice-item {
    padding: 0.625rem;
  }

  .notice-title {
    font-size: 0.8125rem;
  }

  .checklist-item {
    padding: 0.625rem;
  }

  .checklist-checkbox {
    width: 20px;
    height: 20px;
  }

  .checklist-text {
    font-size: 0.8125rem;
  }

  .systems-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .modal-content {
    width: 95%;
  }

  .background-options {
    flex-direction: column;
  }

  .background-preview {
    height: 100px;
  }

  .settings-menu {
    min-width: 200px;
  }

  .footer {
    padding: 0.5rem 0;
    font-size: 0.75rem;
  }
}

/* AI 채팅 모달 스타일 */
.ai-chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ai-chat-modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 900px;
  height: 80vh;
  max-height: 700px;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ai-chat-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #6b7280;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-chat-modal-close:hover {
  background: rgba(255, 255, 255, 1);
  transform: rotate(90deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ai-chat-modal-close:active {
  transform: rotate(90deg) scale(0.95);
}

.ai-chat-modal-content iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

/* 반응형 모달 */
@media (max-width: 768px) {
  .ai-chat-modal-content {
    width: 95%;
    height: 85vh;
  }

  .ai-chat-modal-close {
    width: 36px;
    height: 36px;
    top: 12px;
    right: 12px;
  }
}

/* 즉시 예약 버튼 */
.quick-book-btn {
  background: #315c37;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  margin-right: 6px;
  flex-shrink: 0;
}

.quick-book-btn svg {
  width: 10px;
  height: 10px;
  color: white;
}

.quick-book-btn:hover {
  background: #73ac8c;
  transform: scale(1.2);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4);
}

.quick-book-btn:active {
  transform: scale(0.95);
}

.status-wrapper {
  display: flex;
  align-items: center;
}

/* 로딩 스피너 */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 알림 스타일 */
.notification {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notification-icon {
  font-size: 1.25rem;
}

/* 공지사항 가로 스크롤 띠 */
.notice-banner {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  color: #333;
  padding: 6px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  z-index: 90;
}

.notice-content {
  display: flex;
  align-items: center;
  max-width: 100%;
  padding: 0 2rem;
  gap: 0.75rem;
}

.notice-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.notice-scroll-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.notice-scroll {
  display: flex;
  gap: 3rem;
  animation: scroll-left 30s linear infinite;
  white-space: nowrap;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.notice-scroll:hover {
  animation-play-state: paused;
}

.notice-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.notice-item:hover {
  opacity: 0.8;
}

.notice-badge {
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.notice-title {
  font-size: 0.875rem;
  font-weight: 400;
}

.notice-date {
  font-size: 0.85rem;
  opacity: 0.9;
  margin-left: 0.5rem;
}
