body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* justify-content: flex-start; */
    align-items: center;
    background-color: #f3f4f6;
    margin: 0;
    position: relative;
    font-size: 13px;
    color: #1f2937;
}

/* === 헤더 === */
header {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

thead th {
    position: sticky;
    top: 0;
    background-color: #f1f1f1;
    z-index: 1;
}

/* header .left-group {
    display: flex;
    align-items: center;
} */

/* === 메인 영역 === */
main {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    font-size: 13px;
}

footer {
    padding: 0.5rem;
    text-align: center;
}



.container {
    background-color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    max-width: 24rem;
    width: calc(100% - 2rem);
    margin: 1rem auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}



.container h1 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #1f2937;
    text-align: center;
}

.container p {
    color: #4b5563;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.container input,
.container textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    outline: none;
}

.container textarea {
    height: 150px
}

.container input:focus,
.container textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}



.container button {
    background-color: #2563eb;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.container button:hover {
    background-color: #1d4ed8;
}

.container button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/*
텀블러나 링크처럼 표가 있는 상황은 아래
*/

/* 버튼바는 항상 카드 맨 아래 */
.container .button-bar {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-shrink: 0;
}

.container .table-wrapper {
    height: 100%;
    overflow-y: auto;
    margin-top: 0.5rem;
}

/* 테이블 스타일 그대로 유지 */
.container .table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    /* min-width: 600px; */
}

.container .table-wrapper th,
.container .table-wrapper td {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 14px;
    white-space: nowrap;
}

.container .table-wrapper th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.container .table-wrapper tr:hover {
    background-color: #fafafa;
    cursor: pointer;
}

#menuToggle {
    margin-right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

#menuToggle:focus {
    outline: none;
}

/* === 사이드 메뉴 === */
#sideMenu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 16rem;
    height: 100%;
    background-color: #1e293b;
    color: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 40;
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}


#sideMenu .header {
    padding: 0.3rem;
    border-bottom: 1px solid #4b5563;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgb(0 0 0 / 0.1);
}

#menuClose {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 2rem;
    cursor: pointer;
}

#menuClose:hover {
    color: white;
}

#sideMenu ul {
    padding: 0.3rem;
    list-style: none;
    margin: 0;
}

#sideMenu ul li+li {
    margin-top: 0.5rem;
}

#sideMenu ul li a {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: white;
    transition: background-color 0.3s ease;
}

#sideMenu ul li a:hover {
    background-color: #334155;
}

/* === 오버레이 === */
#overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 30;
    display: none;
}

#logoutBtn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* 행을 길게 누를때 텍스트 선택되지 않도록 */
#links tr {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
}

/* 사용자 텀블러 화면에서 행을 길게 누르면 링트 상세정보 팝업 */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    min-width: 300px;
    max-width: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    word-break: break-word;
    z-index: 9999;
    height: 500px;
}

#close-btn {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: black;
}