@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* WeDealize Supplier Portal Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* WeDealize Brand Colors */
    --primary: #FFE500;
    --primary-light: #FFF176;
    --primary-dark: #E6CE00;
    --primary-bg: #FFFDE7;
    --accent: #1a1a1a;
    --accent-light: #333333;
    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    /* Grayscale */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: var(--gray-800);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

/* Portal App */
.portal-app {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.portal-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 24px;
    width: 260px;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* 대시보드 모드일 때 로고 영역 스타일 */
body.dashboard-mode .logo {
    background: var(--white);
}

body.dashboard-mode .logo img {
    filter: none;
}

body.dashboard-mode .portal-badge {
    background: var(--gray-100);
    color: var(--gray-700);
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
}

.portal-badge {
    background: var(--primary);
    color: var(--gray-900);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 30px;
    flex: 1;
    justify-content: flex-end;
}

/* Language Dropdown */
.language-dropdown {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-700);
    transition: all 0.2s;
}

.language-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.language-dropdown.active .language-btn {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.dropdown-arrow {
    font-size: 0.7rem;
    color: var(--gray-400);
    transition: transform 0.2s;
}

.language-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    max-height: 400px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.language-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-search {
    padding: 12px;
    border-bottom: 1px solid var(--gray-100);
}

.language-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
}

.language-search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.language-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.language-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.language-item:hover {
    background: var(--gray-50);
}

.language-item.active {
    background: rgba(37, 99, 235, 0.08);
}

.lang-flag {
    font-size: 1.2rem;
}

.lang-name {
    font-weight: 500;
    color: var(--gray-800);
    flex: 1;
}

.lang-code {
    font-size: 0.8rem;
    color: var(--gray-400);
}

.lang-check {
    color: var(--primary);
    font-weight: 600;
}

/* RTL Support */
[dir="rtl"] .language-menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .language-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .lang-name {
    text-align: right;
}

/* Scrollbar styling for language list */
.language-list::-webkit-scrollbar {
    width: 6px;
}

.language-list::-webkit-scrollbar-track {
    background: var(--gray-50);
    border-radius: 3px;
}

.language-list::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.language-list::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
}

.btn-logout {
    padding: 6px 14px;
    background: var(--gray-100);
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Main */
.portal-main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Auth Section */
.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 70px);
    padding: 40px 20px;
    background: var(--gray-900);
}

.auth-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 44px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 4px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    font-weight: 500;
}

.auth-tab:hover {
    color: var(--gray-700);
}

.auth-tab.active {
    background: var(--primary);
    color: var(--gray-900);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.auth-form h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--gray-800);
}

.auth-subtitle {
    color: var(--gray-500);
    margin-bottom: 28px;
}

/* Social Login */
.social-login {
    margin-bottom: 20px;
}

.btn-google {
    width: 100%;
    padding: 12px 20px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-google:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.google-icon {
    flex-shrink: 0;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 15px;
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* Email Verification */
.verification-icon {
    font-size: 64px;
    text-align: center;
    margin: 20px 0;
}

.verification-code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.code-input {
    width: 50px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    transition: all 0.2s;
}

.code-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.code-input.filled {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.code-input.error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.resend-section {
    text-align: center;
    margin: 25px 0;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: inherit;
    font-weight: 500;
    text-decoration: underline;
}

.link-btn:hover {
    color: var(--primary-dark);
}

.link-btn:disabled {
    color: var(--gray-400);
    cursor: not-allowed;
    text-decoration: none;
}

.resend-timer {
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* Forgot Password / Reset */
.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.reset-instructions {
    background: var(--gray-50);
    padding: 16px;
    border-radius: 10px;
    margin: 20px 0;
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: all 0.25s ease;
    background: var(--gray-50);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--gray-300);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 229, 0, 0.2);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: var(--gray-900);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(255, 229, 0, 0.4);
}

.btn-outline {
    background: white;
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--primary-light);
    color: var(--primary);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-icon {
    font-size: 1.1rem;
}

/* Dashboard */
.dashboard-section {
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
}

.dashboard-container {
    display: flex;
    flex-direction: row !important;
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.dashboard-sidebar {
    width: 260px;
    background: var(--gray-900);
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar-label {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 0 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    position: relative;
    border-radius: var(--radius);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.nav-btn.active {
    background: var(--primary);
    color: var(--gray-900);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 229, 0, 0.3);
}

.nav-icon {
    font-size: 1.25rem;
    width: 28px;
    text-align: center;
}

.badge-count {
    position: absolute;
    right: 14px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}

/* Sidebar Submenu */
.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-parent {
    justify-content: flex-start;
}

.nav-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.nav-group.expanded .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
}

.nav-group.expanded .nav-submenu {
    display: flex;
}

.nav-child {
    padding-left: 52px !important;
    font-size: 0.9rem;
}

.nav-child .nav-icon {
    font-size: 1rem;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    height: 100%;
    min-height: 0;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--gray-100);
}

.dashboard-panel {
    display: none;
}

.dashboard-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    margin-bottom: 28px;
}

.panel-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--gray-800);
}

