body {
    background: #f3f4f6;
}

.coupon-app {
    min-height: 100vh;
    font-family: Arial, "Noto Sans KR", sans-serif;
    color: #222;
}

/* 상단 헤더 */
.coupon-topbar {
    height: 58px;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    box-sizing: border-box;
}

.coupon-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.coupon-brand {
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    text-decoration: none;
}

.coupon-page-title {
    color: #d1d5db;
    font-size: 14px;
}

.coupon-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.coupon-login-user {
    color: #facc15;
    font-weight: 700;
}

.coupon-top-link {
    color: #e5e7eb;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 9px;
    border-radius: 6px;
}

.coupon-top-link:hover {
    background: rgba(255,255,255,0.12);
}

/* 전체 레이아웃 */
.coupon-layout {
    display: flex;
    min-height: calc(100vh - 58px);
}

/* 좌측 메뉴 */
.coupon-sidebar {
    width: 230px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 18px 14px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.coupon-menu-group {
    margin-bottom: 24px;
}

.coupon-menu-title {
    font-size: 12px;
    font-weight: 800;
    color: #6b7280;
    margin: 0 0 8px 8px;
}

.coupon-side-link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 4px;
}

.coupon-side-link:hover {
    background: #f3f4f6;
}

.coupon-side-link.active {
    background: #111827;
    color: #fff;
    font-weight: 700;
}

/* 우측 콘텐츠 */
.coupon-content {
    flex: 1;
    padding: 24px;
    box-sizing: border-box;
    max-width: 1280px;
}

.coupon-content-head {
    margin-bottom: 18px;
}

.coupon-content-head h1 {
    font-size: 26px;
    margin: 0 0 6px 0;
}

.coupon-content-head p {
    margin: 0;
    color: #6b7280;
}

/* 카드 */
.coupon-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.coupon-card h2 {
    font-size: 19px;
    margin: 0 0 10px 0;
}

.coupon-card p {
    line-height: 1.55;
}

/* 버튼 */
.coupon-btn {
    display: inline-block;
    padding: 9px 13px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 8px;
    color: #222;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.coupon-btn:hover {
    background: #f3f4f6;
}

.coupon-btn-primary {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.coupon-btn-primary:hover {
    background: #000;
}

/* 폼 */
.coupon-form-row {
    margin-bottom: 14px;
}

.coupon-form-row label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.coupon-form-row input,
.coupon-form-row textarea,
.coupon-form-row select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}

.coupon-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 13px;
}

/* 테이블 */
.coupon-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.coupon-table th,
.coupon-table td {
    border: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.coupon-table th {
    background: #f9fafb;
    font-weight: 700;
}

.coupon-table tbody tr:nth-child(even) {
    background: #fafafa;
}

/* 목록/대시보드 */
.coupon-page-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.coupon-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.coupon-number {
    font-size: 28px;
    font-weight: 800;
    margin: 8px 0 0;
}

.coupon-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

/* 쿠폰 이미지 */
.coupon-item {
    display: flex;
    gap: 16px;
}

.coupon-thumb {
    width: 160px;
    flex: 0 0 160px;
}

.coupon-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.coupon-item-body {
    flex: 1;
}

.coupon-condition {
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
}

/* 체크박스 */
.coupon-check-label {
    display: flex !important;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.5;
    font-weight: 400 !important;
}

.coupon-check-label input {
    width: auto !important;
    margin-top: 4px;
}

/* 가맹점 할인권 사용완료 표시 */
.discount-card {
    position: relative;
    overflow: hidden;
}

.discount-used {
    opacity: 0.55;
    background: #f5f5f5;
}

.discount-used::after {
    content: "";
    position: absolute;
    left: -20%;
    top: 50%;
    width: 140%;
    height: 3px;
    background: #333;
    transform: rotate(-12deg);
    opacity: 0.35;
}

.discount-used-mark {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 54px;
    height: 54px;
    border: 4px solid #c00;
    border-radius: 50%;
    color: #c00;
    font-size: 34px;
    font-weight: 900;
    line-height: 46px;
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    z-index: 2;
}

.discount-expired {
    opacity: 0.6;
    background: #fafafa;
}

.discount-status-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #ccc;
    background: #f5f5f5;
}

