* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: #f8fafc;
    font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* 💡 웹폰트 렌더링 선명도 극대화 */
}

/* ==========================================================================
   1. 헤더 (Header)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background-color: #0b1f15;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    box-sizing: border-box;
    z-index: 1000;
}

body:not(.sub-page) header {
    background: transparent;
}

body.sub-page header {
    background-image: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.15)), url('image/bg1.avif');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 24px;
    font-weight: 800;
    color: #047857;
    letter-spacing: -0.5px;
}

.logo img {
    display: inline-block;
    height: 42px;
    width: auto;
    margin: 0;
    filter: saturate(3);
}

.logo span {
    display: inline-block;
    white-space: nowrap;
    font-size: 30px;
    font-weight: 800;
    color: #39f732;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
}

nav a {
    display: inline-block;
    text-decoration: none;
    color: #f4f5f7;
    font-weight: 700;
    font-size: 24px;
    padding: 10px 24px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.25s ease-in-out;
}

nav a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #e6e950;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* ==========================================================================
   2. 메인 페이지 히어로 & 퀵메뉴
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-size: cover;
    background-position: center;
    animation: bgFade 12s infinite, zoomEffect 12s infinite ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.1) 60%, rgba(0, 0, 0, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 850px;
    padding: 0 20px;
    color: #ffffff;
    margin-top: -30px;
}

.hero-content h2 {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.25;
    letter-spacing: -1px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 22px;
    font-weight: 500;
    opacity: 0.95;
    margin-bottom: 40px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.quick-menu-wrap {
    position: absolute;
    bottom: 40px;
    z-index: 3;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.quick-menu {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 26px 20px;
    text-align: center;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    background: #ffffff;
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
}

.card .icon {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #065f46;
}

.card p {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

@keyframes bgFade {

    0%,
    28% {
        background-image: url('image/bg1.avif');
    }

    33%,
    61% {
        background-image: url('image/bg2.avif');
    }

    66%,
    95% {
        background-image: url('image/bg3.avif');
    }

    100% {
        background-image: url('image/bg1.avif');
    }
}

@keyframes zoomEffect {
    0% {
        transform: scale(1.15);
    }

    50% {
        transform: scale(1.0);
    }

    100% {
        transform: scale(1.15);
    }
}

/* ==========================================================================
   3. 서브페이지 레이아웃
   ========================================================================== */
.sub-container {
    flex: 1;
    width: 92%;
    max-width: 1500px;
    margin: 150px auto 40px auto !important;
    padding: 0 20px;
    display: flex;
    gap: 40px;
    box-sizing: border-box;
    min-height: 600px;
}

.sub-sidebar {
    width: 240px;
    min-width: 240px;
    flex-shrink: 0;
}

.sub-sidebar h2 {
    font-size: 24px;
    color: #047857;
    padding-bottom: 15px;
    border-bottom: 2px solid #047857;
    margin-bottom: 15px;
}

.sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sub-menu li {
    margin-bottom: 8px;
}

.sub-menu a {
    display: block;
    padding: 12px 16px;
    color: #475569;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
}

.sub-menu li.active a,
.sub-menu a:hover {
    background-color: #ecfdf5;
    color: #047857;
}

.sub-content {
    flex: 1;
    width: 100%;
    background: #ffffff;
    padding: 35px 40px 60px 40px !important;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    overflow: visible !important;
    height: auto !important;
}

.sub-content h3 {
    font-size: 28px;
    color: #1e293b;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.ceo-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 40px !important;
    margin-top: 20px !important;
}

.ceo-photo {
    width: 260px !important;
    flex-shrink: 0 !important;
}

.ceo-photo img {
    width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e2e8f0 !important;
}

.ceo-message {
    flex: 1 !important;
    font-size: 17px !important;
    line-height: 1.9 !important;
    color: #334155 !important;
}

.ceo-name {
    display: block !important;
    margin-top: 30px !important;
    font-size: 19px !important;
    font-weight: 700;
    color: #047857 !important;
    text-align: left !important;
}

.location-container {
    box-sizing: border-box;
    width: 100%;
}

.map-wrapper {
    max-width: 100%;
    overflow: hidden;
}

/* ==========================================================================
   4. 조직도 및 임직원 팝업
   ========================================================================== */
.tree-container {
    width: 100%;
    overflow-x: auto;
    padding: 40px 10px 220px 10px !important;
    text-align: center;
    box-sizing: border-box;
    margin-bottom: 40px;
}

