body {
            margin: 0;
            min-height: 100vh;
            font-family: Arial, sans-serif;
            background-image: url("./images/landing.jpg");
            background-size: 100% auto;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
        }

        .hide { display: none !important; }

        .admin-menu-btn {
            position: fixed;
            top: 28px;
            right: 38px;
            z-index: 1000;
            width: 46px;
            height: 46px;
            border: none;
            background: rgba(255,255,255,0.15);
            color: #111;
            font-size: 28px;
            cursor: pointer;
            border-radius: 50%;
            backdrop-filter: blur(6px);
        }

        .login-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.25);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .login-box {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 260px;
            padding: 24px;
            background: rgba(255,255,255,0.96);
            border-radius: 16px;
            text-align: center;
            box-shadow: 0 10px 35px rgba(0,0,0,0.25);
        }

        .login-box h3 { margin-top: 0; letter-spacing: 1px; }

        .login-box input {
            width: 100%;
            padding: 11px;
            margin-top: 10px;
            border: 1px solid #ddd;
            border-radius: 8px;
            box-sizing: border-box;
        }

        .login-box button {
            width: 100%;
            margin-top: 10px;
            padding: 11px;
            background: #111;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .login-close { background: #888 !important; }

        .logout-btn {
            position: fixed;
            top: 16px;
            right: 16px;
            width: 86px;
            height: 38px;
            background: #c0392b;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 12px;
            cursor: pointer;
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
            z-index: 1200;
        }

        .admin-layout { display: flex; min-height: 100vh; }

        .sidebar {
            position: fixed;
            left: 0;
            top: 0;
            width: 220px;
            height: 100vh;
            background: #082b63;
            color: white;
            padding: 24px 16px;
            z-index: 900;
            box-sizing: border-box;
            box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        }

        .sidebar-title {
            font-size: 22px;
            font-weight: 900;
            line-height: 1.25;
            margin-bottom: 32px;
            letter-spacing: -0.5px;
        }

        .sidebar-subtitle {
            font-size: 12px;
            opacity: 0.75;
            margin-top: 6px;
        }

        .side-menu {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .side-menu button {
            width: 100%;
            background: transparent;
            color: white;
            text-align: left;
            border: none;
            border-radius: 10px;
            padding: 14px 12px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
        }

        .side-menu button:hover,
        .side-menu button.active {
            background: rgba(255,255,255,0.18);
        }

        .sidebar-footer {
            position: absolute;
            bottom: 24px;
            left: 16px;
            right: 16px;
            font-size: 11px;
            opacity: 0.7;
            line-height: 1.5;
        }

        .admin-content {
            margin-left: 220px;
            width: calc(100% - 220px);
            min-height: 100vh;
            padding: 40px;
            box-sizing: border-box;
        }

        .admin-section { display: none; }
        .admin-section.active { display: block; }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 22px;
        }

        .section-header h1 {
            margin: 0;
            font-size: 28px;
            letter-spacing: -1px;
        }

        .section-desc {
            color: #666;
            font-size: 14px;
            margin-top: 6px;
        }

        .quick-links {
            position: fixed;
            top: 16px;
            right: 116px;
            display: flex;
            gap: 6px;
            z-index: 1100;
        }

        .quick-links a {
            display: inline-block;
            padding: 8px 12px;
            font-size: 12px;
            font-weight: 700;
            background: rgba(0,0,0,0.85);
            color: white;
            border-radius: 8px;
            text-decoration: none;
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
        }

        .upload-toggle-btn,
        .control-toggle-btn,
        .card-btn {
            position: fixed;
            right: 18px;
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: none;
            background: #111;
            color: white;
            cursor: pointer;
            font-size: 16px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.2);
            z-index: 1100;
        }

        .upload-toggle-btn { top: 72px; }
        .control-toggle-btn { top: 126px; }
        .card-btn { top: 180px; }

        .upload-box {
            position: fixed;
            top: 126px;
            right: 74px;
            width: 190px;
            background: rgba(255,255,255,0.95);
            border-radius: 12px;
            padding: 12px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.18);
            font-size: 12px;
            z-index: 1100;
        }

        .upload-title {
            font-weight: bold;
            font-size: 13px;
            margin-bottom: 8px;
            text-align: center;
        }

        .upload-box input {
            width: 100%;
            font-size: 11px;
            margin-bottom: 8px;
        }

        .upload-box button,
        .download-btn {
            width: 100%;
            display: block;
            box-sizing: border-box;
            padding: 8px;
            margin-top: 6px;
            font-size: 12px;
            text-align: center;
            background: #111;
            color: white;
            border: none;
            border-radius: 7px;
            cursor: pointer;
            text-decoration: none;
        }

        .download-btn { background: #333; }

        .card-popup {
            position: fixed;
            top: 180px;
            right: 74px;
            width: 380px;
            background: rgba(255,255,255,0.97);
            border-radius: 14px;
            padding: 12px;
            box-shadow: 0 5px 25px rgba(0,0,0,0.25);
            z-index: 1100;
        }

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

        .card-close {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            border: none;
            background: #222;
            color: white;
            cursor: pointer;
        }

        .card-image { width: 100%; border-radius: 10px; }

        .board {
            width: 100%;
            margin: 0 auto 30px;
            padding: 24px;
            background: rgba(255,255,255,0.94);
            border-radius: 16px;
            box-shadow: 0 5px 22px rgba(0,0,0,0.18);
            box-sizing: border-box;
        }

        input, textarea, select { box-sizing: border-box; }

        input, textarea {
            width: 100%;
            padding: 12px;
            margin: 5px 0;
            border: 1px solid #ddd;
            border-radius: 8px;
        }

        #title { height: 45px; }

        #content {
            height: 160px;
            resize: none;
            white-space: pre-wrap;
        }

        .board > button,
        .detail-box button {
            width: 100%;
            padding: 12px;
            background: #111;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
        }

        .detail-box {
            margin-top: 15px;
            padding: 15px;
            border: 1px solid #ddd;
            border-radius: 8px;
            background: #fff;
        }

        .post-item {
            padding: 12px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
        }

        .post-item:hover { background: #f5f5f5; }

        button.delete {
            background: #c0392b !important;
            margin-top: 8px;
        }

        #d-content {
            width: 100%;
            height: 400px;
            font-size: 16px;
            resize: vertical;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid #ddd;
            line-height: 1.6;
        }

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

        .kpi-card {
            background: rgba(255,255,255,0.95);
            border-radius: 16px;
            padding: 18px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.12);
        }

        .kpi-label {
            font-size: 13px;
            color: #082b63;
            font-weight: 800;
            margin-bottom: 10px;
        }

        .kpi-value {
            font-size: 26px;
            font-weight: 900;
        }

        .kpi-note {
            margin-top: 8px;
            font-size: 11px;
            color: #777;
        }

        .daily-briefing {
            width: 100%;
            margin: 0 auto 20px;
            padding: 22px;
            background: #ffffff;
            border: 1px solid rgba(15, 23, 42, 0.08);
            border-radius: 16px;
            box-shadow: 0 5px 22px rgba(0,0,0,0.12);
            box-sizing: border-box;
        }

        .briefing-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            margin-bottom: 16px;
        }

        .briefing-head h2 {
            margin: 3px 0 0;
            font-size: 21px;
            color: #111827;
        }

        .briefing-kicker,
        .briefing-label {
            display: block;
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.08em;
            color: #2563eb;
        }

        .briefing-head button {
            width: auto;
            min-width: 92px;
            padding: 10px 14px;
            border: 0;
            border-radius: 8px;
            background: #111827;
            color: #fff;
            font-weight: 800;
            cursor: pointer;
        }

        .briefing-grid {
            display: grid;
            grid-template-columns: 1.1fr 0.9fr 0.9fr 1.4fr;
            gap: 12px;
        }

        .briefing-card {
            min-height: 132px;
            padding: 16px;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            background: #f8fafc;
            box-sizing: border-box;
        }

        .briefing-card strong {
            display: block;
            margin-top: 12px;
            font-size: 27px;
            line-height: 1.1;
            color: #111827;
        }

        .briefing-card p {
            margin: 9px 0 0;
            font-size: 13px;
            line-height: 1.45;
            color: #374151;
        }

        .briefing-card small {
            display: block;
            margin-top: 10px;
            font-size: 11px;
            color: #6b7280;
        }

        .briefing-summary {
            background: #111827;
            border-color: #111827;
        }

        .briefing-summary .briefing-label,
        .briefing-summary p,
        .briefing-summary small {
            color: #fff;
        }

        .admin-market-bar {
            position: sticky;
            top: 0;
            z-index: 40;
            display: grid;
            grid-template-columns: minmax(220px, 0.85fr) minmax(0, 2.4fr);
            gap: 14px;
            align-items: stretch;
            margin: -12px 0 26px;
            padding: 14px;
            background: rgba(12, 18, 32, 0.92);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 14px;
            box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
            backdrop-filter: blur(14px);
            box-sizing: border-box;
        }

        .market-bar-main {
            display: grid;
            gap: 8px;
            align-content: center;
            min-width: 0;
            padding: 4px 4px 4px 6px;
        }

        .market-kicker {
            display: block;
            margin-bottom: 4px;
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.14em;
            color: #93c5fd;
        }

        .market-bar-main strong {
            display: block;
            font-size: 18px;
            line-height: 1.15;
            color: #fff;
        }

        .market-bar-main p {
            margin: 0;
            font-size: 12px;
            line-height: 1.45;
            color: #d1d5db;
        }

        .market-ticker-row {
            display: grid;
            grid-template-columns: 120px 124px 142px minmax(360px, 1fr) 86px;
            gap: 8px;
            align-items: stretch;
            min-width: 0;
        }

        .market-pill,
        .market-mini-card {
            min-width: 0;
            padding: 10px 11px;
            border: 1px solid rgba(255,255,255,0.09);
            border-radius: 10px;
            background: rgba(255,255,255,0.07);
            box-sizing: border-box;
        }

        .market-label,
        .market-mini-card span {
            display: block;
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0.08em;
            color: #9ca3af;
            text-transform: uppercase;
        }

        .market-pill b,
        .market-mini-card b {
            display: block;
            margin-top: 5px;
            font-size: 16px;
            line-height: 1.15;
            color: #fff;
            white-space: nowrap;
        }

        .market-pill small,
        .market-mini-card small {
            display: block;
            margin-top: 4px;
            overflow: hidden;
            color: #cbd5e1;
            font-size: 11px;
            line-height: 1.25;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .market-watchlist {
            display: grid;
            grid-template-columns: repeat(4, minmax(118px, 1fr));
            gap: 8px;
            min-width: 0;
        }

        .market-mini-card {
            display: grid;
            grid-template-columns: minmax(0, 1fr) 58px;
            gap: 8px;
            align-items: center;
        }

        .market-mini-card.up small { color: #86efac; }
        .market-mini-card.down small { color: #fca5a5; }

        .sparkline {
            width: 58px;
            height: 28px;
            overflow: visible;
        }

        .sparkline polyline {
            fill: none;
            stroke: #86efac;
            stroke-width: 2.2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .market-mini-card.down .sparkline polyline {
            stroke: #fca5a5;
        }

        .market-mini-card.loading {
            display: flex;
            align-items: center;
            justify-content: center;
            color: #cbd5e1;
            font-size: 12px;
        }

        .market-refresh {
            width: 100%;
            min-height: 100%;
            padding: 0 10px;
            border: 0;
            border-radius: 10px;
            background: #2563eb;
            color: #fff;
            font-size: 12px;
            font-weight: 900;
            cursor: pointer;
        }

        .market-updated {
            position: absolute;
            right: 16px;
            bottom: -18px;
            color: #6b7280;
            font-size: 10px;
        }

        .market-hidden-meta {
            display: none;
        }

        .control-card {
            display: flex;
            gap: 24px;
            align-items: flex-start;
            margin-top: 20px;
            padding: 22px;
            background: rgba(255,255,255,0.96);
            border-radius: 18px;
            box-shadow: 0 8px 25px rgba(0,0,0,0.12);
        }

        .product-image-box {
            width: 220px;
            height: 220px;
            border-radius: 16px;
            overflow: hidden;
            background: #f5f5f5;
            border: 1px solid #eee;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .product-image-box img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .product-info-box { flex: 1; }

        .product-title {
            font-size: 24px;
            font-weight: 900;
            margin-bottom: 16px;
            line-height: 1.35;
        }

        .product-meta {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }

        .meta-item {
            padding: 14px;
            background: #f7f7f7;
            border-radius: 12px;
            font-size: 14px;
        }

        .meta-label {
            color: #777;
            font-size: 12px;
            margin-bottom: 5px;
        }

        .meta-value {
            font-weight: 800;
            font-size: 16px;
        }

        .option-card {
            margin-top: 16px;
            padding: 18px;
            background: #fff;
            border-radius: 14px;
            border: 1px solid #e5e5e5;
            box-shadow: 0 4px 14px rgba(0,0,0,0.08);
        }

        .option-title {
            font-size: 18px;
            font-weight: 900;
            margin-bottom: 12px;
        }

        .option-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        .option-cell {
            background: #f8f8f8;
            border-radius: 10px;
            padding: 12px;
        }

        .option-cell span {
            display: block;
            font-size: 12px;
            color: #777;
            margin-bottom: 4px;
        }

        .option-cell b { font-size: 15px; }

        #productSelect {
            width: 100%;
            height: 44px;
            margin-top: 12px;
            margin-bottom: 14px;
            border-radius: 10px;
            border: 1px solid #ccc;
            padding: 0 12px;
            font-size: 14px;
        }

        #calendar {
            background: white;
            padding: 22px;
            border-radius: 16px;
            box-shadow: 0 5px 22px rgba(0,0,0,0.18);
        }

        @media (max-width: 1100px) {
            .kpi-grid { grid-template-columns: repeat(2, 1fr); }
            .option-grid { grid-template-columns: repeat(2, 1fr); }
            .control-card { flex-direction: column; }
            .product-image-box { width: 100%; height: 280px; }
        }
.budget-edit-btn {
    padding: 6px 10px;
    background: #082b63;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 4px;
}

.budget-delete-btn {
    padding: 6px 10px;
    background: #c0392b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

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

.budget-summary-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.10);
}

.budget-summary-card span {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 700;
}

.budget-summary-card b {
    font-size: 24px;
    font-weight: 900;
}

.budget-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.budget-form-grid input,
.budget-form-grid select {
    width: 100%;
    height: 42px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.budget-wide {
    grid-column: span 2;
}

.budget-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.budget-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #111;
    color: white;
    cursor: pointer;
}

.budget-table-top-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px;
    margin-bottom: 6px;
}

.budget-table-top-scroll-inner {
    height: 1px;
}

.budget-table-wrap {
    margin-top: 10px;
    overflow-x: auto;
}

.budget-table {
    min-width: 1300px;
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 13px;
    table-layout: fixed;
}

.budget-table th,
.budget-table td {
    border-bottom: 1px solid #eee;
    padding: 10px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.budget-table th {
    background: #082b63;
    color: white;
}

.budget-table th:nth-child(1),
.budget-table td:nth-child(1) { width: 90px; }

.budget-table th:nth-child(2),
.budget-table td:nth-child(2),
.budget-table th:nth-child(3),
.budget-table td:nth-child(3) { width: 100px; }

.budget-table th:nth-child(4),
.budget-table td:nth-child(4) { width: 220px; }

.budget-table th:nth-child(5),
.budget-table td:nth-child(5),
.budget-table th:nth-child(6),
.budget-table td:nth-child(6) { width: 100px; }

.budget-table th:nth-child(7),
.budget-table td:nth-child(7),
.budget-table th:nth-child(8),
.budget-table td:nth-child(8) { width: 100px; }

.budget-table th:nth-child(9),
.budget-table td:nth-child(9) { width: 60px; }

.budget-table th:nth-child(10),
.budget-table td:nth-child(10) { width: 110px; }

.budget-table th:nth-child(11),
.budget-table td:nth-child(11) {
    width: 180px;
    max-width: 180px;
}

.budget-table th:nth-child(12),
.budget-table td:nth-child(12) {
    width: 130px;
    min-width: 130px;
    text-align: center;
}

.budget-delete-btn {
    padding: 6px 10px;
    background: #c0392b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .budget-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .budget-wide {
        grid-column: span 2;
    }
}

.margin-table {
    min-width: 2300px;
    table-layout: auto;
}

.margin-table th,
.margin-table td {
    min-width: 120px;
}

.margin-table th:nth-child(1),
.margin-table td:nth-child(1) {
    min-width: 160px;
}

.margin-table th:nth-child(16),
.margin-table td:nth-child(16) {
    min-width: 140px;
    font-weight: 900;
    color: #c0392b;
}

.margin-table th:nth-child(17),
.margin-table td:nth-child(17) {
    min-width: 180px;
}

.margin-profit-cell {
    display: grid;
    gap: 9px;
    min-width: 190px;
}

.margin-profit-cell > b {
    color: #111827;
    font-size: 15px;
    letter-spacing: 0;
}

.margin-rate-cell {
    position: relative;
    overflow: hidden;
    padding: 10px 11px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.margin-rate-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
}

.margin-rate-top strong {
    color: #111827;
    font-size: 16px;
    line-height: 1;
}

.margin-rate-top span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.margin-rate-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.margin-rate-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease;
}

