/* Portfolio Suite Shared Styles - Matching Chrome Theme Creator */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
    padding: 40px 20px;
}

.container {
    max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.header-row {
  display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

h1 {
    color: white;
    font-size: 56px;
    margin: 0;
    text-align: left;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Layout */
.panels-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Panel Base */
.panel {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.panel-title {
    font-size: 18px;
    color: #2d3748;
    margin-bottom: 20px;
    font-weight: 700;
}

/* Mode Toggle Buttons */
.mode-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.mode-btn {
    background: white;
    color: #2d3748;
    border: 2px solid #e2e8f0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
  font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
    border-color: transparent;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 12px;
  font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: white;
    color: #2d3748;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Hidden Elements */
.hidden {
  display: none !important;
}

/* Data Fields */
.data-field {
    margin-bottom: 16px;
}

.data-field.hidden {
    display: none;
}

/* Character Counter */
.counter {
    font-size: 11px;
    font-weight: 500;
    color: #718096;
    margin-left: 8px;
    text-transform: none;
    letter-spacing: normal;
}

/* Color Inputs */
.color-inputs-container {
  display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.color-input {
    flex: 1;
    min-width: 140px;
}

.color-input .sub-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: normal;
}

.color-input-row {
  display: flex;
  align-items: center;
    gap: 8px;
}

.color-input-row input[type="color"] {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: white;
}

.color-input-row input[type="color"]:hover {
    border-color: #667eea;
}

.color-input-row input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Monaco', 'Courier New', monospace;
    text-transform: uppercase;
    width: auto;
}

.color-input-row.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Background Toggle */
.bg-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bg-toggle-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
  cursor: pointer;
    accent-color: #667eea;
}

/* Logo Container */
.logo-container {
    margin-top: 16px;
}

.logo-input-group {
  display: flex;
    gap: 12px;
  align-items: center;
    flex-wrap: wrap;
}

.logo-input-group input[type="file"] {
    flex: 1;
    min-width: 200px;
}

.clear-btn {
    background: #fc8181;
  color: white;
  border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
  font-weight: 600;
  cursor: pointer;
    transition: background 0.2s;
}

.clear-btn:hover {
    background: #f56565;
}

/* Logo Controls */
#logoControls,
#batchLogoControls,
#serialLogoControls {
    margin-top: 16px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.logo-size-container {
    margin-bottom: 12px;
}

.logo-size-container label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: normal;
}

.logo-size-container input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.logo-size-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
    width: 16px;
    height: 16px;
  border-radius: 50%;
    background: #667eea;
  cursor: pointer;
}

.logo-size-container input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
  border-radius: 50%;
    background: #667eea;
  cursor: pointer;
  border: none;
}

.logo-style-option {
  display: flex;
  align-items: center;
    gap: 8px;
}

.logo-style-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
  cursor: pointer;
    accent-color: #667eea;
}

.logo-style-option label {
    font-size: 13px;
    color: #4a5568;
  cursor: pointer;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
}

/* Primary Button */
.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 32px;
  border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    width: 100%;
    margin-top: 16px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Secondary Button */
.btn-secondary {
    background: white;
    color: #2d3748;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: #667eea;
    color: #667eea;
}

/* Preview Panel */
.panel-preview {
    min-height: 400px;
}

.no-preview,
.batch-instructions-preview,
.serial-instructions-preview {
  display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.preview-placeholder {
    text-align: center;
    color: #a0aec0;
    padding: 40px 20px;
}

.preview-placeholder svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.preview-placeholder p {
    font-size: 14px;
    margin-bottom: 16px;
    color: #718096;
}

.instruction-list {
    text-align: left;
    margin: 0 auto 16px;
    padding-left: 24px;
    max-width: 400px;
    color: #718096;
    font-size: 13px;
    line-height: 1.8;
}

.instruction-list li {
    margin-bottom: 4px;
}

.instruction-tip {
    font-size: 12px;
    color: #667eea;
    font-weight: 500;
}

/* QR Preview Container */
.qr-preview-container {
    text-align: center;
}

#qrcode {
  display: flex;
  align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 300px;
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e2e8f0;
}