.emp-popup {
    display: none;
    margin-top: 15px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    min-width: 280px;
    max-width: 340px;
    text-align: left;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999 !important;
}

.emp-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

/* ==========================================================================
   5. 로그인 / 회원가입 (Auth Menu)
   ========================================================================== */
.auth-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    color: #e2e8f0;
    transition: all 0.2s ease;
}

.auth-link svg {
    opacity: 0.75;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.auth-link:hover {
    color: #ffffff;
}

.auth-link:hover svg {
    opacity: 1;
    transform: translateY(-2px);
}

.auth-divider {
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    margin: 0 4px;
    user-select: none;
}

/* ==========================================================================
   6. 💡 폰트 시인성 개선 및 공통 테이블 스타일
   ========================================================================== */
.sub-content table,
.board-table,
.cs-table {
    font-size: 14.5px !important;
    letter-spacing: -0.3px !important;
}

.sub-content table th,
.board-table th,
.cs-table th {
    font-weight: 700 !important;
    color: #1e293b !important;
}

.sub-content table td,
.board-table td,
.cs-table td {
    font-weight: 500 !important;
    color: #334155 !important;
}

tbody tr:nth-child(even) {
    background-color: #f0fdf4 !important;
}

tbody tr:hover {
    background-color: #e2e8f0 !important;
    transition: background-color 0.2s;
}

@media print {
    tbody tr:nth-child(even) {
        background-color: #f0fdf4 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.sub-sidebar .sub-menu li.active a,
.cs-sidebar .cs-menu li.active a {
    background-color: #0f766e !important;
    color: #ffffff !important;
    border-radius: 6px;
}

.sub-sidebar .sub-menu li a:hover,
.cs-sidebar .cs-menu li a:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

/* 서브페이지 내부 이중 박스 제거 */
.sub-content {
    flex: 1;
    background: #ffffff !important;
    padding: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid #e2e8f0 !important;
    box-sizing: border-box !important;
}

.sub-content>div[style*="background: #fff"],
.sub-content>div[style*="background:#fff"],
.sub-content>div[style*="padding: 35px"],
.sub-content>div[style*="padding:35px"] {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

table,
th,
td,
p,
span,
a,
input,
select,
button,
textarea {
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

table th {
    font-weight: 700 !important;
    color: #1e293b !important;
}

table td {
    font-weight: 500 !important;
    color: #334155 !important;
    letter-spacing: -0.3px !important;
}

.sub-sidebar ul.sub-menu,
.sub-menu ul,
aside.sub-sidebar ul,
nav.sub-menu ul {
    display: block !important;
    flex-direction: column !important;
}

.sub-sidebar ul.sub-menu li,
.sub-menu ul li,
aside.sub-sidebar ul li,
nav.sub-menu ul li {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

.sub-sidebar ul.sub-menu li a,
.sub-menu ul li a,
aside.sub-sidebar ul li a,
nav.sub-menu ul li a {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
}

/* ==========================================================================
   7. 💡 전자거래 (E-Trade) 전용 모던 UI 스타일
   ========================================================================== */
.trade-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    padding: 32px;
    max-width: 1400px;
    margin: 40px auto;
}

.trade-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trade-header-info {
    background: #f8fafc;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    display: inline-block;
}

.trade-header-info label {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
    margin-right: 12px;
}

.modern-input {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: all 0.2s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

.modern-input:focus {
    border-color: #0f766e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.modern-input::placeholder {
    color: #94a3b8;
}

.input-num {
    text-align: right;
}

.trade-table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.trade-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: collapse;
}

.trade-table th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 12px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.trade-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.trade-table tr:last-child td {
    border-bottom: none;
}

.btn-add {
    background: #fff;
    color: #0f766e;
    border: 1px solid #0f766e;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add:hover {
    background: #f0fdfa;
}

.btn-submit {
    background: #0f766e;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(15, 118, 110, 0.2);
}

.btn-submit:hover {
    background: #115e59;
    box-shadow: 0 6px 12px rgba(15, 118, 110, 0.3);
    transform: translateY(-1px);
}

.btn-del {
    background: #fff;
    color: #ef4444;
    border: 1px solid #fca5a5;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.btn-del:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* ==========================================================================
   📱 모바일 화면(768px 이하) 강제 통일 및 반응형 처리
   ========================================================================== */
@media (max-width: 768px) {
    header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 60px !important;
        padding: 0 15px !important;
        gap: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    nav ul {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    nav a {
        font-size: 15px !important;
        padding: 6px 12px !important;
        white-space: nowrap !important;
    }

    .hero-content h2 {
        font-size: 26px !important;
        word-break: keep-all !important;
        line-height: 1.35 !important;
    }

    .hero-content p {
        font-size: 15px !important;
        word-break: keep-all !important;
    }

    .quick-menu-wrap {
        bottom: 20px !important;
    }

    .quick-menu {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .card {
        padding: 15px 10px !important;
    }

    .card .icon {
        font-size: 26px !important;
        margin-bottom: 5px !important;
    }

    .card h3 {
        font-size: 14px !important;
        white-space: nowrap !important;
    }

    .card p {
        display: none !important;
    }

    .sub-container,
    div.sub-container {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important;
        margin-top: 80px !important;
    }

    .sub-container:not(.dashboard-wrap) .sub-sidebar,
    .sub-container:not(.dashboard-wrap) aside.sub-sidebar,
    .sub-container:not(.dashboard-wrap) .cs-sidebar,
    .sub-container:not(.dashboard-wrap) div[class*="sidebar"],
    .sub-container:not(.dashboard-wrap) .sub-container>aside {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sub-content,
    .sub-container>main,
    div.sub-content {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        overflow-x: auto !important;
        padding: 15px !important;
        box-sizing: border-box !important;
        -webkit-overflow-scrolling: touch !important;
    }

    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    .search-box {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 15px !important;
        gap: 15px !important;
    }

    .search-box .filter-group,
    .search-box .filter-control,
    .btn-search {
        width: 100% !important;
    }

    #trend_item_buttons {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }

    .ceo-container,
    div.ceo-container,
    .sub-content div[style*="flex-direction: row"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
    }

    .ceo-photo,
    div.ceo-photo {
        width: 100% !important;
        max-width: 200px !important;
        margin: 0 auto !important;
    }

    .ceo-message,
    div.ceo-message {
        width: 100% !important;
        font-size: 15px !important;
        line-height: 1.6 !important;
        word-break: keep-all !important;
    }

    .sub-content div[style*="display: flex"],
    .sub-content div[style*="display:flex"] {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .date-badge-group {
        flex-wrap: wrap !important;
        margin-top: 5px !important;
    }

    .filter-group>div[style*="align-items: center"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 5px !important;
    }

    .filter-group>div[style*="align-items: center"]>span {
        text-align: center !important;
    }

    .tab-content>div[style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
        height: auto !important;
    }

    .tab-content>div[style*="justify-content: space-between"]>div {
        flex-direction: column !important;
        width: 100% !important;
        align-items: stretch !important;
    }

    #trend_search_type,
    #trend_keyword {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .select2-container,
    .search-box .filter-group {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* API 렌더링 테이블 전용 복구 (유통정보 검색 등) */
    #search_result_area {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 20px !important;
    }

    #search_result_area table {
        display: table !important;
        width: 100% !important;
        min-width: max-content !important;
        table-layout: auto !important;
    }

    #search_result_area table thead {
        display: table-header-group !important;
    }

    #search_result_area table tr {
        display: table-row !important;
        background-color: transparent !important;
    }

    #search_result_area table th,
    #search_result_area table td {
        display: table-cell !important;
        text-align: center !important;
        padding: 12px 10px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        white-space: nowrap !important;
        font-size: 14px !important;
    }

    #search_result_area table th:first-child,
    #search_result_area table td:first-child,
    #search_result_area table th:last-child,
    #search_result_area table td:last-child {
        display: table-cell !important;
    }

    #search_result_area table td:nth-child(2)::before,
    #search_result_area table td:nth-child(2)::after {
        content: none !important;
    }

    #search_result_area>div:not([style*="padding: 40px"]),
    #search_result_area>p,
    #search_result_area>span {
        display: block !important;
        float: none !important;
        width: 100% !important;
        position: sticky !important;
        left: 0 !important;
        text-align: left !important;
        white-space: normal !important;
        word-break: keep-all !important;
        font-size: 12.5px !important;
        line-height: 1.4 !important;
        margin: 0 0 10px 0 !important;
        padding: 0 5px !important;
        color: #475569 !important;
        box-sizing: border-box !important;
    }

    #trend_list_area .board-table {
        display: block !important;
        width: 100% !important;
        border-top: 2px solid #334155 !important;
    }

    #trend_list_area .board-table thead {
        display: none !important;
    }

    #trend_list_area .board-table tbody {
        display: block !important;
        width: 100% !important;
    }

    #trend_list_area .board-table tr {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 12px 5px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #trend_list_area .board-table th,
    #trend_list_area .board-table td {
        display: block !important;
        border: none !important;
        padding: 0 !important;
        background: transparent !important;
    }

    #trend_list_area .board-table td:nth-child(1),
    #trend_list_area .board-table td:nth-child(2),
    #trend_list_area .board-table td:nth-child(3),
    #trend_list_area .board-table td:nth-child(7),
    #trend_list_area .category-badge {
        display: none !important;
    }

    #trend_list_area .board-table td:nth-child(4) {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding-right: 5px !important;
        text-align: left !important;
    }

    #trend_list_area .board-table td:nth-child(4) a {
        display: block !important;
        width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        letter-spacing: -0.5px !important;
        color: #333333 !important;
    }

    #trend_list_area .board-table td:nth-child(5) {
        flex: 0 0 42px !important;
        text-align: right !important;
        font-size: 12px !important;
        color: #64748b !important;
        white-space: nowrap !important;
    }

    #trend_list_area .board-table td:nth-child(6) {
        flex: 0 0 70px !important;
        text-align: right !important;
        font-size: 12px !important;
        color: #94a3b8 !important;
        padding-left: 5px !important;
        white-space: nowrap !important;
    }

    /* 💡 전자거래(E-Trade) 모바일 최적화 */
    .trade-card {
        padding: 20px 15px !important;
        margin: 20px auto !important;
        border-radius: 12px !important;
    }

    .trade-header-info {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 15px !important;
    }

    .trade-header-info input {
        width: 100% !important;
    }

    .btn-submit {
        width: 100% !important;
        padding: 14px !important;
        margin-top: 10px !important;
    }

    .btn-add {
        width: 100% !important;
        margin-bottom: 10px !important;
        text-align: center !important;
    }

    /* 하단 액션 버튼 그룹 세로 정렬 */
    .trade-card form>div[style*="justify-content: space-between"] {
        flex-direction: column !important;
    }
}

