/* styles.css */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    margin: 0;
    /* padding: 20px; */
}
.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.table-container {
    width: 100%;
    /* max-width: 800px; */
    overflow-x: auto; /* 가로 스크롤 활성화 */
    border: 1px solid #ddd;
    /* margin-top: 20px; */
}
table {
    width: 100%;    /* 테이블이 부모 요소의 전체 너비를 차지 */
    table-layout: auto; /* 브라우저가 셀 내용에 따라 열 너비를 자동으로 조정 */
    border-collapse: collapse;
    max-width: 800px;
    /* margin-top: 20px; */
}
thead th {
    position: sticky;
    top: 0px;
}
.sticky-header {
    position: sticky;
    top: 0px;
    z-index: 2;
}
.sticky-column {
    position: sticky;
    left: 0px;
    z-index: 1;
}
th, td {
    border: 1px solid #ddd;
    padding: 2px;
    text-align: center;
    word-wrap: break-word; /* 긴 텍스트가 셀을 벗어나지 않고 자동으로 줄바꿈 */
}
th {
    background-color: #3498db;
    font-weight: white;
    position: sticky; /* 헤더 고정 */
    z-index: 1;
}
h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}
.group-box {
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
}
.group-box h3 {
    margin-top: 0;
    color: #2980b9;
}
.btn-group {
    margin-bottom: 15px;
}
.btn {
    padding: 10px 20px;
    margin-right: 10px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn:hover {
    background-color: #2980b9;
}
/* 모든 셀을 균등하게 나누기 위해 레이아웃 고정 */
table.fixed {
  table-layout: fixed;
}
.fixed-column {
    position: sticky; /* 고정 열 */
    left: 0;
    background-color: #fff;
    z-index: 2;
}
tr:nth-child(even) {
    background-color: #f8f9fa;
}
tr:hover {
    background-color: #e8f4f8;
}
input[type="number"], input[type="date"], input[type="text"], input[type="button"], select {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    text-align: center;
}

/* readonly 속성이 있는 input[type="number"]의 테두리 제거 */
input[type="number"][readonly], input[type="text"][readonly] {
    background-color: transparent; /* 배경색 투명 */
    border: none; /* 테두리 제거 */
    outline: none; /* 포커스 시 외곽선 제거 */
}

/* 스핀 버튼(숫자 화살표) 제거 */
input[type="number"][readonly]::-webkit-inner-spin-button,
input[type="number"][readonly]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 포커스 시에도 스타일 유지 */
input[type="number"][readonly]:focus {
    outline: none;
}

input[type="submit"] {
    background-color: #2ecc71;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
input[type="submit"]:hover {
    background-color: #27ae60;
}
.form-row {
    margin-bottom: 15px;
}
.form-row label {
    display: inline-block;
    width: 120px;
    font-weight: bold;
}
.nav-buttons {
    margin-bottom: 20px;
    text-align: center;
}
.nav-buttons button {
    text-decoration: none;
    color: #333;
    font-size: 18px;
    margin: 0 10px;
    padding: 10px 10px;
    border-radius: 5px;
    background-color: #f4f4f4;
    border: none;
    transition: background-color 0.3s ease;
}
/* 활성화된 버튼 스타일 */
button:not(:disabled) {
    cursor: pointer;
}
/* 비활성화된 버튼 스타일 */
button:disabled {
    cursor: not-allowed; /* 클릭 불가 커서 */
}
/* Hover 효과는 활성화된 버튼에만 적용 */
button:not(:disabled):hover {
      filter: brightness(0.85); /* 밝기를 85%로 줄여 진하게 */
}
.nav-buttons i {
    margin-right: 5px; /* 아이콘과 텍스트 간격 */
}
.nav-buttons select {
    font-size: 16px;
    padding: 5px;
}
.billing-period-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.billing-period-row .form-row {
    margin-bottom: 0;
    display: flex;
    align-items: center;
}
.billing-period-row .form-row label {
    margin-right: 0px;
}
