/* ========================================
   QR Code Dynamique V2 - Styles
   Dark mode premium avec accents violet/cyan
   ======================================== */

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

:root {
    --bg-primary: #0a0a14;
    --bg-secondary: #12121f;
    --bg-card: #1a1a2e;
    --bg-card-hover: #1e1e35;
    --bg-input: #16162a;
    --border: #2a2a45;
    --border-focus: #7c3aed;
    --text-primary: #f0f0f5;
    --text-secondary: #8888a0;
    --text-muted: #55556a;
    --accent-purple: #7c3aed;
    --accent-purple-soft: rgba(124, 58, 237, 0.15);
    --accent-cyan: #06b6d4;
    --accent-cyan-soft: rgba(6, 182, 212, 0.15);
    --accent-green: #10b981;
    --accent-green-soft: rgba(16, 185, 129, 0.15);
    --accent-red: #ef4444;
    --accent-red-soft: rgba(239, 68, 68, 0.15);
    --accent-yellow: #f59e0b;
    --accent-yellow-soft: rgba(245, 158, 11, 0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --transition: 0.2s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* === LOGIN PAGE === */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
}

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

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.6s ease;
}

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

.login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--accent-purple-soft);
    border-radius: 20px;
    color: var(--accent-purple);
    margin-bottom: 20px;
    animation: pulse 3s ease-in-out infinite;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-bg-decoration {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-qr {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(124, 58, 237, 0.08);
    border-radius: 20px;
    animation: float 20s ease-in-out infinite;
}

.floating-qr::before {
    content: '';
    position: absolute;
    inset: 15px;
    border: 2px solid rgba(124, 58, 237, 0.05);
    border-radius: 10px;
}

.qr-1 {
    top: 10%;
    left: 5%;
}

.qr-2 {
    top: 60%;
    right: 8%;
    animation-delay: -7s;
    width: 80px;
    height: 80px;
}

.qr-3 {
    bottom: 10%;
    left: 15%;
    animation-delay: -13s;
    width: 100px;
    height: 100px;
}

.error-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--accent-red-soft);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-red);
    font-size: 0.85rem;
    text-align: center;
}

/* === FORMS === */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--accent-purple-soft);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.color-input-wrapper input[type="color"] {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input-wrapper input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--border);
    border-radius: 6px;
}

.color-value {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-purple);
    color: white;
}

.btn-primary:hover {
    background: #6d28d9;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
    padding: 14px;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-icon.btn-icon-danger:hover {
    background: var(--accent-red-soft);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.spinner {
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
}

.spinner-large {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

/* === HEADER === */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-purple-soft);
    border-radius: 10px;
    color: var(--accent-purple);
}

.header-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* === MAIN === */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--accent-purple);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-icon-purple {
    background: var(--accent-purple-soft);
    color: var(--accent-purple);
}

.stat-icon-cyan {
    background: var(--accent-cyan-soft);
    color: var(--accent-cyan);
}

.stat-icon-green {
    background: var(--accent-green-soft);
    color: var(--accent-green);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === FILTER BAR === */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition);
}

.search-input:focus {
    border-color: var(--accent-purple);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    appearance: auto;
}

/* === ACTIONS BAR === */
.actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
}

/* === QR LIST === */
.qr-list {
    display: grid;
    gap: 16px;
}

.qr-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    transition: all var(--transition);
    animation: fadeIn 0.3s ease;
}

.qr-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: var(--shadow);
}

.qr-card.inactive {
    opacity: 0.5;
}

.qr-card.inactive:hover {
    opacity: 0.7;
}

.qr-card-preview {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.qr-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-card-preview canvas,
.qr-card-preview svg {
    width: 100% !important;
    height: 100% !important;
}

.qr-preview-container canvas,
.qr-preview-container svg {
    max-width: 200px;
}

.qr-card-info {
    min-width: 0;
}

.qr-card-label {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qr-card-url {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    max-width: 400px;
}

.qr-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.qr-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qr-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-category {
    color: white;
}

.badge-type {
    background: var(--accent-cyan-soft);
    color: var(--accent-cyan);
}

.badge-inactive {
    background: var(--accent-red-soft);
    color: var(--accent-red);
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 20px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--accent-green);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(16px);
}

/* === TYPE SELECTOR === */
.type-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition);
}

