:root {
    --bg: #0b0e14;
    --panel: #0f131a;
    --card: #121826;
    --muted: #9aa4b2;
    --text: #e5e7eb;
    --primary: #4f46e5;
    --primary-600: #4338ca;
    --border: #1f2937;
    --success: #16a34a;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
}


/* Login Screen Styles */

.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0b0e14 0%, #1a1f2e 50%, #0f131a 100%);
    overflow: hidden;
}

.login-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 80%, rgba(79, 70, 229, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 50%), radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
        opacity: 1;
    }
    66% {
        transform: translateY(10px) rotate(240deg);
        opacity: 0.8;
    }
}

.login-particles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent), radial-gradient(2px 2px at 40px 70px, rgba(79, 70, 229, 0.4), transparent), radial-gradient(1px 1px at 90px 40px, rgba(16, 185, 129, 0.3), transparent), radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.2), transparent), radial-gradient(2px 2px at 160px 30px, rgba(79, 70, 229, 0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 15s linear infinite;
}

@keyframes sparkle {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-100px);
    }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: rgba(18, 24, 38, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: cardSlideIn 0.8s ease-out;
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #4f46e5, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 10px 0;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        filter: drop-shadow(0 0 10px rgba(79, 70, 229, 0.3));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.4));
    }
}

.login-header p {
    color: var(--muted);
    font-size: 16px;
    margin: 0;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.form-group input {
    background: rgba(14, 20, 34, 0.8);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1), 0 0 20px rgba(79, 70, 229, 0.2);
    background: rgba(14, 20, 34, 0.9);
}

.form-group input::placeholder {
    color: var(--muted);
}

.login-btn {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}


/* Responsive */

.app {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    height: 100vh;
    padding: 16px;
    transition: grid-template-columns 220ms ease;
}


/* Hover ile iki panel arasında geçiş (tam kapanma yok) */

.app:has(.editor:hover),
.app:has(.editor:focus-within) {
    grid-template-columns: 3fr 1fr;
}

.app:has(.preview:hover),
.app:has(.preview:focus-within) {
    grid-template-columns: 1fr 3fr;
}


/* JS fallback için sınıflar (tarayıcı :has desteklemiyorsa) */

.app.active-left {
    grid-template-columns: 3fr 1fr;
}

.app.active-right {
    grid-template-columns: 1fr 3fr;
}

