/* Custom Styles for QR Code Generator & Scanner Suite - AhteVerse */

.tool-page {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

.tool-content {
    padding: var(--space-xl) 0;
    margin-top: 20px;
}

/* Tool Header */
.tool-header {
    margin-bottom: var(--space-xl);
}

.tool-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.tool-title span {
    color: var(--magenta);
    text-shadow: var(--glow-magenta);
}

.tool-subtitle {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Custom Tabs */
.tool-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.tab-btn {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 24px;
    border: 1px solid var(--border-color);
    background: var(--glass-bg);
    color: var(--text-primary);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-btn:hover {
    border-color: var(--magenta);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.2);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--magenta), var(--electric-blue));
    border-color: transparent;
    color: #FFFFFF;
    box-shadow: var(--glow-blue);
}

.tab-icon {
    font-size: 1.1rem;
}

/* Workspace Panes */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease forwards;
}

/* Workspace Grid Layout */
.workspace-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

/* Config & Preview Panels */
.config-panel {
    padding: var(--space-lg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.preview-panel-column {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.preview-card-sticky {
    padding: var(--space-lg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.panel-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    padding-bottom: 15px;
    margin-bottom: 5px;
}

/* Config Panel Sections */
.panel-section {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-lg);
}

.panel-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

/* QR Type Selector Buttons */
.type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
}

.type-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.type-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--electric-blue);
}

.type-btn.active {
    background: rgba(0, 123, 255, 0.15);
    border-color: var(--electric-blue);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.25);
    color: var(--electric-blue);
}

.type-icon {
    font-size: 1.4rem;
}

/* Forms & Inputs */
.content-fields {
    min-height: 120px;
}

.content-input-field {
    display: none;
}

.content-input-field.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

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

.form-row {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.flex-1 {
    flex: 1;
}

.flex-center {
    display: flex;
    align-items: center;
}

label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea,
select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px var(--space-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--magenta);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

textarea {
    resize: vertical;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: var(--space-lg);
}

/* Custom Accent for Input Sliders/Radios */
input[type="range"] {
    accent-color: var(--magenta);
    cursor: pointer;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: var(--space-xs);
}

/* Checkbox & Radios */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--magenta);
    cursor: pointer;
}

.checkbox-group label {
    text-transform: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.radio-toggle-group {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 10px;
}

.radio-toggle-group input[type="radio"] {
    display: none;
}

.radio-toggle-group label {
    flex: 1;
    text-align: center;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.25s ease;
    user-select: none;
    color: var(--text-secondary);
}

.radio-toggle-group input[type="radio"]:checked + label {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* Custom Accordions */
.customization-accordions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s ease;
}

.accordion-item:focus-within,
.accordion-item:hover {
    border-color: rgba(255, 0, 255, 0.2);
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 16px var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.accordion-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.6;
}

.accordion-item.open .accordion-header {
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.accordion-item.open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item.open .accordion-content {
    max-height: 1000px;
    padding: var(--space-md);
}

/* Presets & Designs Layout */
.presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: var(--space-sm);
}

.preset-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-xs);
    border-radius: 10px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--magenta);
}

.preset-btn.active {
    border-color: var(--magenta);
    background: rgba(255, 0, 255, 0.06);
    box-shadow: 0 0 8px rgba(255, 0, 255, 0.15);
}