.type-btn:hover {
    border-color: rgba(124, 58, 237, 0.3);
    color: var(--text-primary);
}

.type-btn.active {
    border-color: var(--accent-purple);
    background: var(--accent-purple-soft);
    color: var(--accent-purple);
}

/* === COLOR TEMPLATES === */
.color-templates {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-tpl {
    display: flex;
    gap: 2px;
    padding: 4px;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    transition: all var(--transition);
}

.color-tpl span {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.color-tpl:hover {
    border-color: rgba(124, 58, 237, 0.3);
}

.color-tpl.active {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 2px var(--accent-purple-soft);
}

/* === SHAPE SELECTOR === */
.shape-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.shape-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all var(--transition);
}

.shape-btn:hover {
    border-color: rgba(124, 58, 237, 0.3);
    color: var(--text-primary);
}

.shape-btn.active {
    border-color: var(--accent-purple);
    background: var(--accent-purple-soft);
    color: var(--accent-purple);
}

/* === LOGO UPLOAD === */
.logo-upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.logo-upload-zone:hover,
.logo-upload-zone.dragover {
    border-color: var(--accent-purple);
    background: var(--accent-purple-soft);
}

.logo-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-preview img {
    max-width: 80px;
    max-height: 80px;
    border-radius: 8px;
}

.logo-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-red);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Conditional info */
.conditional-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--accent-cyan-soft);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* === EMPTY & LOADING === */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-state p {
    margin-top: 16px;
}

/* === MODALS === */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    padding: 28px;
}

.modal-large {
    max-width: 650px;
}

.modal-xlarge {
    max-width: 800px;
}

.modal-small {
    max-width: 420px;
}

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

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal-body {
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* QR Preview */
.qr-preview-container {
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.qr-preview-container img {
    max-width: 200px;
    image-rendering: pixelated;
}

/* Delete warning */
.delete-warning {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    color: var(--text-secondary);
    padding: 16px 0;
}

.delete-warning svg {
    color: var(--accent-red);
}

.delete-warning small {
    color: var(--text-muted);
}

/* === STATS MODAL === */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-mini {
    text-align: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.stat-mini-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-purple);
    margin-bottom: 4px;
}

.stat-mini-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-container {
    margin-bottom: 28px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.chart-wrapper {
    position: relative;
    height: 200px;
}

.chart-wrapper-small {
    height: 150px;
}

.stats-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.stats-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stats-list {
    font-size: 0.85rem;
}

.stats-list-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.stats-list-item:last-child {
    border-bottom: none;
}

.stats-list-item .count {
    font-weight: 600;
    color: var(--accent-purple);
}

/* Scans table */
.scans-table-wrapper {
    max-height: 250px;
    overflow-y: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.scans-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.scans-table th {
    background: var(--bg-card);
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    position: sticky;
    top: 0;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.scans-table td {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.scans-table tr:hover td {
    background: var(--bg-card);
}

/* === CATEGORIES === */
.category-add-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.category-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    font-size: 0.9rem;
}

.category-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.category-delete {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}

.category-delete:hover {
    color: var(--accent-red);
}

/* === TOAST === */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
}

.toast-success {
    background: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

.toast-error {
    background: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fecaca;
}

.toast-info {
    background: #1e3a5f;
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #a5f3fc;
}

.toast-exit {
    animation: slideOutRight 0.3s ease forwards;
}

/* === ANIMATIONS === */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(60px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, -30px) rotate(5deg);
    }

    50% {
        transform: translate(-10px, -60px) rotate(-3deg);
    }

    75% {
        transform: translate(30px, -30px) rotate(3deg);
    }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }

    .header-right {
        width: 100%;
        justify-content: center;
    }

    .main {
        padding: 20px 16px;
    }

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

    .filter-bar {
        flex-direction: column;
    }

    .actions-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .qr-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 12px;
    }

    .qr-card-preview {
        margin: 0 auto;
    }

    .qr-card-meta {
        justify-content: center;
    }

    .qr-card-actions {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 20px;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }

    .stats-details-grid {
        grid-template-columns: 1fr;
    }

    .type-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .shape-selector {
        grid-template-columns: repeat(3, 1fr);
    }
}