/* ============================================================
   QR Code Generator — style.css
   Premium dark design system for qr-code.fuby.net
   ============================================================ */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #020617;
    color: #f1f5f9;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

body.light-mode { background: #f8fafc; color: #0f172a; }

/* === Custom Scrollbar === */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border-h); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* === CSS Custom Properties === */
:root {
    --primary:        #2f60ec; /* Vibrant Cobalt Blue */
    --primary-dark:   #1a44c2;
    --primary-light:  #5882ff;
    --secondary:      #4f46e5; /* Clean Indigo */
    --accent:         #10b981; /* Emerald Green */
    --success:        #10b981;
    --danger:         #ef4444; /* Bright Red */
    --warning:        #f59e0b; /* Amber */

    --bg-950:         #0f1013; /* Solid Charcoal Dark Background */
    --bg-900:         #17181c; /* Solid Card Surfaces */
    --bg-800:         #1e2026; /* Inner Controls */
    --bg-700:         #2d313c; /* Borders */
    --bg-600:         #475569;

    --glass-bg:          #17181c;
    --glass-border:      #2d313c;
    --glass-border-h:    #3f4454;

    --text-primary:   #f9fafb; /* Light Gray Text */
    --text-secondary: #d1d5db;
    --text-muted:     #6b7280;

    --shadow-sm:  0 1px 2px rgba(0,0,0,.5);
    --shadow-md:  0 4px 12px rgba(0,0,0,.4);
    --shadow-lg:  0 12px 32px rgba(0,0,0,.6);
    --shadow-glow:rgba(0,0,0,0);

    --tr:         all .16s cubic-bezier(.4,0,.2,1);
    --tr-md:      all .24s cubic-bezier(.4,0,.2,1);
    --tr-lg:      all .36s cubic-bezier(.4,0,.2,1);

    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  14px;
    --radius-xl:  20px;

    --nav-h:      60px;
    --sidebar-w:  280px;
    --panel-w:    330px;
}

body.light-mode, html.light-mode {
    --bg-950:         #f3f4f6; /* Solid Cool Gray Background */
    --bg-900:         #ffffff; /* Solid White Surfaces */
    --bg-800:         #f9fafb; /* Solid Light Controls */
    --bg-700:         #e5e7eb; /* Solid Borders */
    --glass-bg:       #ffffff;
    --glass-border:   #e5e7eb;
    --glass-border-h: #cbd5e1;
    --text-primary:   #111827; /* Rich dark text */
    --text-secondary: #374151;
    --text-muted:     #6b7280;
    --shadow-sm:  0 1px 2px rgba(0,0,0,.05);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -1px rgba(0,0,0,.03);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.05), 0 4px 6px -2px rgba(0,0,0,.02);
    --shadow-glow:rgba(0,0,0,0);
}

/* === Solid Card === */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

/* === Navbar === */
.navbar {
    height: var(--nav-h);
    background: var(--bg-900);
    border-bottom: 1px solid var(--glass-border);
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 4px 12px rgba(47,96,236,.25);
    flex-shrink: 0;
}

.nav-btn {
    border: 1px solid transparent;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--tr);
    display: flex; align-items: center; gap: 6px;
}
.nav-btn:hover { background: var(--glass-bg); border-color: var(--glass-border); color: var(--text-primary); }

/* === App Layout Grid === */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr var(--panel-w);
    min-height: calc(100vh - var(--nav-h));
    margin-top: var(--nav-h);
}

/* === Left Sidebar === */
.sidebar {
    border-right: 1px solid var(--glass-border);
    background: var(--glass-bg);
    overflow-y: auto;
    height: calc(100vh - var(--nav-h));
    position: sticky;
    top: var(--nav-h);
}

.sidebar-section-title {
    padding: 14px 14px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.content-types-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 0 14px 14px;
}

