#WRITE_WRAP { position: relative; min-height: 100vh; background: #020617; padding: 40px 0; font-family: 'Pretendard', sans-serif; color: #f1f5f9; overflow-x: hidden; color-scheme: dark; }

/* 레이아웃 폭 및 좌우 마진 50px */
#WRITE { position: relative; z-index: 2; width: calc(100% - 100px); margin: 0 50px; }
#fwrite { background: rgba(0, 0, 0, 0.95); border: 1px solid #1e293b; border-radius: 4px; box-shadow: 0 25px 50px rgba(0,0,0,0.8); overflow: hidden; }

.write-head {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    background: #080c14;
}
.write-title { margin: 0; font-size: 1.1rem; color: #fff; font-weight: 900; }
.write-title i { color: #00d4ff; }
.write-head-btns { display: flex; gap: 10px; }
.btn-head-cancel { width: auto; padding: 8px 20px; border-radius: 4px; }
.btn-head-submit { width: 120px !important; height: auto; padding: 8px 20px; }

.td-content { padding: 20px 30px; }
.td-dark { background: #000; padding: 25px 30px; }
.row-flex { display: flex; align-items: center; }
.row-gap-30 { gap: 30px; }
.row-gap-20 { gap: 20px; }
.row-gap-8 { gap: 8px; }
.row-ml-auto { margin-left: auto; }
.switch-inline { display: flex; align-items: center; gap: 10px; }
.field-label { color: #00d4ff; font-weight: 800; font-size: 0.75rem; }
.field-gap-left { margin-left: 20px; }
.form-flex-1 { flex: 1; }
.w-full { width: 100%; }

.inline-fields-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.inline-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.inline-field .field-label {
    margin-right: 2px;
}
.inline-field input[type="text"],
.inline-field select {
    width: 150px !important;
    min-width: 150px;
    max-width: 150px;
}
.inline-field select {
    text-overflow: ellipsis;
}

.form-group.block-field {
    display: block;
    width: 100%;
}

/* 테이블 레이아웃 */
.write-table { width: 100%; border-collapse: collapse; }
.write-table tr { border-bottom: 1px solid #1e293b; position: relative; }
.td-label { width: 180px; padding: 25px 30px; color: #94a3b8; font-size: 0.85rem; font-weight: 700; background: #080c14; }
.td-label i { width: 25px; color: #00d4ff; margin-right: 5px; }

/* 입력 폼 공통 */
input[type="text"], input[type="date"], input[type="time"], input[type="datetime-local"], select, textarea {
    background: #050505 !important; border: 1px solid #1e293b !important;
    color: #fff !important; padding: 10px 15px !important; border-radius: 4px !important; font-size: 0.85rem; transition: 0.2s;
    outline: none;
}

/* 마우스 오버 테두리 효과 추가 */
input:hover, select:hover, textarea:hover { border-color: #00d4ff !important; }
input:focus, select:focus { border-color: #00d4ff !important; box-shadow: 0 0 10px rgba(0, 212, 255, 0.2); }

#id_date_end {
    width: 150px !important;
    min-width: 150px;
    max-width: 150px;
    border: 1px solid #ef4444 !important;
}

#id_date_end:hover,
#id_date_end:focus {
    border-color: #00d4ff !important;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2) !important;
}

#id_x2_current_asset,
#id_x2_profit_amount,
#id_x2_profit_rate,
#id_x2_reach_rate {
    border-color: #86efac !important;
}

#id_x2_current_asset:hover,
#id_x2_current_asset:focus,
#id_x2_profit_amount:hover,
#id_x2_profit_amount:focus,
#id_x2_profit_rate:hover,
#id_x2_profit_rate:focus,
#id_x2_reach_rate:hover,
#id_x2_reach_rate:focus {
    border-color: #00d4ff !important;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2) !important;
}

/* 날짜/시간 블랙 디자인 메뉴 */
input[type="date"], input[type="time"] { position: relative; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute; left: 0; top: 0; width: 100%; height: 100%;
    margin: 0; padding: 0; cursor: pointer; opacity: 0;
}

/* 풍선 도움말 (마우스 오버) */
.form-group { position: relative; display: inline-block; }
.tip-balloon {
    position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%); background: #00d4ff; color: #000; padding: 6px 14px;
    font-size: 0.75rem; font-weight: 800; border-radius: 4px; display: none; white-space: nowrap; z-index: 100;
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4); pointer-events: none;
}
.tip-balloon::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: #00d4ff; }
.form-group:hover .tip-balloon { display: block; }

/* 실시간 동적 출력 박스 (자산 제어 아래 배치) */
.dynamic-result-area {
    background: #050505; padding: 20px 30px; border-bottom: 1px solid #1e293b;
    display: flex; flex-wrap: wrap; gap: 15px 40px; border-left: 4px solid #00d4ff;
}
.res-item { font-family: 'JetBrains Mono'; font-size: 0.72rem; display: flex; align-items: center; }
.res-item span { color: #576574; margin-right: 10px; font-weight: bold; }
.res-item b { color: #00d4ff; text-transform: uppercase; }

/* 제목 셀렉트 메뉴 폭 320px */
.select-coin { width: 320px !important; }

/* 첨부파일 디자인 수정 */
.file-box-custom { 
    display: none; align-items: center; gap: 15px; padding: 15px; 
    background: rgba(255, 255, 255, 0.02); border: 1px solid #1e293b; 
    border-radius: 4px; margin-bottom: 10px; transition: 0.3s;
}
.file-box-custom.active { display: flex; }
.file-box-custom:hover { background: rgba(255, 255, 255, 0.05); border-color: #00d4ff; }
.file-btn-ui { 
    background: #1e293b; color: #fff; padding: 8px 15px; border-radius: 4px; 
    font-size: 0.75rem; font-weight: bold; cursor: pointer; white-space: nowrap;
}
.file-info-ui { flex: 1; color: #94a3b8; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; }
.file-desc-ui { width: 350px !important; background: #000 !important; border: 1px solid #334155 !important; }
.file-del-label { color: #ff2d55; font-size: 0.75rem; margin-left: 10px; }
.btn-slot-add { width: auto; padding: 6px 15px; margin-top: 10px; font-size: 0.75rem; }

.option-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #1e293b;
    border-radius: 4px;
    padding: 10px 12px;
}

.memo-panel {
    background: #050505;
    border: 1px solid #1e293b;
    border-radius: 4px;
    padding: 14px;
}
.memo-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.memo-title { color: #e2e8f0; font-size: 0.8rem; font-weight: 800; }
.memo-title i { color: #00d4ff; margin-right: 5px; }
.memo-body textarea { width: 100%; min-height: 100px; resize: vertical; }
.memo-panel.is-open { display: block; }
.memo-panel.is-close { display: none; }

.extra-area { border-top: 1px solid #1e293b; }
.extra-area.is-open { display: block; }
.extra-area.is-close { display: none; }

.file-hidden { display: none; }

.write-foot {
    padding: 50px;
    text-align: center;
    background: #080c14;
    border-top: 1px solid #1e293b;
}

@media (max-width: 1280px) {
    .option-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 900px) {
    .option-grid { grid-template-columns: 1fr; }
}

/* 상세 파라미터 버튼 효과 */
.btn-toggle-clean { 
    background: #0f172a; border: 1px solid #1e293b; color: #00d4ff; 
    padding: 14px; font-size: 0.85rem; font-weight: 700; width: 100%; 
    cursor: pointer; transition: 0.3s; letter-spacing: 1px;
}
.btn-toggle-clean:hover { 
    background: rgba(0, 212, 255, 0.1); color: #ffffff; 
    border-color: #00d4ff; box-shadow: inset 0 0 10px rgba(0, 212, 255, 0.2); 
}
.btn-toggle-clean i { transition: 0.3s; }

/* 버튼 스타일 */
.btn-submit { 
    background: #00d4ff; color: #020617; width: 200px !important; height: 50px;
    font-weight: 800; font-size: 0.95rem; border: none; border-radius: 4px; cursor: pointer; transition: 0.2s; 
}
.btn-submit:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4); }

/* 스위치 토글 */
.toggle-btn { position: relative; display: inline-block; width: 60px; height: 26px; }
.toggle-btn input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #1e293b; transition: .4s; border-radius: 30px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: #94a3b8; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #00d4ff; }
input:checked + .slider:before { transform: translateX(34px); background-color: #fff; }
