/* style.css (최종 수정본: 아이콘 위치 해결) */

body {
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    padding: 30px 20px;
    box-sizing: border-box;
}

h1, h2, h3, h4 { margin-top: 0; color: #111; }

/* 라벨 스타일 */
label {
    display: block; 
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

/* =========================================
   [입력창 디자인 핵심] 
   ========================================= */

/* 1. 입력창을 감싸는 박스: 기준점 역할 */
.input-wrapper {
    position: relative; /* 중요: 아이콘을 이 박스 안에서 자유롭게 배치하기 위함 */
    width: 100%;
    margin-bottom: 10px;
}

/* 2. 입력창(input)과 선택창(select) 공통 스타일 */
.input-wrapper input, 
.input-wrapper select {
    width: 100%;             /* 너비 100% */
    height: 50px;            /* 높이 고정 */
    padding: 0 45px 0 15px;  /* ★오른쪽 여백 45px 확보 (아이콘이 들어갈 자리) */
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;  /* 테두리 포함 크기 계산 */
    outline: none;
    background: #fff;
    transition: border-color 0.3s;
    appearance: none;        /* 기본 스타일 제거 */
    -webkit-appearance: none;
}

/* 포커스 시 파란 테두리 */
.input-wrapper input:focus,
.input-wrapper select:focus { 
    border-color: #0088cc; 
}

/* 숫자 입력창 화살표 제거 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Select 화살표 아이콘 커스텀 (선택사항) */
.input-wrapper select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 12px auto;
}

/* ★ 3. 아이콘 스타일 (눈 모양, 붙여넣기 등) - 여기가 핵심입니다 ★ */
.input-wrapper i, 
.input-wrapper .btn-icon,
.input-wrapper .toggle-password,
.input-wrapper .input-icon {   /* <--- ★ 이 부분이 추가되었습니다! */
    position: absolute; 
    top: 50%;           
    right: 15px;        
    transform: translateY(-50%); 
    cursor: pointer;
    color: #888;
    background: none;
    border: none;
    padding: 0;
    font-size: 1.2rem;
    z-index: 10;
    line-height: 0; /* 이모지(👁️) 높이 문제 방지 */
}

/* 아이콘에 마우스 올렸을 때 */
.input-wrapper i:hover,
.input-wrapper .btn-icon:hover {
    color: #0088cc;
}

/* =========================================
   [기타 버튼 및 메시지] 
   ========================================= */

/* 버튼 스타일 */
.btn {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 20px 0 10px 0;
    background-color: #0088cc;
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s;
}

.btn:active {
    background-color: #005cbf; /* 클릭 시 약간 진하게 */
    transform: scale(0.98);    /* 클릭 효과 */
}

/* 작은 버튼들 */
.btn-sm {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    margin-right: 5px;
}
.btn-edit { background: #6c757d; }
.btn-del { background: #dc3545; }

/* 링크 및 알림 */
.text-link { color: #666; text-decoration: none; font-size: 14px; }
.alert { background: #ffdede; color: #9c2b2b; padding: 15px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }

/* 비밀번호 유효성 메시지 */
.msg-text { font-size: 13px; margin-top: 5px; display: block; min-height: 18px; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }

/* 카드 스타일 (메인 리스트 등) */
.task-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #fff;
    font-weight: bold;
}
.status-pending { background: #888; }
.status-done { background: #28a745; }
.status-fail { background: #dc3545; }