.content-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    aspect-ratio: 1.1 / 1;
    padding: 8px 4px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.015);
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--tr);
    position: relative;
}
body.light-mode .content-type-btn {
    background: rgba(0, 0, 0, 0.01);
}
.content-type-btn:hover {
    border-color: var(--glass-border-h);
    background: rgba(47, 96, 236, 0.04);
    color: var(--text-primary);
}
.content-type-btn.active {
    border-color: var(--primary);
    background: rgba(47, 96, 236, 0.08);
    color: var(--primary-light);
    box-shadow: 0 0 12px rgba(47, 96, 236, 0.12);
}
.content-type-btn.active::before {
    display: none;
}

.type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    color: inherit !important;
    font-size: 16px;
    flex-shrink: 0;
    margin-bottom: 5px;
}
.type-icon i {
    width: 16px !important;
    height: 16px !important;
    color: inherit !important;
}

/* Sidebar form panels — inside left sidebar content area */
.sidebar-forms { padding: 0; }
.form-panel { display: none; padding: 16px 14px; border-top: 1px solid var(--glass-border); }
.form-panel.active { display: block; }
.form-panel-title {
    font-size: 14px; font-weight: 700; margin-bottom: 12px;
    color: var(--text-primary); display: flex; align-items: center; gap: 8px;
}

/* === Center Area === */
.center-panel {
    background: var(--bg-950);
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
    padding: 36px 24px 40px;
    min-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
}
body.light-mode .center-panel { background: var(--bg-900); }

/* QR Preview */
.qr-preview-wrap {
    display: flex; align-items: center; justify-content: center;
    position: relative;
}

.qr-preview-outer {
    background: white;
    border-radius: var(--radius-xl);
    padding: 18px;
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    transition: var(--tr-lg);
    position: relative; overflow: hidden;
    min-width: 280px; min-height: 280px;
    display: flex; align-items: center; justify-content: center;
}
.qr-preview-outer:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,.15), var(--shadow-lg);
    transform: translateY(-3px);
}

.qr-placeholder {
    width: 380px; height: 380px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    border: 2px dashed var(--glass-border-h);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    transition: var(--tr-md);
}

/* Frame overlay */
.qr-frame-text {
    display: none;
    position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
    font-size: 11px; font-weight: 800; letter-spacing: .2em;
    text-transform: uppercase; white-space: nowrap;
    padding: 3px 12px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--primary); color: white;
}
.qr-frame-text.visible { display: block; }

/* Action Buttons */
.action-row {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center; margin-top: 24px;
    max-width: 520px; width: 100%;
}

/* === Right Panel === */
.right-panel {
    border-left: 1px solid var(--glass-border);
    background: var(--glass-bg);
    overflow-y: auto;
    height: calc(100vh - var(--nav-h));
    position: sticky;
    top: var(--nav-h);
}

.panel-section { padding: 14px; border-bottom: 1px solid var(--glass-border); }
.panel-section:last-child { border-bottom: none; }

.panel-title {
    font-size: 10px; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase; color: var(--text-muted);
    margin-bottom: 11px;
    display: flex; align-items: center; gap: 6px;
}

/* === Form Controls === */
.form-group { margin-bottom: 11px; }
.form-label {
    display: block; font-size: 12px; font-weight: 500;
    color: var(--text-secondary); margin-bottom: 5px;
}

.form-control {
    width: 100%;
    background: rgba(15,23,42,.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 11px; font-size: 13px; font-family: inherit;
    transition: var(--tr); outline: none;
}
body.light-mode .form-control { background: rgba(255,255,255,.55); }
.form-control:focus { border-color: rgba(99,102,241,.5); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }
.form-control::placeholder { color: var(--text-muted); }

select.form-control {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
}

textarea.form-control { resize: vertical; min-height: 78px; }
.form-control.error { border-color: var(--danger); }

.char-counter { font-size: 10px; color: var(--text-muted); text-align: right; margin-top: 3px; }

/* Phone country prefix row */
.phone-row { display: flex; gap: 6px; }
.phone-row select { width: 96px; flex-shrink: 0; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: var(--radius);
    font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; border: none; transition: var(--tr);
    text-decoration: none; white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(99,102,241,.38);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(99,102,241,.55); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--text-secondary); backdrop-filter: blur(8px);
}
.btn-secondary:hover { border-color: var(--glass-border-h); color: var(--text-primary); background: rgba(99,102,241,.07); }