.margin-rate-cell small {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 800;
}

.margin-rate-cell.excellent {
    border-color: rgba(22, 163, 74, 0.24);
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

.margin-rate-cell.excellent .margin-rate-track i,
.margin-rate-cell.excellent .margin-rate-top span {
    background: #16a34a;
    color: #ffffff;
}

.margin-rate-cell.good {
    border-color: rgba(14, 165, 233, 0.26);
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.margin-rate-cell.good .margin-rate-track i,
.margin-rate-cell.good .margin-rate-top span {
    background: #0ea5e9;
    color: #ffffff;
}

.margin-rate-cell.watch {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%);
}

.margin-rate-cell.watch .margin-rate-track i,
.margin-rate-cell.watch .margin-rate-top span {
    background: #f59e0b;
    color: #111827;
}

.margin-rate-cell.danger {
    border-color: rgba(239, 68, 68, 0.26);
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

.margin-rate-cell.danger .margin-rate-track i,
.margin-rate-cell.danger .margin-rate-top span {
    background: #ef4444;
    color: #ffffff;
}

/* ===== Coupang rank tracker ===== */
.coupang-rank-hero {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(320px, 1.4fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: linear-gradient(135deg, #111827 0%, #0f2f5f 100%);
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.rank-hero-copy span {
    display: block;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.rank-hero-copy h2 {
    margin: 8px 0 8px;
    font-size: 24px;
    letter-spacing: 0;
}

.rank-hero-copy p {
    max-width: 620px;
    margin: 0;
    color: #dbeafe;
    line-height: 1.55;
}

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

.rank-summary-grid div {
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
}

.rank-summary-grid span {
    display: block;
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 800;
}

.rank-summary-grid b {
    display: block;
    margin-top: 8px;
    color: #ffffff;
    font-size: 19px;
    font-weight: 950;
}

.coupang-rank-board {
    border-top: 4px solid #0f2f5f;
}

.rank-market-board {
    display: grid;
    gap: 16px;
    border-top: 4px solid #0f766e;
}

.rank-market-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.rank-market-head span {
    display: block;
    color: #0f766e;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.08em;
}

.rank-market-head h2 {
    margin: 6px 0 6px;
    color: #111827;
}

.rank-market-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.rank-market-head button,
.rank-market-search button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 0 16px;
    background: #0f766e;
    color: #ffffff;
    font-weight: 950;
    cursor: pointer;
    white-space: nowrap;
}

.rank-market-head button {
    background: #e0f2fe;
    color: #075985;
}

.rank-market-search {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(220px, 0.9fr) auto;
    gap: 10px;
    align-items: center;
}

.rank-market-search input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    outline: none;
    background: #ffffff;
}

.rank-market-search input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.rank-market-status {
    padding: 12px 14px;
    border-left: 4px solid #38bdf8;
    border-radius: 8px;
    background: #f0f9ff;
    color: #075985;
    font-size: 14px;
    font-weight: 850;
}

.rank-market-status.success {
    border-left-color: #22c55e;
    background: #f0fdf4;
    color: #166534;
}

.rank-market-status.estimate {
    border-left-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

.rank-market-status.loading {
    border-left-color: #0f766e;
    background: #ecfdf5;
    color: #0f766e;
}

.rank-market-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.rank-market-kpis div {
    min-height: 104px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.rank-market-kpis span,
.rank-market-kpis small {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.rank-market-kpis b {
    display: block;
    margin: 8px 0 6px;
    color: #111827;
    font-size: 24px;
    font-weight: 950;
}

.rank-market-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.rank-market-insights div {
    padding: 14px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.rank-market-insights b {
    display: block;
    margin-bottom: 6px;
    color: #0f766e;
    font-size: 15px;
}

.rank-market-insights p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.rank-market-table-wrap {
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.rank-market-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: collapse;
    background: #ffffff;
}

.rank-market-table th {
    padding: 12px 10px;
    background: #0f2f5f;
    color: #ffffff;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.rank-market-table td {
    padding: 12px 10px;
    border-top: 1px solid #e5e7eb;
    color: #111827;
    font-size: 14px;
    vertical-align: middle;
}

.rank-market-table td:first-child {
    color: #0f766e;
}

.rank-product-name {
    max-width: 420px;
    color: #111827;
    font-weight: 950;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-product-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
}

.rank-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rank-product-thumb.empty {
    border-style: dashed;
}

.rank-market-table small {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

.rank-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    background: #0f766e;
    color: #ffffff;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

.rank-link-muted {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
    background: #f1f5f9;
    color: #64748b;
}

.rank-pill.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.rank-pill.blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.rank-pill.muted {
    background: #f1f5f9;
    color: #64748b;
}

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

.rank-form-grid input,
.rank-form-grid textarea,
.rank-filter-row input {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    outline: none;
    background: #ffffff;
}

.rank-form-grid textarea {
    grid-column: span 4;
    min-height: 86px;
    resize: vertical;
}

.rank-actions,
.rank-filter-row,
.rank-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.rank-actions {
    margin-top: 14px;
}

.rank-actions button,
.rank-filter-row button,
.rank-card-actions button {
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #0f2f5f;
    color: #ffffff;
    font-weight: 900;
    cursor: pointer;
}

.rank-actions button + button,
.rank-filter-row button,
.rank-card-actions button + button {
    background: #eef2ff;
    color: #1e3a8a;
}

.rank-record-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.rank-filter-row input {
    min-width: 240px;
}

.rank-record-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.rank-empty {
    grid-column: 1 / -1;
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    text-align: center;
    font-weight: 800;
    background: #f8fafc;
}

.rank-record-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.rank-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.rank-card-top span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.rank-card-top h3 {
    margin: 4px 0 0;
    font-size: 17px;
    color: #111827;
}

.rank-card-top b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

.rank-record-card.strong .rank-card-top b {
    background: #dcfce7;
    color: #166534;
}

.rank-record-card.good .rank-card-top b {
    background: #dbeafe;
    color: #1d4ed8;
}

.rank-record-card.watch .rank-card-top b {
    background: #fef3c7;
    color: #92400e;
}

.rank-record-card.weak .rank-card-top b {
    background: #fee2e2;
    color: #991b1b;
}

.rank-keyword {
    color: #0f2f5f;
    font-weight: 950;
}

.rank-meter {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.rank-meter div {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.rank-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0ea5e9, #22c55e);
}

.rank-meter strong {
    color: #111827;
    font-size: 18px;
}

.rank-record-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.rank-record-card dl div {
    padding: 10px;
    border-radius: 8px;
    background: #f8fafc;
}

.rank-record-card dt {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.rank-record-card dd {
    margin: 4px 0 0;
    color: #111827;
    font-weight: 950;
}

.rank-record-card p {
    min-height: 18px;
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .coupang-rank-hero,
    .rank-summary-grid,
    .rank-market-kpis,
    .rank-market-insights,
    .rank-form-grid,
    .rank-record-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-market-search {
        grid-template-columns: 1fr;
    }

    .rank-form-grid textarea {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .coupang-rank-hero,
    .rank-summary-grid,
    .rank-market-kpis,
    .rank-market-insights,
    .rank-form-grid,
    .rank-record-grid {
        grid-template-columns: 1fr;
    }

    .rank-market-head {
        flex-direction: column;
    }

    .rank-market-head button,
    .rank-market-search button {
        width: 100%;
    }

    .rank-form-grid textarea {
        grid-column: span 1;
    }

    .rank-record-head {
        align-items: stretch;
        flex-direction: column;
    }
}
.post-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-modal-box {
    width: 720px;
    max-width: 92vw;
    background: white;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 15px 45px rgba(0,0,0,0.35);
}

.post-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.post-modal-header h2 {
    margin: 0;
}

.post-modal-header button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: #111;
    color: white;
    cursor: pointer;
}

.post-modal-box input {
    width: 100%;
    height: 44px;
    margin-bottom: 12px;
}

.post-modal-box textarea {
    width: 100%;
    height: 420px;
    resize: vertical;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    line-height: 1.6;
    box-sizing: border-box;
}

.post-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.post-modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #111;
    color: white;
    cursor: pointer;
}

.post-modal-actions .delete {
    background: #c0392b !important;
}


/* ===== Customer landing page ===== */
body:not(.admin-mode) {
    background-image: none !important;
    background: #f6f2ec;
}

.customer-admin-door {
    top: 22px;
    right: 26px;
    width: auto;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(16,16,16,0.72);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255,255,255,0.24);
    backdrop-filter: blur(16px);
}

.customer-admin-door:hover {
    background: #111;
    transform: translateY(-1px);
}

.customer-page {
    min-height: 100vh;
    color: #111;
    background:
        radial-gradient(circle at 80% 12%, rgba(197,153,89,0.18), transparent 34%),
        linear-gradient(180deg, #fbf8f2 0%, #fff 42%, #f7f3ec 100%);
}

.admin-mode .customer-page { display: none; }

.customer-nav {
    position: sticky;
    top: 0;
    z-index: 800;
    height: 78px;
    display: grid;
    grid-template-columns: 260px 1fr 150px;
    align-items: center;
    gap: 20px;
    padding: 0 82px;
    background: rgba(8,8,10,0.86);
    color: white;
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.14);
}

.customer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    font-size: 20px;
    letter-spacing: 0.02em;
}

.customer-logo img {
    max-width: 180px;
    max-height: 44px;
    object-fit: contain;
}

.customer-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.customer-tabs button {
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.72);
    padding: 12px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .05em;
}

.customer-tabs button:hover,
.customer-tabs button.active {
    color: #d8b070;
    background: rgba(216,176,112,0.12);
}

.customer-coupang-btn {
    justify-self: end;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(216,176,112,0.55);
    padding: 12px 18px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 900;
}

.customer-hero {
    min-height: 720px;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 40px;
    padding: 76px 92px 70px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.90) 0%, rgba(0,0,0,0.82) 42%, rgba(0,0,0,0.48) 100%),
        radial-gradient(circle at 80% 45%, rgba(216,176,112,0.35), transparent 24%),
        linear-gradient(135deg, #050609, #0e1626 45%, #020204);
    color: white;
    overflow: hidden;
}

.customer-copy { max-width: 620px; }

.eyebrow {
    color: #cda566;
    font-weight: 900;
    letter-spacing: .14em;
    font-size: 12px;
    margin: 0 0 18px;
}

.customer-copy h1 {
    font-size: clamp(46px, 5.4vw, 86px);
    line-height: 1.02;
    letter-spacing: -0.055em;
    margin: 0 0 22px;
}

.customer-copy h1 em {
    color: #d5ad70;
    font-style: normal;
}

.customer-copy p:not(.eyebrow) {
    color: rgba(255,255,255,0.78);
    font-size: 17px;
    line-height: 1.75;
    word-break: keep-all;
}

.customer-cta-row {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.customer-cta-row a,
.customer-cta-row button {
    text-decoration: none;
    border: 1px solid rgba(216,176,112,0.55);
    background: transparent;
    color: white;
    padding: 15px 24px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: 900;
}

.customer-cta-row a {
    background: linear-gradient(135deg, #d9b472, #b98a46);
    color: #111;
}

.customer-visual {
    min-height: 520px;
    border-radius: 30px;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
        var(--customer-visual-bg, linear-gradient(135deg, #090b10, #1a2234));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 34px 80px rgba(0,0,0,0.42);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .35s ease;
}

.visual-card {
    width: min(520px, 90%);
    min-height: 320px;
    border: 1px solid rgba(216,176,112,0.38);
    border-radius: 26px;
    background: rgba(0,0,0,0.34);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.visual-mark {
    font-size: 140px;
    line-height: 1;
    font-family: Georgia, serif;
    color: #d5ad70;
    text-shadow: 0 12px 36px rgba(213,173,112,0.3);
}

.visual-card strong {
    display: block;
    font-size: 30px;
    letter-spacing: .13em;
    color: #d5ad70;
}

.visual-card span {
    color: rgba(255,255,255,0.72);
    letter-spacing: .18em;
    font-size: 11px;
    text-transform: uppercase;
}

.customer-story {
    display: grid;
    grid-template-columns: 120px 1fr 1.1fr;
    gap: 34px;
    align-items: center;
    padding: 72px 92px;
    background: white;
}

.story-mark {
    font-size: 190px;
    font-family: Georgia, serif;
    color: rgba(0,0,0,0.06);
    line-height: 1;
}

.customer-story h2,
.section-mini-head h2 {
    font-size: 34px;
    letter-spacing: -0.04em;
    line-height: 1.24;
    margin: 0 0 18px;
}

.customer-story p:not(.eyebrow) {
    color: #555;
    line-height: 1.8;
    word-break: keep-all;
}

.customer-story img {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(0,0,0,0.14);
}

.customer-collections {
    padding: 70px 92px;
    background: #f4f0e8;
}

.section-mini-head {
    margin-bottom: 26px;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.collection-grid button {
    min-height: 180px;
    border: none;
    border-radius: 20px;
    padding: 24px;
    color: white;
    text-align: left;
    cursor: pointer;
    background:
        linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.78)),
        linear-gradient(135deg, #7c6b57, #1f2024);
    box-shadow: 0 16px 42px rgba(0,0,0,0.12);
}

.collection-grid button:nth-child(2) { background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.8)), linear-gradient(135deg, #33251c, #b98a46); }
.collection-grid button:nth-child(3) { background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.8)), linear-gradient(135deg, #0c1220, #2d3b55); }
.collection-grid button:nth-child(4) { background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.8)), linear-gradient(135deg, #e6ded1, #2e2f33); }

.collection-grid span {
    display: block;
    color: rgba(255,255,255,0.72);
    margin-bottom: 8px;
}

.collection-grid b {
    font-size: 26px;
    letter-spacing: -.02em;
}

.customer-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    padding: 34px 92px 80px;
    background: #0b0b0d;
    color: white;
}

.customer-trust div {
    padding: 26px;
    border: 1px solid rgba(216,176,112,0.2);
}

.customer-trust b {
    display: block;
    color: #d5ad70;
    margin-bottom: 8px;
}

.customer-trust span {
    color: rgba(255,255,255,0.68);
}

@media (max-width: 1000px) {
    .customer-nav { grid-template-columns: 1fr; height: auto; padding: 16px 20px; }
    .customer-tabs { overflow-x: auto; justify-content: flex-start; }
    .customer-coupang-btn { justify-self: start; }
    .customer-hero { grid-template-columns: 1fr; padding: 58px 24px; }
    .customer-story { grid-template-columns: 1fr; padding: 54px 24px; }
    .story-mark { display: none; }
    .customer-collections { padding: 54px 24px; }
    .collection-grid { grid-template-columns: 1fr 1fr; }
    .customer-trust { grid-template-columns: 1fr 1fr; padding: 30px 24px 60px; }
}



/* ===== Margin inline edit UX ===== */
.margin-inline-edit-row {
    background: #f7f9ff;
}

.margin-inline-input {
    width: 100%;
    min-width: 90px;
    height: 34px;
    padding: 6px 8px;
    border: 1px solid #b9c7e8;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
}

.margin-action-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.margin-copy-btn {
    background: #334155 !important;
}

@media (max-width: 760px) {
    .margin-action-cell {
        min-width: 180px;
    }

    .margin-inline-input {
        min-width: 110px;
    }
}



/* ===== Worklog search ===== */
.post-search-box {
    margin: 18px 0;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.post-search-box h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.post-search-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 10px;
}

.post-search-grid input,
.post-search-grid select {
    width: 100%;
    height: 42px;
    border: 1px solid #d7dce5;
    border-radius: 8px;
    padding: 8px 10px;
    background: white;
}

.post-search-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.post-search-actions button {
    flex: 1;
    padding: 11px;
    border: none;
    border-radius: 8px;
    background: #111;
    color: white;
    cursor: pointer;
    font-weight: 700;
}

.post-search-result {
    padding: 10px 12px;
    margin: 8px 0;
    background: #082b63;
    color: white;
    border-radius: 8px;
    font-weight: 800;
}

.post-item b {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.post-item small {
    display: block;
    color: #777;
    font-size: 12px;
    margin-bottom: 5px;
}

.post-item p {
    margin: 0;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.post-item mark {
    background: #ffe58a;
    color: #111;
    padding: 0 2px;
    border-radius: 3px;
}

@media (max-width: 760px) {
    .post-search-grid {
        grid-template-columns: 1fr;
    }

    .post-search-actions {
        flex-direction: column;
    }
}


/* ===== Monthly budget report ===== */
.monthly-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.monthly-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
}

.monthly-card span {
    display: block;
    color: #666;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.monthly-card b {
    font-size: 20px;
    font-weight: 900;
}

.positive {
    color: #0a7f3f !important;
    font-weight: 900;
}

.negative {
    color: #c0392b !important;
    font-weight: 900;
}

.monthly-table {
    min-width: 800px;
}

@media (max-width: 900px) {
    .monthly-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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


/* ===== Coupang sales summary ===== */
#coupangSalesDashboard {
    position: relative;
    overflow: hidden;
}

#coupangSalesDashboard::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, #0f2f5f, #0ea5e9, #22c55e);
}

#coupangSalesDashboard > h2 {
    margin-top: 6px;
    letter-spacing: 0;
}

.sales-summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin: 16px 0 22px;
}

.sales-summary-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.sales-summary-card::after {
    content: "";
    position: absolute;
    right: -24px;
    top: -24px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(14, 165, 233, 0.12);
}

.sales-summary-card span {
    display: block;
    font-size: 13px;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 8px;
}

.sales-summary-card b {
    position: relative;
    z-index: 1;
    color: #0f172a;
    font-size: 26px;
    font-weight: 900;
}

.sales-money-card {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.sales-money-card::after {
    background: rgba(34, 197, 94, 0.14);
}

.sales-money-card b {
    color: #047857;
}

.sales-range-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin: 6px 0 14px;
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}

.sales-range-panel span,
.sales-range-panel small {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.sales-range-panel strong {
    display: block;
    margin: 5px 0;
    color: #0f172a;
    font-size: 20px;
    letter-spacing: 0;
}

.sales-range-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sales-range-controls input {
    min-height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
    background: #ffffff;
}

.sales-range-controls button {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 0 16px;
    color: #ffffff;
    background: #0f2f5f;
    font-weight: 950;
    cursor: pointer;
}

.sales-range-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.sales-range-kpis div {
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}

.sales-range-kpis span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.sales-range-kpis b {
    display: block;
    margin-top: 7px;
    color: #111827;
    font-size: 20px;
    font-weight: 950;
}

.sales-range-table-wrap {
    margin-bottom: 28px;
}

.sales-table {
    min-width: 780px;
}

.sales-table th {
    background: #0f2f5f !important;
}

.sales-table tbody tr:hover {
    background: #f8fafc;
}

.sales-table td:nth-child(2),
.sales-table td:nth-child(3) {
    font-weight: 800;
}

@media (max-width: 900px) {
    .sales-summary-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sales-range-panel,
    .sales-range-kpis {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .sales-range-panel,
    .sales-range-kpis {
        grid-template-columns: 1fr;
    }

    .sales-range-controls {
        align-items: stretch;
        flex-direction: column;
    }
}


/* ===== Product dashboard ===== */
.product-dashboard-controls {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 10px;
}
.product-dashboard-controls input,
.product-dashboard-controls button {
    height: 42px;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 8px 10px;
}
.product-dashboard-controls button {
    border: none;
    background: #111;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}
.product-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 18px;
}
.product-kpi-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}
.product-kpi-card span {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: 800;
    margin-bottom: 8px;
}
.product-kpi-card b {
    display: block;
    font-size: 22px;
    font-weight: 900;
}
.product-kpi-card small {
    display: block;
    margin-top: 8px;
    color: #777;
    font-size: 11px;
}
.product-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.product-dashboard-table {
    min-width: 1600px;
}
.competitor-table {
    min-width: 1700px;
}
.product-dashboard-table td:nth-child(13) {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 1200px) {
    .product-kpi-grid { grid-template-columns: repeat(3, 1fr); }
    .product-dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .product-dashboard-controls { grid-template-columns: 1fr; }
    .product-kpi-grid { grid-template-columns: 1fr; }
}


/* ===== Product dashboard inline edit & charts ===== */
.product-chart-controls {
    display: flex;
    gap: 10px;
    margin: 12px 0 18px;
}

.product-chart-controls select {
    height: 42px;
    border: 1px solid #d7dce5;
    border-radius: 8px;
    padding: 8px 10px;
    background: white;
}

.product-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.product-chart-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    min-height: 360px;
}

.product-chart-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.product-chart-card canvas {
    width: 100% !important;
    height: 290px !important;
}

.product-inline-edit-row {
    background: #f7f9ff;
}

.product-inline-input {
    width: 100%;
    min-width: 95px;
    height: 34px;
    padding: 6px 8px;
    border: 1px solid #b9c7e8;
    border-radius: 6px;
    background: white;
    font-size: 12px;
}

.product-action-cell {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 1000px) {
    .product-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .product-chart-controls {
        flex-direction: column;
    }

    .product-action-cell {
        min-width: 150px;
    }

    .product-inline-input {
        min-width: 110px;
    }
}



/* ===== Product dashboard table width / action fix ===== */
.product-dashboard-table {
    table-layout: auto;
    min-width: 1650px;
}

.product-dashboard-table th,
.product-dashboard-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.product-dashboard-table th:nth-child(1),
.product-dashboard-table td:nth-child(1) {
    min-width: 110px;
}

.product-dashboard-table th:nth-child(2),
.product-dashboard-table td:nth-child(2) {
    min-width: 130px;
}

.product-dashboard-table th:nth-child(3),
.product-dashboard-table td:nth-child(3) {
    min-width: 150px;
}

.product-dashboard-table th:nth-child(13),
.product-dashboard-table td:nth-child(13) {
    min-width: 220px;
    white-space: normal;
    line-height: 1.5;
}

.product-dashboard-table th:nth-child(14),
.product-dashboard-table td:nth-child(14) {
    min-width: 150px;
}

.competitor-table {
    min-width: 1750px;
}

.competitor-table th:nth-child(7),
.competitor-table td:nth-child(7) {
    min-width: 220px;
    white-space: normal;
    line-height: 1.5;
}

.competitor-table th:nth-child(13),
.competitor-table td:nth-child(13) {
    min-width: 110px;
    text-align: center;
}

.competitor-table th:nth-child(14),
.competitor-table td:nth-child(14) {
    min-width: 150px;
}

.product-action-cell {
    min-width: 145px;
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

.product-action-cell button {
    min-width: 60px;
    height: 34px;
    padding: 6px 10px;
    white-space: nowrap;
    line-height: 1;
}

.product-inline-input {
    min-width: 105px;
}

.product-inline-edit-row .product-action-cell {
    min-width: 150px;
}

.budget-table-wrap {
    overflow-x: auto;
    padding-bottom: 8px;
}

.budget-table-wrap::-webkit-scrollbar {
    height: 10px;
}

.budget-table-wrap::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 999px;
}

.budget-table-wrap::-webkit-scrollbar-track {
    background: #eef2f7;
    border-radius: 999px;
}

@media (max-width: 760px) {
    .product-dashboard-table {
        min-width: 1550px;
    }

    .competitor-table {
        min-width: 1650px;
    }

    .product-action-cell {
        min-width: 140px;
    }
}



/* ===== Competitor report column / action column fix ===== */
.competitor-table th:nth-child(13),
.competitor-table td:nth-child(13) {
    min-width: 220px;
    white-space: normal;
    line-height: 1.5;
}

.competitor-table th:nth-child(14),
.competitor-table td:nth-child(14) {
    min-width: 110px;
    text-align: center;
}

.competitor-table th:nth-child(15),
.competitor-table td:nth-child(15) {
    min-width: 150px;
}



/* ===== JRAIN STYLE customer store page ===== */
.customer-store-page {
    background: #05070b;
    color: #fff;
    min-height: 100vh;
    font-family: Arial, "Noto Sans KR", sans-serif;
}

.store-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 74px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4vw;
    background: rgba(3, 6, 10, 0.86);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.store-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.store-logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d7ad5c;
    font-size: 24px;
    font-weight: 900;
    border: 1px solid rgba(215,173,92,.55);
    background: linear-gradient(145deg, rgba(215,173,92,.18), rgba(255,255,255,.02));
}

.store-logo strong {
    display: block;
    letter-spacing: 2px;
    font-size: 20px;
}

.store-logo small {
    display: block;
    font-size: 10px;
    color: #d7ad5c;
    letter-spacing: 1.6px;
}

.store-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.store-menu button {
    background: none;
    border: none;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.store-menu .store-admin-btn {
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 10px 14px;
    color: #d7ad5c;
}

.store-hero {
    position: relative;
    min-height: 760px;
    padding-top: 74px;
    overflow: hidden;
    background: #05070b;
}

.store-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3,6,10,.95) 0%, rgba(3,6,10,.58) 38%, rgba(3,6,10,.10) 70%),
        url("../img/customer/brand-hero.png") center/cover no-repeat;
    transform: scale(1.02);
}

.store-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 620px;
    padding: 115px 0 0 10vw;
}

.store-hero-copy p {
    margin: 0 0 12px;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
}

.store-hero-copy h1 {
    margin: 0;
    font-size: clamp(48px, 6vw, 86px);
    line-height: 1.05;
    letter-spacing: -4px;
    font-weight: 950;
}

.store-hero-copy h1 span {
    color: #d7ad5c;
}

.store-hero-copy h2 {
    margin: 22px 0 0;
    font-size: 19px;
    line-height: 1.7;
    color: #e9e2d5;
    font-weight: 500;
}

.store-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 26px;
}

.store-hero-actions button,
.store-story-copy button {
    padding: 14px 22px;
    border-radius: 10px;
    border: 1px solid #d7ad5c;
    background: linear-gradient(135deg, #e4c37a, #b8842d);
    color: #111;
    font-weight: 900;
    cursor: pointer;
}

.store-hero-actions .ghost {
    background: rgba(0,0,0,.2);
    color: #fff;
}

.store-products {
    background: #f4f6fb;
    color: #111;
    padding: 70px 10vw;
}

.store-section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 28px;
}

.store-section-head p,
.store-story-copy > p {
    color: #b88b3d;
    font-weight: 900;
    letter-spacing: 2px;
    margin: 0 0 8px;
}

.store-section-head h2 {
    margin: 0;
    font-size: 30px;
}

.store-section-head a {
    color: #111;
    text-decoration: none;
    font-weight: 800;
}

.store-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.store-product-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 0 0 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,.10);
    transition: transform .2s ease, box-shadow .2s ease;
}

.store-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,.17);
}

