@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');
@import url('https://cdn.jsdelivr.net/npm/lucide-static@1.17.0/font/lucide.css');

/* ============================================================
   Design Tokens
   ============================================================ */

:root {
	/* Primary — indigo */
	--color-primary: #4f46e5;
	--color-primary-alt: #5b4fe8;
	--color-primary-mid: #667eea;

	/* Text */
	--color-text: #111827;
	--color-text-dark: #1a1a2e;
	--color-text-muted: #6b7280;
	--color-text-light: #9ca3af;

	/* Surface & Border */
	--color-surface: #ffffff;
	--color-surface-muted: #f9fafb;
	--color-border: #e5e7eb;
	--color-border-indigo: #c7d2fe;
	--color-border-green: #bbf7d0;

	/* Overlay */
	--overlay-black-5: rgba(0, 0, 0, 0.05);

	/* Background */
	--color-bg: #eef2ff;

	/* Pastel chip backgrounds */
	--chip-green: #dcfce7;
	--chip-red: #fee2e2;
	--chip-purple: #f3e8ff;
	--chip-orange: #fff7ed;
	--chip-indigo: #eef2ff;
	--chip-violet: #f5f3ff;
	--chip-yellow: #fef9c3;

	/* Accent — solid */
	--color-accent-violet: #7c3aed;
	--color-accent-violet-light: #a78bfa;
	--color-accent-green-dark: #16a34a;
	--color-accent-green: #22c55e;
	--color-accent-green-bright: #43e97b;
	--color-accent-green-light: #6ee7b7;
	--color-accent-red: #ef4444;
	--color-accent-red-light: #fca5a5;
	--color-accent-orange: #f59e0b;
	--color-accent-orange-dark: #854d0e;
	--color-accent-blue: #3b82f6;
	--color-accent-blue-mid: #60a5fa;
	--color-accent-cyan: #11998e;

	/* Typography */
	--font-family: 'Pretendard Variable', Pretendard, Inter, 'Noto Sans KR', sans-serif;

	--font-size-xs: 9px;
	--font-size-sm: 10px;
	--font-size-sm\+: 11px;
	--font-size-base: 12px;
	--font-size-md: 13px;
	--font-size-md\+: 14px;
	--font-size-lg: 15px;
	--font-size-lg\+: 16px;
	--font-size-xl: 17px;
	--font-size-xl\+: 18px;
	--font-size-2xl: 19px;
	--font-size-3xl: 20px;
	--font-size-4xl: 22px;
	--font-size-5xl: 24px;
	--font-size-6xl: 26px;
	--font-size-7xl: 28px;
	--font-size-8xl: 30px;
	--font-size-9xl: 36px;
	--font-size-10xl: 48px;

	--font-weight-regular: 400;
	--font-weight-medium: 500;
	--font-weight-semibold: 600;
	--font-weight-bold: 700;
	--font-weight-extrabold: 800;
	--font-weight-black: 900;

	/* Spacing */
	--space-4xs: 2px;
	--space-3xs: 4px;
	--space-2xs: 8px;
	--space-xs: 12px;
	--space-sm: 16px;
	--space-md: 20px;
	--space-lg: 24px;
	--space-xl: 28px;
	--space-2xl: 34px;
	--space-1: 1px;
	--space-6: 6px;
	--space-10: 10px;
	--space-18: 18px;

	/* Letter Spacing */
	--letter-spacing-tight-xl: -2px;
	--letter-spacing-tight-lg: -1px;
	--letter-spacing-tight-md: -0.5px;
	--letter-spacing-tight-sm: -0.3px;
	--letter-spacing-normal: 0;
	--letter-spacing-wide-sm: 0.2px;
	--letter-spacing-wide-md: 0.3px;
	--letter-spacing-wide-xl: 2px;

	/* Border Radius */
	--radius-sm: 8px;
	--radius-md: 14px;
	--radius-lg: 24px;
	--radius-full: 9999px;

	/* Stroke */
	--stroke-thin: 1px;
	--stroke-base: 1.5px;
	--stroke-thick: 2px;

	/* Shadow */
	--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
	--shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
	--shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
	--shadow-primary: 0 8px 24px rgba(79, 70, 229, 0.18);
}

/* ============================================================
   Reset
   ============================================================ */

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-family);
	font-size: var(--font-size-md\+);
	font-weight: var(--font-weight-regular);
	color: var(--color-text);
	background: var(--color-bg);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;

	display: flex;
}

