:root{--bg:#f4f7fc;--surface:#fff;--line:#e3eaf4;--text:#13213b;--muted:#6b7890;--primary:#3775f5;--primary-soft:#eaf2ff;--dark:#15223b}
*{box-sizing:border-box}body{margin:0;font-family:Pretendard,"Noto Sans KR",system-ui,sans-serif;background:var(--bg);color:var(--text)}a{text-decoration:none;color:inherit}.wrap{width:min(1220px,calc(100% - 40px));margin:auto}.topbar{height:74px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;position:sticky;top:0;z-index:20}.nav{display:flex;align-items:center;gap:38px}.logo{font-weight:900;font-size:22px;display:flex;align-items:center;gap:10px}.logo span{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(135deg,#3775f5,#6ba2ff);color:#fff;font-size:14px}.nav nav{display:flex;gap:24px;font-weight:700}.nav-actions{margin-left:auto;display:flex;gap:8px}.btn{height:44px;padding:0 18px;border-radius:12px;border:1px solid transparent;font-weight:800;display:inline-flex;align-items:center;justify-content:center;background:#fff;cursor:pointer}.btn.primary{background:var(--primary);color:#fff}.btn.ghost{border-color:var(--line)}.btn.dark{background:var(--dark);color:#fff}.btn.large{height:52px}.btn.wide{width:100%}.flash{margin-top:14px;padding:14px;border-radius:12px}.flash.success{background:#eaf9f0;color:#177245}.flash.error{background:#fff0f0;color:#c12d2d}
.hero{padding:96px 0 80px}.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:70px;align-items:center}.pill{display:inline-flex;background:var(--primary-soft);color:var(--primary);padding:8px 13px;border-radius:999px;font-size:13px;font-weight:900}.hero h1,.page-hero h1{font-size:58px;line-height:1.08;letter-spacing:-2.5px}.hero h1 em{font-style:normal;color:var(--primary)}.hero p,.page-hero p{font-size:18px;color:var(--muted);line-height:1.8}.hero-actions{display:flex;gap:12px;margin-top:28px}.hero-card,.feature,.price-card,.auth-card,.panel,.sidebar,.stat{background:#fff;border:1px solid var(--line);border-radius:22px}.hero-card{padding:28px}.dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#28b76b;margin-right:8px}.mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:20px}.mini-grid div{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px}.mini-grid small{display:block;color:var(--muted)}.mini-grid strong{display:block;font-size:28px;margin-top:8px}.section,.page-hero{padding:70px 0}.page-hero{background:#f8fbff}.section-title{text-align:center}.feature-grid,.pricing-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.feature,.price-card{padding:28px}.feature p,.price-card p{color:var(--muted);line-height:1.7}.price{font-size:34px;font-weight:900}.price-card ul{list-style:none;padding:0}.price-card li{padding:10px 0;border-bottom:1px dashed var(--line)}.center-page{min-height:calc(100vh - 74px);display:grid;place-items:center;padding:50px 20px}.auth-card{width:min(560px,100%);padding:32px}.auth-card label,.panel label{display:block;font-weight:800;margin:14px 0}.auth-card input,.auth-card select,.panel input,.panel select,.panel textarea{display:block;width:100%;margin-top:8px;padding:14px;border:1px solid var(--line);border-radius:13px}.alert.error{background:#fff0f0;color:#c12d2d;padding:14px;border-radius:12px}.dashboard{padding:42px 0}.dash-layout{display:grid;grid-template-columns:245px 1fr;gap:24px}.sidebar{padding:18px;height:max-content}.side-title{font-size:13px;color:var(--muted);font-weight:900;padding:8px 12px 14px}.sidebar a{display:block;padding:13px 14px;border-radius:11px;font-weight:700}.sidebar a:hover{background:var(--primary-soft);color:var(--primary)}.page-head h1{font-size:30px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.stat{padding:22px}.stat small{color:var(--muted)}.stat strong{display:block;font-size:30px;margin-top:7px}.panel{margin-top:20px;padding:24px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.inline-form{display:flex;gap:8px;align-items:center}.inline-form select{margin:0;padding:10px}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:14px;border-bottom:1px solid var(--line);white-space:nowrap}th{color:var(--muted);font-size:13px}.tag{display:inline-flex;padding:6px 10px;border-radius:999px;background:var(--primary-soft);color:var(--primary);font-size:12px;font-weight:900}.empty{text-align:center;color:var(--muted);padding:30px}.footer{margin-top:60px;padding:46px 0;background:#fff;border-top:1px solid var(--line)}.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:30px}.footer a{display:block;color:var(--muted);margin-top:10px}
.alert.success {margin: 20px 0;padding: 16px;border-radius: 12px;background: #eaf9f0;color: #177245;line-height: 1.7;}
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.order-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.order-status.warning {
    background: #fff6d8;
    color: #b77900;
}

.order-status.success {
    background: #e8f8ee;
    color: #198754;
}

.order-status.info {
    background: #e9f3ff;
    color: #1769d2;
}

.order-status.active {
    background: #e7f8f2;
    color: #087f5b;
}

.order-status.danger {
    background: #ffe9e9;
    color: #d92d20;
}

.order-status.purple {
    background: #f3e8ff;
    color: #7b2cbf;
}

.order-status.gray {
    background: #eef1f5;
    color: #667085;
}

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

.inline-form select {
    width: auto;
    min-width: 122px;
    margin: 0;
    padding: 11px 36px 11px 13px;
}
.ticket-content {
    min-width: 260px;
    max-width: 420px;
    white-space: normal;
    line-height: 1.65;
    color: #344054;
    word-break: break-word;
}
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.recent-orders-table {
    width: 100%;
    table-layout: fixed;
}

.recent-orders-table th:nth-child(1),
.recent-orders-table td:nth-child(1) {
    width: 85px;
}

.recent-orders-table th:nth-child(2),
.recent-orders-table td:nth-child(2) {
    width: 70px;
}

.recent-orders-table th:nth-child(3),
.recent-orders-table td:nth-child(3) {
    width: auto;
}

.recent-orders-table th:nth-child(4),
.recent-orders-table td:nth-child(4) {
    width: 90px;
}

.recent-orders-table th:nth-child(5),
.recent-orders-table td:nth-child(5) {
    width: 150px;
}

.recent-orders-table td:nth-child(3) {
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-orders-table .order-status {
    min-width: 0;
    white-space: normal;
    line-height: 1.4;
    text-align: center;
}

.ticket-content {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.65;
    color: #344054;
    max-width: 0;
}
.chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.chart-head h2 {
    font-size: 18px;
    margin: 0;
}
.chart-sub {
    color: var(--muted);
    font-size: 13px;
}
.chart-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}
.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.chart-wrap {
    position: relative;
    margin-top: 14px;
}
.chart-tooltip {
    position: absolute;
    pointer-events: none;
    background: var(--dark);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    transform: translate(-50%, -115%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    z-index: 5;
}
.revenue-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.revenue-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.scope-picker-label {
    display: block;
    font-weight: 800;
    margin: 14px 0 0;
}
.scope-picker {
    margin-top: 8px;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 4px 14px;
    background: #fff;
}
.scope-group {
    padding: 8px 0;
}
.scope-group:not(:last-child) {
    border-bottom: 1px dashed var(--line);
}
.scope-group strong {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 800;
    margin: 4px 0 2px;
}
.scope-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 6px;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    border-radius: 8px;
    cursor: pointer;
}
.scope-item:hover {
    background: var(--primary-soft);
}
.scope-picker input[type="checkbox"] {
    all: revert;
    flex: none;
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}
.ticket-admin-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ticket-admin-item {
    overflow: hidden;
    border: 1px solid #e3eaf4;
    border-radius: 16px;
    background: #ffffff;
}

.ticket-admin-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 20px;
    cursor: pointer;
    list-style: none;
}

.ticket-admin-summary::-webkit-details-marker {
    display: none;
}

.ticket-admin-summary:hover {
    background: #f8fbff;
}

.ticket-summary-main {
    min-width: 0;
    flex: 1;
}

.ticket-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ticket-title-row strong {
    font-size: 17px;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 9px;
    color: #667085;
    font-size: 13px;
}

.ticket-preview {
    max-width: 850px;
    margin: 10px 0 0;
    overflow: hidden;
    color: #475467;
    text-overflow: ellipsis;
    white-space: normal;
}

.ticket-open-text {
    flex-shrink: 0;
    color: #3775f5;
    font-size: 13px;
    font-weight: 800;
}

.ticket-admin-item[open] .ticket-open-text {
    font-size: 0;
}

.ticket-admin-item[open] .ticket-open-text::after {
    content: "접기";
    font-size: 13px;
}

.ticket-admin-detail {
    padding: 22px;
    border-top: 1px solid #e3eaf4;
    background: #fbfdff;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.ticket-info-grid > div {
    padding: 16px;
    border: 1px solid #e3eaf4;
    border-radius: 13px;
    background: #ffffff;
}

.ticket-label {
    display: block;
    margin-bottom: 7px;
    color: #667085;
    font-size: 12px;
    font-weight: 700;
}

.ticket-message-block {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #e3eaf4;
    border-radius: 15px;
    background: #ffffff;
}

.ticket-message-head {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 17px;
    border-bottom: 1px solid #e3eaf4;
    background: #f8fafc;
}

.ticket-message-head span {
    color: #667085;
    font-size: 13px;
}

.ticket-message-content {
    padding: 20px;
    color: #344054;
    line-height: 1.8;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-message {
    border-color: #cfe0ff;
}

.admin-message .ticket-message-head {
    color: #1769d2;
    background: #edf4ff;
}

.ticket-reply-form {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid #dce6f5;
    border-radius: 15px;
    background: #ffffff;
}

.ticket-reply-form textarea {
    resize: vertical;
}

.ticket-action-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    margin-top: 14px;
}

.ticket-action-row label {
    width: 230px;
    margin: 0;
}

.ticket-action-row select {
    margin-top: 8px;
}

@media (max-width: 850px) {
    .ticket-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ticket-admin-summary {
        align-items: flex-start;
    }

    .ticket-action-row {
        align-items: stretch;
        flex-direction: column;
    }

    .ticket-action-row label {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .ticket-info-grid {
        grid-template-columns: 1fr;
    }

    .ticket-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .ticket-preview {
        white-space: normal;
    }
}
.ticket-admin-item,
.ticket-admin-detail,
.ticket-message-block,
.ticket-message-content,
.ticket-preview,
.ticket-summary-main {
    min-width: 0;
    max-width: 100%;
}

.ticket-message-content,
.ticket-preview {
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    max-width: 100%;
}

.ticket-admin-detail {
    overflow: hidden;
}

.ticket-admin-summary {
    min-width: 0;
}

.ticket-summary-main {
    overflow: hidden;
}

.ticket-preview {
    display: block;
    overflow: hidden;
    line-height: 1.6;
}

.ticket-reply-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.ticket-message-content{
    width:100%;
    display:block;
    box-sizing:border-box;

    white-space:pre-wrap;
    word-break:break-all;
    overflow-wrap:anywhere;

    overflow:hidden;
}
.product-description {
    display: block;
    margin-top: 5px;
    color: #667085;
}

.product-action-buttons {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.btn.danger-outline {
    border-color: #f2b8b5;
    color: #d92d20;
    background: #fff;
}

.btn.danger-outline:hover {
    background: #fff1f0;
}

.product-modal[hidden] {
    display: none;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 27, 52, .55);
}

.product-modal-dialog {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 26px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 25px 80px rgba(13, 27, 52, .25);
}

.product-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.product-modal-head h2 {
    margin: 0;
}

.product-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #eef2f7;
    font-size: 24px;
    cursor: pointer;
}

.product-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.product-admin-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.product-admin-table th,
.product-admin-table td {
    padding: 18px 14px;
    vertical-align: middle;
    overflow: hidden;
}

.product-admin-table th:nth-child(1),
.product-admin-table td:nth-child(1) {
    width: 28%;
}

.product-admin-table th:nth-child(2),
.product-admin-table td:nth-child(2) {
    width: 9%;
}

.product-admin-table th:nth-child(3),
.product-admin-table td:nth-child(3) {
    width: 13%;
}

.product-admin-table th:nth-child(4),
.product-admin-table td:nth-child(4) {
    width: 23%;
}

.product-admin-table th:nth-child(5),
.product-admin-table td:nth-child(5) {
    width: 11%;
}

.product-admin-table th:nth-child(6),
.product-admin-table td:nth-child(6) {
    width: 16%;
}

.product-name-cell {
    min-width: 0;
}

.product-name {
    display: block;
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
}

.product-description {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.product-code-cell,
.product-price-cell,
.product-status-cell {
    white-space: nowrap;
}

.product-spec-cell {
    white-space: normal;
    line-height: 1.6;
}

.product-action-buttons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
}

.product-action-buttons .btn,
.product-inline-form {
    width: 100%;
    margin: 0;
}

.product-inline-form .btn {
    width: 100%;
}
@media(max-width:900px){.nav nav{display:none}.hero-grid,.dash-layout{grid-template-columns:1fr}.feature-grid,.pricing-grid,.stats{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.feature-grid,.pricing-grid,.stats,.mini-grid,.footer-grid,.form-grid{grid-template-columns:1fr}.hero h1,.page-hero h1{font-size:38px}}
.nav-actions .btn{white-space:nowrap}
.dash-layout>.content{min-width:0}
.ip-pool-table{table-layout:fixed;width:100%}
.ip-pool-table td,.ip-pool-table th{overflow-wrap:anywhere;word-break:break-word}
.ip-pool-status-form{display:flex;flex-direction:column;gap:6px}
.ip-pool-status-form select,.ip-pool-status-form input,.ip-pool-status-form button{width:100%;box-sizing:border-box}
.pagination{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:20px}
.pagination .btn{height:38px;padding:0 14px;min-width:38px}
.pagination-ellipsis{padding:0 4px;color:var(--muted)}
#pwa-install-button[hidden],.pwa-ios-tip[hidden]{display:none!important}
.pwa-ios-tip{position:fixed;top:80px;right:16px;left:16px;max-width:320px;margin-left:auto;z-index:50;padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 16px 40px rgba(20,39,73,.16)}
.pwa-ios-tip p{margin:0 0 10px;font-size:14px;line-height:1.6;color:var(--text)}
.pwa-ios-tip button{height:34px;padding:0 14px;border-radius:9px;border:1px solid var(--line);background:#fff;font-weight:800;cursor:pointer}
@media(max-width:620px){
    .topbar{height:auto;min-height:74px}
    .nav-actions{max-width:60vw;overflow-x:auto;-webkit-overflow-scrolling:touch;gap:6px;scrollbar-width:none}
    .nav-actions::-webkit-scrollbar{display:none}
    .nav-actions .btn{height:36px;padding:0 12px;font-size:12px;border-radius:9px;flex:none}
    .brand img{height:28px!important;margin-right:8px!important}
}