.store-product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.store-product-card h3 {
    margin: 15px 14px 6px;
    font-size: 16px;
    line-height: 1.35;
    min-height: 43px;
}

.store-product-card strong {
    display: block;
    margin: 0 14px;
    font-size: 19px;
}

.store-product-card p {
    margin: 8px 14px;
    color: #555;
    font-size: 13px;
    line-height: 1.45;
    min-height: 38px;
}

.rating {
    margin: 8px 14px 12px;
    color: #f3a900;
    font-size: 13px;
}

.rating span {
    color: #777;
}

.store-product-card a {
    margin: 0 14px;
    display: inline-flex;
    text-decoration: none;
    border: 1px solid #ddd;
    padding: 9px 12px;
    border-radius: 8px;
    color: #111;
    font-weight: 800;
    font-size: 13px;
}

.badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.badge.best { background: #234ea7; }
.badge.hot { background: #e83b57; }
.badge.new { background: #02a99b; }
.badge.sale { background: #d53a2d; }

.store-story {
    display: grid;
    grid-template-columns: 0.78fr 1.22fr;
    background: radial-gradient(circle at left, #1c202a, #05070b 58%);
    color: #fff;
    min-height: 430px;
}

.store-story-visual {
    background:
        linear-gradient(90deg, rgba(5,7,11,.25), rgba(5,7,11,.72)),
        url("../img/customer/brand-hero.png") left center/cover no-repeat;
    min-height: 430px;
}

.store-story-copy {
    padding: 70px 8vw 70px 4vw;
}

.store-story-copy h2 {
    font-size: 42px;
    margin: 0 0 14px;
}

.store-story-copy h3 {
    font-size: 22px;
    margin: 0 0 16px;
    color: #d7ad5c;
}

.store-story-copy p {
    line-height: 1.9;
    color: #e6e1d8;
    max-width: 760px;
}

.store-promise {
    background: #080b11;
    padding: 44px 10vw;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.store-promise article {
    padding: 26px 22px;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,.08);
}

.store-promise div {
    color: #d7ad5c;
    font-size: 40px;
    margin-bottom: 10px;
}

.store-promise b {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

.store-promise span {
    color: #cfc8bd;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .store-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .store-menu {
        gap: 10px;
    }
}

@media (max-width: 760px) {
    .store-nav {
        height: auto;
        padding: 12px 18px;
        align-items: flex-start;
        gap: 12px;
    }

    .store-menu {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
    }

    .store-menu button {
        font-size: 12px;
    }

    .store-hero {
        min-height: 720px;
    }

    .store-hero-bg {
        background-position: 62% center;
    }

    .store-hero-copy {
        padding: 135px 24px 0;
        max-width: 100%;
    }

    .store-hero-copy h1 {
        font-size: 48px;
        letter-spacing: -2px;
    }

    .store-hero-copy h2 {
        font-size: 15px;
    }

    .store-hero-actions {
        flex-direction: column;
    }

    .store-products {
        padding: 52px 22px;
    }

    .store-section-head {
        align-items: flex-start;
        gap: 10px;
        flex-direction: column;
    }

    .store-product-grid {
        grid-template-columns: 1fr;
    }

    .store-story {
        grid-template-columns: 1fr;
    }

    .store-story-visual {
        min-height: 280px;
    }

    .store-story-copy {
        padding: 42px 24px;
    }

    .store-story-copy h2 {
        font-size: 32px;
    }

    .store-promise {
        grid-template-columns: 1fr;
        padding: 24px;
    }
}



/* ===== Customer product correction ===== */
.store-product-card h3 {
    min-height: 62px;
}

.store-product-card strong {
    min-height: 24px;
}



/* ===== JRAIN STYLE final customer landing ===== */
.customer-final-page {
    background: #05070b;
    color: #fff;
    min-height: 100vh;
    font-family: Arial, "Noto Sans KR", sans-serif;
}

.final-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 74px;
    padding: 0 4vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(3, 6, 10, .93);
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(12px);
}

.final-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.final-logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(215,173,92,.7);
    color: #d7ad5c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    font-size: 22px;
    background: linear-gradient(145deg, rgba(215,173,92,.20), rgba(255,255,255,.02));
}

.final-logo strong {
    display: block;
    font-size: 20px;
    letter-spacing: 2px;
}

.final-logo small {
    display: block;
    color: #d7ad5c;
    font-size: 10px;
    letter-spacing: 1.7px;
}

.final-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.final-menu button {
    border: 0;
    background: none;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.final-menu .final-admin {
    border: 1px solid rgba(215,173,92,.65);
    color: #d7ad5c;
    border-radius: 10px;
    padding: 10px 14px;
}

.final-hero {
    position: relative;
    height: 610px;
    padding-top: 74px;
    overflow: hidden;
    background: #05070b;
}

.final-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3,6,10,.35) 0%, rgba(3,6,10,.10) 42%, rgba(3,6,10,.20) 100%),
        url("./assets/img/customer/brand-hero-final.png") center top/cover no-repeat;
}

.final-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 580px;
    padding: 70px 0 0 10vw;
}