/* ==========================================================================
   🚨 일반 모바일 테이블 깨짐 방지 
   💡 핵심: 영업일 달력(.month-table)과 경영공시(.disc-table)를 완벽하게 예외 처리!!
   ========================================================================== */
@media (max-width: 768px) {

    /* 1. min-width: 700px 규칙에서 특수 테이블들 완벽하게 면제 */
    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) {
        display: table !important;
        width: 100% !important;
        min-width: 700px !important;
        /* <--- 이 녀석이 달력을 700px로 찢던 범인입니다! */
        table-layout: auto !important;
    }

    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) thead {
        display: table-header-group !important;
    }

    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) tr {
        display: table-row !important;
        background-color: transparent !important;
    }

    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) th,
    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) td {
        display: table-cell !important;
        text-align: center !important;
        padding: 12px 8px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        font-size: 13.5px !important;
        color: #1e293b !important;
        white-space: nowrap !important;
        width: auto !important;
    }

    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) th {
        background-color: #f8fafc !important;
        font-weight: 700 !important;
        color: #334155 !important;
    }

    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) th:first-child,
    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) td:first-child,
    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) th:last-child,
    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) td:last-child,
    .sub-content table:not(.board-table):not(.info-table):not(.content-table):not(.month-table):not(.disc-table):not(.calendar-table) td:nth-child(3) {
        display: table-cell !important;
    }
}