.panel-header p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.stat-icon.primary { background: var(--primary); }
.stat-icon.success { background: var(--success-light); }
.stat-icon.warning { background: var(--warning-light); }
.stat-icon.info { background: var(--info-light); }
.stat-icon.dark { background: var(--gray-800); }
.stat-icon.purple { background: #ede9fe; }
.stat-icon.pink { background: #fce7f3; }

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Alerts */
.alert {
    display: flex;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-content h4 {
    margin-bottom: 5px;
}

.alert-content p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.missing-items {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.missing-tag {
    background: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--warning);
    border: 1px solid #fcd34d;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.upload-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.upload-card {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.upload-card.required {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.upload-card h3 {
    margin-bottom: 5px;
}

.upload-card p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 15px;
}

.upload-dropzone {
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.dropzone-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    color: var(--gray-400);
}

.upload-dropzone p {
    margin: 0;
    color: var(--gray-600);
}

.browse-link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

.file-types {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 8px;
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-top: 15px;
}

.file-icon {
    font-size: 1.2rem;
}

.file-name {
    flex: 1;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.2rem;
    cursor: pointer;
}

.btn-remove:hover {
    color: var(--danger);
}

.upload-actions {
    text-align: center;
}

.optional-badge {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.required-badge {
    color: var(--danger);
    font-size: 0.75rem;
    font-weight: normal;
}

/* Processing Status */
.processing-status {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.status-header {
    text-align: center;
    margin-bottom: 25px;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.status-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-400);
}

.status-step.active {
    color: var(--primary);
}

.status-step.complete {
    color: var(--success);
}

.step-icon {
    font-size: 1.5rem;
}

.step-label {
    font-size: 0.85rem;
}

/* Catalog Upload Main Section */
.catalog-upload-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.upload-card-main {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--primary);
}

.upload-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.upload-icon-large {
    font-size: 2.5rem;
}

.upload-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-card-title h3 {
    margin: 0;
    font-size: 1.3rem;
}

.required-tag {
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.upload-description {
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.6;
}

.upload-dropzone-large {
    padding: 50px 30px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
    border: 2px dashed var(--primary);
}

.dropzone-icon-large {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.dropzone-text {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.btn-process {
    width: 100%;
    margin-top: 25px;
    padding: 16px;
    font-size: 1.1rem;
}

/* Optional Price List Section */
.upload-card-optional {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.optional-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    background: var(--gray-50);
    transition: background 0.2s;
}

.optional-header:hover {
    background: var(--gray-100);
}

.optional-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.optional-icon {
    font-size: 1.3rem;
}

.optional-title h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-700);
}

.optional-tag {
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.optional-toggle {
    color: var(--gray-400);
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.upload-card-optional.expanded .optional-toggle {
    transform: rotate(180deg);
}

.optional-content {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
}

.optional-description {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.upload-dropzone-compact {
    padding: 25px;
}

/* Extracted Products Section */
.extracted-products-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 1.2rem;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 10px;
}

.extracted-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: #eff6ff;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.extracted-info-box .info-icon {
    font-size: 1.2rem;
}

.extracted-info-box strong {
    color: var(--primary);
}

/* Legacy - keeping for compatibility */

.source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.source-badge.catalog {
    background: #dbeafe;
    color: #1d4ed8;
}

.source-badge.price {
    background: #d1fae5;
    color: #047857;
}

.category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    background: var(--gray-100);
    color: var(--gray-700);
}

.category-badge.missing {
    background: #fef3c7;
    color: #b45309;
}

.selected-count {
    margin-left: 4px;
    font-size: 0.85rem;
    opacity: 0.8;
}

#move-to-list-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Data Tables */
.data-table {
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.data-table th,
.data-table td {
    padding: 16px 18px;
    text-align: left;
}

.data-table th {
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--gray-100) 100%);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--primary-bg);
}

.incomplete-row {
    background: #fef3c7 !important;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.status-badge.success {
    background: #dcfce7;
    color: #166534;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

/* Products Table */
.product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-thumb {
    font-size: 1.8rem;
}

.product-name {
    display: block;
    font-weight: 500;
}

.product-category {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.cert-badge {
    display: inline-block;
    background: #dcfce7;
    color: #166534;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-right: 4px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.complete {
    background: var(--success);
}

.status-dot.incomplete {
    background: var(--warning);
}

.missing-data {
    color: var(--warning);
}

.missing-indicator {
    font-size: 0.8rem;
    font-style: italic;
}

.btn-add-inline {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 8px;
}

/* Data Quality Section */
.data-quality-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.quality-summary {
    display: flex;
    gap: 30px;
    align-items: center;
}

.quality-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--percentage) * 1%), var(--gray-200) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.quality-ring::before {
    content: '';
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 50%;
    position: absolute;
}

.quality-value {
    position: relative;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.quality-checklist {
    list-style: none;
}

.quality-checklist li {
    padding: 6px 0;
    font-size: 0.9rem;
}

.quality-checklist .complete {
    color: var(--success);
}

.quality-checklist .incomplete {
    color: var(--warning);
}

.quality-checklist a {
    color: var(--primary);
    margin-left: 8px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

/* Inquiries */
.inquiries-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.inquiry-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.inquiry-card.new {
    border-left: 4px solid var(--primary);
}

.inquiry-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.inquiry-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.inquiry-badge.new {
    background: #dbeafe;
    color: #1d4ed8;
}

.inquiry-badge.sample {
    background: #f3e8ff;
    color: #7c3aed;
}

.inquiry-date {
    color: var(--gray-400);
    font-size: 0.85rem;
}

.inquiry-content h4 {
    margin-bottom: 8px;
}

.inquiry-from {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.inquiry-details {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 10px;
}

.inquiry-message {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-style: italic;
}

.inquiry-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Profile Form */
.profile-form {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-200);
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h3 {
    margin-bottom: 20px;
    color: var(--gray-700);
}

.cert-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-card:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Section Description */
.section-description {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.field-description {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin: 4px 0 10px 0;
}

/* Certificate Upload Section */
.cert-upload-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

.cert-upload-section h4 {
    font-size: 0.95rem;
    color: var(--gray-700);
    margin-bottom: 15px;
}

.upload-dropzone.compact {
    padding: 20px;
}

.upload-dropzone.compact .dropzone-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.uploaded-certs-list {
    margin-top: 15px;
}

.uploaded-cert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 8px;
}

.uploaded-cert-item .cert-icon {
    font-size: 1.2rem;
}

.uploaded-cert-item .cert-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.uploaded-cert-item .cert-status {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.cert-status.valid {
    background: #d1fae5;
    color: #047857;
}

.cert-status.expired {
    background: #fee2e2;
    color: #b91c1c;
}

.input-with-prefix {
    display: flex;
}

.input-with-prefix .prefix {
    padding: 12px 14px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--gray-500);
}

.input-with-prefix input {
    border-radius: 0 8px 8px 0;
}

.form-actions {
    margin-top: 25px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: pointer;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.missing-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fef3c7;
    border-radius: 8px;
    margin-bottom: 20px;
}

.highlight-missing {
    background: #fffbeb;
    padding: 15px;
    margin: -5px -15px 15px;
    border-radius: 8px;
    border: 1px solid #fcd34d;
}

.cert-checkboxes-small {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.cert-checkboxes-small label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

/* Activity */
.recent-activity {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.recent-activity h3 {
    margin-bottom: 20px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--gray-50);
    border-radius: 8px;
}

.activity-icon {
    font-size: 1.3rem;
}

.activity-content p {
    margin-bottom: 4px;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* Upload History */
.upload-history {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.upload-history h3 {
    margin-bottom: 20px;
}

/* ==================== Catalog Step-based Registration ==================== */

.catalog-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.step-item.active .step-number {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.step-item.completed .step-number {
    background: var(--success);
    color: white;
}

.step-item.completed .step-number::after {
    content: '✓';
    font-size: 1.2rem;
}

.step-item.completed .step-number span {
    display: none;
}

.step-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
    text-align: center;
    max-width: 100px;
}

.step-item.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step-item.completed .step-label {
    color: var(--success);
}

.step-connector {
    width: 80px;
    height: 3px;
    background: var(--gray-200);
    margin: 0 15px;
    margin-bottom: 28px;
    border-radius: 2px;
    transition: background 0.3s;
}

.step-connector.completed {
    background: var(--success);
}

/* Step number span inside */
.step-number span {
    display: block;
}

/* Step Cards */
.catalog-step-content {
    margin-bottom: 25px;
}

.step-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.step-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.step-icon {
    font-size: 2rem;
}

.step-card-header h3 {
    font-size: 1.3rem;
    margin: 0;
    flex: 1;
}

.step-description {
    color: var(--gray-600);
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Step Actions */
.step-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-100);
}

.step-actions-between {
    justify-content: space-between;
}

.step-actions-right {
    display: flex;
    gap: 10px;
}

.btn-arrow {
    font-size: 1.1rem;
}

/* Upload Dropzone Large */
.upload-dropzone-large {
    padding: 50px 30px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
    border: 2px dashed var(--primary);
    text-align: center;
}

.dropzone-icon-large {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

/* Uploaded File Large */
.uploaded-file-large {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
    margin-top: 20px;
}

.file-icon-large {
    font-size: 2.5rem;
}

.uploaded-file-large .file-info {
    flex: 1;
}

.uploaded-file-large .file-name {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.uploaded-file-large .file-size {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* Extracted Products Summary */
.extracted-count {
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.extracted-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--gray-50);
    border-radius: 10px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.summary-item .summary-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
}

.summary-item.complete .summary-icon {
    background: var(--success);
}

.summary-item.incomplete .summary-icon {
    background: var(--warning);
}

.summary-count {
    font-weight: 600;
}

/* Price List Upload Section */
.pricelist-upload-section {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.pricelist-upload-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pricelist-upload-row .upload-info {
    flex: 1;
}

.pricelist-upload-row .upload-info p {
    color: var(--gray-600);
    margin: 0;
    font-size: 0.95rem;
}

.upload-dropzone-inline {
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    padding: 20px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 250px;
}

.upload-dropzone-inline:hover,
.upload-dropzone-inline.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

.upload-dropzone-inline .dropzone-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

.upload-dropzone-inline p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.pricelist-uploaded-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.uploaded-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.uploaded-file-info .file-icon {
    font-size: 1.5rem;
}

.uploaded-file-info .file-name {
    font-weight: 500;
    color: var(--gray-700);
}

.matched-count-badge {
    background: var(--success);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* Unified Product Table */
.product-table {
    margin-top: 0;
}

.product-table .col-checkbox {
    width: 40px;
    text-align: center;
}

/* Price comparison styling */
.price-original {
    color: var(--gray-400);
    text-decoration: line-through;
}

.price-updated {
    color: var(--success);
    font-weight: 600;
}

.status-badge.info {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Responsive for price upload section */
@media (max-width: 768px) {
    .pricelist-upload-row {
        flex-direction: column;
        gap: 15px;
    }

    .upload-dropzone-inline {
        width: 100%;
        min-width: auto;
    }

    .pricelist-uploaded-row {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

.btn-danger {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

/* Step 4 Complete */
.step-card-complete {
    text-align: center;
    padding: 50px 30px;
}

.complete-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    color: white;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.complete-message {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin-bottom: 30px;
}

.complete-summary {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 20px;
    max-width: 300px;
    margin: 0 auto 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row span:last-child {
    font-weight: 600;
}

/* Extract Button */
#extract-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#extract-btn:not(:disabled) {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

/* Spinner for loading state */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hide old sections (replaced by step-based UI) */
#panel-catalog > .processing-status,
#panel-catalog > .extracted-products-section {
    display: none !important;
}


/* Responsive for catalog steps */
@media (max-width: 768px) {
    .catalog-steps {
        flex-wrap: wrap;
        gap: 15px;
    }

    .step-connector {
        display: none;
    }

    .step-item {
        flex: 1;
        min-width: 80px;
    }

    .step-actions-between {
        flex-direction: column;
        gap: 10px;
    }

    .step-actions-right {
        flex-direction: column;
        width: 100%;
    }

    .step-actions-right .btn {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .upload-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dashboard-container {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
    }

    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 0 10px;
    }

    .nav-btn {
        flex-direction: column;
        padding: 10px 15px;
        font-size: 0.8rem;
    }

    .nav-btn span:not(.nav-icon) {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== PO Management Styles ==================== */

.po-table {
    margin-top: 20px;
}

.po-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-weight: 600;
    color: #2563eb;
}

.buyer-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.buyer-name {
    font-weight: 500;
    color: #1f2937;
}

.buyer-country {
    font-size: 0.85rem;
    color: #6b7280;
}

.amount {
    font-weight: 600;
    color: #059669;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-badge.confirmed {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.status-badge.shipping {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
}

.status-badge.completed {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-badge.canceled {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.btn-success {
    background: #059669;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #047857;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    flex: 1;
    min-width: 180px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.pending {
    background: #fef3c7;
}

.stat-icon.confirmed {
    background: #dbeafe;
}

.stat-icon.shipping {
    background: #e0e7ff;
}

.stat-icon.completed {
    background: #d1fae5;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.page-info {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--gray-500);
    font-style: italic;
}

/* Company Logo Upload */
.logo-upload-container {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 20px;
    background: var(--gray-50);
    border-radius: 12px;
}

.logo-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: white;
    flex-shrink: 0;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-400);
    text-align: center;
    padding: 10px;
}

.logo-placeholder svg {
    color: var(--gray-300);
}

.logo-placeholder span {
    font-size: 0.75rem;
}

.logo-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.logo-upload-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-upload-actions .btn-danger {
    color: var(--danger);
    border-color: var(--danger);
}

.logo-upload-actions .btn-danger:hover {
    background: var(--danger);
    color: white;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

/* Readonly Input */
.input-readonly {
    background: var(--gray-100) !important;
    color: var(--gray-500) !important;
    cursor: not-allowed;
    border-color: var(--gray-200) !important;
}

/* Crop Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.crop-modal-content {
    width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--gray-800);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 20px;
}

.crop-container {
    width: 100%;
    max-height: 400px;
    background: var(--gray-100);
    border-radius: 8px;
    overflow: hidden;
}

.crop-container img {
    max-width: 100%;
    display: block;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
}

/* Cropper.js overrides */
.cropper-view-box,
.cropper-face {
    border-radius: 0;
}

/* PO Detail Styles */
.po-detail-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.po-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.po-detail-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.po-detail-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.btn-back {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.btn-back:hover {
    background: var(--gray-100);
}

.btn-icon {
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--gray-600);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.po-detail-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 24px;
}

.po-number-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.po-detail-number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.po-detail-date {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.status-badge.shipping-requested {
    background: #f3e8ff;
    color: #7c3aed;
}

.btn-cancel {
    color: var(--gray-600);
    border-color: var(--gray-300);
}

.btn-cancel:hover {
    background: var(--gray-100);
}

.po-detail-section {
    margin-bottom: 24px;
}

.po-detail-section .section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.company-info-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

.company-avatar {
    width: 48px;
    height: 48px;
    background: var(--gray-200);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.company-details {
    flex: 1;
}

.company-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.company-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.contact-item svg {
    color: var(--gray-400);
}

.trade-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

.trade-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trade-label {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.trade-value {
    font-weight: 500;
    color: var(--gray-800);
}

.po-items-table {
    width: 100%;
    border-collapse: collapse;
}

.po-items-table th,
.po-items-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.po-items-table th {
    background: var(--gray-50);
    font-weight: 500;
    color: var(--gray-600);
    font-size: 0.85rem;
}

.po-items-table td {
    color: var(--gray-700);
}

.po-items-table .text-right {
    text-align: right;
}

.po-items-table tfoot {
    background: var(--gray-50);
}

.po-items-table .total-row td {
    padding: 16px;
    font-size: 0.95rem;
    border-bottom: none;
}

.notes-box {
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

.notes-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.notes-content {
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .po-detail-info-row {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .trade-info-grid {
        grid-template-columns: 1fr;
    }

    .company-contact {
        flex-direction: column;
        gap: 8px;
    }

    .po-items-table {
        font-size: 0.85rem;
    }

    .po-items-table th,
    .po-items-table td {
        padding: 8px 12px;
    }
}

/* Column Filter Dropdown */
.th-filter {
    position: relative;
}

.th-filter > span {
    margin-right: 4px;
}

.column-filter {
    display: inline-block;
    position: relative;
}

.filter-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: var(--gray-400);
    transition: all 0.2s;
    vertical-align: middle;
}

.filter-icon-btn:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.filter-icon-btn.active {
    color: var(--primary-dark);
    background: var(--primary-bg);
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 150px;
    z-index: 100;
    padding: 8px 0;
}

.filter-dropdown.show {
    display: block;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s;
    font-weight: normal;
    font-size: 0.9rem;
}

.filter-option:hover {
    background: var(--gray-50);
}

.filter-option input[type="radio"] {
    accent-color: var(--primary-dark);
}

/* ==================== Product Edit Page Styles ==================== */

.product-edit-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.page-header .btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s;
}

.page-header .btn-back:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 4px 0 0 0;
}

/* Product Edit Form */
.product-edit-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.product-edit-form .form-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.form-section-header {
    padding: 20px 24px;
    background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
    border-bottom: 1px solid var(--gray-100);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.section-icon {
    font-size: 1.4rem;
}

.form-section-body {
    padding: 24px;
}

/* Form Grid Layouts */
.form-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid:last-child {
    margin-bottom: 0;
}

.form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Highlight field */
.highlight-field {
    background: var(--warning-light);
    padding: 16px;
    border-radius: var(--radius);
    margin: -8px;
}

.highlight-field .wd-form-label {
    margin-bottom: 8px;
}

/* Certification Grid */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Image Upload Container */
.image-upload-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.image-preview {
    width: 160px;
    height: 160px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--gray-50);
    flex-shrink: 0;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-400);
    text-align: center;
}

.image-placeholder svg {
    color: var(--gray-300);
}

.image-placeholder span {
    font-size: 0.85rem;
}

.image-upload-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-upload-actions .upload-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

/* Form Actions */
.product-edit-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

/* Toast Styles for Product Edit */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Responsive for Product Edit Page */
@media (max-width: 768px) {
    .product-edit-page {
        padding: 0 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .image-upload-container {
        flex-direction: column;
    }

    .image-preview {
        width: 100%;
        height: 200px;
    }

    .product-edit-form .form-actions {
        flex-direction: column;
    }

    .product-edit-form .form-actions .btn {
        width: 100%;
    }
}