#qrcode.transparent {
    background: repeating-conic-gradient(#e2e8f0 0% 25%, white 0% 50%) 50% / 16px 16px;
}

#qrcode svg,
#qrcode canvas,
#qrcode img {
  max-width: 100%;
  height: auto;
}

/* Preview Data Section */
.preview-data {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.preview-data h3 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

.preview-text {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #4a5568;
    word-break: break-all;
    max-height: 120px;
    overflow-y: auto;
}

/* Download Options */
.download-options {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.download-info {
    font-size: 13px;
    color: #718096;
    margin-bottom: 16px;
    text-align: center;
}

.download-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    flex: 1;
    min-width: 140px;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.download-btn-svg {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    box-shadow: none;
}

.download-btn-svg:hover {
    background: #f7fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

/* Batch Mode Section */
.batch-mode-section,
.serial-mode-section {
    display: none;
}

.batch-mode-section.active,
.serial-mode-section.active {
    display: block;
}

.single-mode-section {
    display: none;
}

.single-mode-section.active {
    display: block;
}

.batch-instructions,
.serial-instructions {
    background: #f7fafc;
  border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.batch-instructions h3,
.serial-instructions h3 {
    font-size: 16px;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 700;
}

.batch-instructions p,
.serial-instructions p {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 8px;
}

.template-link {
    color: #667eea;
    font-weight: 600;
  text-decoration: none;
}

.template-link:hover {
  text-decoration: underline;
}

/* CSV Columns Info */
.csv-columns-info {
    background: #edf2f7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.csv-columns-info h4 {
  font-size: 14px;
    color: #2d3748;
    margin-bottom: 10px;
    font-weight: 700;
}

.columns-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.columns-list li {
  font-size: 12px;
    color: #4a5568;
    margin-bottom: 6px;
    padding-left: 12px;
  position: relative;
}

.columns-list li::before {
    content: "•";
  position: absolute;
  left: 0;
    color: #667eea;
}

.columns-list li strong {
    color: #2d3748;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    background: #fff;
    padding: 1px 4px;
    border-radius: 3px;
}

.columns-note {
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

/* Color Section in Batch/Serial Modes */
.color-section {
    margin-bottom: 20px;
}

.color-section .color-input-row {
    margin-bottom: 12px;
}

.color-section .color-input-row:last-child {
    margin-bottom: 0;
}

.color-section label {
    min-width: 120px;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.toggle-wrapper {
  display: flex;
  align-items: center;
    gap: 8px;
    min-width: 120px;
}

.toggle-wrapper input[type="checkbox"] {
    width: 16px;
    height: 16px;
  cursor: pointer;
    accent-color: #667eea;
}

.color-text {
    width: 80px !important;
    flex: 0 0 auto !important;
}

/* Progress Bar */
.progress-bar-container {
  width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
    transition: width 0.3s ease;
}

#progressStatus,
#serialProgressStatus {
    font-size: 13px;
    color: #4a5568;
    text-align: center;
    font-weight: 500;
}

/* Batch Preview */
.batch-preview {
    margin-top: 20px;
}

.batch-preview h4 {
    font-size: 14px;
  font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
}

.preview-container,
#serialPreviewContainer {
  display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.qr-preview-item {
    text-align: center;
}

.qr-preview-item img,
.qr-preview-item svg {
    width: 100px;
    height: 100px;
    border: 2px solid #e2e8f0;
  border-radius: 8px;
    background: white;
}

.qr-preview-label {
    font-size: 11px;
    color: #718096;
    margin-top: 8px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Preview panel visibility control */
#singlePreviewPanel,
#batchPreviewPanel,
#serialPreviewPanel {
  display: none;
}

#singlePreviewPanel.visible,
#batchPreviewPanel.visible,
#serialPreviewPanel.visible {
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .panels-container {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 36px;
    }
    
    .header-row {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    body {
        padding: 20px 12px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    .panel {
        padding: 16px;
    }
    
    .mode-toggle {
        flex-direction: column;
    }
    
    .mode-btn {
        width: 100%;
    }
    
    .color-inputs-container {
        flex-direction: column;
    }
    
    .download-buttons {
        flex-direction: column;
    }
    
    .download-btn {
        width: 100%;
    }
}