/* Shared LiveMira tool surface, website colors and readable controls. */
:root{--bg:#f6f8fc;--bg-alt:#f1f5fb;--surface:#fff;--surface-hover:#f5f8ff;--surface-raised:#fff;--border:#dce5f2;--border-hover:#aebfda;--text:#15243b;--text-secondary:#50627c;--text-muted:#64748b;--primary:#2563eb;--primary-light:#dceaff;--primary-dark:#1d4ed8;--primary-glow:#2563eb20;--primary-gradient:linear-gradient(120deg,#2563eb,#1d4ed8);--primary-subtle:#eff5ff;--accent:#2563eb;--accent-bg:#eff5ff;--success:#15803d;--success-bg:#ecfdf3;--danger:#dc2626;--danger-bg:#fff1f2;--warning:#b45309;--warning-bg:#fffbeb;--coin:#b45309;--coin-bg:#fffbeb;--radius-xs:6px;--radius-sm:10px;--radius-md:14px;--radius-lg:20px;--radius-xl:24px;--radius-full:999px;--shadow-xs:0 2px 10px #18375b06;--shadow-sm:0 3px 15px #18375b08;--shadow-md:0 6px 25px #18375b0d;--shadow-lg:0 14px 45px #18375b12;--shadow-xl:0 20px 65px #18375b18;--transition:.18s ease;--overlay-bg:#15243b66;color-scheme:light}
html{scroll-behavior:smooth}body.tools-page{background:var(--bg);color:var(--text);font-family:"Segoe UI",system-ui,-apple-system,sans-serif;line-height:1.65;margin:0;max-width:none}*,*:before,*:after{box-sizing:border-box}button,input,select,textarea{font:inherit}button{cursor:pointer}img{max-width:100%;height:auto}[hidden]{display:none!important}a{color:#2563eb}input,textarea,select{max-width:100%}button:disabled{cursor:wait;opacity:.65}:focus-visible{outline:3px solid #93b5fc;outline-offset:3px}
.tools-page .livemira-site-header{position:sticky;top:0;z-index:100;background:#fff}.tools-main{max-width:1160px;margin:0 auto;padding:28px 24px 56px}.tools-breadcrumb{display:flex;gap:10px;flex-wrap:wrap;font-size:12px;color:#60728b;align-items:center}.tools-breadcrumb a{color:#50627c;text-decoration:none}.tools-intro{display:flex;justify-content:space-between;gap:24px;align-items:center;padding:30px 0}.tools-eyebrow{font-size:10px;letter-spacing:.13em;font-weight:800;color:#2563eb}.tools-intro h1{font-size:clamp(27px,3.2vw,42px);letter-spacing:-1.2px;line-height:1.2;margin:10px 0 12px;color:#14243c}.tools-intro p{font-size:16px;color:#60728b;max-width:680px;line-height:1.75;margin:0}.tools-back{display:inline-flex;gap:20px;white-space:nowrap;align-items:center;background:white;border:1px solid #dce5f2;border-radius:12px;padding:12px 16px;font-size:13px;font-weight:700;text-decoration:none}.tool-content{min-width:0}.tool-content>style{display:none}.tool-content>div{min-width:0}.tool-content table{border-collapse:collapse}.tool-content p{line-height:1.75}.tool-content input,.tool-content textarea,.tool-content select{color:#15243b}.tool-content input[type=checkbox],.tool-content input[type=radio]{accent-color:#2563eb}.tool-content :is(pre,.response-body,.output-area){max-width:100%;overflow:auto}
.tool-help{margin-top:32px;border:1px solid #dce5f2;background:#fff;border-radius:20px;padding:28px;display:grid;gap:24px;grid-template-columns:1fr 1fr;align-items:start}.tool-help>div:only-child{grid-column:1/-1}.tool-help h2{font-size:23px;letter-spacing:-.5px;margin:8px 0 16px}.tool-help h3{font-size:17px}.tool-help p,.tool-help li{font-size:14px;color:#50627c;line-height:1.85}.tool-help ol{padding-left:22px}.tool-help li{padding-left:5px;margin:8px 0}.tool-help li::marker{font-weight:800;color:#2563eb}.tool-note{padding:14px 18px;background:#f5f8fd;border-radius:12px}.tool-help figure{margin:0;min-width:0}.tool-help img{width:100%;height:auto;border-radius:12px;border:1px solid #dce5f2}.tool-help figcaption{font-size:12px;color:#64748b;margin-top:8px}.tools-related{margin-top:36px}.tools-related-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.tools-related-heading h2{font-size:23px;letter-spacing:-.5px}.tools-related-heading a{font-size:13px;font-weight:700;text-decoration:none}.tools-related-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.tools-related-grid a{display:flex;flex-direction:column;gap:12px;border:1px solid #dce5f2;border-radius:16px;background:white;padding:22px;text-decoration:none;transition:transform .18s,box-shadow .18s}.tools-related-grid a:hover{transform:translateY(-3px);box-shadow:0 12px 24px #18375b0c}.tools-related-grid strong{color:#14243c;font-size:15px}.tools-related-grid span{color:#60728b;font-size:13px;line-height:1.7}.tools-related-grid small{margin-top:auto;color:#2563eb;font-weight:700;font-size:12px}.tool-help>h2,.tool-help>h3,.tool-help>p{grid-column:1/-1;margin:0}


.auth-page {
    min-height: calc(100vh - var(--header-h) - 60px);
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    width: 100%; max-width: 420px;
    box-shadow: var(--shadow-xl);
    position: relative; overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary-gradient);
}
.auth-card-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; text-align: center; }
.auth-card-sub { text-align: center; color: var(--text-muted); font-size: 0.84rem; margin-bottom: 24px; }



.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.87rem;
    outline: none;
    transition: all var(--transition);
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 5px; }
.form-check {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.84rem; cursor: pointer; color: var(--text-secondary);
}



.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 22px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--primary-glow);
    color: white;
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-sm { padding: 7px 16px; font-size: 0.78rem; }

