/* === DESIGN SYSTEM & CSS TOKENS === */
:root {
    --bg-primary: #090c14;
    --bg-secondary: #0f1523;
    --bg-card: rgba(20, 27, 44, 0.7);
    --bg-card-hover: rgba(28, 38, 62, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    
    --brand-crimson: #e60023;
    --brand-crimson-glow: rgba(230, 0, 35, 0.35);
    --brand-violet: #8b5cf6;
    --brand-gradient: linear-gradient(135deg, #e60023 0%, #ff3366 50%, #8b5cf6 100%);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --status-discovered: #38bdf8;
    --status-queued: #fbbf24;
    --status-published: #10b981;
    --status-error: #f43f5e;
    --status-skipped: #64748b;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 25px rgba(230, 0, 35, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === BASE RESETS === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(230, 0, 35, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(139, 92, 246, 0.07) 0%, transparent 45%);
    background-attachment: fixed;
}

/* === CONTAINER === */
.app-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 28px 60px;
}

/* === TOPBAR NAVIGATION === */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--brand-crimson-glow);
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-pro {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 7px;
    background: rgba(230, 0, 35, 0.2);
    color: #ff4766;
    border: 1px solid rgba(230, 0, 35, 0.35);
    border-radius: var(--radius-full);
}

.brand-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Stats Bar */
.stats-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.stat-pill:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.07);
}

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

.stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

.stat-pill.highlight-queued .stat-value {
    color: var(--status-queued);
}

.stat-pill.highlight-published .stat-value {
    color: var(--status-published);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
}