.final-hero-copy p {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 900;
}

.final-hero-copy h1 {
    margin: 0;
    font-size: clamp(46px, 5.6vw, 76px);
    line-height: 1.05;
    letter-spacing: -3px;
    font-weight: 950;
}

.final-hero-copy h1 span {
    color: #d7ad5c;
}

.final-hero-copy h2 {
    margin: 20px 0 0;
    color: #eee7dc;
    font-size: 18px;
    line-height: 1.7;
    font-weight: 500;
}

.final-hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 26px;
}

.final-hero-actions button,
.final-story-copy button {
    padding: 14px 24px;
    border-radius: 10px;
    border: 1px solid #d7ad5c;
    background: linear-gradient(135deg, #f1c96f, #b9822f);
    color: #111;
    font-weight: 950;
    cursor: pointer;
}

.final-hero-actions .ghost {
    background: rgba(0,0,0,.25);
    color: #fff;
}

.final-products {
    background: #f5f7fb;
    color: #111;
    padding: 58px 10vw 70px;
}

.final-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 26px;
}

.final-section-head p {
    margin: 0 0 8px;
    color: #b9852e;
    font-weight: 950;
    letter-spacing: 2px;
}

.final-section-head h2 {
    margin: 0;
    font-size: 30px;
}

.final-section-head a {
    color: #111;
    font-weight: 900;
    text-decoration: none;
}

