﻿:root {
  --bg-main: #edf4ee;
  --bg-soft: #e4eefc;
  --bg-warm: #fde8d8;
  --ink: #172332;
  --ink-muted: #5c6d83;
  --line: #d6deea;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --shadow: 0 18px 50px rgba(17, 34, 57, 0.14);
  --primary: #0f6d6f;
  --primary-deep: #0a4f51;
  --accent: #f08a4b;
  --accent-deep: #cd6e34;
  --danger: #b1372e;
  --danger-deep: #8a271f;
  --ok: #2d7e4b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  position: relative;
  color: var(--ink);
  font-family: "SUIT", "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  background:
    radial-gradient(760px 520px at -8% -8%, var(--bg-soft) 0%, transparent 70%),
    radial-gradient(780px 520px at 108% 2%, var(--bg-warm) 0%, transparent 72%),
    linear-gradient(160deg, var(--bg-main), #dbe8ff);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.24) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.3;
}

body::after {
  content: "";
  position: fixed;
  width: 460px;
  height: 460px;
  right: -180px;
  bottom: -210px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 35% 35%, #95d7d7 0%, transparent 70%);
  opacity: 0.36;
  filter: blur(2px);
}

.page {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 0.9rem));
  margin: 0.5rem auto 1rem;
}

.auth-page {
  display: grid;
  min-height: calc(100vh - 2rem);
  place-items: center;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.9rem;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
  animation: riseIn 420ms ease both;
}

.auth {
  width: min(500px, 100%);
}

.auth-panel {
  position: relative;
  overflow: hidden;
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -30%;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(133, 215, 203, 0.28) 0%, transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 0.65rem;
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a5557;
  background: #d8f2ee;
  border: 1px solid #bde4df;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(1.45rem, 4.2vw, 2.12rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.04rem, 2.7vw, 1.24rem);
  margin-bottom: 0.62rem;
}

.subtitle {
  margin: 0.62rem 0 0.95rem;
  color: var(--ink-muted);
  line-height: 1.48;
}

.subtitle.small {
  margin: 0.42rem 0 0.62rem;
}

.form {
  display: grid;
  gap: 0.6rem;
}

label {
  display: inline-block;
  margin-bottom: 0.28rem;
  font-size: 0.94rem;
  font-weight: 760;
}

input,
select {
  width: 100%;
  min-height: 52px;
  border: 1.6px solid #c1cbda;
  border-radius: 14px;
  padding: 0.62rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input::placeholder {
  color: #8193a8;
}

input:focus,
select:focus {
  outline: none;
  border-color: #6ca6d5;
  box-shadow: 0 0 0 4px rgba(108, 166, 213, 0.24);
}

button,
.link-btn,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 56px;
  border: 0;
  border-radius: 16px;
  padding: 0.78rem 1rem;
  font: inherit;
  font-size: 1.01rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

button:hover,
.link-btn:hover,
.btn-link:hover {
  filter: brightness(1.03);
}

button:active,
.link-btn:active,
.btn-link:active {
  transform: translateY(1px);
}

.full {
  width: 100%;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  box-shadow: 0 9px 22px rgba(11, 79, 81, 0.32);
}

.secondary {
  color: #163149;
  background: #eef4ff;
  border: 1.5px solid #cbd7e8;
}

.danger-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--danger), var(--danger-deep));
  box-shadow: 0 9px 22px rgba(138, 39, 31, 0.32);
}

.link-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 20px rgba(205, 110, 52, 0.28);
}

