:root {
    --primary: #2c3e50;
    --accent: #3498db;
    --bg: #f4f7f9;
    --white: #ffffff;
    --border: #dee2e6;
    --gray: #aaaaaa;
    --danger: #d20000;
    --warning: #e67e22;;
    --success: #27ae60;
    --nav-bg: #2c3e50;
    --nav-text: #ffffff;
    --nav-hover: #3498db;
    --text-main: #333;
    --text-muted: #7f8c8d;
}

body {
    font-family: 'Pretendard', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* 모바일에서 툴바 제외한 높이 */
    flex-direction: column;
    color: #333;
}

input:not([type="radio"]):not([type="checkbox"]), select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px; /* 좀 더 부드럽게 */
    box-sizing: border-box;
    font-size: 1rem;
    appearance: none; /* 모바일 기본 스타일 제거 */
    -webkit-appearance: none;
}

input:not([type="radio"]):not([type="checkbox"]):focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 드롭다운 화살표 추가 ( appearance: none 시 필요) */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8.825L1.175 4 2.575 2.6 6 6.025 9.425 2.6 10.825 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}

/*버튼*/
.btn-area {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-add {
    padding: 4px 6px;
    border-radius: 4px;
    background: var(--primary);
    color: #ffffff;
    cursor: pointer;
}

.btn-create {
    flex: 1;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-cancel {
    flex: 1;
    background: none;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-danger {
    flex: 1;
    background: var(--danger);
    border: 0;
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-disabled {
    flex: 1;
    border: 1px solid var(--gray);
    color: var(--gray);
    cursor: not-allowed;
    padding: 12px 24px;
    border-radius: 8px;
    opacity: 0.6;
}

.btn-close {
    flex: 1;
    padding: 12px 24px;
    background: #eee;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-save {
    flex: 1;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-white {
    flex: 1;
    background: white;
    color: var(--gray);
    border: 1px solid #ddd;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-header {
    padding: 5px 10px;
    border-radius: 4px;
}

.btn-grid {
    padding: 5px 10px;
    border-radius: 4px;
}

.dangerTxt {
    color: var(--danger);
    font-weight: 600;
}

.warningTxt {
    color: var(--warning);
    font-weight: 600;
}

.accentTxt {
    color: var(--accent);
    font-weight: 600;
}
.successTxt {
    color: var(--success);
    font-weight: 600;
}

.flexNone {
    flex: none;
}

.justTxtCell {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.widthFull {
    width: 100% !important;
}

.textCenter {
    text-align: center;
}

/* 로그인 */
/* [PC] 중앙 집중형 카드 레이아웃 */
.login-wrapper {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.3s;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 2.5rem;
}

.form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

.btn-login {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #1a252f;
}

.login-footer-links {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #999;
    text-align: center;
}

.login-footer-links a {
    color: #999;
    text-decoration: none;
    margin: 0 12px;
}

/* 목업용 선택기 */
.role-selector {
    background-color: #f0f7ff;
    border: 2px solid var(--accent);
    font-weight: bold;
    color: var(--primary);
}

/*헤더*/
.main-nav {
    background: var(--primary);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1500;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.nav-brand {
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand small {
    font-weight: 300;
    font-size: 0.8rem;
    opacity: 0.7;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.2s;
    padding: 18px 0;
    display: inline-block;
    border-bottom: 3px solid transparent;
}

.nav-menu a.active {
    color: #fff;
    border-bottom: 3px solid var(--accent);
}

.user-menu {
    position: relative;
    cursor: pointer;
    font-size: 0.9rem;
    height: 100%;
    padding-top: 38px;
    border-radius: 4px;
    /*padding: 5px 10px;*/
}

.dropdown {
    display: none;
    position: absolute;
    top: 84%;
    right: 0;
    background: var(--white);
    color: #333;
    border: 1px solid var(--border);
    border-radius: 6px;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-user {
    position: relative;
}

.user-trigger {
    cursor: pointer;
    font-size: 0.9rem;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    color: #333;
    min-width: 150px;
    border-radius: 6px;
    margin-top: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
}

.nav-dropdown.show {
    display: block;
}

.user-menu:hover .dropdown {
    display: block;
}

.nav-dropdown a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    font-size: 0.85rem;
}

.nav-dropdown a:hover {
    background: #f8f9fa;
}

.nav-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid #eee;
}

.dropdown a {
    display: block;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #eee;
}

.link-button {
    background: none;
    border: none;
    padding: 12px;
    color: var(--danger);
    cursor: pointer;
    font: inherit;
}
.dropdown a:hover {
    background: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
    flex: 1;
}

.container.owner .admin-flex {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.container.owner .admin-flex > article {
    flex: 1;
}

/*.logout-link {*/
/*    color: #e74c3c !important;*/
/*}*/

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/*모달 공통*/
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.open {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    width: 450px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    max-height: 90%;
}

.modal-content.warning, .modal-content.plan {
    width: 550px;
}

.modal-content.risk {
    width: 700px;
}

.modal-content.apply {
    width: 500px;
}
.modal-content.dept .itemValue {
    flex-direction: row;
    display: flex;
    gap: 10px;
}
.modal-content.dept .itemValue button {
    width: 80px;
    flex: none;
}
.modal-content.dept .itemValue input {
    width: auto;
    flex: 1;
}

.modalTitleArea {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.modalTitleArea .title {
    padding: 10px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.modalTitleArea .btn-create {
    flex: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.viewform {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
}

.viewform .formTitle {
    font-size: 1em;
    font-weight: 400;
    margin: 10px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.viewform .formTitle > span:before {
    content: '■ ';
}

.viewform .itemArea {
    display: flex;
    flex-direction: column;
}

.viewform .itemArea .itemRow {
    display: flex;
    flex-direction: row;
}

.viewform .itemArea .itemRow .items {
    display: flex;
    flex-direction: column;
}

.viewform .itemArea .items {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.viewform .itemArea .items > span {
    padding: 4px 8px;
}

.viewform .itemArea .items .itemTitle {
    font-size: 12px;
}

.viewform .itemArea .items .itemValue {
    flex: 1;
    font-size: 16px;
}

.viewform .itemArea .items .itemValue.number {
    text-align: right;
}

.viewform .itemArea > div {
    display: flex;
    flex-direction: row;
}

.viewform .itemArea .itemHeader {
    background-color: #efefef;
    border-top: 1px #cccccc solid;
    border-bottom: 1px #cccccc solid;
}

.viewform .itemArea .itemHeader .itemTitle {
    flex: 1;
    font-size: 14px;
    text-align: center;
    padding: 4px 0;
}

.viewform .itemArea .itemDetail  {
    border-bottom: 1px #cccccc solid;
}

.viewform .itemArea .itemDetail .itemValue {
    flex: 1;
    padding: 4px 6px;
}

.viewform .itemArea .itemRow.grid {
    display: flex;
    flex-direction: row;
    border-top: 1px #cccccc solid;
}

.viewform .itemArea .itemRow.grid:last-child {
    border-bottom: 1px #cccccc solid;
}

.viewform .itemArea .itemRow.grid .items {
    flex-direction: row;
}

.viewform .itemArea .itemRow.grid .items .itemTitle {
    display: flex;
    align-items: center;
    font-size: 14px;
    width: 90px;
    background-color: #efefef;
}


.viewform .noticeContent {
    padding: 10px 8px;
    font-size: 14px;
    line-height: 22px;
}

.viewform .noticeContent .content {
    word-break: keep-all;
}

.viewform .noticeContent:not(:has(.date)) .content {
    padding-top: 20px;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.viewform .noticeContent .date {
    text-align: center;
    width: 100%;
    display: inline-block;
    padding-top: 20px;
}

.sub {
    display: none;
}

.sub.on {
    display: flex;
}

/*사용자 대시보드*/
/* [1. 미사용 연차 사용 계획 작성 공지] */
.warning-card {
    background: var(--white);
    border-radius: 15px;
    padding: 10px 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    border: 1px solid var(--danger);
    color: var(--danger);
    font-size: 1rem;
}
.danger-card {
    background: var(--danger);
    border-radius: 15px;
    padding: 10px 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.danger-card-title {
    color: #ffffff;
    font-size: 1rem;
}

.danger-card-btn {
    background-color: #ffffff;
    border: 0;
    color: var(--danger);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}
.accent-card {
    background: var(--accent);
    border-radius: 15px;
    padding: 10px 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.accent-card-title {
    color: #ffffff;
    font-size: 1rem;
}

.accent-card-btn {
    background-color: #ffffff;
    border: 0;
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* [2. 잔여 연차 요약] */
.summary-card {
    background: var(--white);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.summary-card-title {
    color: #888888;
    font-size: 1rem;
}

.leave-count {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    margin: 10px 0;
}

.leave-count > span {
    font-size: 1rem;
    font-weight: 400;
    color: #aaa;
}

.summary-card-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 44px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}

/* [3. 내 신청 내역 그리드 & 취소 로직] */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.card.danger {
    border-top: 4px solid var(--danger);
}

.card.waring {
    border-top: 4px solid var(--warning);
}

.card.accent {
    border-top: 4px solid var(--accent);
}

.card.history {
    border-top: 4px solid var(--gray);
}

.card-header {
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header .title {
    font-weight: bold;
    font-size: 1.1rem;
}

.card-header .subTxt {
    font-weight: normal;
    color: var(--danger);
    font-size: 0.8rem;
}

.card-content {
    width: 100%;
    overflow-x: auto; /* 가로 스크롤 허용 */
    -webkit-overflow-scrolling: touch;
    display: block; /* 플렉스 간섭 방지 */
    border-radius: 8px; /* 표 모서리 깔끔하게 */
}

.card-content {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto; /* 콘텐츠 양에 따라 조절 */
}

.card-content .table {
    width: 100%;
}

.card-content .history-table {
    min-width: 850px;
}

.card-content .vacation-table {
    min-width: 50%;
}

.card-content .table th,
.card-content .table td {
    flex: 1;
    white-space: nowrap;
    padding: 12px 15px;
}

.card-content .table th {
    background: #f8f9fa;
    padding: 12px;
    border-bottom: 2px solid var(--border);
    text-align: left;
}

.card-content .table td {
    padding: 15px 12px;
    /*border-bottom: 1px solid #eee;*/
}
.table td {
    font-size: 14px;
}
.table .doubleLine {
    display: flex;
    flex-direction: column;
}
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-request {
    background: #bce3f3;
    color: #153957;
}

.badge-approved {
    background: #d4edda;
    color: #155724;
}

.badge-reject {
    background: #ffc0d4;
    color: #ad2e4a;
}

.badge-used {
    background: #e2e3e5;
    color: #383d41;
}

/*차트*/
.chart-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.user-chart {
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding-top: 10px;
}

.bar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.bar {
    width: 20px;
    background: #eee;
    border-radius: 3px 3px 0 0;
    position: relative;
}

.bar.active {
    background: var(--accent);
}

.bar-label {
    font-size: 0.7rem;
    margin-top: 8px;
    color: #999;
}

/* 경리 본인 연차 퀵바 */
.my-leave-hero {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.2);
}

.my-leave-hero b {
    font-size: 2.2rem;
}

.my-leave-hero > button {
    flex: none;
}

/*관리자*/
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* 주/월/년 통계 탭 */
.tab-group {
    display: flex;
    background: #eee;
    padding: 3px;
    border-radius: 8px;
}

.tab {
    border: none;
    padding: 6px 15px;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 6px;
    color: #666;
    transition: 0.2s;
}

.tab.active {
    background: var(--white);
    color: var(--primary);
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 통계 그래프 */
.chart-viewport {
    height: 220px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.label {
    font-size: 0.75rem;
    margin-top: 10px;
    color: var(--text-muted);
}

/* 기업 선택 바 */
.company-selector-card {
    background: var(--white);
    padding: 1.2rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    flex-wrap: wrap;
}

.company-selector-card .company {
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
}

.company-selector-card .company > strong {
    min-width: 130px;
}

.notice {
    display: block;
    width: 100%;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* [설정 카드 레이아웃] */
.setting-item {
    padding: 20px 0;
    border-bottom: 1px solid #f8f8f8;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

.setting-label {
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
    min-width: 250px;
}

.setting-desc {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
    font-weight: 400;
}

.setting-control {
    min-width: 300px;
    text-align: right;
}

.setting-control select {
    width: 80px;
}

.setting-control .dtlOption {
    font-size: 0.85rem;
    margin-top: 10px;
    font-weight: bold;
}

.setting-control .dtlOption > select {
    min-width: 100px;
    width: auto;
    border-color: var(--warning);
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    justify-content: flex-end;
}
.submit-area {
    text-align: center;
    margin: 3rem 0;
}
.btn-save-main {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 80px;
    border-radius: 40px;
    font-size: 1.05rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2);
    transition: all 0.3s;
}
.btn-save-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
    background: #1a252f;
}
/* 이력 그리드 no-data 오버레이 */
.history-grid-wrap {
    position: relative;
    width: 100%;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.92);
    z-index: 2;
}

.grid-overlay.hidden {
    display: none;
}

/* 검색바 */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    padding: 14px 0 18px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.search-bar .search-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}
.search-bar .search-item label {
    font-size: 0.78rem;
    color: var(--gray);
    font-weight: 500;
}
.search-bar .search-item input,
.search-bar .search-item select {
    height: 36px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.88rem;
    background: #fff;
    width: 100%;
}
.search-bar .search-item input:focus,
.search-bar .search-item select:focus {
    outline: none;
    border-color: var(--primary);
}
.search-bar .search-btns {
    display: flex;
    gap: 6px;
    align-items: flex-end;
}
.search-bar .search-btns button {
    height: 36px;
    padding: 0 18px;
    border-radius: 6px;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    flex: unset;
}
.search-bar .search-btns .btn-srch {
    background: var(--primary);
    color: #fff;
}
.search-bar .search-btns .btn-reset {
    background: #fff;
    color: var(--gray);
    border: 1px solid #ddd;
}
.search-bar .search-btns button:hover {
    opacity: 0.85;
}
@media (max-width: 600px) {
    body {
        display: block;
        background: var(--white);
    }

    .onlyPc {
        display: none;
    }

    .dashboard-grid {
        gap: 0;
        display: flex;
        flex-direction: column;
    }

    .container {
        /* 컨테이너 너비 확보 */
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .container.owner .admin-flex {
        flex-direction: column;
        gap: 0;
    }

    /* 신청 내역 카드 내부 스크롤 강제 */
    .card-content {
        display: block;
        width: 100%;
        overflow-x: auto !important; /* 스크롤 우선순위 강화 */
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px; /* 카드 패딩만큼 확장해서 꽉 차게 보이게 (선택사항) */
        padding: 0 15px;
    }

    .card-content .history-table {
        /* [핵심] 테이블이 절대 줄어들지 않도록 최소 너비 지정 */
        width: 100%;
        min-width: 750px !important;
        display: table;
        border-collapse: collapse;
    }

    .card-content .history-table th,
    .card-content .history-table td {
        /* 텍스트 줄바꿈 방지하여 가로 길이 유지 */
        white-space: nowrap;
        padding: 12px 8px;
    }

    /* 나머지 기존 모바일 스타일 유지 */
    .viewform .itemArea .itemRow {
        display: flex;
        flex-direction: column;
        border-top: 0;
    }

    .viewform .itemArea .itemRow.grid {
        flex-direction: column;
        border: 0;
    }

    .viewform .itemArea .itemRow.grid:last-child {
        border: 0;
    }

    .viewform .itemArea .itemRow.grid .items {
        border-top: 1px solid #eee;
    }

    .viewform .itemArea .itemRow.grid:last-child > .items:last-child {
        border-bottom: 1px solid #eee;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.mobile-show {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        padding: 20px;
        gap: 10px;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-user {
        display: none;
    }

    .modal-content {
        margin: 0 20px;
    }

    .modal-content.warning, .modal-content.plan, .modal-content.risk, .modal-content.apply {
        width: auto;
    }

    .login-wrapper {
        box-shadow: none;
        border-radius: 0;
        padding: 3rem 1.5rem;
        max-width: 100%;
        height: 100vh; /* 전체 화면 꽉 차게 */
    }

    .logo {
        font-size: 2.2rem !important;
        margin-bottom: 0.8rem !important;
    }

    .subtitle {
        font-size: 1rem !important;
        margin-bottom: 3rem !important;
    }

    label {
        font-size: 0.95rem !important;
    }

    input:not([type="radio"]):not([type="checkbox"]), select {
        padding: 15px !important;
        font-size: 1.1rem !important;
    }

    /* 터치 영역 확대 */
    .btn-login {
        padding: 16px !important;
        font-size: 1.1rem !important;
        margin-top: 2rem !important;
    }

    .setting-header {
        flex-direction: column;
        text-align: left;
    }

    .setting-control {
        text-align: left;
        width: 100%;
        margin-top: 10px;
    }
    .setting-header.company {
        flex-direction: row;
    }
    .setting-header.company .setting-label {
         min-width: 50px;
    }
    .setting-header.company .setting-control {
        text-align: left;
        min-width: 50px;
        margin-top: 10px;
        width: auto;
    }
    .dtlOption {
        text-align: right;
    }
    .radio-group {
        justify-content: flex-start;
    }

    .submit-area {
        position: sticky;
        bottom: 20px;
    }
    .btn-save-main {
        width: 90%;
    }
}
/* ── 승인 배너 & nav 뱃지 ── */
.approval-banner {
    background: var(--danger);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    gap: 12px;
}
.approval-banner a {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}
.nav-badge {
    display: inline-block;
    background: var(--danger);
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.4;
    vertical-align: middle;
    margin-left: 3px;
}
.nav-menu a .nav-badge {
    background: #ef4444;
}
.nav-inquiry-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0 6px 0 0;
    color: inherit;
}
.nav-inquiry-btn .nav-badge {
    background: #f59e0b;
}

/* ── 전사 통계 화면 ─────────────────────────────── */
.stat-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 1.2rem;
}
@media (max-width: 640px) {
    .stat-summary-grid { grid-template-columns: repeat(2, 1fr); }
}
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    text-align: center;
}
.stat-card.accent { border-left: 3px solid var(--accent); }
.stat-card.warn   { border-left: 3px solid var(--warning); }
.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
}
.stat-value span {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 3px;
}
.stat-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}
.stat-tab {
    background: none;
    border: none;
    padding: 8px 18px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 4px 4px 0 0;
    transition: color 0.15s;
}
.stat-tab:hover  { color: var(--accent); }
.stat-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.ratio-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0.5rem;
}
.ratio-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ratio-label {
    min-width: 80px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}
.ratio-bar-wrap {
    flex: 1;
    background: #f1f5f9;
    border-radius: 4px;
    height: 18px;
    overflow: hidden;
}
.ratio-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.4s ease;
}
.ratio-value {
    font-size: 0.82rem;
    color: var(--text-muted);
    white-space: nowrap;
    min-width: 110px;
    text-align: right;
}