.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); background: var(--surface-hover); }
.btn-ghost.btn-sm { padding: 7px 16px; font-size: 0.78rem; }

.btn-outline {
    background: transparent !important;
    border: 1px solid var(--border) !important;
    color: var(--text-secondary) !important;
    box-shadow: none !important;
}
.btn-outline:hover { border-color: var(--primary) !important; color: var(--primary) !important; }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626) !important; }



.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.panel-header { padding: 18px 22px; border-bottom: 1px solid var(--border); }
.panel-header h2 { font-size: 1.05rem; font-weight: 700; }
.panel-body { padding: 22px; }



.tabs {
    display: flex; gap: 2px;
    margin-bottom: 20px; padding: 3px;
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.tab-btn {
    flex: 1;
    padding: 9px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.tab-btn:hover { color: var(--text-secondary); }
.tab-btn.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px var(--primary-glow);
}
.tab-content { display: none; }
.tab-content.active { display: block; }



.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.data-table thead { background: var(--bg-alt); }
.data-table th {
    padding: 11px 14px;
    text-align: left; font-weight: 600;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.data-table td { padding: 11px 14px; border-top: 1px solid var(--border); }
.data-table tr:hover td { background: var(--primary-subtle); }
.data-table code { font-size: 0.76rem; background: var(--bg-alt); padding: 2px 8px; border-radius: 4px; }
.admin-actions { display: flex; gap: 6px; flex-wrap: nowrap; }



.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.84rem; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: var(--danger-bg); color: var(--danger); border-color: rgba(239, 68, 68, 0.15); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: rgba(16, 185, 129, 0.15); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border-color: rgba(245, 158, 11, 0.15); }



.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(8px);
    z-index: 300;
    align-items: center; justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    width: 100%; max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
}
.modal-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-box h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 18px; }