.editor {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.editor .grid {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 120px);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 10;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.btn:hover {
    background: var(--primary-600);
}

.btn-secondary {
    background: #253044;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-secondary:hover {
    background: #2e3b54;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active,
.btn-secondary:active {
    transform: translateY(0);
}

.file-input {
    background: #253044;
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
}

.file-input input {
    display: none;
}

.grid {
    padding: 12px;
    display: grid;
    gap: 12px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field label {
    color: var(--muted);
    font-size: 12px;
}

.form-field input,
.form-field select,
.form-field textarea {
    background: #0e1422;
    color: var(--text);
    border: 1px solid #1b2436;
    border-radius: 8px;
    padding: 10px 12px;
}

.items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.items-table-wrapper {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}

.items-table th,
.items-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.items-table th {
    color: var(--muted);
    font-weight: 600;
    text-align: left;
    font-size: 12px;
}

.items-table td input,
.items-table td textarea,
.items-table td select {
    width: 100%;
}

.items-table .col-sm {
    width: 100px;
}

.items-table .col-md {
    width: 140px;
}

.items-table .col-xs {
    width: 90px;
}

.items-table .col-action {
    width: 48px;
}

.right {
    text-align: right;
}

.totals-card {
    display: flex;
    justify-content: flex-end;
}

.totals {
    width: 360px;
    margin-left: auto;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border);
}

.totals-row.grand {
    font-size: 18px;
    font-weight: 700;
    padding-top: 12px;
}

.preview {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    overflow: auto;
    min-width: 0;
}


/* A4 preview */

.a4 {
    position: relative;
    width: 794px;
    /* 210mm at ~96dpi */
    min-height: 1123px;
    /* 297mm at 96dpi approx */
    margin: 0 auto;
    background: white;
    color: #0b0e14;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 28px;
}

.pdf-header {
    display: flex;
    gap: 16px;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
}

.logo-wrap {
    width: 160px;
    height: 80px;
    border: 1px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.logo-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.company-info {
    flex: 1;
}

.company-name {
    font-size: 20px;
    font-weight: 700;
}

.pdf-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin: 18px 0;
}


/* Şablon 1: Logo sol, başlık ortada (varsayılan düşey A4) */

.pdf-theme-sablon1 {
    --accent: #3b82f6;
}

.pdf-theme-sablon1 .pdf-header {
    border-bottom: 3px solid var(--accent);
}

.pdf-theme-sablon1 .logo-wrap {
    width: 180px;
    height: 90px;
    border: none;
}

.pdf-theme-sablon1 .pdf-title {
    text-align: center;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.pdf-theme-sablon1 .pdf-items th {
    background: #eff6ff;
    border-bottom: 2px solid #93c5fd;
}

.pdf-theme-sablon1 .pdf-items td {
    border-bottom: 1px solid #e5e7eb;
}

.pdf-theme-sablon1 .pdf-items tbody tr:nth-child(odd) {
    background: #f8fafc;
}

.pdf-theme-sablon1 .totals-line {
    border-bottom-color: #cbd5e1;
}

.pdf-theme-sablon1 .totals-line.grand {
    color: #0b0e14;
}


/* Şablon 2: Logo ortada büyük, sade başlık */

.pdf-theme-sablon2 .pdf-header {
    border-bottom: none;
    justify-content: center;
}

.pdf-theme-sablon2 .logo-wrap {
    width: 260px;
    height: 120px;
    border: none;
    margin: 0 auto;
}

.pdf-theme-sablon2 .company-info {
    display: none;
}

.pdf-theme-sablon2 .pdf-title {
    font-size: 28px;
    font-weight: 600;
    margin-top: 6px;
    letter-spacing: .4px;
}

.pdf-theme-sablon2 .info-card {
    background: #ffffff;
    border-color: #ffffff;
}

.pdf-theme-sablon2 .pdf-items th,
.pdf-theme-sablon2 .pdf-items td {
    border-bottom: 1px solid #eee;
}

.pdf-theme-sablon2 .pdf-items th {
    font-weight: 700;
}

.pdf-theme-sablon2 .totals-line {
    border-bottom: 1px dashed #ddd;
}


/* Şablon 3: Yatay (landscape), koyu başlık şeridi */

.pdf-theme-sablon3 {
    width: 1123px;
    min-height: 794px;
}

.pdf-theme-sablon3 .pdf-header {
    border-bottom: none;
    background: #111827;
    color: #fff;
    border-radius: 8px;
    padding: 16px;
}

.pdf-theme-sablon3 .logo-wrap {
    width: 200px;
    height: 96px;
    border: none;
    background: rgba(255, 255, 255, .06);
}

.pdf-theme-sablon3 .company-name {
    font-size: 22px;
}

.pdf-theme-sablon3 .pdf-title {
    text-align: left;
    font-size: 22px;
    margin: 14px 0;
}

.pdf-theme-sablon3 .info-card {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.pdf-theme-sablon3 .pdf-items th {
    background: #111827;
    color: #fff;
    border-bottom: none;
}

.pdf-theme-sablon3 .pdf-items td {
    border-bottom: 1px solid #e5e7eb;
}

.pdf-theme-sablon3 .totals-line.grand {
    background: #111827;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
}


/* Şablon 4: İnce alt çizgiler, logo sağda */

.pdf-theme-sablon4 {
    --accent: #0ea5a4;
}

.pdf-theme-sablon4 .pdf-header {
    border-bottom: 2px solid var(--accent);
    justify-content: space-between;
    flex-direction: row-reverse;
}

.pdf-theme-sablon4 .logo-wrap {
    width: 160px;
    height: 80px;
}

.pdf-theme-sablon4 .company-info {
    text-align: left;
}

.pdf-theme-sablon4 .pdf-title {
    letter-spacing: .6px;
    text-align: left;
}

.pdf-theme-sablon4 .info-card {
    border-left: 4px solid var(--accent);
    background: #f0fdfa;
}

.pdf-theme-sablon4 .pdf-items th {
    border-bottom: 2px solid var(--accent);
}

.pdf-theme-sablon4 .pdf-items tbody tr:nth-child(odd) {
    background: #f8fdfa;
}

.pdf-theme-sablon4 .totals-line {
    border-bottom-color: #94a3b8;
}

.pdf-theme-sablon4 .totals-line.grand {
    color: #0b0e14;
}


/* Şablon 5: Yatay, minimal başlık ve geniş tablo */

.pdf-theme-sablon5 {
    width: 1123px;
    min-height: 794px;
}

.pdf-theme-sablon5 {
    --accent: #f59e0b;
}

.pdf-theme-sablon5 .pdf-header {
    border-bottom: 2px solid #e5e7eb;
}

.pdf-theme-sablon5 .logo-wrap {
    width: 180px;
    height: 90px;
}

.pdf-theme-sablon5 .pdf-title {
    text-align: center;
    font-size: 24px;
}

.pdf-theme-sablon5 .company-info {
    text-transform: uppercase;
    letter-spacing: .4px;
    font-size: 12px;
}

.pdf-theme-sablon5 .pdf-items th {
    background: #fffbeb;
    border-bottom: 2px solid #fef3c7;
}

.pdf-theme-sablon5 .pdf-items td {
    border-bottom: 1px solid #fde68a;
}

.pdf-theme-sablon5 .totals-line {
    border-bottom: 1px dashed #f59e0b;
}

.pdf-theme-sablon5 .totals-line.grand {
    background: #f59e0b;
    color: #111827;
}


/* Şablon 6: Kartlar vurgulu, logo küçük */

.pdf-theme-sablon6 {
    --accent: #7c3aed;
}

.pdf-theme-sablon6 .info-card {
    background: #eef2ff;
    border-color: #c7d2fe;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}

.pdf-theme-sablon6 .logo-wrap {
    width: 140px;
    height: 70px;
}

.pdf-theme-sablon6 .pdf-items th {
    background: #ede9fe;
    border-bottom: 2px solid #c4b5fd;
}

.pdf-theme-sablon6 .pdf-items td {
    border-bottom: 1px solid #e9d5ff;
}

.pdf-theme-sablon6 .totals-line {
    border-bottom: 1px dashed #c7d2fe;
}

.pdf-theme-sablon6 .totals-line.grand {
    background: #7c3aed;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
}

.pdf-theme-sablon6::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 10px;
    background: #7c3aed;
    border-radius: 8px 0 0 8px;
}


/* Şablon 7: Yatay, başlık ortada, kartlar beyaz */

.pdf-theme-sablon7 {
    width: 1123px;
    min-height: 794px;
}

.pdf-theme-sablon7 {
    --accent: #0ea5e9;
}

.pdf-theme-sablon7 .pdf-header {
    border-bottom: none;
    justify-content: center;
}

.pdf-theme-sablon7 .logo-wrap {
    width: 220px;
    height: 110px;
}

.pdf-theme-sablon7 .info-card {
    background: #fff;
    border-color: #fff;
}

.pdf-theme-sablon7 .pdf-title {
    font-size: 28px;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.pdf-theme-sablon7 .pdf-items th {
    background: linear-gradient(90deg, #0ea5e9, #22d3ee);
    color: #fff;
    border-bottom: none;
}

.pdf-theme-sablon7 .pdf-items td {
    border-bottom: 1px solid #e5e7eb;
}

.pdf-theme-sablon7 .totals-line.grand {
    background: #0ea5e9;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
}


/* Şablon 8: Kurumsal grid, ince ayrıntılar, sol şerit */

.pdf-theme-sablon8 {
    --accent: #2563eb;
}

.pdf-theme-sablon8::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    background: var(--accent);
    border-radius: 8px 0 0 8px;
}

.pdf-theme-sablon8 .pdf-header {
    border-bottom: 2px solid #e5e7eb;
}

.pdf-theme-sablon8 .pdf-header {
    flex-direction: row-reverse;
    align-items: center;
}

.pdf-theme-sablon8 .company-info {
    text-align: right;
}

.pdf-theme-sablon8 .pdf-title {
    text-align: left;
}

.pdf-theme-sablon8 .info-grid {
    grid-template-columns: 2fr 1fr;
}

.pdf-theme-sablon8 .info-card {
    background: #f8fafc;
    border-color: #e5e7eb;
}

.pdf-theme-sablon8 .pdf-items th {
    background: #eff6ff;
    border-bottom: 2px solid #bfdbfe;
}

.pdf-theme-sablon8 .totals-line.grand {
    background: var(--accent);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
}


/* Şablon 9 (Yatay): Koyu başlık bandı, köşe etiketleri */

.pdf-theme-sablon9 {
    width: 1123px;
    min-height: 794px;
    --accent: #0ea5a4;
}

.pdf-theme-sablon9 .pdf-header {
    background: #0b1220;
    color: #fff;
    border-radius: 8px;
    padding: 16px;
    border-bottom: none;
}

.pdf-theme-sablon9 .logo-wrap {
    background: rgba(255, 255, 255, .06);
    border: none;
    width: 200px;
    height: 96px;
}

.pdf-theme-sablon9 .info-card {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.pdf-theme-sablon9 .pdf-items th {
    background: #0b1220;
    color: #fff;
    border-bottom: none;
}

.pdf-theme-sablon9 .totals-line.grand {
    background: #0b1220;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
}

.pdf-theme-sablon9 .pdf-title {
    text-align: left;
    margin: 14px 0;
}

.pdf-theme-sablon9 .info-grid {
    grid-template-columns: 1.5fr 1fr;
}


/* Şablon 10: Minimal çizgiler, tipografik vurgu */

.pdf-theme-sablon10 {
    --accent: #111827;
}

.pdf-theme-sablon10 .pdf-header {
    border-bottom: 1px solid #cbd5e1;
}

.pdf-theme-sablon10 .pdf-header {
    justify-content: center;
}

.pdf-theme-sablon10 .company-info {
    display: none;
}

.pdf-theme-sablon10 .logo-wrap {
    width: 260px;
    height: 120px;
    border: none;
}

.pdf-theme-sablon10 .pdf-title {
    text-align: left;
}

.pdf-theme-sablon10 .info-grid {
    grid-template-columns: 1fr;
}

.pdf-theme-sablon10 .company-name {
    letter-spacing: .6px;
    text-transform: uppercase;
}

.pdf-theme-sablon10 .pdf-items th {
    border-bottom: 1px solid #cbd5e1;
    background: #f8fafc;
}

.pdf-theme-sablon10 .totals-line {
    border-bottom: 1px dashed #cbd5e1;
}

.pdf-theme-sablon10 .totals-line.grand {
    color: #111827;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}


/* Şablon 11 (Yatay): Gradient başlık, kart köşe şeritleri */

.pdf-theme-sablon11 {
    width: 1123px;
    min-height: 794px;
    --accent: #7c3aed;
}

.pdf-theme-sablon11 .pdf-header {
    background: linear-gradient(90deg, #7c3aed, #22d3ee);
    color: #fff;
    border-radius: 8px;
    padding: 16px;
    border-bottom: none;
}

.pdf-theme-sablon11 .logo-wrap {
    border: none;
    background: rgba(255, 255, 255, .08);
    width: 200px;
    height: 96px;
}

.pdf-theme-sablon11 .info-card {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}

.pdf-theme-sablon11 .info-grid {
    display: flex;
    gap: 12px;
}

.pdf-theme-sablon11 .info-grid .info-card:nth-child(1) {
    order: 2;
    border-left: 4px solid var(--accent);
}

.pdf-theme-sablon11 .info-grid .info-card:nth-child(2) {
    order: 1;
    border-left: 4px solid #22d3ee;
}

.pdf-theme-sablon11 .pdf-items th {
    background: #111827;
    color: #fff;
    border-bottom: none;
}

.pdf-theme-sablon11 .totals-line.grand {
    background: #111827;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
}


/* Şablon 12: İnce renk aksanı, çift sütun başlık */

.pdf-theme-sablon12 {
    --accent: #ef4444;
}

.pdf-theme-sablon12 .pdf-header {
    border-bottom: 2px solid var(--accent);
}

.pdf-theme-sablon12 {
    display: flex;
    flex-direction: column;
}

.pdf-theme-sablon12 .pdf-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    order: 0;
}

.pdf-theme-sablon12 .pdf-title {
    order: 2;
    text-align: center;
    letter-spacing: .4px;
}

.pdf-theme-sablon12 .info-grid {
    order: 1;
    grid-template-columns: 1fr;
}

.pdf-theme-sablon12 .pdf-items {
    order: 3;
}

.pdf-theme-sablon12 .pdf-totals {
    order: 4;
}

.pdf-theme-sablon12 .pdf-title {
    letter-spacing: .4px;
}

.pdf-theme-sablon12 .info-card {
    background: #fff;
    border-color: #fff;
}

.pdf-theme-sablon12 .pdf-items th {
    background: #fee2e2;
    border-bottom: 2px solid #fecaca;
}

.pdf-theme-sablon12 .totals-line.grand {
    background: var(--accent);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.info-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
}

.info-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.pdf-items {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.pdf-items th,
.pdf-items td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px;
    text-align: left;
}


/* PDF page-break rules (export only; html2pdf respects these) */

.a4,
.pdf-header,
.info-grid,
.pdf-items,
.pdf-totals,
.notes,
.pdf-footer,
.pdf-references,
.company-info-bottom {
    page-break-inside: avoid;
}

.pdf-items tbody tr {
    page-break-inside: avoid;
}

.pdf-items {
    page-break-inside: auto;
}

.pdf-items th.right,
.pdf-items td.right {
    text-align: right;
}

.pdf-totals {
    width: 300px;
    margin-left: auto;
    margin-top: 12px;
    font-size: 14px;
}

.totals-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.totals-line.grand {
    font-weight: 800;
    font-size: 16px;
}

.notes {
    margin-top: 16px;
    font-size: 12px;
}

.notes-title {
    font-weight: 700;
    margin-bottom: 6px;
}

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

.partner-info {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 2px dashed #e5e7eb;
    font-size: 12px;
}

.partner-info .partner-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.references-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.references-thumbs .thumb {
    background: #0e1422;
    border: 1px solid #1b2436;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 120px;
}

.references-thumbs .thumb img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}

.pdf-references {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 2px dashed #e5e7eb;
    font-size: 12px;
}

.pdf-references .references-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.pdf-references .references-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    align-items: center;
}

.pdf-references .ref-logo {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-references .ref-logo img {
    max-height: 36px;
    max-width: 100%;
    object-fit: contain;
}

.references-banner-preview {
    margin-top: 10px;
    background: #0e1422;
    border: 1px solid #1b2436;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    justify-content: center;
}

.references-banner-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.pdf-references .references-banner-wrap {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.pdf-references .references-banner-wrap img {
    max-width: 90%;
    max-height: 160px;
    object-fit: contain;
}


/* Şablon 13: Şablon 1'e benzer, logo ortada, şirket bilgisi başlığın altında */

.pdf-theme-sablon13 {
    --accent: #3b82f6;
}

.pdf-theme-sablon13 .pdf-header {
    border-bottom: 3px solid var(--accent);
    justify-content: center;
}

.pdf-theme-sablon13 .logo-wrap {
    width: 220px;
    height: 110px;
    border: none;
}

.pdf-theme-sablon13 .company-info {
    display: none;
}

.pdf-theme-sablon13 .pdf-title {
    text-align: center;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.company-info-bottom {
    display: none;
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
}

.pdf-theme-sablon13 .company-info-bottom {
    display: block;
}

.company-info-below {
    display: none;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
    margin-top: -8px;
}

.pdf-theme-sablon13+.pdf-title+.company-info-below,

/* fallback selector not reliable */

.pdf-theme-sablon13 .company-info-below {
    display: block;
}

.signature {
    width: 260px;
}

.sig-line {
    border-bottom: 1px solid #111827;
    height: 42px;
}


/* Print */

@media print {
    body {
        background: white;
    }
    .app {
        display: block;
        padding: 0;
    }
}


/* ============================= */


/* RESPONSIVE DESIGN - MOBILE FIRST */


/* ============================= */


/* Tablet Landscape (768px - 1024px) */

@media (max-width: 1024px) {
    .app {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        padding: 12px;
        gap: 12px;
    }
    .app:has(.editor:hover),
    .app:has(.editor:focus-within),
    .app:has(.preview:hover),
    .app:has(.preview:focus-within) {
        grid-template-columns: 1fr;
    }
    /* Toolbar Stack Layout */
    .toolbar {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
    /* Grid Columns */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    /* PDF Preview */
    .preview {
        padding: 12px;
    }
    .a4 {
        transform: scale(0.9);
        transform-origin: top center;
    }
}


/* Mobile Large (481px - 767px) */

@media (max-width: 767px) {
    body {
        font-size: 14px;
    }
    .app {
        padding: 8px;
        gap: 10px;
    }
    /* Toolbar Mobile */
    .toolbar {
        padding: 10px;
        gap: 8px;
        position: sticky;
        top: 0;
        z-index: 30;
        background: var(--panel);
        border-bottom: 2px solid var(--border);
    }
    .toolbar-left,
    .toolbar-right {
        flex-direction: column;
        gap: 8px;
    }
    .btn,
    .btn-secondary,
    .file-input {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
        font-weight: 600;
    }
    /* Cards */
    .card {
        padding: 14px;
        border-radius: 12px;
    }
    .card h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    /* Form Fields - Touch Friendly */
    .form-field {
        gap: 8px;
    }
    .form-field label {
        font-size: 12px;
        font-weight: 600;
    }
    .form-field input,
    .form-field select,
    .form-field textarea {
        font-size: 15px;
        padding: 12px 14px;
        min-height: 44px;
        border-radius: 10px;
    }
    .form-field textarea {
        min-height: 80px;
    }
    /* PDF Preview */
    .preview {
        padding: 8px;
        background: var(--bg);
    }
    .a4 {
        transform: scale(0.75);
        transform-origin: top center;
        margin-bottom: -50px;
    }
    .pdf-title {
        font-size: 18px;
    }
    .company-name {
        font-size: 15px;
    }
    /* Table Scroll Hint */
    .items-table-wrapper {
        position: relative;
    }
    .items-table-wrapper::before {
        content: '⬅️ Kaydırın ➡️';
        display: block;
        text-align: center;
        padding: 8px;
        background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(16, 185, 129, 0.1));
        color: var(--primary);
        font-size: 12px;
        font-weight: 700;
        border-radius: 8px 8px 0 0;
        letter-spacing: 0.5px;
    }
    .items-table {
        min-width: 800px;
    }
    /* Demo Elements */
    .pdf-demo-bar {
        flex-direction: column;
        padding: 8px;
        gap: 6px;
        text-align: center;
    }
    .pdf-demo-emd {
        font-size: 13px;
    }
    /* Floating WhatsApp */
    .floating-whatsapp {
        width: 54px;
        height: 54px;
        bottom: 24px;
        right: 24px;
    }
    .floating-whatsapp svg {
        width: 28px;
        height: 28px;
    }
    .floating-whatsapp-tooltip {
        display: none;
    }
    /* Promo Banner */
    .promo-banner {
        margin: 10px;
        padding: 14px;
    }
    .promo-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .promo-link {
        width: 100%;
    }
    /* Demo Modal */
    .demo-modal {
        width: 90%;
        max-width: 400px;
        padding: 28px 22px;
    }
    .demo-modal h2 {
        font-size: 20px;
    }
    .demo-modal p {
        font-size: 14px;
    }
}


/* Mobile Small (< 480px) */

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    .app {
        padding: 6px;
        gap: 8px;
    }
    /* Toolbar Compact */
    .toolbar {
        padding: 8px;
        gap: 6px;
    }
    .btn,
    .btn-secondary,
    .file-input {
        font-size: 13px;
        padding: 11px 14px;
        min-height: 42px;
    }
    /* Cards Compact */
    .card {
        padding: 12px;
        border-radius: 10px;
    }
    .card h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .grid {
        gap: 8px;
    }
    /* Form Fields */
    .form-field input,
    .form-field select,
    .form-field textarea {
        font-size: 14px;
        padding: 11px 12px;
        min-height: 42px;
    }
    .form-field textarea {
        min-height: 70px;
    }
    /* PDF Preview - Better Scale */
    .preview {
        padding: 6px;
    }
    .a4 {
        transform: scale(0.65);
        transform-origin: top center;
        margin-bottom: -80px;
    }
    .logo-wrap {
        width: 100px;
        height: 50px;
    }
    .pdf-header {
        padding-bottom: 10px;
        margin-bottom: 10px;
    }
    .pdf-title {
        font-size: 16px;
        margin: 10px 0;
    }
    .company-name {
        font-size: 14px;
    }
    .info-card {
        padding: 8px;
        font-size: 11px;
    }
    .pdf-items {
        font-size: 10px;
    }
    .pdf-items th,
    .pdf-items td {
        padding: 5px 4px;
    }
    /* Demo Bar */
    .pdf-demo-bar {
        padding: 6px 8px;
        gap: 4px;
    }
    .pdf-demo-label {
        font-size: 10px;
    }
    .pdf-demo-emd {
        font-size: 11px;
    }
    .pdf-demo-whatsapp {
        width: 24px;
        height: 24px;
    }
    .pdf-demo-whatsapp svg {
        width: 14px;
        height: 14px;
    }
    /* Floating WhatsApp */
    .floating-whatsapp {
        width: 52px;
        height: 52px;
        bottom: 20px;
        right: 20px;
    }
    .floating-whatsapp svg {
        width: 26px;
        height: 26px;
    }
    /* Items Table */
    .items-table-wrapper::before {
        padding: 6px;
        font-size: 11px;
    }
    .items-table {
        min-width: 750px;
        font-size: 12px;
    }
    .items-header {
        flex-direction: column;
        gap: 8px;
    }
    .items-actions {
        width: 100%;
    }
    .items-actions button {
        width: 100%;
        justify-content: center;
    }
    /* Form Actions */
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    .form-actions button,
    .form-actions select,
    .form-actions .btn {
        width: 100%;
    }
    /* References */
    .references-thumbs {
        gap: 6px;
    }
    .references-thumbs .thumb {
        width: 80px;
        padding: 6px;
    }
    .references-thumbs .thumb img {
        max-height: 45px;
    }
    .pdf-references .references-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    /* Promo Banner */
    .promo-banner {
        margin: 8px;
        padding: 12px;
    }
    .promo-icon {
        font-size: 22px;
    }
    .promo-text {
        font-size: 12px;
    }
    .promo-link {
        padding: 10px 14px;
        font-size: 12px;
    }
    /* Powered Footer */
    .emd-powered-footer {
        padding: 10px;
        margin-top: 14px;
    }
    .emd-powered-content {
        font-size: 10px;
        gap: 6px;
    }
    /* Demo Modal */
    .demo-modal {
        width: 92%;
        padding: 24px 18px;
    }
    .demo-modal h2 {
        font-size: 18px;
    }
    .demo-modal p {
        font-size: 13px;
    }
    .demo-btn-whatsapp,
    .demo-btn-close {
        padding: 11px 18px;
        font-size: 13px;
    }
    /* Loading Screen */
    .emd-spinner {
        width: 100px;
        height: 100px;
    }
    .emd-logo-center {
        width: 50px;
        height: 50px;
    }
    .emd-text {
        font-size: 20px;
    }
    .emd-brand-text {
        font-size: 28px;
        letter-spacing: 3px;
        margin: 24px 0 16px;
    }
    .emd-progress-container {
        width: 200px;
    }
    .emd-loading-message {
        font-size: 13px;
    }
}


/* Extra Small Mobile (< 375px) */

@media (max-width: 374px) {
    .app {
        padding: 4px;
        gap: 6px;
    }
    .toolbar {
        padding: 6px;
    }
    .btn,
    .btn-secondary,
    .file-input {
        font-size: 12px;
        padding: 10px 12px;
        min-height: 40px;
    }
    .card {
        padding: 10px;
    }
    .a4 {
        transform: scale(0.55);
        margin-bottom: -100px;
    }
    .pdf-title {
        font-size: 14px;
    }
    .floating-whatsapp {
        width: 48px;
        height: 48px;
        bottom: 16px;
        right: 16px;
    }
    .floating-whatsapp svg {
        width: 24px;
        height: 24px;
    }
    .emd-brand-text {
        font-size: 24px;
        letter-spacing: 2px;
    }
}


/* Landscape Mode Optimization */

@media (max-height: 600px) and (orientation: landscape) {
    .toolbar {
        position: static;
    }
    .a4 {
        transform: scale(0.6);
    }
    .emd-loading-screen {
        padding: 20px;
    }
    .emd-spinner {
        width: 80px;
        height: 80px;
    }
    .emd-brand-text {
        font-size: 24px;
        margin: 16px 0 12px;
    }
}


/* ============================= */


/* DEMO MODE STYLES */


/* ============================= */


/* Demo Modal Overlay */

.demo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-modal-overlay.active {
    opacity: 1;
}

.demo-modal {
    background: linear-gradient(135deg, #1a1f2e 0%, #0f131a 100%);
    border: 2px solid rgba(79, 70, 229, 0.5);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(79, 70, 229, 0.3);
    text-align: center;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    0% {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.demo-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(79, 70, 229, 0.6);
    }
}

.demo-modal-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.demo-modal h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, #4f46e5, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-modal p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.demo-modal p strong {
    color: var(--text);
    font-weight: 600;
}

.demo-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.demo-btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3);
}

.demo-btn-whatsapp svg {
    width: 24px;
    height: 24px;
}

.demo-btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, #128C7E, #075E54);
}

.demo-btn-close {
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.demo-btn-close:hover {
    background: rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.5);
    color: var(--text);
}

.demo-modal-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(79, 70, 229, 0.2);
}

.demo-modal-footer a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.demo-modal-footer a:hover {
    color: #4f46e5;
}

.demo-modal-footer strong {
    color: var(--text);
}


/* Floating WhatsApp Button */

.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    animation: floatBounce 3s ease-in-out infinite;
}

@keyframes floatBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.floating-whatsapp:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp svg {
    width: 32px;
    height: 32px;
    color: white;
}

.floating-whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: rgba(18, 24, 38, 0.95);
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.floating-whatsapp:hover .floating-whatsapp-tooltip {
    opacity: 1;
}


/* Promo Banner */

.promo-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 12px;
    margin: 12px;
    padding: 16px 20px;
    animation: bannerSlideIn 0.6s ease-out;
}

@keyframes bannerSlideIn {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.promo-icon {
    font-size: 32px;
    animation: iconRotate 4s linear infinite;
}

@keyframes iconRotate {
    0%,
    100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

.promo-text {
    flex: 1;
    color: white;
    font-size: 15px;
}

.promo-text strong {
    font-size: 16px;
    font-weight: 700;
}

.promo-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.promo-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}


/* PDF Demo Bar (PDF içinde üstte) */

.pdf-demo-bar {
    display: none;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 8px 16px;
    margin-bottom: 14px;
    border-bottom: 2px solid #e5e7eb;
    border-radius: 8px;
    user-select: none;
    -webkit-user-select: none;
    page-break-after: avoid;
}

.pdf-demo-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.5px;
}

.pdf-demo-center {
    flex: 1;
    text-align: center;
}

.pdf-demo-emd {
    font-size: 14px;
    font-weight: 900;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pdf-demo-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
}

.pdf-demo-whatsapp:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.5);
}

