:root {
    --sidebar-width: 260px;
    --coupang-red: #e4002b;
    --coupang-dark: #1a1a2e;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    background: #f5f6fa;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--coupang-dark);
    color: #fff;
    overflow-y: auto;
    z-index: 100;
}

.sidebar .logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .logo h2 {
    margin: 0;
    font-size: 18px;
    color: var(--coupang-red);
}

.sidebar .logo small {
    color: #888;
    font-size: 12px;
}

.sidebar .nav-section {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar .nav-section h6 {
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    padding: 5px 20px;
    margin: 0;
    letter-spacing: 1px;
}

.sidebar a {
    display: block;
    padding: 10px 20px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.sidebar a:hover,
.sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar a.active {
    border-left: 3px solid var(--coupang-red);
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 25px;
}

.page-header h3 {
    margin: 0 0 5px;
    color: #333;
}

.page-header p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

.api-form {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.api-form label {
    font-weight: 600;
    font-size: 13px;
    color: #555;
}

.api-form .form-text {
    font-size: 12px;
}

.btn-coupang {
    background: var(--coupang-red);
    color: #fff;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn-coupang:hover {
    background: #c00024;
    color: #fff;
}

.response-panel {
    background: #1e1e2e;
    border-radius: 8px;
    padding: 20px;
    color: #a6e3a1;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.response-panel .json-key { color: #89b4fa; }
.response-panel .json-string { color: #a6e3a1; }
.response-panel .json-number { color: #fab387; }
.response-panel .json-boolean { color: #f38ba8; }
.response-panel .json-null { color: #6c7086; }

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card .card-body {
    padding: 12px;
}

.product-card .product-name {
    font-size: 13px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.product-card .product-price {
    color: var(--coupang-red);
    font-weight: 700;
    font-size: 16px;
}

.badge-rocket {
    background: #5865f2;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-freeship {
    background: #2ecc71;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading-spinner.active {
    display: block;
}

.config-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Login page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* Sidebar user info */
.user-info-section {
    padding: 15px 20px !important;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--coupang-red);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.user-detail {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.user-detail strong {
    font-size: 13px;
    color: #fff;
}

.role-badge {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    display: inline-block;
    width: fit-content;
}

.role-admin { background: var(--coupang-red); color: #fff; }
.role-editor { background: #5865f2; color: #fff; }
.role-viewer { background: #666; color: #fff; }

.sidebar-logout {
    color: #f66 !important;
    font-size: 13px;
}

.sidebar-logout:hover {
    color: #ff4444 !important;
    background: rgba(255,68,68,0.1) !important;
}
