@font-face {
  font-family: 'Pretendard';
  src: url('../../font/text/Pretendard-Thin.woff') format('woff');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../../font/text/Pretendard-ExtraLight.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../../font/text/Pretendard-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../../font/text/Pretendard-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../../font/text/Pretendard-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../../font/text/Pretendard-SemiBold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../../font/text/Pretendard-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../../font/text/Pretendard-ExtraBold.woff') format('woff');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('../../font/text/Pretendard-Black.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg-start: #e8f1ff;
  --bg-middle: #f7fafc;
  --bg-end: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --surface-strong: #e2e8f0;
  --text: #1f2937;
  --text-muted: #64748b;
  --border: #dbe4f0;
  --input-border: #cbd5e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #dbeafe;
  --secondary: #e2e8f0;
  --secondary-hover: #cbd5e1;
  --secondary-text: #1f2937;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --success: #15803d;
  --success-soft: #dcfce7;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --info-soft: #dbeafe;
  --focus: rgba(37, 99, 235, 0.18);
  --shadow: rgba(31, 41, 55, 0.12);
  --shadow-soft: rgba(31, 41, 55, 0.08);
  --modal-backdrop: rgba(15, 23, 42, 0.56);
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg-start: #000000;
  --bg-middle: #050505;
  --bg-end: #0a0a0a;
  --surface: #0b0b0b;
  --surface-muted: #171717;
  --surface-strong: #222222;
  --text: #f8fafc;
  --text-muted: #c7c7c7;
  --border: #2a2a2a;
  --input-border: #3a3a3a;
  --primary: #60a5fa;
  --primary-hover: #3b82f6;
  --primary-soft: rgba(96, 165, 250, 0.16);
  --gold-start: #ffe8a3;
  --gold-mid: #d9a441;
  --gold-end: #a76f18;
  --gold-text: #1c1305;
  --gold-border: rgba(251, 191, 36, 0.72);
  --gold-focus: rgba(251, 191, 36, 0.32);
  --gold-surface: rgba(251, 191, 36, 0.1);
  --gold-surface-hover: rgba(251, 191, 36, 0.16);
  --secondary: #222222;
  --secondary-hover: #2f2f2f;
  --secondary-text: #f8fafc;
  --danger: #f87171;
  --danger-soft: #3b1111;
  --success: #86efac;
  --success-soft: #0f2f1d;
  --warning: #fbbf24;
  --warning-soft: #3a2505;
  --info-soft: rgba(96, 165, 250, 0.16);
  --focus: rgba(96, 165, 250, 0.24);
  --shadow: rgba(0, 0, 0, 0.38);
  --shadow-soft: rgba(0, 0, 0, 0.24);
  --modal-backdrop: rgba(0, 0, 0, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, var(--primary-soft) 0, transparent 34%),
    linear-gradient(135deg, var(--bg-start) 0%, var(--bg-middle) 55%, var(--bg-end) 100%);
  color: var(--text);
  font-family: 'Pretendard', Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
}

body.center-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.25;
}

h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.3;
}

h3 {
  font-size: 22px;
  line-height: 1.35;
}

label {
  display: block;
  margin: 18px 0 8px;
  font-size: 18px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  border: 2px solid var(--input-border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--primary);
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-muted);
}

.page-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 28px 22px 56px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 18px 60px var(--shadow-soft);
}

.page-header h1 {
  margin-bottom: 10px;
}

.page-header p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
}

.app-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 28px 22px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 18px 0 60px var(--shadow-soft);
}

.sidebar-brand {
  margin-bottom: 28px;
}

.sidebar-brand a {
  display: inline-flex;
  color: var(--text);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.sidebar-brand p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 18px;
}

.sidebar-nav,
.sidebar-actions {
  display: grid;
  gap: 10px;
}

.sidebar-actions {
  margin-top: auto;
  padding-top: 24px;
}

.sidebar-link,
button.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  box-shadow: none;
}

.sidebar-link:hover,
button.sidebar-link:hover {
  background: var(--secondary-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.sidebar-link.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 32px var(--shadow-soft);
}

.app-content {
  min-width: 0;
  padding: 28px 32px 56px;
}

.content-header {
  margin-bottom: 24px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 18px 60px var(--shadow-soft);
}

.content-header h1 {
  margin-bottom: 10px;
}

.content-header p {
  max-width: 860px;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.6;
}

.content-panel {
  min-width: 0;
}

.top-actions,
.nav-actions,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-actions {
  justify-content: flex-end;
  margin-bottom: 18px;
}

.nav-actions .button,
.nav-actions button {
  min-height: 48px;
  padding: 0 16px;
  font-size: 17px;
}

.nav-actions .is-current {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 10px 28px var(--shadow-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

@media (max-width: 860px) {
  .app-layout {
    display: block;
  }

  .app-sidebar {
    position: static;
    height: auto;
    padding: 18px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 40px var(--shadow-soft);
  }

  .sidebar-brand {
    margin-bottom: 16px;
  }

  .sidebar-nav,
  .sidebar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .sidebar-actions {
    margin-top: 12px;
    padding-top: 0;
  }

  .sidebar-link,
  button.sidebar-link {
    width: auto;
    flex: 1 1 180px;
    justify-content: center;
    text-align: center;
  }

  .app-content {
    padding: 22px 16px 44px;
  }

  .content-header {
    padding: 22px;
  }

  .page-header {
    display: block;
    padding: 22px;
  }

  .nav-actions {
    margin-top: 16px;
  }

  .grid {
    display: block;
  }

  .grid > * {
    margin-bottom: 18px;
  }
}

@media (max-width: 560px) {
  body.center-page {
    padding: 16px;
  }

  .page-shell {
    padding: 18px 14px 36px;
  }

  .app-sidebar {
    padding: 16px 14px;
  }

  .app-content {
    padding: 18px 14px 36px;
  }

  .content-header {
    padding: 20px;
  }

  .nav-actions .button,
  .nav-actions button {
    width: 100%;
  }

  .sidebar-link,
  button.sidebar-link {
    flex-basis: 100%;
  }
}