.status-issued {
    background: #eef9f0;
    border-color: #9ad3a3;
    color: #157a2f;
}

.status-used {
    background: #f3f3f3;
    border-color: #999;
    color: #333;
}

.status-expired {
    background: #fff1f1;
    border-color: #e0a0a0;
    color: #b00020;
}

/* 모바일 */
@media (max-width: 900px) {
    .coupon-topbar {
        height: auto;
        padding: 12px;
        align-items: flex-start;
        gap: 10px;
    }

    .coupon-topbar-left,
    .coupon-topbar-right {
        flex-wrap: wrap;
    }

    .coupon-layout {
        display: block;
    }

    .coupon-sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
        padding: 12px;
    }

    .coupon-menu-group {
        margin-bottom: 12px;
    }

    .coupon-side-link {
        display: inline-block;
        margin: 0 4px 6px 0;
    }

    .coupon-content {
        padding: 14px;
    }

    .coupon-grid,
    .coupon-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .coupon-page-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .coupon-item {
        flex-direction: column;
    }

    .coupon-thumb {
        width: 100%;
        flex: auto;
    }

    .coupon-thumb img {
        height: auto;
        max-height: 260px;
    }

    .coupon-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* QR 기반 가맹점 할인권 사용 화면 */
.discount-use-view {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.discount-use-view h2 {
    font-size: 22px;
    line-height: 1.35;
}

.discount-qr-section {
    text-align: center;
    margin: 18px 0;
}

.discount-qr-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    margin: 10px auto;
    min-width: 250px;
    min-height: 250px;
    box-sizing: border-box;
}

.discount-qr-box img,
.discount-qr-box canvas {
    display: block;
    max-width: 220px;
    max-height: 220px;
}

.discount-code-box {
    padding: 14px;
    background: #111827;
    color: #fff;
    border-radius: 10px;
    text-align: center;
    margin: 12px 0;
}

.discount-code-box strong {
    display: block;
    font-size: 13px;
    color: #d1d5db;
    margin-bottom: 6px;
}

.discount-code-box span {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
}

.discount-use-guide {
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .discount-use-view {
        max-width: none;
    }

    .discount-qr-box {
        min-width: 230px;
        min-height: 230px;
    }

    .discount-qr-box img,
    .discount-qr-box canvas {
        max-width: 200px;
        max-height: 200px;
    }

    .discount-code-box span {
        font-size: 22px;
    }
}


/* 가맹점 할인 QR 스캔 화면 */
.qr-scan-card {
    max-width: 720px;
}

.qr-reader-wrap {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    background: #111827;
    border-radius: 14px;
    overflow: hidden;
}

#qr-video {
    width: 100%;
    min-height: 320px;
    display: block;
    background: #111827;
}

.qr-scan-guide {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
}

.qr-scan-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    #qr-video {
        min-height: 260px;
    }

    .qr-scan-guide {
        width: calc(100% - 32px);
        text-align: center;
        white-space: normal;
    }
}

/* merchant issued coupon registration */
.coupon-thumb-placeholder {
    width: 100%;
    height: 100%;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #6b7280;
    font-weight: 800;
    text-align: center;
    padding: 12px;
}

.claim-qr-wrap {
    margin: 12px 0;
    display: flex;
    justify-content: center;
}

.claim-qr-box {
    width: 170px;
    min-height: 170px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.claim-url-text {
    font-size: 12px;
    color: #6b7280;
    word-break: break-all;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
}

/* 묶음 양도 협상 */
.bundle-toolbar {
    border: 1px solid #dbeafe;
    background: #f8fbff;
}

.bundle-toolbar.bottom {
    margin-top: 16px;
}

.coupon-select-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.coupon-select-line input {
    width: auto;
}

.coupon-radio-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 6px 0 8px;
}

.coupon-radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}

.coupon-radio-row input {
    width: auto;
}

.coupon-bundle-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.coupon-bundle-list.compact {
    grid-template-columns: 1fr;
}