.final-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
}

.final-product-card {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 13px 28px rgba(0,0,0,.10);
    transition: transform .2s ease, box-shadow .2s ease;
    padding-bottom: 16px;
}

.final-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 38px rgba(0,0,0,.16);
}

.final-product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.final-product-card h3 {
    margin: 14px 14px 8px;
    font-size: 16px;
    line-height: 1.35;
    min-height: 64px;
}

.final-product-card strong {
    display: block;
    margin: 0 14px 8px;
    font-size: 18px;
    font-weight: 950;
}

.final-product-card .rating {
    margin: 0 14px 12px;
    color: #f3a900;
    font-size: 13px;
}

.final-product-card .rating span {
    color: #666;
}

.final-product-card a {
    margin: 0 14px;
    display: inline-flex;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #111;
    text-decoration: none;
    font-weight: 900;
    font-size: 13px;
}

.badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    color: #fff;
    padding: 6px 10px;
    font-weight: 950;
    font-size: 12px;
    border-radius: 999px;
}

.badge.best { background: #234ea7; }
.badge.hot { background: #e83b57; }
.badge.new { background: #02a99b; }
.badge.sale { background: #d53a2d; }

.final-story {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    min-height: 430px;
    background: radial-gradient(circle at left, #1c202a, #05070b 62%);
}

.final-story-image {
    background:
        linear-gradient(90deg, rgba(5,7,11,.10), rgba(5,7,11,.74)),
        url("./assets/img/customer/brand-hero-final.png") left center/cover no-repeat;
}

.final-story-copy {
    padding: 70px 8vw 70px 4vw;
}

.final-story-copy > p {
    color: #d7ad5c;
    font-weight: 950;
    letter-spacing: 2px;
    margin: 0 0 10px;
}

.final-story-copy h2 {
    margin: 0 0 14px;
    font-size: 42px;
}

.final-story-copy h3 {
    margin: 0 0 18px;
    color: #d7ad5c;
    font-size: 22px;
}

.final-story-copy p {
    max-width: 760px;
    color: #e6dfd4;
    line-height: 1.9;
}

.final-promise {
    background: #080b11;
    padding: 44px 10vw;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(255,255,255,.08);
}

.final-promise article {
    text-align: center;
    padding: 26px 20px;
    border-right: 1px solid rgba(255,255,255,.08);
}

.final-promise div {
    color: #d7ad5c;
    font-size: 38px;
    margin-bottom: 10px;
}

.final-promise b {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
}

.final-promise span {
    color: #cfc8bd;
    font-size: 13px;
    line-height: 1.6;
}

@media (max-width: 1100px) {
    .final-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .final-menu {
        gap: 12px;
    }
}

@media (max-width: 760px) {
    .final-nav {
        height: auto;
        padding: 12px 18px;
        align-items: flex-start;
        gap: 12px;
    }

    .final-menu {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .final-menu button {
        font-size: 12px;
    }

    .final-hero {
        height: 720px;
    }

    .final-hero-bg {
        background-position: 60% top;
    }

    .final-hero-copy {
        padding: 145px 24px 0;
    }

    .final-hero-copy h1 {
        font-size: 48px;
        letter-spacing: -2px;
    }

    .final-hero-copy h2 {
        font-size: 15px;
    }

    .final-hero-actions {
        flex-direction: column;
    }

    .final-products {
        padding: 48px 22px 60px;
    }

    .final-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .final-product-grid {
        grid-template-columns: 1fr;
    }

    .final-story {
        grid-template-columns: 1fr;
    }

    .final-story-image {
        min-height: 280px;
    }

    .final-story-copy {
        padding: 42px 24px;
    }

    .final-story-copy h2 {
        font-size: 32px;
    }

    .final-promise {
        grid-template-columns: 1fr;
        padding: 24px;
    }
}



/* ===== Exact uploaded hero image placement ===== */
.customer-final-page .final-hero {
    position: relative;
    height: auto !important;
    min-height: 0 !important;
    padding-top: 74px !important;
    background: #05070b !important;
    overflow: hidden;
}

.customer-final-page .final-hero::before {
    content: "";
    display: block;
    width: 100%;
    aspect-ratio: 1912 / 448;
    background-image: url("../img/customer/hero-natural.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}

.customer-final-page .final-hero-bg,
.customer-final-page .final-hero-copy {
    display: none !important;
}

/* Keep product section directly under the uploaded hero screenshot */
.customer-final-page .final-products {
    padding-top: 58px;
}

/* Mobile: show the full hero image ratio without cutting the face */
@media (max-width: 760px) {
    .customer-final-page .final-hero {
        padding-top: 96px !important;
    }

    .customer-final-page .final-hero::before {
        aspect-ratio: 1912 / 448;
        background-size: contain;
        background-color: #05070b;
    }
}


/* =========================================================
   JRAIN CONTROL Mobile Optimization
   PC layout is preserved. These rules apply only on tablet/mobile.
   ========================================================= */

@media (max-width: 1024px) {
    body { overflow-x: hidden; }

    .admin-layout { display: block !important; }

    .sidebar,
    .admin-sidebar {
        position: relative !important;
        width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        padding: 18px 16px !important;
        box-sizing: border-box;
    }

    .sidebar-footer { display: none !important; }

    .side-menu,
    .sidebar-menu {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .side-menu button,
    .sidebar-menu button {
        width: 100% !important;
        min-height: 46px !important;
        padding: 10px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
    }

    .admin-content,
    main.admin-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 16px !important;
        box-sizing: border-box;
    }

    .section-header { display: block !important; margin-bottom: 16px !important; }
    .section-header h1 { font-size: 26px !important; line-height: 1.25 !important; }
    .section-desc { font-size: 13px !important; line-height: 1.6 !important; }

    .board,
    .card,
    .admin-card {
        width: 100% !important;
        padding: 18px !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
        overflow: hidden;
    }

    .kpi-grid,
    .product-kpi-grid,
    .monthly-summary-grid,
    .sales-summary-grid,
    .briefing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .briefing-head {
        align-items: flex-start !important;
    }

    .briefing-summary {
        grid-column: 1 / -1;
    }

    .admin-market-bar {
        position: relative !important;
        top: auto !important;
        grid-template-columns: 1fr !important;
        margin: 0 0 18px !important;
    }

    .market-ticker-row {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .market-watchlist {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .market-refresh {
        grid-column: 1 / -1;
        min-height: 44px !important;
    }

    .market-updated {
        position: static !important;
        grid-column: 1 / -1;
        margin-top: -4px;
    }

    .product-dashboard-grid,
    .product-chart-grid {
        grid-template-columns: 1fr !important;
    }

    .budget-form-grid,
    .post-search-grid,
    .product-dashboard-controls,
    .margin-form-grid,
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    input,
    select,
    textarea {
        width: 100% !important;
        min-height: 46px !important;
        font-size: 15px !important;
        box-sizing: border-box !important;
    }

    textarea {
        min-height: 120px !important;
        line-height: 1.6 !important;
    }

    button {
        min-height: 44px;
        touch-action: manipulation;
    }

    .budget-actions,
    .post-search-actions,
    .margin-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .budget-actions button,
    .post-search-actions button,
    .margin-actions button {
        width: 100% !important;
        min-height: 48px !important;
        font-size: 15px !important;
    }

    .budget-table-wrap,
    .table-wrap {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 10px !important;
    }

    .budget-table,
    .margin-table,
    .product-dashboard-table,
    .competitor-table,
    .sales-table,
    .monthly-table {
        min-width: 980px !important;
        table-layout: auto !important;
        font-size: 13px !important;
    }

    .product-dashboard-table { min-width: 1500px !important; }
    .competitor-table { min-width: 1650px !important; }
    .margin-table { min-width: 1800px !important; }

    .budget-table th,
    .budget-table td,
    .margin-table th,
    .margin-table td,
    .product-dashboard-table th,
    .product-dashboard-table td,
    .competitor-table th,
    .competitor-table td {
        white-space: nowrap !important;
        padding: 10px 8px !important;
        vertical-align: middle !important;
    }

    .product-action-cell,
    .margin-action-cell {
        min-width: 145px !important;
        display: flex !important;
        gap: 6px !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    .product-action-cell button,
    .margin-action-cell button,
    .budget-edit-btn,
    .budget-delete-btn {
        min-width: 58px !important;
        min-height: 36px !important;
        padding: 6px 10px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    .product-inline-input,
    .margin-inline-input {
        min-width: 110px !important;
        min-height: 38px !important;
        font-size: 13px !important;
    }

    .post-item {
        padding: 14px !important;
        border-radius: 12px !important;
    }

    #postModal,
    .modal {
        padding: 14px !important;
    }

    #postModal .modal-content,
    .modal-content {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        max-height: 86vh !important;
        overflow-y: auto !important;
        border-radius: 16px !important;
        padding: 18px !important;
    }

    .product-chart-card {
        min-height: 340px !important;
        padding: 14px !important;
    }

    .product-chart-card canvas { height: 260px !important; }

    .floating-buttons,
    .quick-buttons,
    .top-link-buttons {
        right: 10px !important;
        transform: scale(.88);
        transform-origin: right center;
    }
}

@media (max-width: 760px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .side-menu,
    .sidebar-menu {
        grid-template-columns: 1fr 1fr !important;
    }

    .kpi-grid,
    .product-kpi-grid,
    .monthly-summary-grid,
    .sales-summary-grid {
        grid-template-columns: 1fr !important;
    }

    .section-header h1 { font-size: 24px !important; }
    .board h2 { font-size: 21px !important; }

    .customer-final-page .final-nav,
    .store-nav,
    .final-nav {
        position: relative !important;
        height: auto !important;
        padding: 12px 16px !important;
        display: block !important;
    }

    .final-logo,
    .store-logo {
        margin-bottom: 12px !important;
    }

    .final-menu,
    .store-menu {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .final-menu button,
    .store-menu button {
        min-height: 40px !important;
        border: 1px solid rgba(255,255,255,.12) !important;
        border-radius: 9px !important;
        font-size: 12px !important;
    }

    .customer-final-page .final-hero,
    .customer-store-page .store-hero {
        padding-top: 0 !important;
        height: auto !important;
        min-height: auto !important;
    }

    .customer-final-page .final-hero::before {
        background-size: contain !important;
        background-position: center top !important;
        background-color: #05070b !important;
        aspect-ratio: 2560 / 700 !important;
    }

    .final-hero-bg,
    .store-hero-bg {
        background-size: contain !important;
        background-position: center top !important;
        background-color: #05070b !important;
    }

    .final-hero-copy,
    .store-hero-copy {
        position: relative !important;
        padding: 28px 20px !important;
        max-width: 100% !important;
        background: #05070b !important;
    }

    .final-hero-copy h1,
    .store-hero-copy h1 {
        font-size: 38px !important;
        letter-spacing: -1.5px !important;
        line-height: 1.1 !important;
    }

    .final-hero-copy h2,
    .store-hero-copy h2 {
        font-size: 14px !important;
        line-height: 1.7 !important;
    }

    .final-hero-actions,
    .store-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .final-products,
    .store-products {
        padding: 42px 18px !important;
    }

    .final-section-head,
    .store-section-head {
        display: block !important;
    }

    .final-product-grid,
    .store-product-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .final-product-card h3,
    .store-product-card h3 {
        min-height: auto !important;
        font-size: 16px !important;
    }

    .final-story,
    .store-story {
        grid-template-columns: 1fr !important;
    }

    .final-story-image,
    .store-story-visual {
        min-height: auto !important;
    }

    .final-story-image img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: contain !important;
    }

    .final-story-copy,
    .store-story-copy {
        padding: 36px 20px !important;
    }

    .final-story-copy h2,
    .store-story-copy h2 {
        font-size: 30px !important;
    }

    .final-promise,
    .store-promise {
        grid-template-columns: 1fr !important;
        padding: 20px !important;
    }

    .final-promise article,
    .store-promise article {
        border-right: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,.08) !important;
    }

    .budget-table,
    .sales-table,
    .monthly-table {
        min-width: 900px !important;
    }

    .product-dashboard-table { min-width: 1450px !important; }
    .competitor-table { min-width: 1600px !important; }
    .margin-table { min-width: 1750px !important; }
}

@media (max-width: 420px) {
    .admin-content,
    main.admin-content {
        padding: 10px !important;
    }

    .board { padding: 14px !important; }

    .side-menu,
    .sidebar-menu {
        grid-template-columns: 1fr !important;
    }

    .final-logo strong,
    .store-logo strong {
        font-size: 16px !important;
    }

    .final-hero-copy h1,
    .store-hero-copy h1 {
        font-size: 32px !important;
    }

    input,
    select,
    textarea {
        font-size: 14px !important;
    }
}



/* =========================================================
   Critical visibility fix
   Prevent customer/admin pages from being shown together.
   Must stay at the very end of CSS.
   ========================================================= */
.hide,
#adminLayout.hide,
#customerPage.hide,
.login-overlay.hide,
.quick-links.hide,
.upload-toggle-btn.hide,
.control-toggle-btn.hide,
.card-btn.hide,
.logout-btn.hide {
    display: none !important;
}

body:not(.admin-mode) #adminLayout {
    display: none !important;
}

body.admin-mode #customerPage {
    display: none !important;
}

body.admin-mode #adminLayout:not(.hide) {
    display: flex !important;
}

@media (max-width: 1024px) {
    body.admin-mode #adminLayout:not(.hide) {
        display: block !important;
    }
}

/* Calendar mobile/visibility stabilization */
#calendar {
    width: 100% !important;
    min-height: 640px;
    box-sizing: border-box;
}

.fc {
    max-width: 100%;
}

@media (max-width: 760px) {
    #calendar {
        min-height: 560px;
        padding: 10px !important;
        overflow-x: auto;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .fc .fc-toolbar-title {
        font-size: 18px !important;
        text-align: center;
    }

    .fc .fc-button {
        padding: 7px 9px !important;
        font-size: 12px !important;
    }
}



/* ===== Split product dashboard charts ===== */
.split-chart-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px;
}

.product-chart-grid-4 {
    grid-template-columns: repeat(2, 1fr);
}

.chart-help {
    margin: -4px 0 12px;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .split-chart-controls {
        grid-template-columns: 1fr;
    }

    .product-chart-grid-4 {
        grid-template-columns: 1fr !important;
    }
}

/* ===== Customer page polish override ===== */
.customer-final-page {
    background: #f7f4ef;
}

.customer-final-page .final-nav {
    height: 70px;
    background: rgba(9, 12, 18, 0.86);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.customer-final-page .final-logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #d7ad5c;
    color: #101318;
    border-color: transparent;
}

.customer-final-page .final-logo strong {
    letter-spacing: 1px;
}

.customer-final-page .final-logo small {
    color: rgba(255, 255, 255, 0.66);
    letter-spacing: 1.2px;
}

.customer-final-page .final-menu button {
    color: rgba(255, 255, 255, 0.82);
    padding: 9px 4px;
    border-bottom: 2px solid transparent;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.customer-final-page .final-menu button:hover {
    color: #ffffff;
    border-color: #d7ad5c;
}

.customer-final-page .final-menu .final-admin {
    padding: 9px 13px;
    border-radius: 8px;
    border: 1px solid rgba(215, 173, 92, .7);
    background: rgba(215, 173, 92, .08);
}

.customer-final-page .final-hero {
    padding-top: 70px !important;
}

.customer-final-page .final-hero::before {
    box-shadow: inset 0 -70px 70px rgba(247, 244, 239, 0.92);
}

.customer-final-page .final-products {
    background: linear-gradient(180deg, #f7f4ef 0%, #ffffff 100%);
    color: #141414;
    padding: 70px min(8vw, 118px) 86px;
}

.customer-final-page .final-section-head {
    max-width: 1180px;
    margin: 0 auto 30px;
}

.customer-final-page .final-section-head p {
    color: #8b6429;
    letter-spacing: 1.4px;
}

.customer-final-page .final-section-head h2 {
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: 0;
}

.customer-final-page .final-section-head a {
    border: 1px solid rgba(20, 20, 20, .16);
    border-radius: 8px;
    padding: 11px 15px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .07);
}

.customer-final-page .final-product-grid {
    max-width: 1180px;
    margin: 0 auto;
    gap: 18px;
}

.customer-final-page .final-product-card {
    border-radius: 8px;
    border: 1px solid rgba(16, 19, 24, .08);
    box-shadow: 0 12px 26px rgba(20, 23, 30, .08);
    background: #ffffff;
}

.customer-final-page .final-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(20, 23, 30, .14);
}

.customer-final-page .final-product-card img {
    background: #f1f2f4;
    object-fit: contain;
    padding: 16px;
    box-sizing: border-box;
}

.customer-final-page .final-product-card h3 {
    min-height: 78px;
    font-size: 15px;
    color: #171717;
}

.customer-final-page .final-product-card strong {
    color: #8b6429;
}

.customer-final-page .final-product-card a {
    border-radius: 8px;
    border-color: rgba(139, 100, 41, .28);
    background: #16191f;
    color: #ffffff;
}

.customer-final-page .final-story {
    background: linear-gradient(135deg, #101318 0%, #22272f 52%, #101318 100%);
}

.customer-final-page .final-story-copy h2,
.customer-final-page .final-story-copy h3,
.customer-final-page .final-story-copy p {
    letter-spacing: 0;
}

.customer-final-page .final-promise {
    background: #101318;
}

.product-chart-card {
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.product-chart-card canvas {
    height: 310px !important;
}

@media (max-width: 760px) {
    .customer-final-page .final-nav {
        height: auto;
        padding: 12px 16px;
    }

    .customer-final-page .final-hero {
        padding-top: 92px !important;
    }

    .customer-final-page .final-products {
        padding: 44px 18px 58px;
    }

    .customer-final-page .final-section-head a {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
}
/* ===== Brand story visual image ===== */
.customer-final-page .final-story-image {
    background:
        linear-gradient(90deg, rgba(8, 11, 17, 0.04), rgba(8, 11, 17, 0.38)),
        url("../img/customer/brand-story-visual.png") center/cover no-repeat !important;
    min-height: 430px;
}

@media (max-width: 760px) {
    .customer-final-page .final-story-image {
        min-height: 300px;
        background-position: center center !important;
    }
}
/* ===== High-resolution filled hero override ===== */
.customer-final-page .final-hero::before {
    aspect-ratio: 2560 / 720 !important;
    min-height: 430px;
    background-image: url("../img/customer/hero-premium-wide.png") !important;
    background-size: cover !important;
    background-position: center top !important;
}

@media (min-width: 1440px) {
    .customer-final-page .final-hero::before {
        min-height: 500px;
    }
}

@media (max-width: 760px) {
    .customer-final-page .final-hero::before {
        aspect-ratio: 16 / 9 !important;
        min-height: 320px;
        background-size: cover !important;
        background-position: 45% top !important;
    }
}
/* ===== Margin item action buttons: keep edit/copy/delete on one row ===== */
#marginItemList td.margin-action-cell {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 190px !important;
    min-width: 190px !important;
    max-width: 190px !important;
    box-sizing: border-box;
}

#marginItemList td.margin-action-cell button {
    flex: 0 0 auto !important;
    min-width: 46px !important;
    margin: 0 !important;
    padding: 7px 11px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

#marginItemList tr {
    height: auto;
}

@supports selector(table:has(#marginItemList)) {
    table:has(#marginItemList) {
        min-width: 1420px !important;
    }

    table:has(#marginItemList) th:nth-child(8),
    table:has(#marginItemList) td:nth-child(8) {
        width: 190px !important;
        min-width: 190px !important;
        max-width: 190px !important;
        text-align: center !important;
    }
}

@media (max-width: 520px) {
    .briefing-grid,
    .market-ticker-row,
    .market-watchlist {
        grid-template-columns: 1fr !important;
    }

    .briefing-head {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    .briefing-head button,
    .market-refresh {
        width: 100%;
    }
}

/* ===== Sourcing records ===== */
.sourcing-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.sourcing-board-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.sourcing-board-head h2 {
    margin: 0;
    font-size: 21px;
}

.sourcing-board-head p {
    margin: 5px 0 0;
    color: #666;
    font-size: 13px;
}

.sourcing-board-head button,
.sourcing-subhead button,
.sourcing-card-actions button {
    width: auto;
    min-height: 36px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.sourcing-score-panel {
    display: grid;
    grid-template-columns: 110px 110px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px;
    border-radius: 12px;
    background: #111827;
    color: #fff;
}

.sourcing-score-panel span {
    display: block;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 800;
}

.sourcing-score-panel strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
}

.sourcing-score-panel p {
    margin: 0;
    color: #d1d5db;
    font-size: 12px;
    line-height: 1.45;
}

.decision-런칭추천 { color: #86efac !important; }
.decision-검토 { color: #fde68a !important; }
.decision-보류 { color: #fca5a5 !important; }

.sourcing-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.sourcing-form-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 0;
}

.sourcing-form-grid input,
.sourcing-form-grid select,
.sourcing-filter-row input,
.sourcing-filter-row select {
    width: 100%;
    min-height: 42px;
    margin: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}

.sourcing-wide {
    grid-column: span 2;
}

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

.sourcing-panel {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.sourcing-panel h3 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 16px;
}

.sourcing-subhead {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.sourcing-subhead h3 {
    margin: 0;
}

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

.sourcing-mini-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.sourcing-mini-table th,
.sourcing-mini-table td {
    padding: 7px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.sourcing-mini-table th {
    color: #374151;
    font-size: 12px;
    font-weight: 900;
}

.sourcing-mini-table input {
    width: 100%;
    min-height: 36px;
    margin: 0;
    padding: 7px 8px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
}

.sourcing-mini-table button {
    width: auto;
    min-height: 34px;
    padding: 6px 10px;
    border: 0;
    border-radius: 7px;
    background: #6b7280;
    color: #fff;
    cursor: pointer;
}

.supplier-table { min-width: 780px; }
.competitor-table { min-width: 1100px; }

.sourcing-panel textarea {
    width: 100%;
    min-height: 104px;
    margin: 0 0 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    resize: vertical;
}

.sourcing-actions {
    margin-top: 16px;
}

.sourcing-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
    gap: 8px;
    margin-bottom: 12px;
}

.sourcing-list {
    display: grid;
    gap: 10px;
}

.sourcing-list-card {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.sourcing-list-card h3 {
    margin: 6px 0 4px;
    font-size: 17px;
}

.sourcing-list-card p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

.sourcing-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 900;
}

.sourcing-list-score {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 12px 0;
}

.sourcing-list-score b {
    font-size: 28px;
    color: #111827;
}

.decision-chip {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 11px;
    font-weight: 900;
}

.decision-chip.런칭추천 {
    background: #dcfce7;
    color: #166534;
}

.decision-chip.검토 {
    background: #fef3c7;
    color: #92400e;
}

.sourcing-list-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 12px;
}

.sourcing-list-card dl div {
    padding: 9px;
    border-radius: 8px;
    background: #f3f4f6;
}

.sourcing-list-card dt {
    color: #6b7280;
    font-size: 11px;
}

.sourcing-list-card dd {
    margin: 3px 0 0;
    color: #111827;
    font-weight: 900;
}

.sourcing-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.sourcing-card-actions button:last-child {
    background: #991b1b;
}

.sourcing-empty {
    padding: 20px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.refined-score-panel {
    grid-template-columns: 150px minmax(220px, 0.9fr) minmax(260px, 1.25fr);
    padding: 18px;
    background: linear-gradient(135deg, #0f172a, #111827 55%, #172554);
}

.score-ring,
.detail-score-ring,
.mini-score-ring {
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #111827 58%, transparent 59%),
        conic-gradient(#22c55e calc(var(--score) * 1%), rgba(255,255,255,0.13) 0);
}

.score-ring {
    width: 124px;
    height: 124px;
    justify-self: center;
}

.score-ring span {
    color: #fff;
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
}

.score-ring small {
    margin-top: -22px;
    color: #9ca3af;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.score-ring[data-decision="보류"] {
    background:
        radial-gradient(circle at center, #111827 58%, transparent 59%),
        conic-gradient(#f87171 calc(var(--score) * 1%), rgba(255,255,255,0.13) 0);
}

.score-ring[data-decision="검토"] {
    background:
        radial-gradient(circle at center, #111827 58%, transparent 59%),
        conic-gradient(#facc15 calc(var(--score) * 1%), rgba(255,255,255,0.13) 0);
}

.score-summary span {
    color: #93c5fd;
    font-size: 11px;
    font-weight: 900;
}

.score-summary strong {
    display: block;
    margin: 6px 0;
    font-size: 24px;
}

.score-thresholds {
    display: grid;
    gap: 5px;
    margin-top: 10px;
}

.score-thresholds span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #d1d5db;
    font-size: 11px;
    font-weight: 700;
}

.score-thresholds b {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.score-thresholds span:nth-child(2) b { background: #facc15; }
.score-thresholds span:nth-child(3) b { background: #f87171; }

.score-breakdown {
    display: grid;
    gap: 9px;
    align-content: center;
}

.score-metric {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 42px;
    gap: 8px;
    align-items: center;
}

.score-metric span,
.score-metric b {
    color: #d1d5db;
    font-size: 11px;
    font-weight: 900;
}

.score-metric div {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
}

.score-metric i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #60a5fa, #22c55e);
}

.sourcing-list-board {
    position: sticky;
    top: 16px;
}

.sourcing-list-card {
    position: relative;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.sourcing-list-card:hover,
.sourcing-list-card.active {
    border-color: #2563eb;
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.mini-score-ring {
    width: 44px;
    height: 44px;
    background:
        radial-gradient(circle at center, #fff 57%, transparent 58%),
        conic-gradient(#22c55e calc(var(--score) * 1%), #e5e7eb 0);
}

.mini-score-ring b {
    color: #111827;
    font-size: 14px;
}

.mini-score-track {
    height: 6px;
    overflow: hidden;
    margin: -2px 0 12px;
    border-radius: 999px;
    background: #e5e7eb;
}

.mini-score-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f87171, #facc15 52%, #22c55e);
}

.sourcing-card-actions {
    grid-template-columns: repeat(3, 1fr);
}

.sourcing-card-actions button:first-child {
    background: #2563eb;
}

.sourcing-detail {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border-radius: 14px;
    background: #111827;
    color: #fff;
}

.detail-hero h2 {
    margin: 8px 0 5px;
    font-size: 22px;
}

.detail-hero p {
    margin: 0;
    color: #d1d5db;
    font-size: 13px;
}

.detail-score-ring {
    width: 86px;
    height: 86px;
}

.detail-score-ring b {
    color: #fff;
    font-size: 24px;
}

.detail-score-ring span {
    margin-top: -16px;
    color: #d1d5db;
    font-size: 10px;
    font-weight: 900;
}

.detail-score-scale {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 14px 0;
    padding-top: 16px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 900;
}

.detail-score-scale::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f87171, #facc15 52%, #22c55e);
}

.detail-score-scale i {
    position: absolute;
    top: 0;
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #111827;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transform: translateX(-50%);
}

.detail-score-scale span:nth-child(4) {
    text-align: right;
}

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

.detail-insight-grid div {
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.detail-insight-grid span {
    display: block;
    color: #6b7280;
    font-size: 11px;
    font-weight: 900;
}

.detail-insight-grid b {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-insight-grid small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: #6b7280;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-note,
.detail-table-section {
    margin-top: 14px;
}

.detail-note h3,
.detail-table-section h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.detail-note p {
    margin: 0;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    color: #374151;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.detail-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 12px;
}

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

.detail-table th {
    background: #f3f4f6;
    color: #374151;
}

.detail-table a {
    color: #2563eb;
    font-weight: 900;
}

.detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.detail-actions button {
    min-height: 40px;
    border: 0;
    border-radius: 9px;
    background: #111827;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.detail-actions button:last-child {
    background: #991b1b;
}

@media (max-width: 1024px) {
    .sourcing-layout,
    .sourcing-two-col,
    .sourcing-score-panel,
    .refined-score-panel {
        grid-template-columns: 1fr !important;
    }

    .sourcing-list-board {
        position: static;
    }

    .sourcing-form-grid,
    .sourcing-form-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 620px) {
    .sourcing-board-head,
    .sourcing-subhead {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sourcing-form-grid,
    .sourcing-form-grid.compact,
    .sourcing-filter-row {
        grid-template-columns: 1fr !important;
    }

    .sourcing-wide {
        grid-column: auto;
    }

    .detail-hero,
    .detail-insight-grid,
    .detail-actions {
        grid-template-columns: 1fr;
    }

    .detail-score-ring {
        justify-self: start;
    }
}

/* ===== AI business assistant ===== */
.ai-assistant-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1300;
    width: 74px;
    height: 74px;
    border: 0;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.3);
    cursor: pointer;
}

.ai-assistant-panel {
    position: fixed;
    right: 22px;
    bottom: 108px;
    z-index: 1300;
    display: grid;
    grid-template-rows: auto auto minmax(220px, 1fr) auto auto;
    width: min(430px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 130px));
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    background: #0f172a;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.45);
}

.ai-assistant-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ai-assistant-head span {
    display: block;
    color: #93c5fd;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.ai-assistant-head strong {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: 18px;
}

.ai-assistant-head button {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
}

.ai-assistant-tabs,
.ai-assistant-prompts {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ai-assistant-tabs button,
.ai-assistant-prompts button {
    width: auto;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    color: #d1d5db;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.ai-assistant-tabs button.active {
    background: #2563eb;
    color: #fff;
}

.ai-assistant-body {
    display: grid;
    align-content: start;
    gap: 10px;
    overflow-y: auto;
    padding: 14px;
    background: #111827;
}

.ai-msg {
    max-width: 92%;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.ai-msg-user {
    justify-self: end;
    background: #2563eb;
    color: #fff;
}

.ai-msg-bot,
.ai-msg-bot.loading {
    justify-self: start;
    background: #f8fafc;
    color: #111827;
}

.ai-assistant-prompts {
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.08);
    border-bottom: 0;
}

.ai-assistant-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 8px;
    padding: 12px;
    background: #0f172a;
}

.ai-assistant-input textarea {
    width: 100%;
    min-height: 58px;
    max-height: 120px;
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    resize: vertical;
}

.ai-assistant-input button {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 10px;
    background: #22c55e;
    color: #052e16;
    font-weight: 900;
    cursor: pointer;
}

@media (max-width: 620px) {
    .ai-assistant-fab {
        right: 16px;
        bottom: 16px;
        width: 64px;
        height: 64px;
    }

    .ai-assistant-panel {
        right: 12px;
        bottom: 90px;
        width: calc(100vw - 24px);
        max-height: calc(100vh - 110px);
    }
}

/* ===== Customer executive hero override ===== */
.customer-final-page .final-hero {
    position: relative !important;
    height: min(820px, 92vh) !important;
    min-height: 640px !important;
    padding-top: 70px !important;
    overflow: hidden !important;
    background: #05070b !important;
}

.customer-final-page .final-hero::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    background-image:
        linear-gradient(90deg, rgba(4, 6, 10, 0.94) 0%, rgba(4, 6, 10, 0.76) 28%, rgba(4, 6, 10, 0.18) 58%, rgba(4, 6, 10, 0.08) 100%),
        linear-gradient(180deg, rgba(4, 6, 10, 0.16) 0%, rgba(4, 6, 10, 0.08) 58%, rgba(247, 244, 239, 0.94) 100%),
        url("../img/customer/hero-executive.png") !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: cover !important;
    box-shadow: none !important;
}

.customer-final-page .final-hero-bg {
    display: none !important;
}

.customer-final-page .final-hero-copy {
    position: relative !important;
    z-index: 2 !important;
    display: block !important;
    max-width: 560px !important;
    padding: clamp(96px, 14vh, 150px) 0 0 min(8vw, 118px) !important;
    color: #fff !important;
}

.customer-final-page .final-hero-copy p {
    color: #d7ad5c !important;
    font-size: 17px !important;
    letter-spacing: 0.08em !important;
}

.customer-final-page .final-hero-copy h1 {
    font-size: clamp(44px, 5vw, 72px) !important;
    line-height: 1.06 !important;
    letter-spacing: 0 !important;
    text-shadow: 0 16px 42px rgba(0,0,0,0.42);
}

.customer-final-page .final-hero-copy h2 {
    max-width: 520px !important;
    color: rgba(255,255,255,0.82) !important;
    font-size: 17px !important;
    line-height: 1.75 !important;
}

.customer-final-page .final-hero-actions {
    display: flex !important;
}

@media (max-width: 900px) {
    .customer-final-page .final-hero {
        height: auto !important;
        min-height: 760px !important;
        padding-top: 92px !important;
    }

    .customer-final-page .final-hero::before {
        background-image:
            linear-gradient(180deg, rgba(4, 6, 10, 0.28) 0%, rgba(4, 6, 10, 0.72) 54%, rgba(247, 244, 239, 0.96) 100%),
            url("../img/customer/hero-executive.png") !important;
        background-position: 54% top !important;
        background-size: auto 72% !important;
        background-color: #05070b !important;
    }

    .customer-final-page .final-hero-copy {
        padding: 470px 20px 76px !important;
        max-width: 100% !important;
    }

    .customer-final-page .final-hero-copy h1 {
        font-size: 38px !important;
    }

    .customer-final-page .final-hero-actions {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}

/* ===== Customer executive story image override ===== */
.customer-final-page .final-story {
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr) !important;
    min-height: 620px !important;
    background: linear-gradient(135deg, #080b10 0%, #151a20 48%, #0a0d12 100%) !important;
}

/* ===== 1688 sourcing automation MVP ===== */
.sa-report-hero {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(520px, 1.35fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
    padding: 24px;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(11, 31, 58, 0.94), rgba(18, 86, 86, 0.88)),
        linear-gradient(90deg, #0f172a, #115e59);
    color: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.sa-report-hero span {
    color: #99f6e4;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.09em;
}

.sa-report-hero h2 {
    margin: 9px 0 8px;
    font-size: 25px;
    letter-spacing: 0;
}

.sa-report-hero p {
    max-width: 720px;
    margin: 0;
    color: #ccfbf1;
    line-height: 1.55;
}

.sa-hero-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.sa-hero-kpis div {
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 10px;
    background: rgba(255,255,255,0.08);
}

.sa-hero-kpis span {
    display: block;
    color: #a7f3d0;
    letter-spacing: 0;
}

.sa-hero-kpis b {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: 21px;
    font-weight: 950;
}

.sa-control-board {
    border-top: 4px solid #0f766e;
}

.sa-manual-board {
    display: none;
}

.sa-toolbar,
.sa-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.sa-toolbar h2,
.sa-result-head h2 {
    margin: 0;
}

.sa-toolbar p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

.sa-toolbar-actions,
.sa-actions,
.sa-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sa-keyword-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 12px;
}

.sa-ai-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 12px;
    align-items: stretch;
    margin: 12px 0;
}

.sa-ai-settings label {
    display: grid;
    gap: 7px;
}

.sa-ai-settings span {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.sa-ai-settings textarea,
.sa-ai-settings input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
}

.sa-ai-settings textarea {
    min-height: 88px;
    resize: vertical;
    padding: 11px 12px;
    line-height: 1.55;
}

.sa-ai-settings input {
    min-height: 44px;
    padding: 8px 10px;
}

.sa-ai-settings > div {
    display: grid;
    gap: 10px;
}

.sa-ai-settings button {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: #0f766e;
    color: #ffffff;
    font-weight: 950;
    cursor: pointer;
}

.sa-upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
}

.sa-upload-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f766e;
    font-weight: 900;
}

.sa-upload-row input {
    max-width: 220px;
}

.sa-upload-row small {
    color: #64748b;
    font-weight: 700;
}

.sa-ai-status {
    margin: 10px 0 0;
    padding: 11px 13px;
    border-left: 4px solid #0ea5e9;
    border-radius: 8px;
    background: #f0f9ff;
    color: #075985;
    font-size: 13px;
    font-weight: 800;
}

.sa-keyword-row input,
.sa-form-grid input,
.sa-form-grid select,
.sa-form-grid textarea,
.sa-result-head input,
.sa-result-head select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    font: inherit;
    outline: none;
}

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

.sa-form-grid textarea {
    grid-column: span 4;
    min-height: 86px;
    resize: vertical;
}

.sa-actions {
    margin-top: 14px;
}

.sa-toolbar button,
.sa-keyword-row button,
.sa-actions button,
.sa-card-actions button,
.sa-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #0f766e;
    color: #ffffff;
    font-weight: 950;
    text-decoration: none;
    cursor: pointer;
}

.sa-toolbar button + button,
.sa-actions button + button,
.sa-card-actions button + button {
    background: #e0f2fe;
    color: #075985;
}

.sa-result-head > div {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px;
    gap: 8px;
}

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

.sa-empty {
    grid-column: 1 / -1;
    padding: 30px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-weight: 900;
}

.sa-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.sa-card-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
}

.sa-card-head span {
    color: #0f766e;
    font-size: 12px;
    font-weight: 950;
}

.sa-card-head h3 {
    margin: 5px 0 4px;
    color: #111827;
    font-size: 19px;
}

.sa-card-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.sa-score-badge {
    display: grid;
    place-items: center;
    min-width: 92px;
    height: 92px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #065f46;
    text-align: center;
}

.sa-score-badge b {
    font-size: 28px;
    line-height: 1;
}

.sa-score-badge small {
    max-width: 74px;
    font-size: 11px;
    font-weight: 900;
}

.sa-card.grade-a .sa-score-badge {
    background: #dcfce7;
    color: #166534;
}

.sa-card.grade-b .sa-score-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.sa-card.grade-watch .sa-score-badge {
    background: #fef3c7;
    color: #92400e;
}

.sa-card.grade-exclude .sa-score-badge {
    background: #fee2e2;
    color: #991b1b;
}

.sa-score-bars {
    display: grid;
    gap: 8px;
}

.sa-score-bars div {
    display: grid;
    grid-template-columns: 48px 1fr 52px;
    gap: 8px;
    align-items: center;
}

.sa-score-bars span,
.sa-score-bars strong {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.sa-score-bars i {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.sa-score-bars b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0ea5e9, #22c55e);
}

.sa-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.sa-card-metrics div {
    padding: 10px;
    border-radius: 8px;
    background: #f8fafc;
}

.sa-card-metrics dt {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.sa-card-metrics dd {
    margin: 4px 0 0;
    color: #111827;
    font-weight: 950;
}

.sa-risk-line {
    display: grid;
    gap: 5px;
    padding: 11px 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.sa-risk-line b {
    color: #111827;
}

.sa-risk-line span,
.sa-action {
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

.sa-card.risk-medium .sa-risk-line {
    background: #fffbeb;
}

.sa-card.risk-high .sa-risk-line {
    background: #fef2f2;
}

.sa-action {
    margin: 0;
    padding-left: 12px;
    border-left: 3px solid #0f766e;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .sa-report-hero,
    .sa-hero-kpis,
    .sa-form-grid,
    .sa-candidate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sa-form-grid textarea {
        grid-column: span 2;
    }
}

@media (max-width: 700px) {
    .sa-report-hero,
    .sa-hero-kpis,
    .sa-keyword-row,
    .sa-ai-settings,
    .sa-form-grid,
    .sa-candidate-grid,
    .sa-card-metrics,
    .sa-result-head > div {
        grid-template-columns: 1fr;
    }

    .sa-toolbar,
    .sa-result-head {
        align-items: stretch;
        flex-direction: column;
    }

    .sa-form-grid textarea {
        grid-column: span 1;
    }
}

.customer-final-page .final-story-image {
    position: relative !important;
    min-height: 620px !important;
    overflow: hidden !important;
    background:
        linear-gradient(90deg, rgba(5, 7, 11, 0.10), rgba(5, 7, 11, 0.42)),
        linear-gradient(180deg, rgba(5, 7, 11, 0.08), rgba(5, 7, 11, 0.34)),
        url("../img/customer/story-executive-brand.png") center center/cover no-repeat !important;
}

.customer-final-page .final-story-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(5,7,11,0) 0%, rgba(5,7,11,0) 58%, rgba(5,7,11,0.62) 100%);
    pointer-events: none;
}

.story-image-badge {
    position: absolute;
    left: clamp(22px, 4vw, 56px);
    bottom: clamp(22px, 4vw, 52px);
    z-index: 2;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(8, 11, 17, 0.58);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.24);
}

.story-image-badge span {
    display: block;
    margin-bottom: 5px;
    color: #d7ad5c;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.story-image-badge b {
    display: block;
    color: #fff;
    font-size: 21px;
    letter-spacing: 0;
}

.customer-final-page .final-story-copy {
    display: grid;
    align-content: center;
    padding: 76px min(7vw, 92px) !important;
}

@media (max-width: 900px) {
    .customer-final-page .final-story {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }

    .customer-final-page .final-story-image {
        min-height: 420px !important;
        background-position: 48% center !important;
    }

    .customer-final-page .final-story-copy {
        padding: 42px 22px 54px !important;
    }
}