main {
	flex-grow: 1;
	padding: var(--space-2xl);
}

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

button,
input,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
}

img,
svg {
	display: block;
	max-width: 100%;
}

ul,
ol {
	list-style: none;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2xs);
	padding: var(--space-2xs) var(--space-sm);
	border-radius: var(--radius-sm);
	font-size: var(--font-size-md\+);
	font-weight: var(--font-weight-semibold);
	line-height: 1.4;
	cursor: pointer;
	border: var(--stroke-thin) solid transparent;
	transition:
		opacity 0.15s,
		background 0.15s,
		border-color 0.15s;
	white-space: nowrap;
}

.btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.btn-primary {
	background: var(--color-primary);
	color: #ffffff;
	border-color: var(--color-primary);
}

.btn-primary:hover:not(:disabled) {
	background: var(--color-primary-alt);
	border-color: var(--color-primary-alt);
}

.btn-outline {
	background: transparent;
	color: var(--color-text);
	border-color: var(--color-border);
}

.btn-outline:hover:not(:disabled) {
	border-color: var(--color-primary);
	color: var(--color-primary);
}

.btn-ghost {
	background: transparent;
	color: var(--color-primary);
	border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
	background: var(--chip-indigo);
}

.btn-danger {
	background: var(--chip-red);
	color: var(--color-accent-red);
	border-color: transparent;
}

.btn-danger:hover:not(:disabled) {
	opacity: 0.85;
}

.btn-sm {
	padding: var(--space-4xs) var(--space-2xs);
	font-size: var(--font-size-sm\+);
}

.btn-lg {
	padding: var(--space-2xs) var(--space-lg);
	font-size: var(--font-size-lg\+);
}

/* ============================================================
   Card
   ============================================================ */

.card {
	background: var(--color-surface);
	border: var(--stroke-thin) solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--space-sm);
}

.card-header {
	font-size: var(--font-size-lg\+);
	font-weight: var(--font-weight-extrabold);
	padding-bottom: var(--space-2xs);
	border-bottom: var(--stroke-thin) solid var(--color-border);
	margin-bottom: var(--space-sm);
}

/* ============================================================
   Form
   ============================================================ */

.input {
	display: block;
	width: 100%;
	min-height: 46px;
	padding: var(--space-2xs) var(--space-xs);
	background: var(--color-surface);
	border: var(--stroke-thin) solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: var(--font-size-md\+);
	color: var(--color-text);
	line-height: 1.5;
	transition:
		border-color 0.15s,
		box-shadow 0.15s;
	outline: none;
}

.input::placeholder {
	color: var(--color-text-light);
}

.input:focus {
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--chip-indigo);
}

.input:disabled {
	background: var(--color-surface-muted);
	color: var(--color-text-light);
	cursor: not-allowed;
}

.label {
	display: block;
	font-size: var(--font-size-sm\+);
	font-weight: var(--font-weight-medium);
	color: var(--color-text-muted);
	margin-bottom: var(--space-4xs);
}

.required-mark {
	color: var(--color-accent-red);
	font-weight: var(--font-weight-bold);
}

.optional-mark {
	color: var(--color-text-light);
	font-size: var(--font-size-sm\+);
	font-weight: var(--font-weight-medium);
}

.field-help {
	margin-top: var(--space-4xs);
	color: var(--color-text-light);
	font-size: var(--font-size-sm\+);
	line-height: 1.5;
}

/* ============================================================
   Tags / Chips
   ============================================================ */

.chip {
	display: inline-flex;
	align-items: center;
	padding: var(--space-4xs) var(--space-2xs);
	border-radius: var(--radius-full);
	font-size: var(--font-size-sm\+);
	font-weight: var(--font-weight-medium);
	white-space: nowrap;
}

.chip-sm {
	padding: var(--space-1) var(--space-3xs);
	font-size: var(--font-size-xs);
}

.chip-green {
	background: var(--chip-green);
	color: var(--color-accent-green-dark);
}
.chip-red {
	background: var(--chip-red);
	color: var(--color-accent-red);
}
.chip-purple {
	background: var(--chip-purple);
	color: var(--color-accent-violet);
}
.chip-orange {
	background: var(--chip-orange);
	color: var(--color-accent-orange-dark);
}
.chip-indigo {
	background: var(--chip-indigo);
	color: var(--color-primary);
}
.chip-violet {
	background: var(--chip-violet);
	color: var(--color-accent-violet);
}
.chip-yellow {
	background: var(--chip-yellow);
	color: var(--color-accent-orange);
}