.coupon-bundle-item {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.coupon-bundle-item strong,
.coupon-bundle-item span,
.coupon-bundle-item small {
    display: block;
}

.coupon-bundle-item span {
    margin-top: 4px;
    color: #64748b;
}

.coupon-bundle-item small {
    margin-top: 4px;
    color: #475569;
}

/* 직원 권한 관리 */
.coupon-btn-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.coupon-btn-danger:hover {
    background: #fecaca;
}

.coupon-staff-permission-form {
    display: grid;
    gap: 6px;
}

.coupon-staff-permission-form .coupon-btn {
    margin-top: 6px;
    width: fit-content;
}


/* 작업내역 */
.coupon-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coupon-history-item {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
}

.coupon-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.coupon-history-title {
    font-weight: 800;
    font-size: 16px;
    color: #111827;
}

.coupon-history-time {
    white-space: nowrap;
    font-size: 12px;
    color: #6b7280;
}

.coupon-history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.coupon-history-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12px;
    line-height: 1.2;
}

.coupon-history-detail {
    margin-top: 8px;
    color: #374151;
    font-size: 14px;
    line-height: 1.55;
}

.coupon-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
}

.coupon-filter-form .coupon-form-row {
    margin-bottom: 0;
    min-width: 180px;
    flex: 1;
}


/* 원 발행처 쿠폰 사용 QR */
.origin-coupon-qr-section {
    margin-top: 14px;
}

.origin-coupon-qr-box {
    margin-top: 8px;
}

/* 원 발행처 QR 사용확인 대기 잠금 */
.coupon-lock-notice {
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px solid #f0c36d;
    background: #fff8e5;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #6b4a00;
}

.coupon-row-pending,
.coupon-item-pending {
    position: relative;
    background: #fffdf5;
}

.coupon-row-pending td {
    background: #fffdf5;
}

/* 사용확인 중 쿠폰 현황 */
.coupon-pending-summary {
    border-color: #f0c36d;
    background: #fffdf5;
}

.coupon-inline-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}


/* 이용안내 화면 */
.coupon-guide-intro {
    border-left: 4px solid #2563eb;
}

.coupon-guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.coupon-guide-step {
    position: relative;
    padding-top: 44px;
}

.coupon-step-no {
    position: absolute;
    top: 16px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.coupon-guide-mini {
    background: #f8fafc;
}

.coupon-table-wrap {
    overflow-x: auto;
}

.coupon-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.coupon-table th,
.coupon-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.coupon-table th {
    background: #f3f4f6;
    font-weight: 700;
}

/* 관리자 전체 현황판 */
.coupon-admin-overview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.coupon-admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.coupon-stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    box-sizing: border-box;
}

.coupon-stat-card.coupon-stat-warning {
    border-color: #f0c36d;
    background: #fffdf5;
}

.coupon-stat-label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.coupon-stat-value {
    display: block;
    color: #111827;
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 8px;
}

.coupon-stat-help {
    display: block;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

.coupon-admin-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.coupon-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.coupon-section-head h2 {
    margin-bottom: 0;
}

.coupon-badge-warning {
    background: #fff8e5;
    border-color: #f0c36d;
    color: #7a5200;
}

@media (max-width: 1100px) {
    .coupon-admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .coupon-admin-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .coupon-admin-overview-head,
    .coupon-section-head {
        flex-direction: column;
    }

    .coupon-admin-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* 약관/정책 문서 */
.coupon-policy-card {
    line-height: 1.75;
}

.coupon-policy-card h2 {
    margin-bottom: 10px;
}

.coupon-policy-card p {
    margin: 8px 0;
    color: #374151;
}

.coupon-policy-card ol,
.coupon-policy-card ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.coupon-policy-card li {
    margin: 6px 0;
    color: #374151;
}

.coupon-policy-date {
    color: #6b7280 !important;
    font-size: 13px;
    font-weight: 700;
}

.coupon-policy-emphasis {
    border-color: #f0c36d;
    background: #fffdf5;
}

.coupon-policy-footer {
    margin-top: 28px;
    padding: 18px 0 4px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #9ca3af;
    font-size: 13px;
}

.coupon-policy-footer a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 700;
}

.coupon-policy-footer a:hover {
    color: #111827;
    text-decoration: underline;
}

.coupon-agreement-box {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 12px;
}

.coupon-check-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 800;
    color: #111827;
}

.coupon-check-line input[type="checkbox"] {
    margin-top: 4px;
}