.pdf-demo-whatsapp svg {
    width: 16px;
    height: 16px;
    color: white;
}


/* Demo Watermark on Preview */

.demo-watermark {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
    opacity: 0.12;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.demo-watermark-content {
    text-align: center;
    transform: rotate(-45deg);
    user-select: none;
}

.demo-watermark-icon {
    font-size: 80px;
    margin-bottom: 10px;
}

.demo-watermark-text {
    font-size: 48px;
    font-weight: 900;
    color: #4f46e5;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.demo-watermark-subtext {
    font-size: 18px;
    color: #666;
    margin-top: 8px;
}


/* EMD Powered Footer */

.emd-powered-footer {
    display: none;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-top: 2px solid #e5e7eb;
    border-radius: 0 0 8px 8px;
    padding: 10px 16px;
    margin-top: 16px;
    user-select: none;
    -webkit-user-select: none;
    page-break-inside: avoid;
}

.emd-powered-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 11px;
}

.emd-powered-icon {
    font-size: 16px;
}

.emd-powered-text {
    color: #6b7280;
    font-weight: 500;
}

.emd-powered-text strong {
    font-weight: 800;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.emd-powered-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.emd-powered-link:hover {
    color: #7c3aed;
    text-decoration: underline;
}


/* Loading screen removed */


/* EMD Promo in PDF */

.emd-promo-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    page-break-inside: avoid;
    user-select: none;
    -webkit-user-select: none;
}