.account-badge.connected {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.account-badge.disconnected {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fb7185;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    display: inline-block;
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 0.4; transform: scale(0.9); }
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: var(--brand-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--brand-crimson-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(230, 0, 35, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    color: #ffffff;
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

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

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.btn-full {
    width: 100%;
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

/* === CONTROL CARD === */
.control-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
}

.control-row {
    display: grid;
    grid-template-columns: 2.2fr 1.2fr 1.4fr 1.4fr;
    gap: 18px;
    align-items: flex-end;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
}

.input-wrapper input {
    width: 100%;
    padding: 11px 16px 11px 32px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    transition: var(--transition);
}

.input-wrapper input:focus, .custom-select:focus, .form-input:focus {
    outline: none;
    border-color: #ff3366;
    box-shadow: 0 0 0 3px rgba(230, 0, 35, 0.2);
}

.custom-select {
    width: 100%;
    padding: 11px 14px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
}

.action-scan-box .btn {
    width: 100%;
    height: 45px;
}

/* Switch & Autopilot Box */
.auto-pilot-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}

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

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.autopilot-text {
    display: flex;
    flex-direction: column;
}

.autopilot-text span {
    font-size: 0.8rem;
    font-weight: 700;
}

.status-on { color: var(--status-published); }
.status-off { color: var(--text-muted); }

.autopilot-text small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Scan Progress Strip */
.scan-progress-strip {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.progress-status-text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-crimson);
    font-weight: 600;
}

.spinner-inline {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(230, 0, 35, 0.2);
    border-top-color: var(--brand-crimson);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--brand-gradient);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

/* === LIBRARY TOOLBAR === */
.library-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.tabs-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    padding: 5px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.tab-btn {
    padding: 7px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.tab-count {
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.search-box input {
    padding: 8px 14px 8px 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    width: 220px;
    transition: var(--transition);
}

.search-box input:focus {
    width: 260px;
    outline: none;
    border-color: #ff3366;
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === MULTI-SELECT FLOATING BAR === */
.bulk-floating-bar {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 24, 38, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-full);
    padding: 10px 22px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 99;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translate(-50%, 40px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.floating-info {
    font-size: 0.9rem;
    font-weight: 600;
}

#selected-count-badge {
    background: var(--brand-crimson);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.floating-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === PINS MASONRY GRID === */
.pins-masonry-grid {
    column-count: 5;
    column-gap: 20px;
}

@media (max-width: 1400px) { .pins-masonry-grid { column-count: 4; } }
@media (max-width: 1100px) { .pins-masonry-grid { column-count: 3; } }
@media (max-width: 768px) { .pins-masonry-grid { column-count: 2; } }
@media (max-width: 480px) { .pins-masonry-grid { column-count: 1; } }

/* === PIN CARD === */
.pin-card {
    break-inside: avoid;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.pin-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.pin-card.selected {
    border-color: var(--brand-crimson);
    box-shadow: 0 0 0 2px var(--brand-crimson);
}

/* Image Container & Overlay */
.pin-img-wrapper {
    position: relative;
    width: 100%;
    background: #0e1320;
    overflow: hidden;
    cursor: pointer;
}

.pin-img {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pin-card:hover .pin-img {
    transform: scale(1.03);
}

.pin-4k-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.pin-select-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--brand-crimson);
    z-index: 5;
}

/* Hover Action Bar */
.pin-overlay-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px;
    background: linear-gradient(to top, rgba(9, 12, 20, 0.95) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pin-card:hover .pin-overlay-actions {
    opacity: 1;
}

.overlay-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Card Body */
.pin-card-body {
    padding: 12px 14px;
}

.pin-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 0.75rem;
}

.pin-source {
    color: var(--text-muted);
    font-weight: 600;
}

.status-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.status-badge.DISCOVERED {
    background: rgba(56, 189, 248, 0.12);
    color: var(--status-discovered);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-badge.QUEUED {
    background: rgba(251, 191, 36, 0.12);
    color: var(--status-queued);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-badge.PUBLISHED {
    background: rgba(16, 185, 129, 0.12);
    color: var(--status-published);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.ERROR {
    background: rgba(244, 63, 94, 0.12);
    color: var(--status-error);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.status-badge.SKIPPED {
    background: rgba(100, 116, 139, 0.12);
    color: var(--status-skipped);
}

.pin-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pin-tags {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-icon-box {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

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

.empty-state p {
    font-size: 0.9rem;
    max-width: 480px;
    margin: 0 auto;
}

/* === LOGS DRAWER === */
.logs-drawer {
    position: fixed;
    bottom: 0;
    right: 28px;
    width: 520px;
    height: 380px;
    background: rgba(13, 17, 28, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-hover);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.drawer-title {
    font-size: 0.88rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.drawer-controls {
    display: flex;
    gap: 6px;
}

.logs-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    line-height: 1.6;
}

.log-row {
    margin-bottom: 6px;
    display: flex;
    gap: 10px;
    word-break: break-word;
}

.log-time {
    color: var(--text-muted);
    flex-shrink: 0;
}

.log-level {
    font-weight: 700;
    flex-shrink: 0;
}

.log-level.INFO { color: #38bdf8; }
.log-level.SUCCESS { color: #34d399; }
.log-level.WARNING { color: #fbbf24; }
.log-level.ERROR { color: #f43f5e; }

.log-msg {
    color: #e2e8f0;
}

/* === MODALS === */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 820px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.settings-card {
    max-width: 620px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 22px;
}

.modal-body {
    display: flex;
    gap: 24px;
}

.settings-card .modal-body {
    display: block;
}

.modal-preview-col {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-img-container {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border-color);
}

.preview-img-container img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    display: block;
}

.preview-badge-4k {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--brand-crimson);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
}

.modal-form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    transition: var(--transition);
}

textarea.form-input {
    resize: vertical;
}

.field-hint {
    font-size: 0.74rem;
    color: var(--text-muted);
}

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

.settings-grid .full-width {
    grid-column: span 2;
}

.modal-actions-row {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

/* === TOAST NOTIFICATIONS === */
.toast-container {
    position: fixed;
    top: 24px;
    right: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.toast {
    background: rgba(18, 24, 38, 0.95);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { border-left: 4px solid var(--status-published); }
.toast.error { border-left: 4px solid var(--status-error); }
.toast.info { border-left: 4px solid var(--status-discovered); }

/* Utility */
.hidden { display: none !important; }

/* === INLINE SEARCH BUTTON IN INPUT === */
.input-with-button {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-button input {
    padding-right: 155px !important;
}

.btn-search-inline {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 7px 14px;
    font-size: 0.82rem;
    background: linear-gradient(135deg, rgba(230, 0, 35, 0.85) 0%, rgba(139, 92, 246, 0.85) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 10px rgba(230, 0, 35, 0.3);
    transition: var(--transition);
}

.btn-search-inline:hover {
    background: var(--brand-gradient);
    transform: translateY(-50%) scale(1.02);
    box-shadow: 0 4px 14px rgba(230, 0, 35, 0.45);
}

/* === LIVE EXPLORER SECTION === */
.explorer-section {
    margin-bottom: 28px;
    animation: fadeInDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.explorer-card {
    background: rgba(18, 24, 40, 0.88);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.12);
}

.explorer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.explorer-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.explorer-avatar-wrap {
    position: relative;
    width: 54px;
    height: 54px;
    flex-shrink: 0;
}

.explorer-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff3366;
    box-shadow: 0 0 15px rgba(230, 0, 35, 0.3);
}

.live-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 8px #10b981;
}

.explorer-user-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.explorer-user-meta h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.explorer-username {
    font-size: 0.88rem;
    color: #ff3366;
    font-weight: 600;
}

.explorer-link {
    color: var(--text-muted);
    transition: var(--transition);
}

.explorer-link:hover {
    color: #fff;
    transform: translateY(-1px);
}

.explorer-pin-summary {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

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

.explorer-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.explorer-search-box i {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.explorer-search-box input {
    padding: 8px 14px 8px 36px;
    background: rgba(10, 14, 26, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.86rem;
    width: 220px;
    transition: var(--transition);
}

.explorer-search-box input:focus {
    width: 280px;
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Boards Strip */
.explorer-boards-container {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
}

.boards-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.explorer-boards-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.board-pill {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.board-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--border-hover);
}

.board-pill.active {
    background: var(--brand-gradient);
    color: #fff;
    font-weight: 600;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(230, 0, 35, 0.35);
}

/* Action Bar */
.explorer-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
}

.explorer-selection-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-subtle {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Status Filter Buttons (All / Not Imported / Imported) */
.explorer-status-filters {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
}

.explorer-status-filter-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.explorer-status-filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.explorer-status-filter-btn.active {
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(224, 37, 72, 0.35);
}

.filter-count-badge {
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.72rem;
    font-weight: 700;
}

.explorer-status-filter-btn.active .filter-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.explorer-bulk-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Loading & Empty States */
.explorer-loading {
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.spinner-large {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff3366;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.explorer-loading h4 {
    font-size: 1.1rem;
    color: #fff;
}

.explorer-loading p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.explorer-empty {
    padding: 50px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

/* Pins Grid */
.explorer-pins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
    margin-top: 10px;
    max-height: 700px;
    overflow-y: auto;
    padding-right: 6px;
}

.explorer-pin-card {
    position: relative;
    background: rgba(12, 16, 28, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.explorer-pin-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.explorer-pin-card.selected {
    border-color: #ff3366;
    box-shadow: 0 0 0 2px rgba(255, 51, 102, 0.5), 0 8px 24px rgba(230, 0, 35, 0.25);
}

.explorer-card-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #090c14;
    overflow: hidden;
}

.explorer-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.explorer-pin-card:hover .explorer-card-thumb {
    transform: scale(1.05);
}

.explorer-card-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.explorer-pin-card.selected .explorer-card-checkbox {
    background: #e60023;
    border-color: #e60023;
}

.explorer-card-checkbox svg {
    width: 14px;
    height: 14px;
    color: #fff;
    opacity: 0;
    transition: var(--transition);
}

.explorer-pin-card.selected .explorer-card-checkbox svg {
    opacity: 1;
}

/* ═══ IMPORTED / NEW STATUS BADGE ON EXPLORER CARDS ═══ */
.explorer-import-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    letter-spacing: 0.2px;
}

.explorer-import-badge i {
    width: 12px;
    height: 12px;
}

/* Çekilmedi (Henüz Yeni) */
.explorer-import-badge.is-new {
    background: rgba(15, 23, 42, 0.85);
    color: #94a3b8;
    border: 1px dashed rgba(255, 255, 255, 0.25);
}

/* Çekildi (Kütüphanede Var) */
.explorer-import-badge.is-imported {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.6);
}

/* Kuyrukta Bekliyor */
.explorer-import-badge.is-queued {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.6);
}

/* Hesabınızda Paylaşıldı */
.explorer-import-badge.is-published {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.6);
}

.explorer-card-hover-actions {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 3;
}

.explorer-pin-card:hover .explorer-card-hover-actions {
    opacity: 1;
    transform: translateY(0);
}

.explorer-action-btn {
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.explorer-action-btn:hover {
    background: var(--brand-gradient);
    border-color: transparent;
    transform: scale(1.05);
}

.explorer-card-meta {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.explorer-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explorer-card-sub {
    font-size: 0.74rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ═══ LOGIN MODAL & TABS ═══ */
.login-modal-card {
    max-width: 520px;
}

.login-modal-card .modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.modal-tabs {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 6px;
}

.modal-tab-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.modal-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.modal-tab-btn.active {
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 4px 12px rgba(224, 37, 72, 0.35);
}

.login-info-box {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #93c5fd;
}

.login-info-box p {
    margin: 0;
}

.login-info-box code {
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: #fb7185;
    font-size: 0.85em;
}

.login-helper-steps {
    margin: 8px 0 0 0;
    padding-left: 18px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.6;
}

.login-helper-steps li {
    margin-bottom: 4px;
}

.tab-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: fadeIn 0.15s ease;
}

.tab-panel.hidden {
    display: none !important;
}

.pin-desc-preview {
    font-size: 0.74rem;
    color: var(--text-secondary);
    line-height: 1.35;
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explorer-card-desc {
    font-size: 0.73rem;
    color: var(--text-secondary);
    line-height: 1.35;
    margin: 3px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