.coupon-policy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.coupon-btn-light {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
}

.coupon-btn-light:hover {
    background: #f3f4f6;
}

/* 관리자 가맹점 상태 배지 */
.coupon-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f8fafc;
    color: #334155;
    white-space: nowrap;
}

.coupon-status-pending,
.coupon-status-review,
.coupon-status-requested {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.coupon-status-active {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.coupon-status-suspended {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.coupon-status-rejected {
    background: #f8fafc;
    color: #64748b;
    border-color: #cbd5e1;
}

.coupon-status-terminated,
.coupon-status-inactive {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.coupon-btn-danger {
    background: #991b1b !important;
    color: #fff !important;
    border-color: #991b1b !important;
}

/* 관리자 가맹점 업종 변경 */
.coupon-category-form {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 170px;
}

.coupon-category-input {
    width: 110px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
}

.coupon-category-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.coupon-btn-mini {
    padding: 7px 9px !important;
    font-size: 12px !important;
    line-height: 1.2;
    white-space: nowrap;
}

.coupon-muted {
    display: inline-block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 768px) {
    .coupon-category-form {
        min-width: 150px;
    }

    .coupon-category-input {
        width: 100px;
    }
}

/* 참여 가맹점 상세 소개 */
.merchant-view-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    background: linear-gradient(135deg, #111827, #374151);
    color: #fff;
    border: 0;
}

.merchant-view-title h2 {
    margin: 8px 0 10px;
    font-size: 30px;
    letter-spacing: -0.5px;
}

.merchant-view-title p {
    margin: 0;
    max-width: 680px;
    color: #e5e7eb;
    line-height: 1.7;
}

.merchant-view-category {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.merchant-view-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 260px;
}

.merchant-view-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.merchant-view-grid .coupon-card {
    margin-bottom: 0;
}

.merchant-view-steps {
    margin: 0;
    padding-left: 20px;
    color: #374151;
    line-height: 1.7;
}

.merchant-view-description {
    line-height: 1.8;
    color: #374151;
}

.merchant-view-coupon-card h2 {
    margin-bottom: 12px;
}

.merchant-view-notice {
    background: #fff7ed;
    border-color: #fed7aa;
}

@media (max-width: 768px) {
    .merchant-view-hero {
        display: block;
    }

    .merchant-view-title h2 {
        font-size: 24px;
    }

    .merchant-view-actions {
        justify-content: flex-start;
        min-width: 0;
        margin-top: 16px;
    }

    .merchant-view-grid {
        grid-template-columns: 1fr;
    }
}

/* 가맹점 광고/소개 페이지 */
.merchant-ad-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 24px;
    align-items: stretch;
    overflow: hidden;
}

.merchant-ad-hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.merchant-ad-hero-text h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
}

.merchant-ad-hero-text p {
    margin: 0;
    line-height: 1.7;
}

.merchant-ad-hero-media {
    min-height: 260px;
    border-radius: 22px;
    overflow: hidden;
    background: #f3f4f6;
}

.merchant-ad-hero-media img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    display: block;
}

.merchant-ad-no-image,
.merchant-product-no-image,
.coupon-product-empty-image {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    color: #64748b;
    text-align: center;
    border-radius: 18px;
}

.merchant-ad-no-image {
    height: 100%;
    min-height: 260px;
}

.merchant-ad-no-image strong {
    color: #111827;
    font-size: 20px;
}

.merchant-ad-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.merchant-ad-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.merchant-ad-info-card p,
.merchant-ad-location-card p {
    line-height: 1.65;
}

.merchant-ad-rich-text {
    line-height: 1.75;
    color: #374151;
    white-space: normal;
}

.merchant-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.merchant-product-card {
    overflow: hidden;
    padding: 0;
}

.merchant-product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.merchant-product-card .merchant-product-no-image {
    border-radius: 0;
    height: 180px;
}

.merchant-product-body {
    padding: 18px;
}

.merchant-product-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.merchant-product-body p {
    line-height: 1.6;
}

.merchant-product-price {
    font-weight: 700;
    color: #2563eb;
}

.no-margin {
    margin-bottom: 0;
}

/* 가맹점 소개 관리 */
.coupon-form-card h2 {
    margin-top: 0;
}

.coupon-form-grid-2,
.coupon-form-grid-3 {
    display: grid;
    gap: 14px;
}

.coupon-form-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.coupon-form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.coupon-form-row-button {
    justify-content: flex-end;
}

.coupon-image-preview-wrap {
    margin-bottom: 10px;
}

.coupon-image-preview {
    max-width: 320px;
    max-height: 180px;
    border-radius: 16px;
    display: block;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    margin-bottom: 8px;
}

.coupon-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
}

