/* [추가] 전체 페이지 및 내부 요소 커스텀 스크롤바 디자인 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #090a0f; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 5px; border: 2px solid #090a0f; }
::-webkit-scrollbar-thumb:hover { background: #00f2ff; box-shadow: 0 0 10px rgba(0, 242, 255, 0.5); }

textarea::-webkit-scrollbar { width: 6px; }
textarea::-webkit-scrollbar-thumb { background: rgba(0, 242, 255, 0.2); }
textarea::-webkit-scrollbar-thumb:hover { background: #00f2ff; }

* { scrollbar-width: thin; scrollbar-color: #1e293b #090a0f; }

@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(30px); }
	to { opacity: 1; transform: translateY(0); }
}

#WRITE_WRAP {
	position: relative;
	min-height: 100vh;
	background: radial-gradient(circle at center, #1b2735 0%, #090a0f 100%);
	padding: 60px 0;
	font-family: 'Pretendard', sans-serif;
}

#WRITE {
	position: relative;
	z-index: 2;
	width: 90%;
	margin: 0 auto;
	animation: fadeInUp 1s ease-out forwards;
}

.write-top-bar {
	padding: 30px 40px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.Project_Box {
	color: #fff;
	background: #000;
}

.Project_Box textarea {
	border: 0px !important;
	padding: 15px 30px !important;
	font-size:14px !important;
}

.write-top-title {
	margin: 0;
	font-size: 1.8rem;
	color: #00f2ff;
	letter-spacing: 1px;
	font-weight: 800;
}

.write-top-actions {
	display: flex;
	gap: 15px;
}

#fwrite {
	background: rgba(14, 22, 40, 0.92);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 4px;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
	overflow: hidden;
}

.write-table { width: 100%; border-collapse: collapse; }
.write-table tr { border-bottom: 1px solid rgba(255, 255, 255, 0.05); transition: 0.3s; }
.td-label {
	width: 200px;
	padding: 25px 30px;
	color: #e2e8f0;
	font-size: 0.9rem;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.02);
}
.td-label i { width: 28px; color: #00f2ff; margin-right: 12px; }

.td-value {
	padding: 20px 40px;
}

.field-row-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	align-items: center;
}

.field-caption {
	color: #64748b;
	font-size: 0.9rem;
	margin-left: 5px;
}

.field-caption.no-margin {
	margin-left: 0;
}

input[type="text"],
input[type="date"],
input[type="time"],
select,
textarea {
	background: rgba(0, 0, 0, 0.4) !important;
	border: 1px solid rgba(255, 255, 255, 0.15) !important;
	color: #fff !important;
	padding: 12px 18px !important;
	border-radius: 4px !important;
	font-size: 0.8rem;
	transition: all 0.3s ease;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

select {
	padding-right: 40px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300f2ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: calc(100% - 12px) center !important;
	background-size: 16px !important;
	cursor: pointer;
}
select option { background-color: #0f172a !important; color: #fff !important; }

.switch { position: relative; display: inline-block; width: 45px; height: 22px; vertical-align: middle; margin: 0 5px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #1e293b;
	transition: 0.4s;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}
.slider:before {
	position: absolute;
	content: "";
	height: 14px;
	width: 14px;
	left: 4px;
	bottom: 3px;
	background-color: #64748b;
	transition: 0.4s;
	border-radius: 5px;
}
.switch input:checked + .slider { background-color: rgba(0, 242, 255, 0.2); border-color: #00f2ff; }
.switch input:checked + .slider:before { transform: translateX(21px); background-color: #00f2ff; box-shadow: 0 0 8px #00f2ff; }

textarea { line-height: 27px; padding: 25px; width: 100%; box-sizing: border-box; overflow-y: auto; }

input[type="text"]:hover,
select:hover,
input[type="date"]:hover,
input[type="time"]:hover {
	border-color: rgba(0, 242, 255, 0.5) !important;
	background: rgba(255, 255, 255, 0.05) !important;
	box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

input[type="text"]:focus,
select:focus {
	border-color: #00f2ff !important;
	box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
	outline: none;
}

input[type="date"],
input[type="time"] {
	position: relative;
	background: rgba(0, 0, 0, 0.4) !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	color: #fff !important;
	padding: 10px 15px !important;
	border-radius: 4px !important;
	color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); cursor: pointer; opacity: 0.8; }

.file-row {
	display: none;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	padding: 12px;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 4px;
}
.file-row.active { display: flex; flex-wrap: wrap; }

.btn-add-file {
	background: none;
	border: 1px solid #334155;
	color: #8fa3ad;
	padding: 8px 20px;
	border-radius: 5px;
	cursor: pointer;
}

.btn-memo-toggle {
	background: none;
	border: 1px solid #00f2ff;
	color: #00f2ff;
	padding: 8px 16px;
	border-radius: 4px;
	font-size: 0.8rem;
}

.memo-area {
	display: none;
	margin-top: 18px;
	padding: 20px;
	width: 100%;
	background: rgba(255,255,255,0.02);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 4px;
}

.memo-area.open {
	display: block;
}

.memo-clean-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.date-time-wrap {
	margin-left: auto;
	display: flex;
	gap: 10px;
	align-items: center;
}

.editor-toggle-row {
	text-align: center;
	padding: 15px;
	background: rgba(255,255,255,0.01);
}

.btn-editor-toggle {
	background: none;
	border: 1px dashed #00f2ff;
	color: #00f2ff;
	padding: 8px 30px;
	border-radius: 5px;
	cursor: pointer;
}

.section-title {
	color: #e2e8f0;
	font-size: 0.9rem;
	margin-bottom: 15px;
}

.section-title i {
	color: #00f2ff;
	margin-right: 10px;
}

.work-line-section {
	border-top: 1px solid rgba(255,255,255,0.05);
}

.work-line-row {
	padding: 14px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.06);
	border-radius: 6px;
	margin: 0px 10px 12px 10px;
}

.work-line-time-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.work-line-time {
	width: 220px;
	font-size: 0.78rem;
	padding: 8px 12px !important;
}

.work-line-content {
	width: 100%;
	min-height: 95px;
	padding: 12px !important;
	line-height: 1.6;
}

.btn-add-line {
	background: none;
	border: 1px solid #334155;
	color: #8fa3ad;
	padding: 8px 20px;
	border-radius: 5px;
	cursor: pointer;
	margin:15px 0px 5px 10px;
}

.write-submit-wrap {
	padding: 60px;
	text-align: center;
	border-top: 1px solid rgba(255,255,255,0.05);
}
.file-btn-custom {
	background: #00f2ff;
	color: #000;
	padding: 7px 15px;
	border-radius: 4px;
	font-weight: 700;
	cursor: pointer;
	font-size: 0.8rem;
	transition: 0.3s;
}
.file-btn-custom:hover { background: #fff; transform: scale(1.05); }
.file-desc-input {
	background: rgba(255, 255, 255, 0.05) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	width: 300px !important;
	font-size: 0.8rem !important;
	height: 35px !important;
}

.btn-action { transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); cursor: pointer; }
.btn-action:hover { transform: translateY(-3px) scale(1.03); filter: brightness(1.1); box-shadow: 0 10px 25px rgba(0, 242, 255, 0.4); }
.btn-save-main {
	background: linear-gradient(45deg, #00f2ff, #0062ff);
	color: #fff;
	padding: 18px 100px;
	border-radius: 12px;
	font-weight: 800;
	border: none;
}
.btn-save-top { background: #00f2ff; color: #000; border: none; padding: 10px 25px; border-radius: 5px; font-weight: 700; }
.btn-cancel-top { background: #1e293b; color: #fff; border: none; padding: 10px 25px; border-radius: 5px; }

.extra-code-section { padding: 30px; background: rgba(0, 0, 0, 0.2); border-top: 1px solid rgba(255, 255, 255, 0.05); }
.link-item { display: flex; align-items: center; gap: 10px; }
.link-item i { color: #00f2ff; width: 20px; }






/* 릴레이 사이드 메뉴 기본 상태 (숨김) */
#relay-side-menu {
    position: fixed;
    top: 0;
    left: -980px; /* 폭 100px만큼 왼쪽으로 숨김 */
    width: 980px ;
    height: calc(100% - 30px);
    background: rgba(14, 22, 40, 1);
    border: 1px solid #20394b;
    border-left: 0px;
	border-radius: 7px;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    z-index: 9999;
    transition: left 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 5px 0 15px rgba(35, 35, 46, 0.5);
	margin:15px 0px;
	scroll-behavior: smooth; /* 부드러운 스크롤 이동 */
    overflow-y: auto;        /* 내용 넘칠 때만 스크롤바 생성 */
    overflow-x: hidden;
}