.btn-ghost {
    background: transparent; color: var(--text-muted);
    border: 1px solid transparent; padding: 8px 12px;
}
.btn-ghost:hover { color: var(--text-secondary); background: var(--glass-bg); border-color: var(--glass-border); }

.btn-danger { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2); color: #f87171; padding: 7px 12px; font-size: 12px; }
.btn-danger:hover { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.4); }

.btn-success { background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.25); color: #34d399; }
.btn-success:hover { background: rgba(16,185,129,.2); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 4px 9px; font-size: 11px; border-radius: 6px; }

.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* === Range & Color inputs === */
.range-row { display: flex; align-items: center; gap: 10px; }
.range-val { font-size: 12px; color: var(--primary-light); font-weight: 600; min-width: 40px; text-align: right; }

input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 4px; border-radius: 2px;
    background: var(--bg-700); outline: none; cursor: pointer; flex: 1;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--primary); cursor: pointer;
    box-shadow: 0 0 8px rgba(99,102,241,.5);
    transition: var(--tr);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); box-shadow: 0 0 14px rgba(99,102,241,.75); }

input[type="color"] {
    -webkit-appearance: none; appearance: none;
    width: 34px; height: 34px; border: 2px solid var(--glass-border);
    border-radius: 7px; cursor: pointer; background: transparent; padding: 2px;
    transition: var(--tr);
}
input[type="color"]:hover { border-color: var(--primary); }

.color-row { display: flex; align-items: center; gap: 8px; }
.color-row .form-control { flex: 1; font-family: monospace; font-size: 12px; }

/* === Segmented Control === */
.seg-ctrl {
    display: flex; background: rgba(15,23,42,.5); border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); padding: 3px; gap: 2px;
}
body.light-mode .seg-ctrl { background: rgba(255,255,255,.5); }

.seg-btn {
    flex: 1; padding: 6px 4px; border: none; background: transparent;
    color: var(--text-muted); font-size: 11px; font-weight: 600; font-family: inherit;
    cursor: pointer; border-radius: 6px; transition: var(--tr); text-align: center;
}
.seg-btn.active { background: var(--primary); color: white; box-shadow: 0 2px 8px rgba(99,102,241,.4); }

/* === Toggle Switch === */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; }
.toggle-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