/* ==========================================================================
   🚨 영업일 달력(.month-table) 절대 보호구역
   ========================================================================== */
@media (max-width: 768px) {
    html body .sub-content table.month-table {
        display: table !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        table-layout: fixed !important;
        /* 7칸 강제 고정 */
        margin: 0 auto !important;
    }

    html body .sub-content table.month-table thead,
    html body .sub-content table.month-table th {
        display: table-header-group !important;
    }

    html body .sub-content table.month-table tbody {
        display: table-row-group !important;
    }

    html body .sub-content table.month-table tr {
        display: table-row !important;
        background: transparent !important;
    }

    /* 💡 어떠한 경우에도 7일(수~토 포함) 모두 노출 */
    html body .sub-content table.month-table th,
    html body .sub-content table.month-table td,
    html body .sub-content table.month-table th:nth-child(n),
    html body .sub-content table.month-table td:nth-child(n) {
        display: table-cell !important;
        width: 14.285% !important;
        /* 100% / 7일 = 정확한 너비 분배 */
        text-align: center !important;
        padding: 10px 0 !important;
        border: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        font-size: 13.5px !important;
        white-space: normal !important;
    }
}

/* ==========================================================================
   🚨 메인 화면 헤더 원상복구 & 시세 티커 고정 (글씨 뭉침 완벽 해결)
   ========================================================================== */
