@charset "UTF-8";
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');

:root {
  --primary: #2563eb;
  --primary-light: #eff6ff;
  --secondary: #0ea5e9;
  --accent: #f97316;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --dark: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 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);
  --radius: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  color: var(--gray-800);
  background-color: var(--gray-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* Header & Navigation */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.logo-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
  padding: 8px 0;
  white-space: nowrap;
}

.nav-link.active {
  color: var(--primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  min-width: 160px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  padding: 8px 0;
  z-index: 100;
}

.nav-dropdown.open .nav-dropdown-content {
  display: block;
}

.nav-dropdown-item {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}

.header-action {
  flex-shrink: 0;
}

.header-action .btn-register {
  background: var(--primary);
  color: var(--white);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Layout Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Flash Messages */
.alert-container {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 0 24px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
}

.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.alert-info { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-outline {
  background: var(--white);
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.badge-vacant {
  background: #dcfce7;
  color: #166534;
}

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

.badge-theme {
  background: #eff6ff;
  color: #1d4ed8;
}

.badge-open {
  background: #e0f2fe;
  color: #0369a1;
}

/* Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.gosiwon-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card-img-wrap {
  position: relative;
  width: 100%;
  height: 190px;
  background: #e2e8f0;
  overflow: hidden;
}

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

.card-tag-top {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
}

.card-vacant-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.vacant-active {
  background: #22c55e;
  color: #fff;
}

.vacant-zero {
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
}

.card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-addr {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price-box {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.price-label {
  font-size: 12px;
  color: var(--gray-500);
}

.price-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}

.price-sub {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 500;
}

.card-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--gray-500);
}

/* Footer */
.footer {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  margin-top: 60px;
  padding: 40px 0 30px;
  color: var(--gray-600);
  font-size: 13px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.footer-copyright {
  margin-top: 16px;
  color: var(--gray-400);
}

/* Common Form & Section Utilities */
.filter-input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  background-color: var(--white);
  outline: none;
}

.filter-input:focus {
  border-color: var(--primary);
}

select:not([multiple]),
select.filter-input,
select.room-filter-select,
.custom-select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 600;
}

.filter-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.spec-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.spec-card .val {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 4px;
}

.spec-card .lbl {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 600;
}

.section-block {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.block-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.key-option-pill {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
  margin-top: 4px;
}

/* Shared Multi-Image Lightbox Gallery Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(4px);
  z-index: 9999;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 24px 24px;
  user-select: none;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.lightbox-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lightbox-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 3px;
}

.lightbox-zoom-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.lightbox-zoom-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.22);
}

.lightbox-zoom-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lightbox-zoom-level {
  min-width: 52px;
  height: 34px;
  padding: 0 8px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lightbox-zoom-level:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-title {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-counter {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.14);
  padding: 4px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.lightbox-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 16px 68px;
  overflow: hidden;
  touch-action: none;
}

.lightbox-img-frame {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.lightbox-modal.is-zoomed .lightbox-img-frame {
  cursor: grab;
}

.lightbox-modal.is-dragging .lightbox-img-frame {
  cursor: grabbing;
}

.lightbox-img {
  max-width: min(1100px, 82vw);
  max-height: 74vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: block;
  transform-origin: center center;
  transition: transform 0.16s ease-out;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-modal.is-dragging .lightbox-img {
  transition: none;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(37, 99, 235, 0.9);
  border-color: rgba(255, 255, 255, 0.45);
}

.lightbox-prev {
  left: 8px;
}

.lightbox-next {
  right: 8px;
}

.lightbox-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 4px 2px;
  overflow-x: auto;
  flex-shrink: 0;
  max-width: 100%;
  position: relative;
  z-index: 10;
}

.lightbox-thumb-btn {
  width: 72px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0.55;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lightbox-thumb-btn:hover {
  opacity: 0.85;
}

.lightbox-thumb-btn.active {
  border-color: #60a5fa;
  opacity: 1;
  transform: translateY(-2px);
}

.lightbox-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-modal.is-single .lightbox-nav,
.lightbox-modal.is-single .lightbox-thumbs {
  display: none;
}

.lightbox-modal.is-single .lightbox-stage {
  padding: 16px 0;
}

@media (max-width: 768px) {
  .lightbox-modal {
    padding: 14px 12px 18px;
  }
  .lightbox-topbar {
    gap: 8px;
  }
  .lightbox-actions {
    gap: 6px;
  }
  .lightbox-zoom-btn {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }
  .lightbox-zoom-level {
    min-width: 44px;
    height: 30px;
    font-size: 12px;
    padding: 0 6px;
  }
  .lightbox-close {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  .lightbox-stage {
    padding: 12px 0;
  }
  .lightbox-img {
    max-width: 94vw;
    max-height: 70vh;
  }
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  .lightbox-prev {
    left: 4px;
  }
  .lightbox-next {
    right: 4px;
  }
  .lightbox-thumbs {
    justify-content: flex-start;
  }
  .lightbox-thumb-btn {
    width: 60px;
    height: 44px;
  }
}


/* Room List Search & Filter Bar (고시원 상세 / 관리 대시보드 공용) */
.room-filter-bar {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}

.room-filter-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.room-filter-row.compact {
  grid-template-columns: 1.5fr 1fr 1fr auto;
}

.room-filter-input,
.room-filter-select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background-color: var(--white);
  color: var(--gray-800);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.room-filter-select {
  padding-right: 34px;
}

.room-filter-input:focus,
.room-filter-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.room-filter-input.is-filled,
.room-filter-select.is-filled,
.filter-sidebar .filter-input.is-filled,
.filter-sidebar .range-row input.is-filled {
  background-color: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
  font-weight: 700;
}

.room-filter-options-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--gray-200);
}

.room-filter-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.room-filter-opt-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
  margin-right: 4px;
}

.room-opt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.room-opt-chip input {
  display: none;
}

.room-opt-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.room-opt-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.room-filter-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.room-filter-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
}

.room-filter-count strong {
  color: var(--primary);
}

.room-filter-reset {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.room-filter-reset:hover {
  background: var(--gray-100);
  color: var(--gray-800);
  border-color: var(--gray-400);
}

.room-empty-filter {
  display: none;
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius);
  background: var(--gray-50);
  color: var(--gray-500);
}

.room-empty-filter i {
  font-size: 28px;
  color: var(--gray-400);
  margin-bottom: 10px;
  display: block;
}

@media (max-width: 900px) {
  .room-filter-row,
  .room-filter-row.compact {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .room-filter-row,
  .room-filter-row.compact {
    grid-template-columns: 1fr;
  }
}
