:root {
    --bg: #f6f1ff;
    --bg-2: #eef3ff;
    --surface: #ffffff;
    --ink: #1f2937;
    --muted: #5f6b7a;
    --accent: #4c7cf3;
    --accent-2: #11b5a4;
    --lavender: #ead6ff;
    --border: #e4e7ee;
    --shadow-sm: 0 10px 30px rgba(31, 41, 55, 0.08);
    --shadow-lg: 0 24px 60px rgba(31, 41, 55, 0.14);
    --radius-sm: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: "Source Sans 3", sans-serif;
    background: linear-gradient(180deg, #f8f6ff 0%, #f1f6ff 45%, #f7fbff 100%);
    color: var(--ink);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
}

a {
    color: inherit;
}

.header {
    background: linear-gradient(120deg, #f3ecff 0%, #e9f1ff 50%, #eff8f7 100%);
    border-bottom: 1px solid #e6def7;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    gap: 12px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 12px 25px rgba(76, 124, 243, 0.18);
}

.brand-name {
    font-family: "Sora", sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.brand-tagline {
    font-size: 14px;
    color: var(--muted);
}

.hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.eyebrow {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.page-title {
    font-family: "Sora", sans-serif;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-subtitle {
    color: var(--muted);
    font-size: 16px;
    max-width: 520px;
}

.note-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(6px);
}

.note-title {
    font-family: "Sora", sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.note-text {
    color: var(--muted);
    font-size: 14px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.qr-type-panel {
    gap: 16px;
}

.qr-type-panel .row {
    flex: 1;
    align-content: stretch;
}

.qr-type-panel .row > [class*="col-"] {
    display: flex;
}

.qr-type-panel .qr-type-card {
    height: 100%;
    width: 100%;
}

.qr-type-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.panel-head {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    text-align: left;
}

.panel-head.align-start {
    align-items: flex-start;
}

.panel-title {
    font-family: "Sora", sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.panel-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.qr-type-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid transparent;
    background: linear-gradient(#ffffff, #ffffff) padding-box,
                linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(76, 124, 243, 0.35)) border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-height: 140px;
    cursor: pointer;
}

.qr-type-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(76, 124, 243, 0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.qr-type-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.qr-type-card:hover::after {
    opacity: 1;
}

.qr-type-card .card-body {
    position: relative;
    z-index: 1;
}

.qr-type-card .card-title {
    font-family: "Sora", sans-serif;
    font-size: 16px;
    margin: 0;
}

.qr-type-icon {
    color: var(--accent);
}

.card[data-modal-target="textModal"] .qr-type-icon {
    color: #8b5cf6;
}

.card[data-modal-target="vCardModal"] .qr-type-icon {
    color: #10b981;
}

.card[data-modal-target="emailModal"] .qr-type-icon {
    color: #f97316;
}

.card[data-modal-target="wifiModal"] .qr-type-icon {
    color: #0f766e;
}

.qr-preview {
    border: 1px dashed #d7deea;
    background: #f7f9ff;
    border-radius: 16px;
    padding: 16px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex: 1;
}

.qr-preview img {
    max-height: 100%;
}

#qr-title {
    margin: 0;
}

.qr-actions .btn {
    border-radius: 999px;
    font-weight: 600;
}

.qr-actions {
    margin-top: auto;
}

.btn {
    border-radius: 999px;
    font-weight: 600;
    padding: 10px 18px;
}

.btn-primary {
    background: linear-gradient(135deg, #4c7cf3, #7c3aed);
    border: none;
    box-shadow: 0 10px 20px rgba(76, 124, 243, 0.25);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-outline-info {
    border-color: #4c7cf3;
    color: #4c7cf3;
}

.btn-outline-info:hover {
    background: #4c7cf3;
    color: #ffffff;
}

.file-upload-wrapper {
    position: relative;
    width: 100%;
    min-height: 220px;
    border: 2px dashed #cdd6e5;
    border-radius: var(--radius-lg);
    background-color: #f8f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.file-upload-wrapper:hover {
    border-color: #8bb0ff;
    background-color: #f0f5ff;
}

.custom-file-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    cursor: pointer;
    text-decoration: none;
}

.upload-content {
    color: #6c757d;
}

.upload-icon {
    fill: none;
    stroke: currentColor;
}

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

.decode-preview {
    max-width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #f7f9ff;
    padding: 10px;
}

.decode-panel form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#image-preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.decoded-panel {
    min-height: 320px;
}

#decoded-result {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.textt {
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 15px;
    line-height: 1.6;
    background: #f7f9ff;
    border: 1px solid #e0e6f2;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
}

.section-head {
    margin-bottom: 24px;
}

.section-title {
    font-family: "Sora", sans-serif;
    font-size: 30px;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 15px;
}

.sticky-footer {
    background: linear-gradient(120deg, #f3ecff 0%, #e9f1ff 50%, #eff8f7 100%);
    border-top: 1px solid #e6def7;
    padding: 18px 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    text-align: center;
}

.footer-copy {
    color: var(--muted);
    font-size: 14px;
}

.sticky-footer a {
    color: #4c7cf3;
    text-decoration: none;
}

.sticky-footer a:hover {
    color: #3455c6;
}

.form-group {
    margin-bottom: 1rem !important;
}

.modal-contentt {
    background-color: #ffffff;
    border-radius: 18px;
    padding: 22px;
    width: min(640px, 100%);
    max-width: 640px;
    max-height: 90vh;
    position: relative !important;
    z-index: 100;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    animation: scale-in 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.45);
    z-index: 1050;
    justify-content: center;
    align-items: center;
    padding: 24px;
    backdrop-filter: blur(6px);
}

.modal-header,
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.modal-header .modal-title {
    font-size: 18px;
    font-weight: bold;
}

.modal-header .close-modal-btn {
    background: none;
    border: none;
    font-size: 35px;
    cursor: pointer;
    color: #374151;
}

.modal-body {
    overflow-y: auto;
    padding-right: 6px;
}

.modal-body input,
.modal-body textarea,
.modal-body select {
    border-radius: 12px;
    border: 1px solid #dbe0ea;
    padding: 10px 12px;
}

.modal-footer {
    gap: 10px;
    margin-top: auto;
}

.modal-footer .btn {
    border: none;
    cursor: pointer;
    border-radius: 999px;
    font-size: 14px;
}

@keyframes scale-in {
    from {
        transform: scale(0.94);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.border-secondaryy {
    border: 1px solid var(--border) !important;
}

.pad {
    padding: 12px 0;
}

.print-btn:hover {
    color: white !important;
}

@media (max-width: 991px) {
    .page-title {
        font-size: 34px;
    }

    .hero-header {
        margin-bottom: 20px;
    }
}

@media (max-width: 575px) {
    .page-title {
        font-size: 30px;
    }

    .panel {
        padding: 16px;
    }

    .brand-row {
        justify-content: center;
        text-align: center;
    }

    .brand-tagline {
        width: 100%;
        text-align: center;
    }

    .modal-contentt {
        padding: 16px;
        max-height: 92vh;
    }

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-footer .btn {
        width: 100%;
    }
}