.toggle { position: relative; width: 38px; height: 21px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-sl {
    position: absolute; inset: 0; background: var(--bg-700);
    border-radius: 11px; cursor: pointer; transition: var(--tr);
}
.toggle-sl::before {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 15px; height: 15px; background: white; border-radius: 50%;
    transition: var(--tr); box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.toggle input:checked + .toggle-sl { background: var(--primary); }
.toggle input:checked + .toggle-sl::before { transform: translateX(17px); }

/* === Shape Grid === */
.shape-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.shape-option {
    border: 2px solid var(--glass-border); border-radius: var(--radius-sm);
    padding: 7px 3px; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    transition: var(--tr); color: var(--text-muted); font-size: 9.5px; font-weight: 600;
}
.shape-option:hover { border-color: rgba(99,102,241,.4); background: rgba(99,102,241,.05); color: var(--text-secondary); }
.shape-option.selected { border-color: var(--primary); background: rgba(99,102,241,.1); color: var(--primary-light); }
.shape-option svg { width: 26px; height: 26px; }

/* === Preset Themes Grid === */
.themes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.theme-card {
    border: 2px solid var(--glass-border); border-radius: var(--radius-sm);
    padding: 7px; cursor: pointer; transition: var(--tr); overflow: hidden;
}
.theme-card:hover { border-color: rgba(99,102,241,.4); transform: translateY(-1px); }
.theme-card.selected { border-color: var(--primary); }
.theme-preview { width: 100%; height: 38px; border-radius: 6px; margin-bottom: 5px; }
.theme-name { font-size: 9.5px; font-weight: 700; color: var(--text-secondary); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* === Logo Upload Zone === */
.logo-zone {
    border: 2px dashed var(--glass-border); border-radius: var(--radius);
    padding: 20px; text-align: center; cursor: pointer;
    transition: var(--tr-md);
}
.logo-zone:hover, .logo-zone.over { border-color: rgba(99,102,241,.5); background: rgba(99,102,241,.05); }

.logo-preview-row {
    display: none; align-items: center; gap: 10px;
    background: rgba(15,23,42,.4); border-radius: var(--radius-sm);
    padding: 8px 11px; border: 1px solid var(--glass-border);
}
.logo-preview-row.has-logo { display: flex; }

.logo-preview-img {
    width: 38px; height: 38px; object-fit: contain;
    border-radius: 6px; background: white; padding: 2px; flex-shrink: 0;
}

/* === Download Dropdown === */
.dl-dropdown { position: relative; }
.dl-menu {
    position: absolute; bottom: calc(100% + 8px); left: 50%;
    transform: translateX(-50%);
    background: var(--bg-800); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 5px; min-width: 210px;
    display: none; z-index: 20; box-shadow: var(--shadow-lg);
}
.dl-menu.open { display: block; animation: slideUp .2s ease; }

.dl-item {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 8px 11px; border-radius: 7px; border: none; background: transparent;
    font-size: 13px; color: var(--text-secondary); cursor: pointer;
    transition: var(--tr); font-family: inherit; text-align: left;
}
.dl-item:hover { background: rgba(99,102,241,.1); color: var(--text-primary); }
.dl-sep { height: 1px; background: var(--glass-border); margin: 4px 0; }
.dl-badge {
    margin-left: auto; font-size: 10px; background: rgba(99,102,241,.15);
    color: var(--primary-light); padding: 2px 6px; border-radius: 4px; font-weight: 600;
}

/* === Modals === */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }

.modal {
    background: var(--bg-800); border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl); width: 100%; max-width: 660px;
    max-height: 92vh; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: scaleIn .28s cubic-bezier(.34,1.56,.64,1);
}

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--glass-border); flex-shrink: 0;
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--text-primary); }

.modal-close {
    width: 30px; height: 30px; border-radius: 8px; border: none; background: transparent;
    color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--tr);
}
.modal-close:hover { background: rgba(239,68,68,.1); color: #f87171; }

.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--glass-border); display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0; }

/* === QR Scanner === */
#scanner-video { width: 100%; border-radius: var(--radius); background: #000; border: 2px solid var(--glass-border); }
.scan-result-box {
    display: none; margin-top: 12px; padding: 12px 16px;
    background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3);
    border-radius: var(--radius-sm); word-break: break-all;
}
.scan-result-box.visible { display: block; animation: fadeIn .25s ease; }
.scan-result-text { font-size: 13px; color: #34d399; font-weight: 500; }

/* === History === */
.history-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px;
}
.history-card {
    background: var(--bg-900); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 9px; display: flex; flex-direction: column;
    align-items: center; gap: 7px; transition: var(--tr);
}
.history-card:hover { border-color: var(--glass-border-h); transform: translateY(-2px); }
.history-card img { border-radius: 6px; image-rendering: pixelated; }
.history-label { font-size: 10px; color: var(--text-muted); text-align: center; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-actions { display: flex; gap: 4px; width: 100%; }
.history-actions .btn { flex: 1; padding: 4px; font-size: 10px; justify-content: center; }

/* === Batch Generation === */
.batch-result-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px;
    max-height: 360px; overflow-y: auto; margin-top: 14px;
}
.batch-card {
    background: var(--bg-900); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 10px; text-align: center;
}
.batch-card img { width: 100%; border-radius: 7px; }
.batch-card-name { font-size: 10px; color: var(--text-muted); margin-top: 5px; word-break: break-all; }