.auth-links {
  margin-top: 0.65rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.text-link {
  color: #0f5e74;
  font-weight: 780;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.auth-tip {
  margin-top: 0.75rem;
  padding: 0.6rem 0.72rem;
  border-radius: 12px;
  border: 1px solid #d8e8e1;
  background: #f4fbf8;
  color: #3d5f55;
  font-size: 0.9rem;
}

.status {
  min-height: 1.45rem;
  margin: 0.7rem 0 0;
  font-size: 0.96rem;
  font-weight: 780;
  color: var(--ok);
}

.status.error {
  color: var(--danger);
}

.global {
  text-align: center;
}

.dashboard {
  display: grid;
  gap: 0.85rem;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.95rem;
  background:
    radial-gradient(420px 240px at 88% -25%, rgba(255, 255, 255, 0.28) 0%, transparent 70%),
    linear-gradient(135deg, #0f6d6f, #174b7f);
  border-color: rgba(255, 255, 255, 0.24);
  color: #f5fbff;
}

.hero-content {
  display: grid;
  gap: 0.45rem;
}

.hero-panel .subtitle,
.hero-panel .eyebrow {
  color: #def4ff;
}

.hero-panel .eyebrow {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.26);
}

.hero-month-wrap {
  width: min(290px, 100%);
  display: grid;
  gap: 0.35rem;
}

.hero-month-wrap label {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #e5f4ff;
}

.hero-month-wrap input {
  min-height: 48px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: #f4fbff;
}

.hero-month-wrap input:focus {
  border-color: rgba(200, 234, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(200, 234, 255, 0.24);
}

.hero-actions {
  display: grid;
  gap: 0.48rem;
  width: 100%;
}

.hero-actions .secondary,
.hero-actions .btn-link {
  background: rgba(255, 255, 255, 0.17);
  border-color: rgba(255, 255, 255, 0.32);
  color: #eefbff;
}

.workspace-grid {
  display: grid;
  gap: 0.7rem;
}

.grid-form {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1fr;
}

.wide {
  grid-column: 1 / -1;
}

.btn-row {
  margin-top: 0.68rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.58rem;
}

.register-panel,
.filter-panel,
.floor-panel,
.monthly-panel,
.rooms-panel,
.recent-panel,
.reset-panel {
  background: var(--panel-strong);
}

.card-grid {
  display: grid;
  gap: 0.62rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.summary-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #d0dae8;
  border-radius: 15px;
  padding: 0.75rem;
  background: linear-gradient(175deg, #f7fbff, #eef6ff);
}

.summary-card:nth-child(3n + 2) {
  background: linear-gradient(175deg, #f9fff8, #eef9f2);
}

.summary-card:nth-child(3n + 3) {
  background: linear-gradient(175deg, #fffaf4, #fff2e8);
}

.summary-card::after {
  content: "";
  position: absolute;
  inset: auto -28px -40px auto;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.66) 0%, transparent 72%);
}

.summary-card h4 {
  font-size: 1.02rem;
  margin: 0 0 0.38rem;
}

.summary-card p {
  margin: 0.16rem 0;
  color: #35506b;
  font-weight: 600;
}

.floor-card-btn {
  width: 100%;
  min-height: 0;
  display: block;
  text-align: left;
  padding: 0.75rem;
  border-radius: 15px;
  border: 1px solid #d0dae8;
  box-shadow: none;
}

.floor-card-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23, 56, 90, 0.13);
}

.floor-card-btn:focus-visible {
  outline: 0;
  border-color: #6ca6d5;
  box-shadow: 0 0 0 4px rgba(108, 166, 213, 0.24);
}

.summary-hint {
  display: inline-flex;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4c667f;
}

.table-wrap {
  border: 1px solid #d8e0eb;
  border-radius: 14px;
  overflow: auto;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 430px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef4fb;
  color: #2f4864;
  font-weight: 780;
}

th,
td {
  text-align: left;
  padding: 0.62rem 0.56rem;
  border-bottom: 1px solid #e1e7f0;
  font-size: 0.95rem;
}

tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.empty-row td {
  text-align: center;
  justify-content: center;
}

.empty-row td::before {
  content: none;
}

.recent {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.46rem;
}

.recent li {
  border: 1px solid #d8e0ec;
  border-radius: 12px;
  padding: 0.62rem 0.7rem;
  background: #fdfefe;
  color: #2f4963;
  line-height: 1.43;
}

.danger {
  border-color: #efc6c1;
  background: linear-gradient(180deg, #fff8f7, #fff2f1);
}

.floor-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.9rem;
  background: rgba(12, 24, 38, 0.45);
}

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

body.modal-open {
  overflow: hidden;
}

.floor-modal-panel {
  width: min(700px, 100%);
  max-height: min(88vh, 760px);
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid #ccd6e3;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 26px 56px rgba(14, 31, 50, 0.28);
  overflow: hidden;
}

.floor-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem;
  border-bottom: 1px solid #dfe6ef;
  background: linear-gradient(180deg, #f8fbff, #f2f7ff);
}

.floor-detail-body {
  padding: 0.8rem;
  overflow: auto;
}

.floor-detail-empty {
  margin: 0;
  color: var(--ink-muted);
  font-weight: 600;
}

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

@media (max-width: 760px) {
  .page {
    width: calc(100% - 0.75rem);
  }

  .panel {
    border-radius: 16px;
    padding: 0.78rem;
  }

  .auth-page {
    min-height: calc(100vh - 1.1rem);
    padding: 0.2rem 0 0.5rem;
  }

  h1 {
    font-size: clamp(1.3rem, 5.3vw, 1.75rem);
  }

  .hero-panel {
    padding: 0.8rem;
  }

  .hero-month-wrap {
    width: 100%;
  }

  .hero-actions .secondary,
  .hero-actions .btn-link,
  .hero-actions button {
    width: 100%;
  }

  .btn-row {
    grid-template-columns: 1fr;
  }

  .auth-links {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }

  table {
    min-width: 0;
  }

  thead {
    display: none;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tbody tr {
    margin-bottom: 0.55rem;
    border: 1px solid #d8e0eb;
    border-radius: 13px;
    background: #fff;
    overflow: hidden;
  }

  tbody tr:last-child {
    margin-bottom: 0;
  }

  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px dashed #e3e9f2;
    padding: 0.58rem 0.62rem;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: #35506b;
    font-weight: 760;
    flex-shrink: 0;
  }

  .floor-modal {
    padding: 0.45rem;
  }

  .floor-modal-panel {
    border-radius: 14px;
    max-height: 92vh;
  }
}

@media (max-width: 620px) {
  .auth-links {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 830px) {
  .page {
    margin-top: 1.12rem;
  }

  .grid-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .btn-row {
    grid-template-columns: repeat(2, minmax(0, 220px));
  }
}

@media (min-width: 900px) {
  .hero-panel {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.05rem;
  }

  .hero-actions {
    width: min(340px, 100%);
  }
}

@media (min-width: 1080px) {
  .workspace-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .register-panel,
  .filter-panel {
    grid-column: span 6;
  }

  .floor-panel,
  .rooms-panel,
  .reset-panel {
    grid-column: span 12;
  }

  .monthly-panel,
  .recent-panel {
    grid-column: span 6;
  }
}