.emd-promo-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emd-promo-logo {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.emd-promo-text {
    font-size: 14px;
    font-weight: 500;
}

.emd-promo-text strong {
    font-weight: 800;
}

.emd-promo-contact {
    font-size: 13px;
    font-weight: 600;
}

.emd-promo-contact a {
    color: #fef08a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.emd-promo-contact a:hover {
    color: white;
    text-decoration: underline;
}

.emd-footer-promo {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 12px 16px;
    margin-top: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    page-break-inside: avoid;
}

.emd-footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.emd-footer-logo {
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 2px;
}

.emd-footer-text {
    font-size: 12px;
    font-weight: 500;
}


/* Responsive Demo Styles */


/* Mobile responsive styles removed */


/* EMD Promo in PDF */

.emd-promo-banner {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    page-break-inside: avoid;
    user-select: none;
    -webkit-user-select: none;
}

.emd-promo-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emd-promo-logo {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.emd-promo-text {
    font-size: 14px;
    font-weight: 500;
}

.emd-promo-text strong {
    font-weight: 800;
}

.emd-promo-contact {
    font-size: 13px;
    font-weight: 600;
}

.emd-promo-contact a {
    color: #fef08a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.emd-promo-contact a:hover {
    color: white;
    text-decoration: underline;
}

.emd-footer-promo {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    padding: 14px 18px;
    margin: 20px 0 8px 0;
    border-radius: 8px;
    page-break-inside: avoid;
    user-select: none;
    -webkit-user-select: none;
}

.emd-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 12px;
}

.emd-footer-left {
    font-weight: 600;
}

.emd-footer-left strong {
    font-weight: 800;
}

.emd-footer-right {
    font-weight: 500;
}

.emd-footer-right a {
    color: #fef08a;
    text-decoration: none;
}

.emd-footer-right a:hover {
    text-decoration: underline;
}


/* Responsive Demo Styles */


/* Mobile responsive styles removed */