.toast-container {
    position: fixed;
    top: calc(var(--header-h) + 12px);
    right: 16px; z-index: 500;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s cubic-bezier(.4, 0, .2, 1);
    min-width: 240px;
    border: 1px solid;
    backdrop-filter: blur(12px);
}
.toast.success { background: rgba(240, 253, 244, 0.95); color: #166534; border-color: rgba(16, 185, 129, 0.2); }
.toast.error { background: rgba(254, 242, 242, 0.95); color: #991b1b; border-color: rgba(239, 68, 68, 0.2); }
.toast.warning { background: rgba(255, 251, 235, 0.95); color: #92400e; border-color: rgba(245, 158, 11, 0.2); }
.toast.info { background: rgba(239, 246, 255, 0.95); color: #1e40af; border-color: rgba(59, 130, 246, 0.2); }
[data-theme="dark"] .toast.success { background: rgba(6, 78, 59, 0.92); color: var(--success); }
[data-theme="dark"] .toast.error { background: rgba(127, 29, 29, 0.92); color: var(--danger); }
[data-theme="dark"] .toast.warning { background: rgba(120, 53, 15, 0.92); color: var(--warning); }
[data-theme="dark"] .toast.info { background: rgba(30, 58, 138, 0.92); color: #93c5fd; }

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}



.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.row-ok td:first-child { border-left: 3px solid var(--success); }
.row-err td:first-child { border-left: 3px solid var(--danger); }



.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-coin { color: var(--coin); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Common control overrides after compatibility styles. */
.tools-page .tool-content :is(#caroApp,#xqApp) .caro-mode-card{min-width:0;padding:14px;gap:8px}.tools-page .tool-content :is(#caroApp,#xqApp) .caro-mode-card>div{min-width:0}.tools-page .tool-content .caro-board{max-width:100%}.tools-page .tool-content .xq-board{max-width:100%}
.tools-page .skip{position:absolute;top:-100px;left:16px;padding:12px;background:#fff;z-index:300}.tools-page .skip:focus{top:10px}
.tools-page .tool-content .panel{border-radius:20px;box-shadow:0 8px 35px #193b6506}.tools-page .tool-content .panel-header{padding:20px 26px;background:#f8faff}.tools-page .tool-content .panel-header h2{font-size:17px;margin:0}.tools-page .tool-content .panel-body{padding:26px}.tools-page .tool-content .btn-primary{background:#2563eb;border-radius:11px;min-height:44px}.tools-page .tool-content .btn-ghost{border-radius:11px;min-height:44px}.tools-page .tool-content .form-input{background:white;border-radius:11px;min-height:46px;font-size:14px}.tools-page .tool-content .form-hint{font-size:12px}.tools-page .tool-content .qr-type-btn.active,.tools-page .tool-content .vd-platform-btn.active{border-color:#2563eb;background:#eff5ff;color:#1d4ed8}.tools-page .tool-content :is(.qr-type-btn,.vd-platform-btn){border-radius:12px}.tools-page .tool-content :is(.qr-type-grid,.vd-platforms){gap:10px}.tools-page .tool-content :is(.qr-output,.qr-preview,.vd-options){border-radius:16px}.tools-page .livemira-web-footer{margin-top:0}.tools-page .tool-content .search-card,.tools-page .tool-content .profile-card,.tools-page .tool-content .detail-card{box-shadow:0 8px 35px #193b6506;border-color:#dce5f2;border-radius:20px}.tools-page .tool-content .search-card{padding:26px}.tools-page .tool-content .stats article{border-color:#dce5f2;border-radius:16px}.tools-page .tool-content .input-row button{background:#2563eb}.tools-page .tool-content #status{font-size:13px}.tools-page .tool-content .examples button{background:#eff5ff;color:#2563eb;border-color:#dce5f2}.tools-page .tool-content .input-row input{font-size:15px;border-radius:12px}.tools-page .tools-main .tools-intro{display:flex}.tools-page .toast-container{z-index:200}
@media(max-width:800px){.tools-main{padding:22px 20px 40px}.tools-intro{align-items:flex-start;padding:24px 0}.tools-back{display:none}.tools-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.tool-help{grid-template-columns:1fr;padding:24px}.tools-page .tool-content .panel-body{padding:20px}.tools-intro h1{font-size:31px}.tools-intro p{font-size:14px}.tools-page .tool-content .details-grid{grid-template-columns:1fr}.tools-page .tool-content .input-row{flex-direction:column}.tools-page .tool-content .input-row button{width:100%}.tools-page .tool-content .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.tools-page .tool-content .profile-link{margin-left:0}.tools-page .tool-content .identity{flex-wrap:wrap}}
@media(max-width:480px){.tools-main{padding:20px 15px 32px}.tools-breadcrumb{font-size:11px;gap:7px}.tools-intro{padding:22px 0}.tools-intro h1{font-size:28px;letter-spacing:-.7px}.tools-intro p{font-size:14px}.tools-page .tool-content .panel-body,.tools-page .tool-content .search-card{padding:18px}.tools-page .tool-content .panel-header{padding:16px 18px}.tools-page .tools-related-grid{grid-template-columns:1fr}.tools-related-heading h2,.tool-help h2{font-size:21px}.tool-help{padding:20px}.tools-page .tool-content .qr-type-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.tools-page .tool-content .qr-type-btn{min-width:0;font-size:12px}.tools-page .tool-content .panel-header h2{font-size:16px}.tools-page .tool-content .stats strong{font-size:22px}.tools-page .livemira-site-header .brand small{display:none}.tools-page .livemira-site-header .brand-mark{width:32px;height:32px;flex-basis:32px}.tools-page .livemira-site-header .brand strong{font-size:13px}.tools-page .livemira-site-header .brand{gap:7px}.tools-page .livemira-site-header .header-live{min-width:78px;font-size:11px;padding:8px}.tools-page .livemira-site-header .nav-shell{gap:6px;padding:0 13px}.tools-page .livemira-site-header .header-language{margin-left:0}.tools-page .livemira-site-header .menu-toggle{width:34px;flex-basis:34px;height:34px;padding:6px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{transition:none!important;animation:none!important}}
@media(max-width:480px){.tools-page .tool-content .rps-mode-card{min-width:0;gap:8px;padding:14px}.tools-page .tool-content .rps-mode-card>*{min-width:0}}