.coupon-product-form {
    margin-top: 12px;
}

.coupon-product-edit-card {
    display: block;
}

.coupon-product-edit-grid {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.coupon-product-edit-image {
    width: 180px;
    height: 140px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    margin-bottom: 8px;
    border: 1px solid #e5e7eb;
}

.coupon-product-empty-image {
    width: 180px;
    height: 140px;
    min-height: 140px;
    margin-bottom: 8px;
}

.coupon-code-box {
    background: #0f172a;
    color: #e5e7eb;
    padding: 14px;
    border-radius: 12px;
    overflow-x: auto;
}

.coupon-btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.coupon-btn-danger:hover {
    background: #fecaca;
}

.coupon-btn-xs {
    padding: 6px 10px;
    font-size: 12px;
}

.coupon-table-actions {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .merchant-ad-hero,
    .merchant-ad-section-grid,
    .merchant-product-grid,
    .coupon-form-grid-2,
    .coupon-form-grid-3,
    .coupon-product-edit-grid {
        grid-template-columns: 1fr;
    }

    .merchant-ad-hero-media,
    .merchant-ad-hero-media img,
    .merchant-ad-no-image {
        min-height: 210px;
    }

    .coupon-product-edit-image,
    .coupon-product-empty-image {
        width: 100%;
        height: 180px;
    }
}

/* 판매 물품/서비스 저장 안내 */
.coupon-success-box {
    border: 1px solid #b7ebc6;
    background: #f2fff6;
}
.coupon-success-box strong {
    display: block;
    margin-bottom: 6px;
    color: #137333;
}
.coupon-success-box p {
    margin: 0 0 12px;
    color: #335;
}


/* 할인권 사용 한도 노출 */
.coupon-usage-limit {
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #7c2d12;
    border-radius: 12px;
    line-height: 1.55;
}

.coupon-usage-limit strong {
    color: #9a3412;
}

.coupon-usage-limit-options {
    gap: 8px 14px;
}

.coupon-usage-limit-field input[type="text"] {
    margin-top: 8px;
}

/* 가맹점 발행한도/운영보증금 관리 */
.coupon-issue-control-card {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
}

.coupon-issue-control-card h2 {
    color: #1d4ed8;
}

.coupon-issue-policy-cell {
    min-width: 260px;
    vertical-align: top;
}

.coupon-issue-policy-summary {
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    line-height: 1.5;
}

.coupon-issue-policy-form {
    display: grid;
    grid-template-columns: 82px minmax(110px, 1fr);
    gap: 6px 8px;
    align-items: center;
}

.coupon-issue-policy-form label {
    font-size: 12px;
    color: #475569;
}

.coupon-issue-policy-form input[type="number"],
.coupon-issue-policy-form input[type="text"] {
    width: 100%;
    min-height: 30px;
    padding: 5px 7px;
    font-size: 12px;
}

.coupon-issue-policy-form input[name="issue_policy_note"] {
    grid-column: 1 / -1;
}

.coupon-issue-policy-form button {
    grid-column: 1 / -1;
    width: 100%;
}

@media (max-width: 900px) {
    .coupon-issue-policy-form {
        grid-template-columns: 1fr;
    }
}

.coupon-wallet-scope-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 700;
}


/* 쿠폰 통합 관리 */
.coupon-overview-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border: 1px solid #c7d2fe;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
}

.coupon-overview-entry h2,
.coupon-overview-head h2 {
    margin-bottom: 6px;
}

.coupon-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.coupon-limit-overview-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.coupon-limit-percent {
    min-width: 86px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
}

.coupon-progress-wrap {
    width: 100%;
    height: 14px;
    margin: 14px 0 10px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
}

.coupon-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: #2563eb;
}

.coupon-limit-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.coupon-limit-breakdown span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 700;
}