/* ============================================================
   Progress Bar
   ============================================================ */

.progress {
	width: 100%;
	height: 6px;
	background: var(--color-border);
	border-radius: var(--radius-full);
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	background: var(--color-primary);
	border-radius: var(--radius-full);
	transition: width 0.3s ease;
}

.progress-sm {
	height: 4px;
}

/* ============================================================
   Avatar
   ============================================================ */

.avatar {
	width: 67px;
	height: 67px;
	border-radius: var(--radius-full);
	object-fit: cover;
	border: var(--stroke-thin) solid var(--color-border);
	background: var(--chip-indigo);
}

/* ============================================================
   Divider
   ============================================================ */

.divider {
	border: none;
	border-top: var(--stroke-thin) solid var(--color-border);
}

/* ============================================================
   Icons
   ============================================================ */

.icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: currentColor;
	font-size: 16px;
	font-style: normal;
	font-weight: var(--font-weight-regular);
	line-height: normal;
}

/* ============================================================
   Tabs
   ============================================================ */

.tabs {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	min-height: 42px;
	border-bottom: var(--stroke-thin) solid var(--color-border);
	overflow-x: auto;
	scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
	display: none;
}

.tab {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	align-self: stretch;
	gap: var(--space-2xs);
	padding: 0 var(--space-xs) var(--space-2xs);
	border: 0;
	background: transparent;
	color: var(--color-text-muted);
	font-size: var(--font-size-md\+);
	font-weight: var(--font-weight-bold);
	white-space: nowrap;
	cursor: pointer;
}

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

.tab:hover {
	color: var(--color-primary);
}

.tab.active::after {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: var(--stroke-thick);
	border-radius: var(--radius-full);
	background: var(--color-primary);
	content: '';
}

/* ============================================================
   Typography Utilities
   ============================================================ */

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

.text-sm {
	font-size: var(--font-size-sm\+);
}
.text-md {
	font-size: var(--font-size-md\+);
}
.text-lg {
	font-size: var(--font-size-lg\+);
}
.text-xl {
	font-size: var(--font-size-xl\+);
}
.text-2xl {
	font-size: var(--font-size-5xl);
	letter-spacing: -0.3px;
}
.text-3xl {
	font-size: var(--font-size-9xl);
	letter-spacing: -0.5px;
}

.font-medium {
	font-weight: var(--font-weight-medium);
}
.font-semibold {
	font-weight: var(--font-weight-semibold);
}
.font-bold {
	font-weight: var(--font-weight-bold);
}

.logo {
	font-size: var(--font-size-4xl);
	font-weight: var(--font-weight-bold);
	letter-spacing: var(--letter-spacing-tight-md);
	color: var(--color-primary);
}

/* ============================================================
   Layout Utilities
   ============================================================ */

.flex {
	display: flex;
}
.flex-col {
	display: flex;
	flex-direction: column;
}
.items-center {
	align-items: center;
}
.justify-between {
	justify-content: space-between;
}
.gap-xs {
	gap: var(--space-xs);
}
.gap-sm {
	gap: var(--space-sm);
}
.gap-md {
	gap: var(--space-md);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: calc(var(--space-1) * -1);
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ============================================================
   Toggle (checkbox + label 패턴)
   ============================================================ */

.toggle-input {
	display: none;
}

.toggle-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	user-select: none;
}

/* ============================================================
   Modal
   ============================================================ */

.modal::backdrop {
	background: var(--overlay-black-5);
	backdrop-filter: blur(2px);
}

.modal:modal {
	position: absolute;
	justify-self: center;
	align-self: center;
}

.modal-close {
	display: none;
	position: absolute;
	top: var(--space-sm);
	right: var(--space-sm);
	width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: var(--stroke-thin) solid transparent;
	border-radius: var(--radius-sm);
	color: var(--color-text-light);
	cursor: pointer;
	transition:
		background 0.15s,
		border-color 0.15s,
		color 0.15s;
	flex-shrink: 0;
}

:modal .modal-close {
	display: inline-flex;
}

.modal-close:hover {
	background: var(--color-surface-muted);
	border-color: var(--color-border);
	color: var(--color-text);
}

.modal-close-icon {
	font-size: 16px;
}
