/* DYVR Light Theme Cream Design System */
:root {
    --bg-cream: #f5f0eb;
    --bg-surface: #ebe6e0;
    --text-primary: #1a1a1a;
    --text-muted: #6b6560;
    --accent: #2dd4bf;
    --border-color: #d4cfc9;
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 0 !important; /* Strictly no rounded corners */
}

body {
    background-color: var(--bg-cream);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.5;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography Rules from guidelines */
.wordmark-dyvr {
    font-family: var(--font-primary);
    font-weight: 900;
    font-size: 28px;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.wordmark-sub {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: 28px;
    color: var(--text-muted);
    margin-left: 4px;
}

h2.section-title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    text-transform: uppercase;
    border-left: 2px solid var(--accent);
    padding-left: 8px;
}

.subsection-title {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 16px;
    margin-bottom: 8px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.header-tagline {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 12px;
    color: var(--text-muted);
}

/* Grid Layout */
.app-container {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    flex-grow: 1;
    align-items: start;
    margin-bottom: 24px;
}

.panel-left, .panel-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Cards & Containers */
.section-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* CSV Guide */
.syntax-guide {
    background-color: var(--bg-cream);
    border: 1px solid var(--border-color);
    padding: 12px;
}

.syntax-guide p {
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.syntax-list {
    list-style-type: none;
    font-size: 12px;
}

.syntax-list li {
    margin-bottom: 4px;
    color: var(--text-muted);
}

.syntax-list li code {
    font-family: var(--font-mono);
    color: var(--text-primary);
    background-color: rgba(0,0,0,0.05);
    padding: 1px 4px;
}

/* CSV Example Block */
.csv-example-container {
    border: 1px solid var(--border-color);
    margin-top: 8px;
}

.csv-example-header {
    background-color: var(--bg-cream);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10px;
    cursor: pointer;
    font-weight: 600;
    padding: 2px 4px;
}

.btn-text:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.csv-code {
    padding: 12px;
    background-color: var(--bg-cream);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Uploader Dropzone */
.dropzone {
    border: 1px dashed var(--border-color);
    background-color: var(--bg-cream);
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s, border-color 0.2s;
}

.dropzone:hover {
    border-color: var(--accent);
    background-color: rgba(45, 212, 191, 0.03);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.icon-upload {
    font-size: 20px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.dropzone-text {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.text-underline {
    text-decoration: underline;
}

.dropzone-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* Error Alert */
.error-message {
    background-color: rgba(239, 83, 80, 0.1);
    border: 1px solid #ef5350;
    color: #ef5350;
    padding: 10px;
    font-size: 12px;
    font-family: var(--font-mono);
}

.hidden {
    display: none !important;
}

/* UI Buttons */
button {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 12px;
    padding: 8px 16px;
    cursor: pointer;
    border: 1px solid #d4cfc9;
    background-color: #f5f0eb;
    color: #1a1a1a;
    transition: all 0.15s ease-out;
}

button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.btn-primary {
    background-color: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.btn-primary:hover:not(:disabled) {
    background-color: #2dd4bf;
    color: #1a1a1a;
    border-color: #2dd4bf;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #1a1a1a;
    color: #f5f0eb;
    border-color: #1a1a1a;
}

button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Form Select Minimal */
.select-minimal {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 12px;
    padding: 8px 24px 8px 12px;
    border: 1px solid #d4cfc9;
    background-color: #f5f0eb;
    color: #1a1a1a;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%231a1a1a' d='M0 0l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.select-minimal:hover:not(:disabled) {
    border-color: var(--text-primary);
}

.select-minimal:focus {
    border-color: var(--accent);
}

/* Queue Table */
.table-container {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 12px;
}

.graduates-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.graduates-table th {
    background-color: #f5f0eb;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.graduates-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface);
}

.graduates-table tbody tr {
    cursor: pointer;
}

.graduates-table tbody tr:hover td {
    background-color: rgba(0,0,0,0.02);
}

.graduates-table tr.selected td {
    background-color: rgba(45, 212, 191, 0.08);
    border-left: 2px solid var(--accent);
}

.table-empty-state {
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 40px !important;
    background-color: var(--bg-surface) !important;
}

/* Status Badges */
.status-badge {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border: 1px solid var(--border-color);
    display: inline-block;
}

.status-queued {
    background-color: var(--bg-cream);
    color: var(--text-muted);
}

.status-sending {
    background-color: rgba(74, 143, 231, 0.1);
    color: #4a8fe7;
    border-color: #4a8fe7;
}

.status-sent {
    background-color: rgba(54, 214, 196, 0.1);
    color: #1b8579;
    border-color: var(--accent);
}

.status-failed {
    background-color: rgba(239, 83, 80, 0.1);
    color: #ef5350;
    border-color: #ef5350;
}

/* Action Links in Table */
.btn-action-link {
    background: none;
    border: none;
    padding: 0;
    color: #1b8579;
    font-size: 12px;
    font-family: var(--font-mono);
    text-decoration: underline;
    cursor: pointer;
}

.btn-action-link:hover {
    color: var(--text-primary);
}

/* Certificate Workspace Viewport */
.certificate-preview-viewport {
    background-color: #f5f0eb;
    border: 1px solid #d4cfc9;
    min-height: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    overflow: auto;
}

.certificate-preview-empty {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    max-width: 250px;
    line-height: 1.6;
}

.certificate-render-pane {
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Output Console Log Panel */
.console-panel {
    background-color: #12121a; /* Dark background specifically for logs console */
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    height: 150px;
}

.console-header {
    background-color: #0a0a0f;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 6px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-title {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

#btn-clear-console {
    background-color: #0a0a0f;
    border: none;
    color: rgba(255,255,255,0.6);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 0;
}

#btn-clear-console:hover {
    background-color: #0a0a0f;
    color: #ffffff;
    text-decoration: underline;
}

.console-output {
    padding: 12px 16px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    color: #e8e6e3;
    background-color: #12121a;
    flex-grow: 1;
}

.console-line {
    margin-bottom: 4px;
}

.system-line { color: #a0a0a0; background-color: #12121a; }
.info-line { color: #82b1ff; background-color: #12121a; }
.success-line { color: #2dd4bf; background-color: #12121a; }
.error-line { color: #ff8a80; background-color: #12121a; }

/* Modal Custom Dialog Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background-color: var(--bg-cream);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 12px;
    color: var(--text-primary);
}

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    font-weight: 300;
    color: var(--text-muted);
    padding: 0;
    cursor: pointer;
    line-height: 1;
}

.btn-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.email-meta {
    border: 1px solid var(--border-color);
    background-color: var(--bg-cream);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.meta-row {
    display: flex;
}

.meta-label {
    width: 100px;
    color: var(--text-muted);
    font-weight: 600;
}

.meta-value {
    color: var(--text-primary);
}

.text-accent {
    color: #1b8579;
    font-weight: 600;
}

.email-content-preview {
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    padding: 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #333333;
}

.email-content-preview p {
    margin-bottom: 12px;
}

.link-styled {
    color: #1b8579;
    text-decoration: underline;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
}

/* Screen Readers Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================================================
   CERTIFICATE STYLE TEMPLATES
   ========================================================================== */

/* Main Certificate Wrapper (Fixed ratio aspect 4:3 for professional presentation) */
.certificate-wrapper {
    width: 640px;
    height: 480px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: none;
    transform-origin: center center;
    flex-shrink: 0;
}

/* 1. TECHNICAL STYLE CERTIFICATE (Cyber Grid) */
.certificate-tech {
    background-color: #0a0a0f !important;
    border: 1px solid #2dd4bf;
    font-family: 'Inconsolata', var(--font-mono), monospace;
    padding: 32px;
    color: #2dd4bf;
}

.certificate-tech::before {
    content: " [SYSTEM_CREDENTIAL] ";
    position: absolute;
    top: -10px;
    left: 20px;
    background-color: #0a0a0f;
    padding: 0 8px;
    font-size: 11px;
    color: #2dd4bf;
}

.cert-tech-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #2dd4bf;
    padding-bottom: 12px;
    font-size: 11px;
    color: #6b6b78;
}

.cert-tech-title {
    font-family: 'Inconsolata', monospace;
    font-weight: 800;
    font-size: 26px;
    color: #ffffff;
    margin-top: 24px;
    text-transform: uppercase;
}

.cert-tech-subtitle {
    font-size: 12px;
    color: #6b6b78;
    margin-top: 4px;
}

.cert-tech-recipient {
    font-size: 26px;
    font-weight: 700;
    color: #2dd4bf;
    margin-top: 32px;
    border: 1px solid #2dd4bf;
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(45, 212, 191, 0.05);
}

.cert-tech-body {
    font-size: 12px;
    line-height: 1.6;
    color: #e8e6e3;
    margin-top: 24px;
    max-width: 90%;
}

.cert-tech-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    border-top: 1px dashed #2dd4bf;
    padding-top: 16px;
    font-size: 12px;
}

.cert-tech-signatures {
    display: flex;
    gap: 40px;
}

.signature-block-tech {
    display: flex;
    flex-direction: column;
}

.sig-line {
    border-top: 1px dashed #2dd4bf;
    width: 120px;
    margin-bottom: 4px;
}

.cert-tech-hash {
    font-size: 11px;
    color: #6b6b78;
}

/* 2. ACADEMIC STYLE CERTIFICATE (Imperial Gold) */
.certificate-academic {
    background-color: #fdfcf7 !important;
    border: 6px double #d4af37;
    padding: 40px;
    color: #0c1b33;
    font-family: 'EB Garamond', serif;
}

.certificate-academic::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px solid #d4af37;
    pointer-events: none;
}

.cert-academic-header {
    text-align: center;
}

.cert-academic-logo {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.05em;
    color: #d4af37;
}

.cert-academic-logo-divider {
    width: 40px;
    height: 1px;
    background-color: #d4af37;
    margin: 8px auto;
}

.cert-academic-badge {
    font-size: 11px;
    color: #6b6560;
    font-weight: 600;
    text-transform: uppercase;
}

.cert-academic-content {
    text-align: center;
    margin-top: 24px;
}

.cert-academic-presents {
    font-size: 13px;
    font-style: italic;
    color: #6b6560;
    margin-bottom: 6px;
}

.cert-academic-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 28px;
    color: #0c1b33;
    text-transform: uppercase;
}

.cert-academic-for {
    font-size: 13px;
    color: #6b6560;
    margin: 12px 0;
}

.cert-academic-recipient {
    font-family: 'EB Garamond', serif;
    font-weight: 600;
    font-size: 30px;
    color: #0c1b33;
    border-bottom: 1.5px solid #d4af37;
    display: inline-block;
    padding: 0 24px 4px 24px;
}

.cert-academic-body {
    font-size: 13px;
    line-height: 1.6;
    color: #6b6560;
    margin: 16px auto 0 auto;
    max-width: 85%;
}

.cert-academic-footer {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding: 0 10px;
    font-size: 12px;
}

.signature-block-academic {
    text-align: center;
}

.sig-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 11px;
    margin-top: 4px;
}

/* 3. CREATIVE STYLE CERTIFICATE (Modernist Coral) */
.certificate-creative {
    background-color: #ffffff !important;
    border: 2px solid #1a1a1a;
    padding: 0;
    display: grid;
    grid-template-columns: 180px 1fr;
}

.cert-creative-side {
    background-color: #ff6b6b !important;
    color: #ffffff !important;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cert-creative-brand {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 18px;
}

.cert-creative-side-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.8;
    color: rgba(255,255,255,0.9);
    background-color: #ff6b6b;
}

.cert-creative-main {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.cert-creative-kicker {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 11px;
    color: #ff6b6b;
    text-transform: uppercase;
}

.cert-creative-title {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #1a1a1a;
    line-height: 1.2;
    margin-top: 8px;
}

.cert-creative-recipient-box {
    margin-top: 24px;
}

.cert-creative-recipient-label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-muted);
}

.cert-creative-recipient {
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    font-size: 26px;
    color: #ff6b6b;
    margin-top: 4px;
}

.cert-creative-body {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-top: 16px;
}

.cert-creative-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    font-size: 12px;
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */

/* --- Base width constraints (always active, prevent overflow at any size) --- */
body {
    width: 100%;
    max-width: 100vw;
}

.app-header,
.app-container,
.app-footer {
    max-width: 100%;
    min-width: 0;
}

.panel-left,
.panel-right {
    min-width: 0;
    max-width: 100%;
}

.section-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* Console lines must wrap — monospace text can get very long */
.console-line {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Certificate viewport — contain the 640px wrapper via overflow, not body-level hide */
.certificate-preview-viewport {
    overflow: hidden;
    max-width: 100%;
}

.certificate-render-pane {
    max-width: 100%;
    overflow: hidden;
}

/* Email meta values can be long addresses */
.meta-value {
    word-break: break-all;
    overflow-wrap: break-word;
    min-width: 0;
}

/* Pre/code blocks must scroll inside their containers, not push body */
.csv-code {
    max-width: 100%;
}

/* --- Tablet breakpoint (≤ 900px) --- */
@media (max-width: 900px) {
    .app-container {
        grid-template-columns: 1fr;
    }

    body {
        padding: 16px;
    }

    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .header-tagline {
        font-size: 10px;
    }

    /* Card header actions — wrap when needed */
    .card-header-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    .queue-actions {
        display: flex;
        gap: 8px;
    }
}

/* --- Mobile breakpoint (≤ 600px) --- */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    /* Header — stack and shrink */
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .wordmark-dyvr {
        font-size: 22px;
    }

    .wordmark-sub {
        font-size: 22px;
    }

    .header-tagline {
        font-size: 9px;
    }

    /* Card header actions — full stack */
    .card-header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .queue-actions {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .queue-actions button {
        flex: 1;
        font-size: 11px;
        padding: 8px 8px;
    }

    .workspace-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .workspace-actions .select-minimal {
        width: 100%;
    }

    .workspace-actions button {
        width: 100%;
    }

    /* Section cards — tighter */
    .section-card {
        padding: 14px;
        gap: 12px;
    }

    /* Graduates table — scrollable inside its card, not the body */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .graduates-table {
        min-width: 480px;
    }

    /* Certificate preview viewport — let JS scaling do its thing */
    .certificate-preview-viewport {
        padding: 8px;
        min-height: 260px;
    }

    .certificate-render-pane {
        padding: 4px;
    }

    /* Console panel — flex-based height instead of fixed */
    .console-panel {
        height: auto;
        min-height: 100px;
    }

    .console-header {
        padding: 6px 10px;
        flex-wrap: wrap;
        gap: 4px;
    }

    .console-title {
        font-size: 10px;
    }

    .console-output {
        padding: 8px 10px;
        font-size: 10px;
        min-height: 60px;
        max-height: 160px;
    }

    /* CSV code/example */
    .csv-code {
        font-size: 10px;
    }

    .csv-example-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 6px 10px;
    }

    /* Modal */
    .modal-backdrop {
        padding: 12px;
    }

    .modal-container {
        max-width: 100%;
    }

    .modal-body {
        padding: 14px;
    }

    .email-meta {
        font-size: 11px;
        padding: 10px;
    }

    .meta-label {
        width: 60px;
        font-size: 10px;
        flex-shrink: 0;
    }

    .meta-row {
        flex-wrap: wrap;
    }

    /* Dropzone */
    .dropzone {
        padding: 20px 12px;
    }

    .dropzone-text {
        font-size: 11px;
    }

    .dropzone-sub {
        font-size: 10px;
    }

    /* Syntax guide */
    .syntax-guide {
        padding: 10px;
    }

    .syntax-list {
        font-size: 11px;
    }

    .syntax-list li code {
        word-break: break-all;
    }
}

/* ==========================================================================
   PRINT STYLES (@media print)
   ========================================================================== */
@media print {
    /* Hide all workspace elements */
    body, html {
        background-color: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100%;
        height: 100%;
    }
    
    .app-header, 
    .app-container, 
    .app-footer, 
    .modal-backdrop,
    .queue-actions,
    .workspace-actions {
        display: none !important;
    }
    
    /* Reveal and center the certificate render element only */
    .certificate-preview-viewport {
        display: block !important;
        border: none !important;
        background: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow: visible !important;
    }
    
    .certificate-render-pane {
        padding: 16px;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .certificate-wrapper {
        border: none !important;
        box-shadow: none !important;
        transform: scale(1.15) !important; /* Scale to fill page neatly */
        page-break-inside: avoid;
        page-break-after: avoid;
    }

    @page {
        size: A4 landscape;
        margin: 0;
    }
}