/* 1. 헤더 효과 완벽 제거 (원래대로 100% 투명하게 복구) */
body:not(.sub-page) header {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
}

/* 2. 티커의 '가장 바깥쪽 껍데기'만 화면 하단에 안전하게 고정 */
.ticker-wrap {
    position: fixed !important;
    bottom: 0 !important;
    /* 💡 화면 맨 밑바닥 고정 (위로 올리려면 top: 90px;) */
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
}

/* 3. 글씨들이 겹치지 않고 기차처럼 일렬로 쭉 이어지도록 레일 쫙 펴기 */
.ticker-wrap>div,
.ticker-move {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: max-content !important;
    /* 내용물 길이만큼 무한히 늘어남 (겹침 방지) */
}

/* 4. 개별 시세 아이템 간격 확보 및 겹침 원천 차단 */
.ticker-item {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    /* 글씨 줄바꿈 절대 방지 */
    position: static !important;
    /* 개별 글씨가 고정되는 버그 방지 */
    margin-right: 40px !important;
    /* 아이템 사이 넉넉한 간격 확보 */
}

/* ==========================================================================
   💡 시세 티커(전광판) 흐르는 속도 조절
   ========================================================================== */
.ticker-move,
.ticker-wrap>div {
    /* 숫자가 커질수록 '느려지고', 작아질수록 '빨라집니다'. (예: 20s = 빠름, 60s = 느림) */
    animation-duration: 55s !important;
}

/* ==========================================================================
   🚨 메뉴(헤더) 드롭다운 가림 현상 완벽 해결 (티커보다 최상위 배치)
   ========================================================================== */
header {
    z-index: 99999 !important;
}

/* =========================================
   📊 공통 테이블 스크롤 & 상단 타이틀 고정 스타일
   ========================================= */
.table-wrapper {
    width: 100%;
    max-width: 1100px;
    overflow-x: auto;
    overflow-y: auto;
    /* 세로 스크롤 활성화 */
    max-height: 65vh;
    /* 표 높이를 화면의 65% 정도로 제한 */
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
    width: 100%;
    min-width: 750px;
    border-collapse: collapse;
    margin-top: 5px;
    border-top: 2px solid #1e293b;
    table-layout: auto;
}

.table-wrapper th,
.table-wrapper td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    text-align: center;
    word-break: keep-all;
}

.table-wrapper td.text-left {
    white-space: normal;
    line-height: 1.4;
    text-align: left;
}

.table-wrapper td.text-right {
    text-align: right;
}

.table-wrapper .no-data {
    text-align: center;
    color: #94a3b8;
    padding: 30px 0;
}

/* 핵심: 타이틀 고정 */
.table-wrapper th {
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    position: sticky;
    /* 타이틀 윗부분 고정 */
    top: 0;
    z-index: 10;
    box-shadow: inset 0 -2px 0 #1e293b;
    /* 스크롤시 타이틀 아래 경계선 유지 */
    border-bottom: none;
}

.table-wrapper tbody tr:nth-child(even) {
    background-color: #f0fdf4;
}

.table-wrapper tbody tr:hover {
    background-color: #e2e8f0;
    transition: background-color 0.2s;
}

.table-wrapper tfoot tr {
    background-color: #f1f5f9;
    border-top: 2px solid #64748b;
    font-weight: bold;
}

.table-wrapper tfoot td {
    color: #0f172a;
    padding: 12px 8px;
    border-bottom: 2px solid #1e293b;
}

/* =========================================
   인쇄(Print) 전용 스타일
========================================= */
@media print {

    /* 1. 인쇄 시 숨길 공통 클래스 및 요소 지정 */
    .no-print,
    .top-menu,
    /* 상단 메뉴 클래스명 (실제에 맞게 수정) */
    .summary-badges,
    /* 집계 배지 영역 클래스명 (실제에 맞게 수정) */
    header,
    /* 전체 헤더 태그 */
    footer,
    /* 전체 푸터 태그 */
    aside {
        /* 사이드바 태그 */
        display: none !important;
    }

    /* 2. 본문 영역을 전체 화면으로 꽉 차게 조정 (선택 사항) */
    .sub-content,
    .print-area {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
    }

    /* 3. 인쇄 시 배경색/배경이미지가 정상 출력되도록 강제 적용 (브라우저 호환성) */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}