/* 값이 있거나 버튼을 눌러 .side_menu 클래스가 붙었을 때 (노출) */
#relay-side-menu.side_menu { left: 0;}
#relay-side-menu ul:nth-child(1) { 
	height: 50px; line-height: 40px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
	color: #00f2ff;
	font-size: 25px;
	padding-left: 20px;
}
#relay-side-menu ul:nth-child(1) li label:nth-child(2) { font-size:13px; padding-left:15px;  }

#relay-side-menu ul:nth-child(1) li:nth-child(1) { float:left; }
#relay-side-menu ul:nth-child(1) li:nth-child(2) { float:right;	padding-right:48px;}
#relay-side-menu ul:nth-child(1) li:nth-child(2) button {
	width:40px;
	height:40px;
	background:#0f172a;
	border-radius: 5px;
	color:#00f2ff;
	border:1px solid #00f2ff;
	margin-top: 5px;
}
#relay-side-menu button i {	color:#00f2ff;	font-size: 25px; }

#relay-side-menu ul:nth-child(2) {  }

/* 내부 입력창 스타일링 */
#relay-side-menu textarea {
    width: 100%;
    height: 100% !important;
    background: transparent;
    border: none;
    font-size: 13px;
    line-height: 1.6;
    resize: none;
    outline: none;
}
