/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #2449a4;
    --color-accent: #fdbd15;
    --color-dark: #191919;
    --color-text: #222;
    --color-text-light: #888;
    --color-text-muted: #b4b4b4;
    --color-border: #e1e1e1;
    --color-border-dark: #e8e8e8;
    --color-bg-gray: #fafafa;
    --color-white: #fff;
    --font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

/* ========================================
   Header
   ======================================== */
.header__top {
    position: relative;
    height: 76px;
    border-bottom: 1px solid #d5d5d5;
    overflow: hidden;
}

.header__logo {
    position: absolute;
    left: 56px;
    top: 50%;
    transform: translateY(-50%);
}

.header__logo img {
    width: 46px;
    height: auto;
}

.header__admin-btn {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 18px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: -0.3px;
    transition: all 0.2s;
}

.header__admin-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.header__banner {
    background-color: var(--color-primary);
    height: 48px;
    overflow: hidden;
    position: relative;
}

.header__banner-text {
    position: absolute;
    left: 56px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-white);
    letter-spacing: -0.4px;
    white-space: nowrap;
}

/* ========================================
   Hero
   ======================================== */
.hero {
    position: relative;
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: left;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding-left: 56px;
    padding-right: 24px;
}

.hero__title {
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -0.9px;
}

.hero__subtitle {
    font-size: 17px;
    font-weight: 300;
    letter-spacing: -0.34px;
}

/* ========================================
   Content Section
   ======================================== */
.content-section {
    background: var(--color-white);
    padding: 64px 40px 64px 56px;
}

.content-section__inner {
    max-width: none;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
}

.content-section__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.content-section__title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.55;
    letter-spacing: -0.55px;
    color: #1e1e1e;
}

.content-section__subtitle {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: -0.28px;
    color: var(--color-text);
}

/* ========================================
   Search Bar
   ======================================== */
.search-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
    flex-wrap: wrap;
}

.search-bar__info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 17px;
    font-weight: 300;
    color: var(--color-text);
    letter-spacing: -0.3px;
}

.search-bar__count span {
    font-weight: 600;
    color: var(--color-primary);
}

.search-bar__controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.search-bar__select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 124px;
    flex-shrink: 0;
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-white);
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: -0.4px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='11' height='6' viewBox='0 0 11 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5.5 5L10 1' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.search-bar__input {
    width: auto;
    flex: 1;
    min-width: 160px;
    max-width: 420px;
    height: 50px;
    padding: 0 16px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: -0.35px;
    outline: none;
}

.search-bar__input::placeholder {
    color: var(--color-text-light);
}

.search-bar__input:focus {
    border-color: var(--color-primary);
}

.search-bar__select:focus {
    border-color: var(--color-primary);
    outline: none;
}

.search-bar__btn {
    height: 50px;
    padding: 0 32px;
    flex-shrink: 0;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.35px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.search-bar__btn:hover {
    opacity: 0.9;
}

/* ========================================
   Data Table
   ======================================== */
.data-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border-top: 2px solid #7d7d7d;
    border-bottom: 2px solid #7d7d7d;
}

.data-table thead th {
    min-height: 76px;
    padding: 20px 12px;
    background: var(--color-bg-gray);
    border-bottom: 1px solid var(--color-border-dark);
    font-size: 17px;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: -0.3px;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
    vertical-align: middle;
    line-height: 1.45;
}

.data-table tbody td {
    min-height: 88px;
    padding: 20px 12px;
    border-bottom: 1px solid var(--color-text-light);
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text);
    letter-spacing: -0.25px;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    vertical-align: middle;
    line-height: 1.55;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* 비율 기준 너비 — 뷰포트 안에 전체 열이 들어오도록 고정 합계 100% */
.data-table .col-no { width: 5%; }
.data-table .col-model { width: 14%; }
.data-table .col-license { width: 16%; }
.data-table .col-product { width: 38%; }
.data-table .col-document { width: 15%; }
.data-table .col-revision-ym { width: 12%; }

.data-table .col-no,
.data-table tbody td:first-child,
.data-table tbody td:nth-child(5) {
    white-space: nowrap;
}

/* PDF Button */
.btn-pdf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    background: var(--color-accent);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.25px;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
}

.btn-pdf:hover {
    opacity: 0.85;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 0;
}

.pagination__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    font-size: 16px;
}

.pagination__btn svg {
    width: 14px;
    height: 14px;
    fill: var(--color-text-light);
}

.pagination__pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination__page {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text-muted);
    letter-spacing: -0.56px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.pagination__page:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination__page.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    font-weight: 500;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--color-dark);
    padding: 48px 40px;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__company {
    font-size: 14px;
    font-weight: 600;
    color: #999;
    letter-spacing: -0.047px;
}

.footer__address {
    font-size: 14px;
    font-weight: 400;
    color: #999;
    letter-spacing: -0.047px;
}

.footer__copyright {
    font-size: 12px;
    font-weight: 400;
    color: #666;
    letter-spacing: -0.047px;
}

/* ========================================
   Responsive - Tablet (1024px 이하)
   ======================================== */