.coupon-overview-kpi-grid .coupon-kpi-card {
    min-height: 190px;
}

.coupon-kpi-alert {
    border-color: #fecaca;
    background: #fff7f7;
}

.coupon-kpi-warning {
    border-color: #fed7aa;
    background: #fff7ed;
}

.coupon-status-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.coupon-status-summary-grid > div {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #f8fafc;
}

.coupon-status-summary-grid h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.coupon-status-summary-grid p {
    margin: 5px 0;
    color: #334155;
}

.coupon-section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.coupon-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.coupon-overview-table th,
.coupon-overview-table td {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .coupon-overview-entry,
    .coupon-limit-overview-top,
    .coupon-section-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .coupon-page-actions {
        justify-content: flex-start;
    }

    .coupon-status-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* 관리자 쿠폰 관제 */
.coupon-admin-control-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.coupon-admin-control-head h2 {
    margin-bottom: 6px;
}

.coupon-alert-text {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-weight: 700;
}

.coupon-control-limit-card {
    border-color: #bfdbfe;
}

.coupon-progress-warning {
    background: #f59e0b;
}

.coupon-progress-danger {
    background: #dc2626;
}

.coupon-risk-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid transparent;
    white-space: nowrap;
}

.coupon-risk-over {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.coupon-risk-danger {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.coupon-risk-warning {
    background: #fefce8;
    border-color: #fde68a;
    color: #854d0e;
}

.coupon-risk-nolimit {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.coupon-risk-normal {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.coupon-mini-progress {
    width: 92px;
    height: 8px;
    margin-top: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.coupon-mini-progress span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #2563eb;
}

.coupon-control-risk-over .coupon-mini-progress span {
    background: #dc2626;
}

.coupon-control-risk-danger .coupon-mini-progress span {
    background: #f97316;
}

.coupon-control-risk-warning .coupon-mini-progress span {
    background: #eab308;
}

.coupon-control-risk-row td {
    vertical-align: middle;
}

.coupon-control-table small {
    line-height: 1.55;
}

@media (max-width: 900px) {
    .coupon-admin-control-head {
        flex-direction: column;
        align-items: stretch;
    }
}


/* 보증금/예탁금 입출금 관리 */
.coupon-deposit-layout {
    align-items: flex-start;
}

.coupon-deposit-form {
    display: grid;
    gap: 10px;
}

.coupon-deposit-form label,
.coupon-inline-filter label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.coupon-deposit-form input,
.coupon-deposit-form select,
.coupon-inline-filter select {
    width: 100%;
    min-height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.coupon-deposit-balance-wrap {
    max-height: 430px;
    overflow: auto;
}

.coupon-deposit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.coupon-deposit-plus {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.coupon-deposit-minus {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.coupon-deposit-manage-link {
    margin-top: 6px;
}

.coupon-inline-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .coupon-inline-filter {
        width: 100%;
        align-items: stretch;
    }

    .coupon-inline-filter select,
    .coupon-inline-filter .coupon-btn {
        width: 100%;
    }
}

/* 쿠폰 이력 상세 조회 */
.coupon-history-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.coupon-history-search-form {
    display: grid;
    grid-template-columns: 1.5fr 0.9fr 1fr 1.2fr auto;
    gap: 12px;
    align-items: end;
}

.coupon-history-search-form .coupon-form-row {
    margin-bottom: 0;
}

.coupon-history-direct-inputs {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 8px;
}

.coupon-history-current-detail .coupon-table th,
.coupon-history-meta-table th {
    width: 180px;
    background: #f9fafb;
    color: #374151;
}

.coupon-history-meta-table td {
    background: #fff;
}

.coupon-history-link-badge {
    text-decoration: none;
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.coupon-history-link-badge:hover {
    background: #e0e7ff;
}

.coupon-timeline {
    position: relative;
    margin-top: 14px;
    padding-left: 22px;
}

.coupon-timeline::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 2px;
    height: calc(100% - 8px);
    background: #e5e7eb;
}

.coupon-timeline-item {
    position: relative;
    margin-bottom: 14px;
}

.coupon-timeline-dot {
    position: absolute;
    top: 9px;
    left: -21px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #111827;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #d1d5db;
}

.coupon-timeline-body {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 14px;
}

.coupon-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.coupon-timeline-head span {
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap;
}

.coupon-timeline-meta {
    margin-bottom: 8px;
}

.coupon-empty-box {
    border: 1px dashed #d1d5db;
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px;
    color: #6b7280;
}

.coupon-history-detail-table small,
.coupon-history-search-table small {
    color: #6b7280;
}

@media (max-width: 1100px) {
    .coupon-history-search-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .coupon-history-detail-head {
        flex-direction: column;
    }

    .coupon-history-search-form {
        grid-template-columns: 1fr;
    }

    .coupon-history-direct-inputs {
        grid-template-columns: 1fr;
    }

    .coupon-timeline-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 알림함 */
.coupon-notice-top-link {
    font-weight: 700;
}

.coupon-notification-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.coupon-action-group,
.coupon-notification-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.coupon-inline-form {
    display: inline-block;
    margin: 0;
}

.coupon-notification-list {
    display: grid;
    gap: 12px;
}

.coupon-notification-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-left: 5px solid #d1d5db;
}

.coupon-notification-item.severity-info {
    border-left-color: #3b82f6;
}

.coupon-notification-item.severity-success {
    border-left-color: #10b981;
}

.coupon-notification-item.severity-warning {
    border-left-color: #f59e0b;
}

.coupon-notification-item.severity-danger {
    border-left-color: #ef4444;
}

.coupon-notification-item.is-read {
    opacity: 0.72;
}

.coupon-notification-main {
    flex: 1;
    min-width: 0;
}

.coupon-notification-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}

.coupon-notification-badge,
.coupon-notification-category,
.coupon-notification-unread {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.coupon-notification-badge.severity-info {
    color: #1d4ed8;
    background: #dbeafe;
}

.coupon-notification-badge.severity-success {
    color: #047857;
    background: #d1fae5;
}

.coupon-notification-badge.severity-warning {
    color: #92400e;
    background: #fef3c7;
}

.coupon-notification-badge.severity-danger {
    color: #991b1b;
    background: #fee2e2;
}

.coupon-notification-category {
    color: #374151;
    background: #f3f4f6;
}

.coupon-notification-unread {
    color: #ffffff;
    background: #ef4444;
}

@media (max-width: 768px) {
    .coupon-notification-summary,
    .coupon-notification-item {
        flex-direction: column;
    }

    .coupon-notification-actions {
        width: 100%;
    }
}

/* 알림 자동점검/cron 관리 */
.coupon-alert-success {
    border-color: #b7e4c7;
    background: #f1fff6;
}

.coupon-alert-warning {
    border-color: #ffe08a;
    background: #fff9e6;
}

.coupon-alert-danger {
    border-color: #f5b5b5;
    background: #fff2f2;
}

.coupon-code-block {
    white-space: pre-wrap;
    word-break: break-all;
    background: #111827;
    color: #f9fafb;
    padding: 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
}


/* 좌측 메뉴 아코디언 */
.coupon-menu-dropdown {
    margin: 0 0 8px 0;
}

.coupon-menu-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.coupon-menu-summary::-webkit-details-marker {
    display: none;
}

.coupon-menu-dropdown[open] > .coupon-menu-summary {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.coupon-menu-summary:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.coupon-menu-dropdown[open] > .coupon-menu-summary:hover {
    background: #111827;
    border-color: #111827;
}

.coupon-menu-arrow {
    font-size: 11px;
    transition: transform 0.15s ease;
}

.coupon-menu-dropdown[open] .coupon-menu-arrow {
    transform: rotate(180deg);
}

.coupon-menu-dropdown-body {
    padding: 7px 0 4px 8px;
}

.coupon-menu-dropdown-body .coupon-side-link {
    margin: 3px 0;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 13px;
}

.coupon-menu-dropdown-body .coupon-side-link.active {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
    box-shadow: inset 3px 0 0 #2563eb;
}

@media (max-width: 900px) {
    .coupon-menu-dropdown {
        display: inline-block;
        min-width: 190px;
        vertical-align: top;
        margin: 0 8px 10px 0;
    }

    .coupon-menu-dropdown-body .coupon-side-link {
        display: block;
        margin: 4px 0;
    }
}