/* === Toast === */
#toast-container { pointer-events: none; }
.toast {
    background: var(--bg-800); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 11px 14px;
    display: flex; align-items: center; gap: 10px;
    min-width: 240px; max-width: 360px;
    box-shadow: var(--shadow-lg); pointer-events: all;
    animation: toastIn .3s cubic-bezier(.34,1.56,.64,1);
    cursor: pointer;
}
.toast.out { animation: toastOut .28s ease forwards; }
.toast-msg { flex: 1; font-size: 13px; font-weight: 500; color: var(--text-primary); }
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 0 2px; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info    { border-left: 3px solid var(--primary); }

/* === Spinner === */
.spinner {
    width: 38px; height: 38px; border: 3px solid var(--glass-border);
    border-top-color: var(--primary); border-radius: 50%;
    animation: spin .75s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }

/* === Progress === */
.progress { height: 5px; background: var(--bg-700); border-radius: 3px; overflow: hidden; }
.progress-fill {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width .3s ease;
}

/* === File Upload Zone === */
.file-zone {
    border: 2px dashed var(--glass-border); border-radius: var(--radius);
    padding: 28px; text-align: center; cursor: pointer; transition: var(--tr-md);
}
.file-zone:hover, .file-zone.over { border-color: rgba(99,102,241,.5); background: rgba(99,102,241,.05); }

/* === Gradient text === */
.grad-text {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* === Status dots === */
.status-dot {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
    animation: pulse-dot 2s infinite;
}
.status-dot.green { background: var(--success); }
.status-dot.amber { background: var(--warning); }

/* === Keyframes === */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.95) translateY(16px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes toastIn  { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(110%); } }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* Shimmer skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--bg-800) 25%, var(--bg-700) 50%, var(--bg-800) 75%);
    background-size: 200% auto;
    animation: shimmer 1.5s linear infinite;
    border-radius: var(--radius-sm);
}

/* Float animation on QR placeholder icon */
.float-icon { animation: float 3.5s ease-in-out infinite; }

/* === Info Badge === */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600;
}
.badge-primary { background: rgba(47,96,236,.12); color: var(--primary-light); }
.badge-success { background: rgba(16,185,129,.15); color: #34d399; }
.badge-warning { background: rgba(245,158,11,.15); color: #fbbf24; }

/* === Info tip === */
.info-tip {
    font-size: 11px; color: var(--text-secondary);
    background: rgba(47,96,236,.04); border: 1px solid rgba(47,96,236,.1);
    border-radius: var(--radius-sm); padding: 7px 10px; line-height: 1.55;
}

/* === Responsive === */
@media (max-width: 1200px) {
    :root { --sidebar-w: 240px; --panel-w: 300px; }
}

@media (max-width: 1024px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar, .right-panel {
        position: static; height: auto;
        border: none; border-bottom: 1px solid var(--glass-border);
    }
    .center-panel { min-height: auto; padding: 32px 16px; }
    .sidebar-section-title { padding: 16px 14px 8px; }
    .content-types-grid { grid-template-columns: repeat(6, 1fr); }
    .sidebar-forms { display: block; border-top: none; }
    .form-panel { padding: 14px; border-top: 1px solid var(--glass-border); }
}

@media (max-width: 640px) {
    :root { --nav-h: 56px; }
    .qr-placeholder { width: 260px; height: 260px; }
    .modal { border-radius: var(--radius-lg); max-height: 95vh; }
    .action-row { gap: 6px; }
    .btn { padding: 8px 14px; font-size: 12px; }
    .content-types-grid { grid-template-columns: repeat(4, 1fr); }
    .themes-grid { grid-template-columns: repeat(3, 1fr); }
    .shape-grid { grid-template-columns: repeat(3, 1fr); }
}