@media (max-width: 1024px) {
    .header__top {
        height: 72px;
    }

    .header__logo {
        left: 24px;
    }

    .header__logo img {
        width: 44px;
    }

    .header__admin-btn {
        right: 24px;
    }

    .header__banner {
        height: 44px;
    }

    .header__banner-text {
        left: 24px;
        font-size: 14px;
    }

    .hero {
        height: 280px;
    }

    .hero__content {
        padding-left: 24px;
        padding-right: 20px;
    }

    .hero__title {
        font-size: 32px;
    }

    .hero__subtitle {
        font-size: 15px;
    }

    .content-section {
        padding: 40px 24px;
    }

    .content-section__title {
        font-size: 20px;
    }

    .content-section__subtitle {
        font-size: 15px;
    }

    .search-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .search-bar__controls {
        width: 100%;
    }

    .search-bar__input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .search-bar__select {
        width: 120px;
    }

    .search-bar__select,
    .search-bar__input,
    .search-bar__btn {
        height: 50px;
        font-size: 15px;
        border-radius: 10px;
    }

    .data-table {
        display: table;
        width: 100%;
    }

    .data-table thead,
    .data-table tbody,
    .data-table tr {
        min-width: 0;
    }

    .data-table thead th,
    .data-table tbody td {
        font-size: 15px;
        padding: 18px 10px;
        height: auto;
    }

    .btn-pdf {
        font-size: 15px;
        padding: 8px 18px;
    }

    .footer {
        padding: 50px 30px;
    }
}

/* ========================================
   Responsive - Mobile (640px 이하)
   ======================================== */
@media (max-width: 640px) {
    /* Header */
    .header__top {
        height: 60px;
    }

    .header__logo {
        left: 16px;
    }

    .header__logo img {
        width: 36px;
    }

    .header__admin-btn {
        right: 16px;
        padding: 6px 14px;
        font-size: 12px;
    }

    .header__banner {
        height: 36px;
    }

    .header__banner-text {
        left: 16px;
        font-size: 12px;
        top: 50%;
        transform: translateY(-50%);
        white-space: normal;
        line-height: 1.3;
        right: 16px;
    }

    /* Hero */
    .hero {
        height: 280px;
    }

    .hero__content {
        gap: 10px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero__title {
        font-size: 26px;
        letter-spacing: -0.8px;
    }

    .hero__subtitle {
        font-size: 13px;
        letter-spacing: -0.3px;
        word-break: keep-all;
        line-height: 1.6;
    }

    /* Content */
    .content-section {
        padding: 40px 16px;
    }

    .content-section__inner {
        gap: 24px;
    }

    .content-section__title {
        font-size: 17px;
    }

    .content-section__subtitle {
        font-size: 14px;
    }

    /* Search */
    .search-bar__info {
        font-size: 15px;
        gap: 12px;
        width: 100%;
    }

    .search-bar__controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .search-bar__select {
        width: auto;
        flex-shrink: 0;
        height: 46px;
        font-size: 14px;
        border-radius: 10px;
        padding: 0 16px;
    }

    .search-bar__input {
        flex: 1;
        min-width: 0;
        height: 46px;
        font-size: 14px;
        border-radius: 10px;
        padding: 0 16px;
    }

    .search-bar__btn {
        width: 100%;
        height: 46px;
        font-size: 14px;
        border-radius: 10px;
    }

    /* Table → Card */
    .data-table {
        border-top: none;
        border-bottom: none;
        overflow-x: visible;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .data-table tbody tr {
        background: var(--color-bg-gray);
        border: 1px solid var(--color-border);
        border-radius: 12px;
        padding: 18px 16px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .data-table tbody tr:last-child {
        border-bottom: 1px solid var(--color-border);
    }

    .data-table tbody td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        height: auto;
        padding: 0;
        border-bottom: none;
        font-size: 14px;
        font-weight: 400;
        text-align: right;
        white-space: normal;
        word-break: break-word;
    }

    .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-text);
        font-size: 13px;
        flex-shrink: 0;
        margin-right: 16px;
        min-width: 0;
        text-align: left;
    }

    /* 연번 숨기기 (모바일에서 불필요) */
    .data-table tbody td[data-label="연번"] {
        display: none;
    }

    /* 첨부문서 행: PDF 버튼 풀너비 */
    .data-table tbody td[data-label="첨부문서"] {
        margin-top: 4px;
        justify-content: stretch;
    }

    .data-table tbody td[data-label="첨부문서"]::before {
        display: none;
    }

    .data-table tbody td[data-label="첨부문서"] .btn-pdf {
        width: 100%;
        font-size: 14px;
        padding: 10px;
        border-radius: 8px;
        text-align: center;
    }

    /* Pagination */
    .pagination {
        gap: 6px;
    }

    .pagination__btn {
        width: 28px;
        height: 28px;
    }

    .pagination__btn svg {
        width: 12px;
        height: 12px;
    }

    .pagination__pages {
        gap: 6px;
    }

    .pagination__page {
        width: 28px;
        height: 28px;
        font-size: 13px;
        border-radius: 6px;
    }

    /* Footer */
    .footer {
        padding: 32px 16px;
    }

    .footer__inner {
        gap: 16px;
    }

    .footer__company {
        font-size: 13px;
    }

    .footer__address {
        font-size: 13px;
    }

    .footer__copyright {
        font-size: 11px;
    }
}