.preset-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.preset-preview.classic {
    background: #000000;
}
.preset-preview.electric {
    background: linear-gradient(135deg, #007BFF, #00C6FF);
}
.preset-preview.magenta-glow {
    background: linear-gradient(135deg, #FF00FF, #7B00FF);
}
.preset-preview.forest {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}
.preset-preview.sunset {
    background: linear-gradient(135deg, #f12711, #f5af19);
}

/* Color Pickers Custom Styling */
.color-picker-wrapper {
    display: flex;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
    height: 46px;
    width: 100%;
}

.color-picker-wrapper input[type="color"] {
    border: none;
    background: none;
    width: 50px;
    height: 100%;
    cursor: pointer;
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: none;
}

.hex-text {
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 12px !important;
    height: 100%;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Logo Presets Layout */
.preset-logos-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.logo-preset-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 4px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.logo-preset-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--electric-blue);
}

.logo-preset-btn.active {
    background: rgba(0, 123, 255, 0.12);
    border-color: var(--electric-blue);
    color: var(--electric-blue);
}

/* Logo Upload */
.upload-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.file-input-hidden {
    display: none;
}

.upload-btn-styled {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: inline-block;
}

.upload-btn-styled:hover {
    border-color: var(--magenta);
    background: rgba(255, 0, 255, 0.03);
}

.filename-display {
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-clear, .btn-clear-scan {
    background: none;
    border: none;
    color: var(--orange);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 5px 10px;
    transition: opacity 0.2s;
}

.btn-clear:hover, .btn-clear-scan:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Glowing Preview Container */
.qr-container-glowing {
    width: 280px;
    height: 280px;
    background: #FFFFFF; /* High contrast default for scans */
    border-radius: 16px;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    margin: 10px auto;
}

.canvas-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.canvas-wrapper canvas, .canvas-wrapper svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.qr-glow-shadow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    z-index: -1;
    opacity: 0.4;
    transition: all 0.4s ease;
    box-shadow: 0 0 35px var(--electric-blue);
}

/* Actions Buttons Column */
.actions-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
}

.action-btn {
    width: 100%;
    padding: 14px var(--space-lg);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-glow {
    background: linear-gradient(135deg, var(--magenta), var(--electric-blue));
    color: #FFFFFF;
    border: none;
    box-shadow: var(--shadow-sm);
}

.primary-glow:hover {
    box-shadow: var(--glow-blue);
    transform: translateY(-2px);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.secondary-btn:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* SCANNER LAYOUT AND VIEWER */
.scanner-subpane {
    display: none;
}

.scanner-subpane.active {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.camera-selection-wrapper {
    margin-bottom: var(--space-md);
}

.scanner-viewport-wrapper {
    width: 100%;
    max-width: 320px;
    height: 320px;
    margin: 10px auto var(--space-lg);
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: #000;
}

/* html5-qrcode video wrapper placement */
.scanner-reader-view {
    width: 100%;
    height: 100%;
}

.scanner-reader-view video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Styling Scanner Laser & Viewfinder Corners */
.scanner-laser-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.laser-line {
    width: 100%;
    height: 3px;
    background: var(--neon-green);
    box-shadow: 0 0 12px var(--neon-green);
    position: absolute;
    top: 0;
    left: 0;
    animation: scanLaser 3s infinite linear;
}

@keyframes scanLaser {
    0% { top: 3%; }
    50% { top: 97%; }
    100% { top: 3%; }
}

.corner-border {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--magenta);
    border-style: solid;
    border-width: 0;
    z-index: 11;
}

.corner-border.top-left {
    top: 15px;
    left: 15px;
    border-top-width: 3px;
    border-left-width: 3px;
    border-top-left-radius: 8px;
}
.corner-border.top-right {
    top: 15px;
    right: 15px;
    border-top-width: 3px;
    border-right-width: 3px;
    border-top-right-radius: 8px;
}
.corner-border.bottom-left {
    bottom: 15px;
    left: 15px;
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-bottom-left-radius: 8px;
}
.corner-border.bottom-right {
    bottom: 15px;
    right: 15px;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-bottom-right-radius: 8px;
}

.viewport-controls-row {
    display: flex;
    gap: var(--space-md);
}

.select-w {
    flex: 1;
}

/* Drag and Drop Zone */
.drag-drop-zone {
    width: 100%;
    height: 280px;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.01);
    position: relative;
}

.drag-drop-zone:hover,
.drag-drop-zone.drag-active {
    border-color: var(--electric-blue);
    background: rgba(0, 123, 255, 0.03);
}

.zone-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: var(--space-md);
    transition: all 0.3s ease;
}

.zone-icon {
    font-size: 3rem;
    margin-bottom: var(--space-xs);
}

.zone-primary-text {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
}

.zone-secondary-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.browse-btn-label {
    padding: 8px 20px;
    font-size: 0.8rem;
    cursor: pointer;
}

.drag-zone-preview {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
}

.drag-zone-preview img {
    max-height: 180px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Decoded Output Pane Styling */
.scan-status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px var(--space-md);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.scan-status-banner.idle {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}
.scan-status-banner.idle .status-indicator {
    background: #888888;
}

.scan-status-banner.scanning {
    background: rgba(0, 123, 255, 0.1);
    color: var(--electric-blue);
    animation: pulseGlow 2s infinite ease-in-out;
}
.scan-status-banner.scanning .status-indicator {
    background: var(--electric-blue);
    box-shadow: var(--glow-blue);
    animation: blinkIndicator 1.5s infinite;
}

.scan-status-banner.success {
    background: rgba(57, 255, 20, 0.1);
    color: var(--neon-green);
}
.scan-status-banner.success .status-indicator {
    background: var(--neon-green);
    box-shadow: var(--glow-green);
}

.scan-status-banner.failed {
    background: rgba(255, 69, 0, 0.1);
    color: var(--orange);
}
.scan-status-banner.failed .status-indicator {
    background: var(--orange);
    box-shadow: var(--glow-orange);
}

@keyframes pulseGlow {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

@keyframes blinkIndicator {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Decoded Content Result Display */
.scan-result-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    animation: fadeIn 0.4s ease forwards;
}

.result-text-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: var(--space-md);
    border-radius: 10px;
    font-family: monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-all;
    max-height: 180px;
    overflow-y: auto;
    color: var(--text-primary);
}

.parsed-details-box {
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.parsed-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.parsed-row span:first-child {
    font-weight: 700;
    color: var(--text-secondary);
}

.parsed-row span:last-child {
    color: var(--text-primary);
    text-align: right;
    word-break: break-all;
}

.scan-result-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
    margin-top: var(--space-md);
}

/* HISTORY SECTION */
.history-section {
    margin-top: var(--space-xl);
}

.history-container {
    padding: var(--space-lg);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-lg);
}

.history-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.no-history-msg {
    grid-column: 1 / -1;
    color: var(--text-secondary);
    padding: var(--space-xl) 0;
    font-size: 1rem;
}

.history-card {
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: var(--space-md);
    display: flex;
    gap: var(--space-md);
    align-items: center;
    transition: all 0.3s ease;
}

.history-card:hover {
    border-color: var(--electric-blue);
    transform: translateY(-2px);
}

.history-card-canvas-preview {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 6px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-card-canvas-preview img {
    max-width: 100%;
    max-height: 100%;
}

.history-card-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.history-card-type {
    font-size: 0.7rem;
    font-family: var(--font-heading);
    color: var(--magenta);
    text-transform: uppercase;
    font-weight: 700;
}

.history-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-card-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.history-card-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: 4px;
}

.history-action-link {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--electric-blue);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.history-action-link:hover {
    color: var(--magenta);
    text-decoration: underline;
}

/* RESPONSIVE LAYOUT MEDIA QUERIES */

@media (max-width: 1024px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .preview-panel-column {
        position: static;
    }

    .preview-card-sticky {
        max-width: 450px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .flex-1 {
        margin-bottom: var(--space-md);
    }
    
    .form-row .flex-1:last-child {
        margin-bottom: 0;
    }

    .type-selector {
        grid-template-columns: repeat(3, 1fr);
    }

    .type-btn {
        padding: 10px 4px;
        font-size: 0.8rem;
    }

    .preset-logos-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .viewport-controls-row {
        flex-direction: column;
    }
}
