

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: #eef2f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Modal (confirm delete) */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
}



.modal {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.18), 0 8px 16px rgba(0,0,0,0.12);
    overflow: hidden;
}
.modal-header {
    padding: 16px 18px 0 18px;
    font-weight: 600;
    font-size: 18px;
    color: #111827;
}
.modal-body {
    padding: 12px 18px 0 18px;
    color: #374151;
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 18px 18px 18px;
}

/* Danger button */
.danger {
    background-color: #ef4444;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 12px 20px rgba(239, 68, 68, 0.25), 0 4px 8px rgba(239, 68, 68, 0.28);
}
.danger:hover {
    background-color: #dc2626;
    box-shadow: 0 16px 26px rgba(239, 68, 68, 0.28), 0 6px 10px rgba(239, 68, 68, 0.32);
    transform: translateY(-1px);
}

/* Table styles for links admin */
.table-responsive { width: 100%; overflow: auto; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 12px; }
.data-table thead th { position: sticky; top: 0; background: #f8fafc; color: #374151; text-align: left; font-weight: 600; font-size: 13px; padding: 10px 12px; border-bottom: 1px solid #e5e7eb; }
.data-table tbody td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; font-size: 14px; color: #1f2937; }
.data-table tbody tr:nth-child(odd) td { background: #fbfdff; }
.data-table tbody tr:hover td { background: #f5faff; }
.data-table thead th:first-child, .data-table tbody td:first-child { border-top-left-radius: 12px; }
.data-table thead th:last-child, .data-table tbody td:last-child { border-top-right-radius: 12px; }

/* Mini QR containers */
#qr-mini-\{\{it.LinkId\}\} { width: 64px; height: 64px; }
[id^="qr-mini-"] { width: 64px; height: 64px; display: inline-block; }
[id^="qr-mini-"] canvas, [id^="qr-mini-"] img { width: 64px; height: 64px; display: block; image-rendering: pixelated; }

/* ----------------------- */
/* Responsive adjustments  */
/* ----------------------- */
@media (max-width: 480px) {
  body { align-items: flex-start; padding: 16px; height: auto; min-height: 100vh; }
  .container { padding: 12px; }
  .box { max-height: none; }
  .box-body { padding: 16px; padding-right: 20px; }
  .panel-footer, .box-footer { padding: 12px 16px; }
  [id^="qr-mini-"] { width: 48px; height: 48px; }
  [id^="qr-mini-"] canvas, [id^="qr-mini-"] img { width: 48px; height: 48px; }
  .input-group .prefix { height: 40px; }
  .input-group input[type="text"], .input-group input[type="email"] { height: 40px; }
  .input-group .suffix-button { height: 34px; right: 4px; }

  /* Transform table into cards */
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: #fff; }
  .data-table tbody td { border-bottom: 1px solid #f1f5f9; background: #fff !important; }
  .data-table tbody td:last-child { border-bottom: none; }
  .data-table tbody td { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .data-table tbody td::before { content: attr(data-label); font-weight: 600; color: #374151; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
}

@media (min-width: 768px) {
  .container { max-width: 720px; }
}

@media (min-width: 1024px) {
  .container { max-width: 860px; }
}

@media (min-width: 1280px) {
  .container { max-width: 980px; }
}

.container {
    width: 100%;
    max-width: 640px;
    padding: 20px;
}

.panel {
    background-color: #ffffff;
    border-radius: 14px;
    text-align: center;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.06);
    /* Layout for sticky footer */
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

/* Scrollable body area with margin next to scrollbar */
.panel-body {
    padding: 28px 24px;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 28px; /* extra space so text doesn't collide with scrollbar */
    scrollbar-gutter: stable both-edges; /* modern browsers */
}

/* Panel footer pinned to bottom */
.panel-footer {
    flex: 0 0 auto;
    background: #f5f7fb;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -6px 12px rgba(0,0,0,0.06);
    padding: 10px 16px;
    border-radius: 0 0 14px 14px;
}
.panel-footer small {
    display: block;
    text-align: center;
    color: #6b7280;
    font-variant: small-caps;
    letter-spacing: 0.5px;
}

/* Modern scrollbar styling for the scrollable body */
/* Firefox */
.panel-body { scrollbar-width: thin; scrollbar-color: #c7d2fe transparent; }
/* WebKit */
.panel-body::-webkit-scrollbar { width: 10px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a5b4fc, #93c5fd);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.panel-body::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #93c5fd, #60a5fa); }

/* ========================= */
/* New Box component styles  */
/* ========================= */
.box {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;

    /* Make footer stick to bottom */
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.box-header {
    padding: 24px 24px 0 24px;
    background-color: #fff;
    text-align: center;
}

.box-title { font-weight: 600; font-size: 24px; color: #1f2937; margin: 0 0 8px 0; line-height: 1.2; }
.box-title-small { font-weight: 600; font-size: 14px; color: #1f2937; margin: 0 0 8px 0; line-height: 1.2; }
.box-title-sub { font-weight: 500; font-size: 14px; color: #6b7280; margin: 0; text-transform: uppercase; letter-spacing: 1px; }

.box-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 8px; z-index: 10; }
.box-footer-actions { position: absolute; bottom: 9px; right: 10px; display: flex; gap: 8px; z-index: 10; }

.box-body {
    padding: 20px 24px;
    color: #444;
    background-color: #fff;
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 28px; /* room next to scrollbar */
    padding-bottom: 140px; /* extra breathing room above footer */
    scrollbar-gutter: stable both-edges;
}

.box-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px 24px;
    background-color: #f8fafc;
    border-top: 1px solid #e5e7eb;
    min-height: 20px;
}
.box-footer > :first-child { justify-self: start; }
.box-footer .footer-text {
    justify-self: center;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.box-footer > :last-child { justify-self: end; }
.box-footer > :only-child { justify-self: center; grid-column: 1 / -1; }
.box-footer > :first-child:nth-last-child(2) { justify-self: center; grid-column: 2; }
.box-footer > :last-child:nth-child(2) { justify-self: end; grid-column: 3; }
.box-footer .button-group { display: flex; gap: 8px; justify-self: end; }
.box-title-group { display: flex; flex-direction: column; }

/* Modern scrollbar for box body */
.box-body { scrollbar-width: thin; scrollbar-color: #c7d2fe transparent; }
.box-body::-webkit-scrollbar { width: 10px; }
.box-body::-webkit-scrollbar-track { background: transparent; }
.box-body::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #a5b4fc, #93c5fd); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
.box-body::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #93c5fd, #60a5fa); }

/* Toasts */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}
.toast {
    min-width: 260px;
    max-width: 380px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #0b1220;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
    border-left: 4px solid #e5e7eb;
}
.toast.success { border-left-color: #34d399; }
.toast.warning { border-left-color: #fbbf24; }
.toast.error { border-left-color: #f87171; }
.toast .toast-message { font-size: 14px; }

/* Responsive logo above panel */
.logo {
    max-width: 150px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 42px;
}

h1 {
    margin-top: 0;
    color: #2a2e34;
    font-size: 24px;
    letter-spacing: 0.2px;
}

input {
    width: 100%;
    padding: 12px 14px;
    margin: 12px 0 18px;
    border: 1px solid #d9e0ec;
    border-radius: 10px;
    box-sizing: border-box;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

input:focus {
    border-color: #7aa6ff;
    box-shadow: 0 0 0 4px rgba(122, 166, 255, 0.2);
}



.qr-display {
    margin-top: 20px;
    padding: 16px 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-actions {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

/* QR container */
#qrcode { display: inline-block; }
#qrcode canvas, #qrcode img { max-width: 100%; height: auto; image-rendering: pixelated; }

/* Slider row */
.slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 12px;
}

.slider-row label { color: #4b5563; font-size: 14px; min-width: 110px; text-align: left; }

.slider-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #93c5fd, #60a5fa);
    outline: none;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1d4ed8;
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.35);
    cursor: pointer;
}

.slider-row input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1d4ed8;
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.35);
    cursor: pointer;
}

/* Actions */
.actions { margin-top: 12px; }
.actions .primary { min-width: 180px; }

/* Input with https:// prefix */
.input-group {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 12px 0 18px;
}

.input-group .prefix {
    display: flex;
    align-items: center;
    padding: 0 12px 0 14px; /* equalize height with input */
    background: #f5f7fb;
    color: #4b5563;
    border: 1px solid #d9e0ec;
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 14px;
    white-space: nowrap;
    height: 44px;
    box-sizing: border-box;
}

.input-group input[type="text"],
.input-group input[type="email"] {
    margin: 0; /* handled by group */
    border-radius: 0 10px 10px 0;
    border-left: none;
    height: 44px;
    box-sizing: border-box;
}

/* Suffix button integrated into input */
.input-group.has-suffix {
    position: relative;
}

.input-group .suffix-button {
    position: absolute;
    right: 6px;
    top:12px;
    transform: translateY(-50%);
    height: 36px;
    padding: 0 12px;
    border-radius: 8px;
}

/* Make room so text doesn't overlap the suffix button */
.input-group.has-suffix input[type="email"] {
    padding-right: 120px;
}

/* Inline email + button row */
.input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.input-row .primary { height: 44px; white-space: nowrap; }

.input-group:focus-within .prefix {
    border-color: #7aa6ff;
    box-shadow: 0 0 0 4px rgba(122, 166, 255, 0.2);
}

/* Stats email form (fade-in) */
.stats-form {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease;
}

.stats-form.show {
    opacity: 1;
    max-height: none; /* allow full content when visible */
    transform: translateY(0);
    margin-top: 8px;
}

/* Ensure generated link has space from footer */
.generated-link { margin-bottom: 24px; }


/* (removed) checkbox styles cleanup */


/* SA button styles removed */

/* Restored legacy button styles */
button {
    background-color: #3b82f6;
    color: #ffffff;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.25), 0 2px 6px rgba(59, 130, 246, 0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
button:hover {
    background-color: #2563eb;
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28), 0 4px 10px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}
/* Variants */
.primary { background-color: #3b82f6; color: #ffffff; }
.primary:hover { background-color: #2563eb; }
.secondary { background-color: #e5e7eb; color: #0b1220; }
.secondary:hover { background-color: #d1d5db; }
.danger { background-color: #ef4444; color: #ffffff; }
.danger:hover { background-color: #dc2626; }



.checkbox-wrapper-46 input[type="checkbox"] {
    display: none;
    visibility: hidden;
}

.checkbox-wrapper-46 .cbx {
    margin: auto;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

    .checkbox-wrapper-46 .cbx span {
        display: inline-block;
        vertical-align: middle;
        transform: translate3d(0, 0, 0);
    }

        .checkbox-wrapper-46 .cbx span:first-child {
            position: relative;
            width: 18px;
            height: 18px;
            border-radius: 3px;
            transform: scale(1);
            vertical-align: middle;
            border: 1px solid #9098a9;
            transition: all 0.2s ease;
        }

            .checkbox-wrapper-46 .cbx span:first-child svg {
                position: absolute;
                top: 3px;
                left: 2px;
                fill: none;
                stroke: #ffffff;
                stroke-width: 2;
                stroke-linecap: round;
                stroke-linejoin: round;
                stroke-dasharray: 16px;
                stroke-dashoffset: 16px;
                transition: all 0.3s ease;
                transition-delay: 0.1s;
                transform: translate3d(0, 0, 0);
            }

            .checkbox-wrapper-46 .cbx span:first-child:before {
                content: "";
                width: 100%;
                height: 100%;
                background: #506eec;
                display: block;
                transform: scale(0);
                opacity: 1;
                border-radius: 50%;
            }

        .checkbox-wrapper-46 .cbx span:last-child {
            padding-left: 8px;
        }

    .checkbox-wrapper-46 .cbx:hover span:first-child {
        border-color: #506eec;
    }

.checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child {
    background: #506eec;
    border-color: #506eec;
    animation: wave-46 0.4s ease;
}

    .checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child svg {
        stroke-dashoffset: 0;
    }

    .checkbox-wrapper-46 .inp-cbx:checked + .cbx span:first-child:before {
        transform: scale(3.5);
        opacity: 0;
        transition: all 0.6s ease;
    }

@keyframes wave-46 {
    50% {
        transform: scale(0.9);
    }
}


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