/* Lukian Chat - Clean CSS */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');

/* ─── Social Panel Design Tokens ─── */
:root {
    --sp-gold: #d4af37;
    --sp-gold-hover: #b8860b;
    --sp-gold-light: #fef9e7;
    --sp-gold-lighter: #fef3c7;
    --sp-navy: #1A365D;
    --sp-navy-light: #2D4A7A;

    --sp-gray-50: #f9fafb;
    --sp-gray-100: #f3f4f6;
    --sp-gray-200: #e5e7eb;
    --sp-gray-300: #d1d5db;
    --sp-gray-400: #7c8490;
    --sp-gray-500: #515869;
    --sp-gray-600: #4b5563;
    --sp-gray-700: #374151;
    --sp-gray-800: #1f2937;
    --sp-gray-900: #111827;

    --sp-blue: #3b82f6;
    --sp-green: #10b981;
    --sp-red: #ef4444;
    --sp-amber: #f59e0b;
    --sp-purple: #8b5cf6;

    --sp-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --sp-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --sp-shadow-lg: 0 10px 24px rgba(0,0,0,0.12);
    --sp-shadow-xl: 0 20px 60px rgba(0,0,0,0.2);

    --sp-radius-sm: 6px;
    --sp-radius-md: 8px;
    --sp-radius-lg: 12px;
    --sp-radius-xl: 16px;

    --sp-transition: 0.2s ease;
    --sp-transition-fast: 0.15s ease;

    --sp-space-1: 4px;
    --sp-space-2: 8px;
    --sp-space-3: 12px;
    --sp-space-4: 16px;
    --sp-space-5: 20px;
    --sp-space-6: 24px;
    --sp-space-8: 32px;
}

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

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fdfcf9;
    color: #1a365d;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #fdfcf9 0%, #f9f6f0 100%);
    border-right: 1px solid #e8e4dc;
    display: flex;
    flex-direction: column;
    transition: width 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.sidebar.closed {
    width: 56px;
}

.sidebar-header {
    padding: 16px 12px;
    border-bottom: 1px solid #e8e4dc;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-logo span {
    font-size: 16px;
    font-weight: 600;
    color: #1a365d;
}

.sidebar.closed .sidebar-logo span { display: none; }

/* === PROGRESS INDICATOR - MINIMAL === */
.processing-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: 13px;
    color: #5a6a8a;
}

.progress-circle {
    position: relative;
    width: 28px;
    height: 28px;
}

.progress-circle svg {
    transform: rotate(-90deg);
    width: 28px;
    height: 28px;
}

.progress-circle .bg {
    fill: none;
    stroke: #e0e4eb;
    stroke-width: 3;
}

.progress-circle .progress {
    fill: none;
    stroke: #c9a227;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.progress-circle .percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8px;
    font-weight: 600;
    color: #1a234b;
}

.processing-message {
    color: #5a6a8a;
    font-size: 13px;
}

/* === ACTION SUMMARY IN MESSAGES === */
.action-summary {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(201, 162, 39, 0.08);
    border-radius: 8px;
    border-left: 3px solid #c9a227;
    font-size: 12px;
}

.action-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #1a234b;
}

.action-summary-title {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-summary-title svg {
    width: 14px;
    height: 14px;
    stroke: #c9a227;
}

.action-summary-toggle {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #5a6a8a;
    transition: transform 0.2s;
}

.action-summary-toggle svg {
    width: 16px;
    height: 16px;
}

.action-summary-toggle.expanded {
    transform: rotate(180deg);
}

.action-summary-brief {
    color: #5a6a8a;
    margin-top: 4px;
}

.action-summary-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(201, 162, 39, 0.2);
    display: none;
}

.action-summary-details.show {
    display: block;
}

.action-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 11px;
    color: #5a6a8a;
}

.action-step-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #c9a227;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-step-icon svg {
    width: 10px;
    height: 10px;
    stroke: white;
    stroke-width: 3;
}

.action-step-time {
    margin-left: auto;
    color: #9aa3b8;
    font-size: 10px;
}

/* Processing indicator position - inside input area */
.chat-input-wrapper .processing-indicator {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 6px 14px;
}

/* New Chat Button */
.new-chat-btn {
    width: 100%;
    padding: 10px 14px;
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
}

.new-chat-btn:hover {
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
}

.new-chat-btn svg {
    width: 16px;
    height: 16px;
}

.sidebar.closed .new-chat-btn { padding: 10px; }
.sidebar.closed .new-chat-btn span { display: none; }

/* Navigation */
.sidebar-nav {
    padding: 4px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 6px;
    color: #64748b;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 0;
}

.nav-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #1a365d;
}

.nav-item.active {
    background: rgba(212, 175, 55, 0.15);
    color: #b8960c;
}

.nav-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.sidebar.closed .nav-item {
    justify-content: center;
    padding: 10px;
}
.sidebar.closed .nav-item span { display: none; }

/* Conversations */
.sidebar-conversations {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    border-top: 1px solid #e8e4dc;
}

.conversations-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #b8960c;
    padding: 6px 8px 4px;
}

.sidebar.closed .conversations-label { display: none; }

.conversation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 1px;
}

.conversation-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.conversation-item.active {
    background: rgba(212, 175, 55, 0.15);
}

.conversation-item > svg {
    display: none;
}

.conversation-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.conversation-title {
    font-size: 12px;
    font-weight: 500;
    color: #1a365d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.conversation-date {
    font-size: 10px;
    color: #94a3b8;
    flex-shrink: 0;
}

.conv-delete-btn {
    opacity: 0;
    padding: 4px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #94a3b8;
    cursor: pointer;
}

.conv-delete-btn svg {
    width: 12px;
    height: 12px;
}

.conversation-item:hover .conv-delete-btn { opacity: 1; }

.conv-delete-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.sidebar.closed .conversation-info,
.sidebar.closed .conv-delete-btn { display: none; }

/* Sidebar Footer */
.sidebar-footer {
    padding: 10px;
    border-top: 1px solid #e8e4dc;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #1a365d 0%, #0f2744 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #d4af37;
    font-size: 13px;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a365d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn svg {
    width: 16px;
    height: 16px;
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.sidebar.closed .user-details,
.sidebar.closed .logout-btn { display: none; }

.credits-display {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    margin-bottom: 6px;
}

.credits-display svg {
    width: 16px;
    height: 16px;
    color: #b8960c;
    flex-shrink: 0;
}

.credits-display span {
    font-size: 12px;
    font-weight: 600;
    color: #b8960c;
}

.sidebar.closed .credits-display span { display: none; }

.buy-credits-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: #b8960c;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.15s;
}

.buy-credits-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
}

.sidebar.closed .buy-credits-btn { display: none; }

.lang-selector {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.lang-btn {
    flex: 1;
    padding: 5px;
    background: transparent;
    border: 1px solid #e8e4dc;
    border-radius: 4px;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.lang-btn:hover {
    border-color: #d4af37;
    color: #b8960c;
}

.lang-btn.active {
    background: #d4af37;
    border-color: #d4af37;
    color: #fff;
}

.sidebar.closed .lang-selector { flex-direction: column; }

/* Sidebar Toggle */
.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.sidebar-toggle svg {
    width: 12px;
    height: 12px;
}

.sidebar-toggle:hover {
    background: #f9f6f0;
    color: #b8960c;
    border-color: #d4af37;
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}
.sidebar-overlay.visible { display: block; }

/* ==================== CHAT CONTAINER ==================== */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #fdfcf9 0%, #f9f6f0 100%);
    min-width: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* Welcome */
.welcome-section {
    max-width: 600px;
    margin: auto;
    text-align: center;
    padding: 40px 20px;
}

.welcome-section h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 10px;
}

.welcome-section p {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 28px;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.suggestions button {
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 20px;
    color: #1a365d;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.suggestions button:hover {
    border-color: #d4af37;
    background: #fffef8;
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.15);
}

/* Messages */
.message {
    display: flex;
    flex-direction: column;
    max-width: 700px;
    width: 100%;
    margin: 0 auto 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.user {
    align-items: flex-end;
}

.message.user .message-content {
    background: linear-gradient(135deg, #1a365d 0%, #0f2744 100%);
    color: #fff;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    max-width: 75%;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.15);
}

.message.user.has-images .message-content {
    background: transparent;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.message.user .message-images {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    background: linear-gradient(135deg, #1a365d 0%, #0f2744 100%);
    padding: 10px;
    border-radius: 14px;
}

.message.user .message-images img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid rgba(255,255,255,0.15);
}

.message.user .message-images img:hover {
    transform: scale(1.05);
}

.message.user.has-images .message-content > span {
    background: linear-gradient(135deg, #1a365d 0%, #0f2744 100%);
    color: #fff;
    padding: 10px 16px;
    border-radius: 14px;
}

.message.assistant {
    align-items: flex-start;
}

.message.assistant .message-content {
    color: #1a365d;
    padding: 8px 0;
    max-width: 75%;
}

/* Result Images */
.result-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: #faf8f4;
    border-radius: 10px;
    border: 1px solid #e8e4dc;
}

.result-image-container img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.result-image-container img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Error & Loading */
.message.error .message-content {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 18px;
    border-radius: 18px;
}

.message.loading .message-content {
    background: #fff;
    border: 1px solid #e8e4dc;
    padding: 12px 18px;
    border-radius: 18px;
}

.processing-status {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    background: #d4af37;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.status-text {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}

/* ==================== INPUT AREA ==================== */
.chat-input-wrapper {
    position: relative;
    padding: 16px 24px 24px;
    background: transparent;
}

.chat-input-wrapper > * {
    max-width: 700px;
    margin: 0 auto;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.upload-preview-item {
    position: relative;
    width: 56px;
    height: 56px;
}

.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.upload-preview-item .remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: #dc2626;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 6px 10px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.chat-input-container:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.upload-preview + .chat-input-container {
    border-radius: 0 0 12px 12px;
    border-top: none;
}

.upload-btn {
    width: 40px;
    height: 40px;
    background: #f5f3ee;
    border: none;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-btn:hover {
    background: #fffef8;
    color: #b8960c;
}

.upload-btn svg {
    width: 20px;
    height: 20px;
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    color: #1a365d;
    outline: none;
    padding: 8px 0;
}

.chat-input::placeholder {
    color: #94a3b8;
}

.send-btn {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-btn svg {
    width: 20px;
    height: 20px;
}

/* Limit Warning */

.limit-warning-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 16px;
    font-size: 13px;
    color: #8B7A2B;
    background: #FFF8E1;
    border-top: 1px solid #F0E6B8;
}

.limit-warning-inline span {
    white-space: nowrap;
}

.limit-warning-inline button {
    background: #1B2B4D;
    color: #D4A843;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.limit-warning-inline button:hover {
    background: #2a3f6e;
}

/* ==================== GALLERY MODAL ==================== */
.gallery-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.gallery-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e8e4dc;
    background: #fdfcf9;
}

.gallery-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a365d;
    margin: 0;
}

.gallery-close {
    width: 36px;
    height: 36px;
    background: #f0ece2;
    border: none;
    border-radius: 8px;
    color: #64748b;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.gallery-close:hover {
    background: #e8e4dc;
    color: #1a365d;
}

.gallery-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #faf8f4;
}

.gallery-loading,
.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 15px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #e8e4dc;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.8));
}

.gallery-item-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
}

/* ==================== LIGHTBOX ==================== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.80);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.lightbox-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-btn.delete:hover {
    background: rgba(220, 38, 38, 0.5);
    border-color: #dc2626;
}

.lightbox-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================== CONVERSATIONS MODAL ==================== */
.conversations-modal {
    max-width: 600px;
}

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

.conversations-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.conversations-list-item:hover {
    background: #faf8f4;
    border-color: #d4af37;
}

.conversations-list-item.active {
    background: #fffef8;
    border-color: #d4af37;
}

.conv-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a365d 0%, #0f2744 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.conv-icon svg {
    width: 20px;
    height: 20px;
    color: #d4af37;
}

.conv-details {
    flex: 1;
    min-width: 0;
}

.conv-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a365d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.conv-date {
    font-size: 11px;
    color: #64748b;
}

.conv-delete {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s;
}

.conv-delete svg {
    width: 16px;
    height: 16px;
}

.conversations-list-item:hover .conv-delete {
    opacity: 1;
}

.conv-delete:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 260px;
        z-index: 1000;
        transition: width 0.3s ease;
    }

    .sidebar.open {
        width: 260px;
    }

    .sidebar.closed {
        width: 60px;
    }

    .sidebar-toggle {
        display: flex;
        position: absolute;
        right: 8px;
        top: 12px;
    }

    .chat-container { 
        width: calc(100% - 60px);
        margin-left: 60px;
        transition: width 0.3s ease, margin-left 0.3s ease;
    }

    .sidebar.open ~ .chat-container {
        width: calc(100% - 260px);
        margin-left: 260px;
    }

    .welcome-section { padding: 16px; }
    .chat-messages { padding: 16px; }
    .chat-input-wrapper { padding: 12px 16px 16px; }    
    .chat-container { width: 100%; }
    
    .sidebar-toggle {
        position: fixed;
        left: 12px;
        top: 12px;
        right: auto;
        transform: none;
        z-index: 998;
    }
    
    .sidebar.open ~ .sidebar-toggle {
        opacity: 0;
        pointer-events: none;
    }
    
    .welcome-section { padding: 70px 16px 30px; }
    .chat-messages { padding: 70px 16px 16px; }
    .chat-input-wrapper { padding: 12px 16px 16px; }
   
     .sidebar-nav {
        padding: 4px 6px;
        gap: 0;
    }
    
    .nav-item {
        padding: 4px 6px;
        font-size: 10px;
        min-height: auto;
        gap: 4px;
    }
    
    .nav-item svg {
        width: 12px;
        height: 12px;
    }
    
    .nav-item span {
        font-size: 10px;
    }
    
    .sidebar-conversations {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    } 
    
    .message { max-width: 100%; }
    .message .message-content { max-width: 85% !important; }
    
    .suggestions { flex-direction: column; }
    .suggestions button { width: 100%; }
    
    .gallery-overlay { padding: 12px; }
    .gallery-modal { max-height: 90vh; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* Mobile lightbox navigation - centered */
@media (max-width: 768px) {
    .lightbox-nav {
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .lightbox-nav-prev {
        left: 10px;
    }
    
    .lightbox-nav-next {
        right: 10px;
    }
}
    

/* ===== PATCH: Lightbox file info positioning ===== */
.lightbox-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d4af37;
    font-size: 13px;
    font-weight: 500;
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== PATCH: Delete button on gallery items ===== */
.gallery-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.gallery-item:hover .gallery-item-actions {
    opacity: 1;
}

.gallery-item-delete {
    width: 28px;
    height: 28px;
    background: rgba(220, 38, 38, 0.9);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.gallery-item-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.gallery-item-delete svg {
    width: 14px;
    height: 14px;
}

.gallery-item-social {
    width: 28px;
    height: 28px;
    background: rgba(212, 175, 55, 0.9);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.gallery-item-social:hover {
    background: #d4af37;
    transform: scale(1.1);
}

.gallery-item-social svg {
    width: 14px;
    height: 14px;
}

/* ===== PATCH: Sidebar toggle button ===== */
.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.15s;
}

.sidebar-toggle svg {
    width: 14px;
    height: 14px;
}

.sidebar-toggle:hover {
    background: #d4af37;
    border-color: #d4af37;
    color: #fff;
}

/* ===== PATCH: Input area redesign ===== */
.chat-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid #e8e4dc;
    border-radius: 24px;
    padding: 8px 8px 8px 16px;
    transition: all 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.chat-input-container:focus-within {
    border-color: #d4af37;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.15);
}

.upload-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.upload-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
}

.upload-btn svg {
    width: 20px;
    height: 20px;
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: #1a365d;
    outline: none;
    padding: 8px 0;
    min-height: 24px;
}

.chat-input::placeholder {
    color: #94a3b8;
}

.send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-btn svg {
    width: 18px;
    height: 18px;
    margin-left: 2px;
}

/* Upload preview above input */
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #e8e4dc;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    margin-bottom: -2px;
}

.upload-preview + .chat-input-container {
    border-radius: 0 0 24px 24px;
}

.upload-preview-item {
    position: relative;
    width: 52px;
    height: 52px;
}

.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e8e4dc;
}

.upload-preview-item .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #dc2626;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.upload-preview-item .remove-btn:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

/* ===== PATCH: Upload preview cu clasele corecte din React ===== */
.preview-item {
    position: relative;
    width: 52px;
    height: 52px;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e8e4dc;
}

.remove-upload {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #dc2626;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    padding: 0;
}

.remove-upload:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

.upload-count {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    padding-left: 8px;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #e8e4dc;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
}

.upload-preview + .chat-input-wrapper .chat-input-container {
    border-radius: 0 0 24px 24px;
    border-top: none;
}

/* Upload spinner */
.upload-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #e8e4dc;
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== PATCH: Upload preview în stil Claude ===== */
.upload-preview {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin: 0 auto 12px;
    max-width: 700px;
    position: relative;
}

.preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-upload {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.preview-item:hover .remove-upload {
    opacity: 1;
}

.remove-upload:hover {
    background: rgba(220, 38, 38, 0.9);
}

.upload-count {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    padding: 0 4px;
    align-self: center;
}

/* ===== PATCH: Input container - stil mai curat ===== */
.chat-input-wrapper {
    padding: 12px 24px 24px;
    background: transparent;
}

.chat-input-wrapper > .chat-input-container {
    max-width: 700px;
    margin: 0 auto;
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 24px;
    padding: 6px 6px 6px 16px;
    transition: all 0.2s;
}

.chat-input-container:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.upload-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    padding: 0;
}

.upload-btn:hover {
    background: #f0f0f0;
    color: #555;
}

.upload-btn svg {
    width: 18px;
    height: 18px;
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: #1a365d;
    outline: none;
    padding: 8px 0;
    line-height: 1.4;
}

.chat-input::placeholder {
    color: #666;
}

.send-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.send-btn svg {
    width: 16px;
    height: 16px;
    margin-left: 1px;
}

/* ===== PATCH: Upload preview - thumbnails mai mari, lățime egală cu input ===== */
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-upload {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    background: rgba(0, 0, 0, 0.65);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.preview-item:hover .remove-upload {
    opacity: 1;
}

.remove-upload:hover {
    background: #dc2626;
}

.upload-count {
    font-size: 14px;
    color: #666;
    margin-left: auto;
    padding-right: 4px;
}

/* Input conectat cu preview */
.chat-input-wrapper {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px 24px;
}

.upload-preview + .chat-input-wrapper,
.chat-input-wrapper:has(+ .upload-preview) {
    padding-top: 0;
}

.chat-input-container {
    max-width: 100%;
    border-radius: 24px;
}

/* Când există preview deasupra */
.upload-preview ~ .chat-input-wrapper .chat-input-container,
.has-preview .chat-input-container {
    border-radius: 0 0 24px 24px;
    border-top: none;
}

/* ===== PATCH: Thumbnails mari + scroll orizontal + input mai mare ===== */
.upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
}

.upload-preview::-webkit-scrollbar {
    height: 6px;
}

.upload-preview::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 3px;
}

.preview-item {
    position: relative;
    min-width: 140px;
    width: 140px;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-upload {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: all 0.15s;
}

.remove-upload:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.upload-count {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    padding: 0 8px;
    flex-shrink: 0;
}

/* ===== Input mult mai mare ===== */
.chat-input-wrapper {
    padding: 0 24px 24px;
}

.chat-input-wrapper > .chat-input-container {
    max-width: 700px;
    margin: 0 auto;
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 28px;
    padding: 12px 12px 12px 20px;
    transition: all 0.2s;
}

.chat-input-container:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.upload-btn {
    width: 44px;
    height: 44px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.upload-btn:hover {
    background: #ebebeb;
    color: #333;
}

.upload-btn svg {
    width: 22px;
    height: 22px;
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: inherit;
    color: #1a365d;
    outline: none;
    padding: 10px 0;
    line-height: 1.5;
    min-height: 28px;
}

.chat-input::placeholder {
    color: #666;
}

.send-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.send-btn svg {
    width: 20px;
    height: 20px;
    margin-left: 2px;
}

/* Când există preview - input conectat */
.upload-preview + .chat-input-wrapper .chat-input-container {
    border-radius: 0 0 28px 28px;
    border-top: 1px solid #e8e8e8;
}

/* ===== PATCH: Input box full-width + conectat cu upload ===== */
.chat-input-wrapper {
    padding: 0 24px 24px;
    max-width: 100%;
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 28px;
    padding: 12px 12px 12px 20px;
    transition: all 0.2s;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    resize: none;
}

.chat-input-container:focus-within {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

/* Upload preview conectat cu input - același frame */
.upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-bottom: 1px solid #eee;
    border-radius: 28px 28px 0 0;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
}

.upload-preview + .chat-input-wrapper {
    padding-top: 0;
}

.upload-preview + .chat-input-wrapper .chat-input-container {
    border-top: none;
    border-radius: 0 0 28px 28px;
    margin-top: 0;
}

/* ===== Butoane close stil Claude - transparente, colț dreapta ===== */
.remove-upload {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    opacity: 0;
    transition: all 0.2s;
}

.preview-item:hover .remove-upload {
    opacity: 1;
}

.remove-upload:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* ===== Scroll bar vizibilă cu săgeți ===== */
.upload-preview {
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #f0f0f0;
}

.upload-preview::-webkit-scrollbar {
    height: 10px;
}

.upload-preview::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 5px;
}

.upload-preview::-webkit-scrollbar-thumb {
    background: #c9a227;
    border-radius: 5px;
    border: 2px solid #f0f0f0;
}

.upload-preview::-webkit-scrollbar-thumb:hover {
    background: #d4af37;
}

.upload-preview::-webkit-scrollbar-button:single-button {
    background: #e8e4dc;
    height: 10px;
    width: 16px;
    display: block;
}

.upload-preview::-webkit-scrollbar-button:single-button:horizontal:decrement {
    border-radius: 5px 0 0 5px;
    background: #e8e4dc url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="3"><path d="M15 18l-6-6 6-6"/></svg>') center/8px no-repeat;
}

.upload-preview::-webkit-scrollbar-button:single-button:horizontal:increment {
    border-radius: 0 5px 5px 0;
    background: #e8e4dc url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="3"><path d="M9 18l6-6-6-6"/></svg>') center/8px no-repeat;
}

.upload-preview::-webkit-scrollbar-button:hover {
    background-color: #d4af37;
}

/* ===== Mesaje user - fundal auriu în loc de navy ===== */
.message.user .message-content {
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    color: #fff;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    max-width: 75%;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
}

.message.user .message-images {
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    padding: 10px;
    border-radius: 14px;
}

.message.user.has-images .message-content > span {
    background: linear-gradient(135deg, #d4af37 0%, #b8960c 100%);
    color: #fff;
    padding: 10px 16px;
    border-radius: 14px;
}

.message.user .message-images img {
    border: 2px solid rgba(255,255,255,0.3);
}

/* ===== PATCH: Fix textarea styling ===== */
.chat-input-container textarea {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: #1a365d;
    outline: none;
    padding: 10px 0;
    line-height: 1.5;
    min-height: 24px;
    max-height: 150px;
    resize: none !important;
    overflow-y: auto;
}

.chat-input-container textarea::placeholder {
    color: #666;
}

/* ===== Mesaje user - fundal auriu semi-transparent (ca sidebar) ===== */
.message.user .message-content {
    background: rgba(212, 175, 55, 0.15) !important;
    color: #1a365d !important;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 18px 18px 4px 18px;
    max-width: 75%;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.message.user .message-images {
    background: rgba(212, 175, 55, 0.15) !important;
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 10px;
    border-radius: 14px;
}

.message.user.has-images .message-content > span {
    background: rgba(212, 175, 55, 0.15) !important;
    color: #1a365d !important;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.message.user .message-images img {
    border: 2px solid rgba(212, 175, 55, 0.4);
}

/* ===== Răspuns chat - font bold ===== */
.message.assistant .message-content {
    font-weight: 700;
    color: #1a365d;
}

/* ===== PATCH: Input full width + single frame pentru mesaje user ===== */

/* Input lățime completă */
.chat-input-wrapper {
    padding: 0 24px 24px;
    width: 100%;
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 28px;
    padding: 12px 12px 12px 20px;
    transition: all 0.2s;
    width: 100%;
    max-width: none;
}

.upload-preview {
    max-width: none;
    width: calc(100% - 48px);
    margin: 0 24px;
}

/* ===== Mesaje user - UN SINGUR frame pentru imagini + text ===== */
.message.user .message-content {
    background: rgba(212, 175, 55, 0.15) !important;
    color: #1a365d !important;
    font-weight: 400 !important;
    font-family: 'Montserrat', sans-serif;
    padding: 14px 18px;
    border-radius: 18px 18px 4px 18px;
    max-width: 75%;
    border: 1px solid rgba(212, 175, 55, 0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message.user.has-images .message-content {
    background: rgba(212, 175, 55, 0.15) !important;
    padding: 14px;
    box-shadow: none;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.message.user .message-images {
    background: transparent !important;
    border: none !important;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.message.user.has-images .message-content > span {
    background: transparent !important;
    border: none !important;
    padding: 4px 0 0 0;
    color: #1a365d !important;
    font-weight: 400;
}

.message.user .message-images img {
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
}

/* ===== Font răspuns chat - semibold ===== */
.message.assistant .message-content {
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: #1a365d;
}

/* ===== PATCH: Upload preview - dimensiune fixă ca input-ul ===== */
.upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-bottom: none;
    border-radius: 28px 28px 0 0;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    box-sizing: border-box;
    min-height: 80px;
    max-height: 120px;
}

.preview-item {
    min-width: 80px;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.upload-count {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Input și upload în același container */
.chat-input-wrapper {
    padding: 0 0 24px 0;
    width: 100%;
    max-width: 100%;
}

.chat-input-container {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* Când există preview, input-ul se conectează */
.upload-preview + .chat-input-wrapper .chat-input-container {
    border-top: none;
    border-radius: 0 0 28px 28px;
}

/* ===== PATCH: Upload preview - dimensiune fixă egală cu input ===== */
.upload-preview {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.preview-item {
    min-width: 140px;
    width: 140px;
    height: 140px;
}

.chat-input-container {
    max-width: 700px;
    margin: 0 auto;
}

/* ===== PATCH: Upload preview mai înalt ===== */
.upload-preview {
    min-height: 170px;
    padding: 14px 16px;
}

/* ===== PATCH: Textarea auto-expand ===== */
.chat-input-container textarea {
    resize: none !important;
    overflow: hidden !important;
    min-height: 24px;
    max-height: 300px;
}

/* ===== PATCH: Buton chat nou și selector limbă - auriu semi-transparent ===== */
.new-chat-btn {
    background: rgba(212, 175, 55, 0.15) !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    color: #1a365d !important;
    box-shadow: none !important;
}

.new-chat-btn:hover {
    background: rgba(212, 175, 55, 0.25) !important;
    border-color: rgba(212, 175, 55, 0.5) !important;
    transform: none !important;
}

.lang-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #1a365d;
}

.lang-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
    color: #1a365d;
}

.lang-btn.active {
    background: rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.5);
    color: #1a365d;
}

/* ===== PATCH: Fonturi user și chat ===== */
.message.user .message-content {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

.message.user.has-images .message-content > span {
    font-weight: 400;
}

.message.assistant .message-content {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

/* ===== PATCH: Logo doar text Lukian ===== */
.sidebar-logo {
    margin-bottom: 12px;
}

.sidebar-logo span {
    font-size: 22px;
    font-weight: 700;
    color: #1a365d;
    letter-spacing: -0.02em;
}

/* ===== PATCH: Selector limbă mic, pătrat, sub credite ===== */
.lang-selector {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    justify-content: center;
}

.lang-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 6px;
    color: #64748b;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
    color: #1a365d;
}

.lang-btn.active {
    background: rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.5);
    color: #1a365d;
    font-weight: 700;
}

/* ===== PATCH: Welcome message centrat cu animație ===== */
.chat-welcome {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    animation: welcomeFadeIn 0.8s ease-out;
}

@keyframes welcomeFadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.chat-welcome h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 8px;
}

.chat-welcome p {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 24px;
}

.chat-messages {
    position: relative;
}

/* ===== PATCH: Font diferit pentru input user ===== */

.chat-input-container textarea {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.message.user .message-content {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

.message.user.has-images .message-content > span {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
}

/* ===== PATCH: Răspuns chat weight 650 (600 closest) ===== */
.message.assistant .message-content {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* ===== PATCH: Eliminare scroll nedorit ===== */
html, body {
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.app-container {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.chat-container {
    overflow: hidden;
}

.chat-messages {
    overflow-x: hidden;
    overflow-y: auto;
}

/* ===== PATCH: Buton toggle sidebar - sus dreapta în sidebar ===== */
.sidebar-toggle {
    position: absolute;
    top: 16px;
    right: 12px;
    left: auto;
    transform: none;
    width: 28px;
    height: 28px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    z-index: 10;
    box-shadow: none;
}

.sidebar-toggle svg {
    width: 14px;
    height: 14px;
}

.sidebar-toggle:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
    color: #1a365d;
}

.sidebar.closed .sidebar-toggle {
    right: 50%;
    transform: translateX(50%);
}

/* ===== PATCH: Buton toggle - poziție fixă stânga ===== */
.sidebar-toggle {
    position: fixed !important;
    top: 16px;
    left: 220px;
    right: auto !important;
    transform: none !important;
    width: 28px;
    height: 28px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    cursor: pointer;
    color: #1a365d;
    z-index: 1001;
    transition: left 0.2s ease;
}

.sidebar.closed ~ .sidebar-toggle {
    left: 16px;
}

/* ===== PATCH: Input - butoane rămân jos ===== */
.chat-input-container {
    align-items: flex-end !important;
}

.chat-input-container textarea {
    align-self: center;
}

.upload-btn, .send-btn {
    flex-shrink: 0;
    align-self: flex-end;
    margin-bottom: 4px;
}

/* ===== PATCH: Header cu logo, new chat și toggle pe aceeași linie ===== */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #e8e4dc;
}

.sidebar-logo {
    flex: 1;
    margin-bottom: 0;
}

.sidebar-logo span {
    font-size: 20px;
    font-weight: 700;
    color: #1a365d;
}

.new-chat-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    padding: 0 !important;
    border-radius: 8px !important;
    flex-shrink: 0;
}

.new-chat-btn span {
    display: none;
}

.new-chat-btn svg {
    width: 18px;
    height: 18px;
}

.sidebar-toggle {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    padding: 0;
    flex-shrink: 0;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle svg {
    width: 16px;
    height: 16px;
}

.sidebar-toggle:hover {
    background: rgba(212, 175, 55, 0.2);
}

/* Sidebar closed - header vertical */
.sidebar.closed .sidebar-header {
    flex-direction: column;
    padding: 8px;
    gap: 6px;
}

.sidebar.closed .sidebar-logo {
    display: none;
}

.sidebar.closed .new-chat-btn,
.sidebar.closed .sidebar-toggle {
    width: 40px !important;
    height: 40px !important;
}

/* ===== PATCH: Conversații când sidebar e închis ===== */
.sidebar .conversations-collapsed {
    display: none;
}

.sidebar.closed .conversations-full {
    display: none;
}

.sidebar.closed .conversations-collapsed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px;
}

.sidebar.closed .conversations-label {
    display: none;
}

.conversation-icon-only {
    width: 40px;
    height: 40px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.15s;
}

.conversation-icon-only:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #1a365d;
}

.conversation-icon-only svg {
    width: 20px;
    height: 20px;
}

.conversation-more {
    width: 40px;
    height: 28px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    letter-spacing: 2px;
    transition: all 0.15s;
}

.conversation-more:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #1a365d;
}

/* Tooltip styling */
[title] {
    position: relative;
}

/* ===== PATCH: New chat ca nav-item ===== */
.nav-item.new-chat-nav {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin-bottom: 8px;
    cursor: pointer;
}

.nav-item.new-chat-nav:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: rgba(212, 175, 55, 0.5);
}

.nav-item.new-chat-nav svg {
    color: #b8960c;
}

/* Ascundem vechiul buton new-chat-btn dacă mai există */
.new-chat-btn {
    display: none !important;
}

/* ===== PATCH: Avatar centrat când sidebar e închis ===== */
.sidebar.closed .sidebar-footer {
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar.closed .user-info {
    justify-content: center;
    padding: 0;
    margin-bottom: 8px;
}

.sidebar.closed .user-avatar {
    margin: 0 auto;
}

.sidebar.closed .credits-display {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 8px;
}

.sidebar.closed .credits-display svg {
    margin: 0;
}

.sidebar.closed .buy-credits-btn {
    display: none;
}

.sidebar.closed .lang-selector {
    flex-direction: column;
    width: 100%;
    align-items: center;
}

.sidebar.closed .lang-btn {
    width: 32px;
}

/* ===== Tooltip stilizat pentru data mesajelor ===== */
.message[title] {
    position: relative;
}



/* ===== PATCH: Tooltip sub mesaj + butoane acțiuni ===== */



.message-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 6px;
    color: #64748b;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}

.message-action-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #1a365d;
}

.message-action-btn svg {
    width: 14px;
    height: 14px;
}

.message-time {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
}

/* ===== PATCH: Message actions fără să miște mesajul ===== */
.message {
    position: relative;
    padding-bottom: 30px;
}




/* ===== PATCH: Actions în dreapta + spațiere ===== */
.message {
    padding-bottom: 35px;
}



/* ===== PATCH: Mai multă distanță text-iconuri ===== */
.message {
    padding-bottom: 45px;
}


/* ===== Message actions - FINAL ===== */
.message {
    position: relative;
    padding-bottom: 40px;
}

.message-actions {
    position: absolute;
    bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.15s;
}

.message:hover .message-actions {
    opacity: 1;
}

.message.user .message-actions {
    right: 0;
}

.message.assistant .message-actions {
    left: 0;
}

.message-action-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-action-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #1a365d;
}

.message-action-btn svg {
    width: 16px;
    height: 16px;
}

.message-time {
    font-size: 11px;
    color: #94a3b8;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a227, #e8c547);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-message {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

.processing-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: rgba(26, 35, 75, 0.9);
    border-radius: 8px;
    margin-bottom: 10px;
}

/* === PROCESSING INDICATOR V2 === */
.processing-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    max-width: 700px;
    margin: 0 auto;
}
.progress-circle {
    position: relative;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.progress-circle svg {
    transform: rotate(-90deg);
    width: 32px;
    height: 32px;
}
.progress-circle .bg {
    fill: none;
    stroke: #e0e4eb;
    stroke-width: 3;
}
.progress-circle .progress-ring {
    fill: none;
    stroke: #c9a227;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}
.progress-circle .percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: 600;
    color: #1a234b;
}
.processing-text {
    display: flex;
    flex-direction: column;
}
.processing-message {
    color: #1a234b;
    font-size: 14px;
}
.processing-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 4px;
}
.processing-dots span {
    width: 4px;
    height: 4px;
    background: #c9a227;
    border-radius: 50%;
    animation: dotPulse 1.4s infinite ease-in-out;
}
.processing-dots span:nth-child(1) { animation-delay: 0s; }
.processing-dots span:nth-child(2) { animation-delay: 0.2s; }
.processing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
}

.action-summary-duration {
    font-size: 11px;
    color: #5a6a8a;
    margin-left: auto;
    margin-right: 8px;
}
.action-step-time {
    margin-left: auto;
    font-size: 10px;
    color: #9aa3b8;
}

/* === LIVE PROGRESS === */
.live-progress {
    display: flex;
    flex-direction: column;
    max-width: 700px;
    width: 100%;
    margin: 0 auto 20px;
    padding: 12px 16px;
    background: rgba(201, 162, 39, 0.08);
    border-radius: 8px;
    border-left: 3px solid #c9a227;
    box-sizing: border-box;
}
.live-progress-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
}
.live-progress-timer {
    font-size: 11px;
    font-weight: 600;
    color: #c9a227;
    font-family: monospace;
}
.live-progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
}
.live-progress-dot {
    width: 6px;
    height: 6px;
    background: #c9a227;
    border-radius: 50%;
    animation: pulse 1s infinite;
    flex-shrink: 0;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.live-progress-text {
    font-size: 13px;
    color: #1a234b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.live-progress-text .cursor {
    animation: blink 0.5s infinite;
    color: #c9a227;
    font-weight: bold;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.live-progress-text.typing {
    border-right: none;
}

/* =================== EDITOR PANEL - BASED ON WORDPRESS STUDIO =================== */

.editor-panel {
    /* CSS Variables */
    --lk-bg-primary: #f7f8fc;
    --lk-bg-card: #ffffff;
    --lk-bg-elevated: #f0f2f7;
    --lk-border-light: #e8ebf0;
    --lk-border-medium: #dde1e8;
    --lk-navy-dark: #0f0f1a;
    --lk-navy-medium: #1A365D;
    --lk-gold-primary: #d4af37;
    --lk-gold-light: #f4d03f;
    --lk-gold-dark: #b8960c;
    --lk-gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    --lk-gold-soft: rgba(212, 175, 55, 0.12);
    --lk-text-primary: #1A365D;
    --lk-text-secondary: #4a5068;
    --lk-text-muted: #8b92a5;
    --lk-text-on-dark: #ffffff;
    --lk-text-on-gold: #1a1a2e;
    --lk-shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
    --lk-shadow-md: 0 4px 12px rgba(26, 26, 46, 0.06);
    --lk-shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --lk-radius-sm: 8px;
    --lk-radius-md: 12px;
    --lk-radius-lg: 16px;
    
    /* Properties */
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 580px;
    background: var(--lk-bg-primary);
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Header - Navy gradient like WordPress */
.editor-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    color: var(--lk-text-on-dark);
}

.editor-panel-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-panel-header h3 svg {
    color: var(--lk-gold-light);
}

.editor-panel-close {
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--lk-radius-sm);
    color: #fff;
    display: flex;
    transition: background 0.2s;
}

.editor-panel-close:hover {
    background: rgba(255,255,255,0.2);
}

/* Preview */
.editor-panel-preview {
    position: relative;
    padding: 12px;
    background: var(--lk-bg-elevated);
    cursor: pointer;
}

.editor-panel-preview img {
    width: 100%;
    border-radius: var(--lk-radius-md);
    box-shadow: var(--lk-shadow-md);
}

.editor-panel-preview:hover .preview-zoom-hint {
    opacity: 1;
}

.preview-zoom-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(26, 26, 46, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: #fff;
}

/* Actions */
.editor-panel-actions {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    background: var(--lk-bg-card);
    border-bottom: 1px solid var(--lk-border-light);
}

.editor-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px;
    background: var(--lk-bg-elevated);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.editor-action-btn:hover {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
}

/* Tabs - from .lk-control-tabs */
.editor-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px;
    background: var(--lk-bg-card);
    border-bottom: 1px solid var(--lk-border-light);
}

.editor-tab {
    padding: 10px 6px;
    background: transparent;
    border: none;
    border-radius: var(--lk-radius-md);
    font-weight: 600;
    font-size: 10px;
    color: var(--lk-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.editor-tab:hover {
    color: var(--lk-text-primary);
    background: var(--lk-bg-elevated);
}

.editor-tab.active {
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
    box-shadow: var(--lk-shadow-sm);
}

.editor-tab svg {
    width: 18px;
    height: 18px;
}

/* Content */
.editor-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.editor-tab-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Section - from .lk-control-card */
.editor-section {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-lg);
    overflow: hidden;
    box-shadow: var(--lk-shadow-sm);
}

.editor-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--lk-border-light);
    background: var(--lk-bg-elevated);
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-text-secondary);
}

.editor-section-header svg {
    width: 16px;
    height: 16px;
    color: var(--lk-gold-dark);
}

/* Preset Grid - from .lk-enhancement-grid */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 12px;
}

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

/* Preset Button - from .lk-enhancement-item */
.preset-btn {
    background: var(--lk-bg-elevated);
    border: 2px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    padding: 14px 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--lk-text-secondary);
}

.preset-btn:hover {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
    transform: translateY(-2px);
}

.preset-btn.active {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
}

.preset-btn.small {
    padding: 10px 6px;
    min-height: 70px;
    justify-content: center;
    gap: 4px;
}

.preset-btn svg {
    width: 24px;
    height: 24px;
    color: var(--lk-text-muted);
    margin-bottom: 6px;
    transition: color 0.2s;
}

.preset-btn:hover svg,
.preset-btn.active svg {
    color: var(--lk-gold-dark);
}

.preset-btn .preset-label {
    font-weight: 600;
    font-size: 11px;
    color: var(--lk-text-primary);
    margin-bottom: 2px;
    line-height: 1.2;
}

.preset-btn .preset-desc {
    font-size: 9px;
    color: var(--lk-text-muted);
}

/* Style Chips - from .lk-style-chips */
.style-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
}

.style-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--lk-bg-elevated);
    border: 2px solid var(--lk-border-light);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.style-chip:hover {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
}

.style-chip.active {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
}

.style-chip svg {
    width: 14px;
    height: 14px;
}

.style-chip.active svg {
    color: var(--lk-text-on-gold);
}

/* Custom Prompt - from .lk-custom-prompt-wrapper */
.custom-prompt-wrapper {
    padding: 12px;
}

.custom-prompt-wrapper textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    background: var(--lk-bg-elevated);
    color: var(--lk-text-primary);
    transition: border-color 0.2s;
    min-height: 80px;
}

.custom-prompt-wrapper textarea:focus {
    outline: none;
    border-color: var(--lk-gold-primary);
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
}

.custom-prompt-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.char-count {
    font-size: 11px;
    color: var(--lk-text-muted);
}

.custom-submit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--lk-gold-gradient);
    border: none;
    border-radius: var(--lk-radius-md);
    color: var(--lk-text-on-gold);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--lk-shadow-gold);
}

.custom-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.custom-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Quick Prompts - from .lk-quick-prompts */
.quick-prompts {
    padding: 0 12px 12px;
}

.quick-prompts-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--lk-text-secondary);
    margin-bottom: 8px;
}

.quick-prompts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-prompt-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: var(--lk-bg-elevated);
    border: 1px solid var(--lk-border-light);
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    color: var(--lk-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-prompt-btn svg {
    width: 12px;
    height: 12px;
    color: var(--lk-gold-dark);
}

.quick-prompt-btn:hover {
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    border-color: transparent;
    color: var(--lk-text-on-dark);
}

.quick-prompt-btn:hover svg {
    color: var(--lk-gold-light);
}

/* Footer */
.editor-panel-footer {
    padding: 10px 12px;
    border-top: 1px solid var(--lk-border-light);
    text-align: center;
    background: var(--lk-bg-elevated);
}

.editor-panel-footer p {
    margin: 0;
    font-size: 11px;
    color: var(--lk-text-muted);
}

/* Mobile */
@media (max-width: 768px) {
    .editor-panel {
        width: 100%;
    }
}

/* Editor Panel Backdrop */
.editor-panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    animation: fadeIn 0.2s ease;
}

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

/* Floating Editor Button */
.editor-floating-btn {
    position: fixed;
    right: 24px;
    bottom: 100px;
    width: 56px;
    height: 56px;
    background: var(--lk-gold-gradient, linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: slideInRight 0.3s ease;
}

.editor-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(212, 175, 55, 0.5);
}

.editor-floating-btn svg {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #d4af37, #b8960c);
    color: #1a1a2e;
}

/* Before/After Comparison Slider - FIXED */



/* =================== BEFORE/AFTER COMPARISON SLIDER =================== */
.lightbox-compare {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.compare-container {
    position: relative;
    display: inline-block;
    max-width: 90vw;
    max-height: 75vh;
    border-radius: 8px;
    overflow: hidden;
}

.compare-container .compare-after {
    display: block;
    max-width: 90vw;
    max-height: 75vh;
    width: auto;
    height: auto;
    border-radius: 8px;
}

.compare-before {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.compare-before img {
    position: absolute;
    top: 0;
    left: 0;
    width: 90vw;
    height: 75vh;
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    object-position: left center;
}

/* Slider Handle */
.compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #fff;
    z-index: 10;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    pointer-events: none;
}

.compare-handle::before {
    content: '◀▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    letter-spacing: -2px;
    color: #1a365d;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.compare-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 20;
    -webkit-appearance: none;
}

.compare-labels {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    z-index: 15;
    pointer-events: none;
}

.compare-label-before,
.compare-label-after {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.compare-label-before {
    background: rgba(26, 54, 93, 0.9);
}

.compare-label-after {
    background: linear-gradient(135deg, #d4af37, #b8960c);
    color: #1a1a2e;
}

.lightbox-compare .lightbox-actions {
    margin-top: 16px;
}

/* Resolution badges */
.compare-resolutions {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 15;
    pointer-events: none;
}

.compare-res-before,
.compare-res-after {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Monaco', 'Consolas', monospace;
    backdrop-filter: blur(4px);
}

/* Limit preview height in EditorPanel */
.editor-panel-preview {
    max-height: 35vh;
    overflow: hidden;
}

.editor-panel-preview img {
    width: 100%;
    height: auto;
    max-height: 35vh;
    object-fit: contain;
}

/* =================== BATCH THUMBNAILS IN EDITOR =================== */
.editor-batch-strip {
    padding: 8px 12px;
    background: var(--lk-bg-elevated);
    border-bottom: 1px solid var(--lk-border-light);
}

.batch-thumbnails {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.batch-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: all 0.2s;
}

.batch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.batch-thumb.active {
    border-color: var(--lk-gold-primary);
    box-shadow: 0 0 0 2px var(--lk-gold-soft);
}

.batch-thumb.selected::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(212, 175, 55, 0.3);
}

.batch-thumb-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255,255,255,0.9);
    border: 2px solid var(--lk-border-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.batch-thumb.selected .batch-thumb-check {
    background: var(--lk-gold-primary);
    border-color: var(--lk-gold-primary);
    color: #fff;
}

.batch-select-all {
    display: block;
    width: 100%;
    padding: 6px;
    margin-top: 4px;
    background: transparent;
    border: 1px dashed var(--lk-border-medium);
    border-radius: 6px;
    font-size: 11px;
    color: var(--lk-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.batch-select-all:hover {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
}

.preview-counter {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.editor-selected-info {
    padding: 8px 12px;
    background: var(--lk-gold-soft);
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--lk-gold-dark);
    border-bottom: 1px solid var(--lk-border-light);
}

/* =================== LIGHTBOX NAVIGATION =================== */
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 2010;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav-prev {
    left: 24px;
}

.lightbox-nav-next {
    right: 24px;
}

.lightbox-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.lightbox-counter {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* =================== EDITOR ACCORDION STYLE =================== */
.editor-accordion {
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    margin-bottom: 8px;
    overflow: hidden;
}

.editor-accordion-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    background: var(--lk-bg-elevated);
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--lk-text-secondary);
    transition: all 0.2s;
}

.editor-accordion-header:hover {
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
}

.editor-accordion-header.open {
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
    border-bottom: 1px solid var(--lk-border-light);
}

.editor-accordion-header span {
    flex: 1;
    text-align: left;
}

.accordion-arrow {
    transition: transform 0.2s;
}

.editor-accordion-header.open .accordion-arrow {
    transform: rotate(180deg);
}

.editor-accordion-content {
    padding: 12px;
    background: var(--lk-bg-card);
}

/* Preset chips */
.preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.preset-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--lk-bg-elevated);
    border: 2px solid var(--lk-border-light);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--lk-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.preset-chip:hover {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
}

.preset-chip.active {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
}

.preset-chip.active svg {
    color: var(--lk-text-on-gold);
}

/* Style selector */
.style-selector {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--lk-border-light);
}

.style-selector-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--lk-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Custom textarea in accordion */
.editor-accordion-content .custom-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    font-family: inherit;
    font-size: 13px;
    resize: none;
    background: var(--lk-bg-elevated);
    color: var(--lk-text-primary);
}

.editor-accordion-content .custom-textarea:focus {
    outline: none;
    border-color: var(--lk-gold-primary);
}

.editor-accordion-content .char-count {
    text-align: right;
    font-size: 10px;
    color: var(--lk-text-muted);
    margin-top: 4px;
}

/* Process button */
.editor-panel-footer {
    padding: 12px;
    background: var(--lk-bg-elevated);
    border-top: 1px solid var(--lk-border-light);
}

.selected-count {
    text-align: center;
    font-size: 11px;
    color: var(--lk-text-muted);
    margin-bottom: 8px;
}

.process-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: var(--lk-gold-gradient);
    border: none;
    border-radius: var(--lk-radius-md);
    color: var(--lk-text-on-gold);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.process-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

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

.process-preset {
    background: rgba(0,0,0,0.15);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.process-credits {
    background: rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.studio-credits-info {
    text-align: center;
    font-size: 11px;
    color: var(--lk-text-muted);
    margin-top: 6px;
}
.studio-credits-info strong {
    color: var(--lk-gold-primary, #d4af37);
}
/* Studio progress in EditorPanel */
.studio-progress-wrap {
    margin-bottom: 10px;
}
.studio-progress-text {
    font-size: 11px;
    color: var(--lk-text-muted);
    margin-bottom: 5px;
    text-align: center;
}
.studio-progress-bar {
    height: 4px;
    background: var(--lk-border-light, rgba(0,0,0,0.1));
    border-radius: 4px;
    overflow: hidden;
}
.studio-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* =================== AI PROVIDER SELECTOR =================== */
.editor-provider-selector {
    padding: 10px 12px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    margin: 0 12px 8px;
}

.provider-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--lk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.provider-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.provider-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--lk-bg-elevated);
    border: 2px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.provider-option input {
    display: none;
}

.provider-option:hover {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
}

.provider-option.active {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-gradient);
}

.provider-option.active .provider-name,
.provider-option.active svg {
    color: var(--lk-text-on-gold);
}

.provider-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.provider-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-text-primary);
}

.provider-desc {
    font-size: 10px;
    color: var(--lk-text-muted);
}

.provider-option.active .provider-desc {
    color: rgba(255,255,255,0.8);
}

/* =================== MOBILE STYLES =================== */
@media (max-width: 768px) {
    .editor-panel {
        width: calc(100vw - 60px);
        left: 60px;
        right: 0;
    }

    .editor-panel-backdrop {
        left: 60px;
    }

    .editor-floating-btn {
        right: 12px;
        bottom: 150px;
        width: 36px;
        height: 36px;
    }

    .editor-floating-btn svg {
        width: 16px;
        height: 16px;
    }

    .provider-options {
        grid-template-columns: 1fr;
    }

    .editor-panel-preview {
        max-height: 25vh;
        padding: 8px;
    }

    .editor-panel-preview img {
        max-height: 25vh;
    }

    .editor-panel-content {
        padding: 8px;
    }

    .editor-accordion-header {
        padding: 10px 12px;
        font-size: 12px;
        gap: 8px;
    }

    .editor-accordion-content {
        padding: 8px;
    }

    .preset-chips {
        gap: 5px;
    }

    .preset-chip {
        padding: 6px 10px;
        font-size: 11px;
        gap: 4px;
    }

    .preset-chip svg {
        width: 12px;
        height: 12px;
    }

    .style-chips {
        gap: 5px;
        padding: 8px;
    }

    .style-chip {
        padding: 5px 10px;
        font-size: 11px;
        gap: 4px;
    }

    .custom-prompt-wrapper {
        padding: 8px;
    }

    .editor-panel-footer {
        padding: 8px;
    }

    .process-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .editor-panel-actions {
        padding: 6px 8px;
    }

    .editor-action-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .batch-thumb {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .editor-batch-strip {
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .editor-panel {
        width: calc(100vw - 50px);
        left: 50px;
    }

    .editor-panel-backdrop {
        left: 50px;
    }

    .editor-panel-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .editor-panel-header h3 {
        font-size: 13px;
    }

    .editor-panel-preview {
        max-height: 20vh;
        padding: 6px;
    }

    .editor-panel-preview img {
        max-height: 20vh;
    }

    .preset-chip {
        padding: 5px 8px;
        font-size: 10px;
        border-radius: 16px;
    }

    .style-chip {
        padding: 4px 8px;
        font-size: 10px;
    }

    .editor-accordion-header {
        padding: 8px 10px;
        font-size: 11px;
    }

    .batch-thumb {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
}

/* =================== COMPACT PROVIDER IN HEADER =================== */
.editor-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-panel-header h3 {
    flex: 1;
}

.header-provider-toggle {
    display: flex;
    background: var(--lk-bg-elevated);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.provider-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--lk-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.provider-btn:hover {
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
}

.provider-btn.active {
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

/* Smaller preview */
.editor-panel-preview {
    max-height: 200px !important;
    margin: 8px 12px;
}

.editor-panel-preview img {
    max-height: 200px !important;
}

/* Hide old provider selector */
.editor-provider-selector {
    display: none;
}

.typewriter-cursor {
    color: #c9a227;
    font-weight: bold;
    animation: blink 0.6s infinite;
    margin-left: 1px;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typewriter-cursor {
    color: #c9a227;
    font-weight: bold;
    animation: cursorBlink 0.6s infinite;
    margin-left: 1px;
}
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========== EVALUATION PANEL ========== */
.evaluation-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.evaluation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
}

.evaluation-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}

.evaluation-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.evaluation-close:hover {
    background: rgba(255,255,255,0.2);
}

.evaluation-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.evaluation-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 14px;
}

.property-summary .summary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 12px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
}

.attributes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.attribute-badge {
    background: #e8f4f8;
    color: #1e3a5f;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.estimate-box {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
    text-align: center;
    padding: 20px;
}

.estimate-label {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.estimate-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.estimate-detail {
    font-size: 12px;
    opacity: 0.8;
}

.estimate-adjustment {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 12px;
    color: #a8d8a8;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 13px;
}

.section-header.clickable {
    cursor: pointer;
}

.section-header.clickable:hover {
    color: #2d5a87;
}

.market-stats {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.stat-row span {
    color: #666;
}

.stat-row strong {
    color: #1e3a5f;
}

.adjustments-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.adjustment-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
}

.adjustment-row.positive {
    background: #e8f5e9;
    color: #2e7d32;
}

.adjustment-row.negative {
    background: #ffebee;
    color: #c62828;
}

.adjustment-row strong {
    font-weight: 600;
}

.comparables-table {
    margin-top: 12px;
    font-size: 12px;
}

.comparables-table .table-header {
    display: grid;
    grid-template-columns: 1fr 0.7fr 0.5fr 0.4fr 1fr;
    gap: 8px;
    padding: 8px;
    background: #e9ecef;
    border-radius: 6px;
    font-weight: 600;
    color: #555;
}

.comparables-table .table-row {
    display: grid;
    grid-template-columns: 1fr 0.7fr 0.5fr 0.4fr 1fr;
    gap: 8px;
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.comparables-table .table-row:hover {
    background: #f0f7ff;
}

.comparables-table .zone-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.evaluation-footer {
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.evaluation-footer .disclaimer {
    font-size: 11px;
    color: #555;
    text-align: center;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .evaluation-panel {
        width: 100%;
    }
}

/* Description Tab Styles */
.description-content {
    padding: 10px 0;
}

.scores-grid {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.score-item {
    flex: 1;
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.score-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.score-value {
    font-size: 16px;
    font-weight: 700;
}

.score-value.good { color: #10b981; }
.score-value.average { color: #f59e0b; }
.score-value.poor { color: #ef4444; }

.quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.quality-badge.excellent { background: #d1fae5; color: #065f46; }
.quality-badge.good { background: #dbeafe; color: #1e40af; }
.quality-badge.average { background: #fef3c7; color: #92400e; }
.quality-badge.below { background: #fed7aa; color: #9a3412; }
.quality-badge.poor { background: #fecaca; color: #991b1b; }

.atmosphere-text {
    font-size: 13px;
    color: #555;
    margin-bottom: 12px;
    padding: 8px;
    background: #f8f9fa;
    border-left: 3px solid #3b82f6;
    border-radius: 0 6px 6px 0;
}

.adjectives-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.adjective-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.features-section {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
}

.features-section.positive {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.features-section.negative {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.features-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.features-section.positive .features-header { color: #166534; }
.features-section.negative .features-header { color: #991b1b; }

.features-list {
    margin: 0;
    padding-left: 20px;
    font-size: 12px;
}

.features-list li {
    margin-bottom: 3px;
}

.features-section.positive .features-list { color: #15803d; }
.features-section.negative .features-list { color: #b91c1c; }

.attributes-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.attr-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.attr-badge.view {
    background: #dbeafe;
    color: #1e40af;
}

.section-header svg {
    margin-right: 6px;
}

/* Evaluations List Styles */
.evaluations-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.evaluation-list-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.evaluation-list-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.eval-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.eval-item-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1e293b;
}

.eval-item-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #64748b;
}

.eval-item-details {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.eval-detail {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #475569;
}

.eval-item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-range {
    font-weight: 700;
    color: #0f766e;
    font-size: 15px;
}

.price-sqm {
    font-size: 11px;
    color: #64748b;
}

.eval-item-quality {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.eval-item-quality.top_10,
.eval-item-quality.top_25 { background: #d1fae5; color: #065f46; }
.eval-item-quality.average { background: #fef3c7; color: #92400e; }
.eval-item-quality.below_average { background: #fed7aa; color: #9a3412; }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-state p {
    margin: 10px 0;
}

.back-button {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    margin-right: 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.back-button:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* ============================================
   SOCIAL MEDIA PANEL — Redesigned
   ============================================ */

.social-panel-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.25);
    z-index: 999;
    animation: fadeIn 0.2s ease;
}

.social-media-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 750px;
    background: var(--sp-gray-50);
    box-shadow: var(--sp-shadow-xl);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: spSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes spSlideIn {
    from { transform: translateX(100%); opacity: 0.8; }
    to { transform: translateX(0); opacity: 1; }
}

/* ─── Header (Notion-style flat white) ─── */
.social-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px var(--sp-space-5);
    background: #fff;
    border-bottom: 1px solid var(--sp-gray-200);
    flex-shrink: 0;
}

.social-panel-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--sp-gray-800);
    display: flex;
    align-items: center;
    gap: var(--sp-space-2);
}

.social-panel-header h3 svg {
    color: var(--sp-gold);
}

.social-panel-close {
    background: none;
    border: none;
    color: var(--sp-gray-400);
    width: 32px;
    height: 32px;
    border-radius: var(--sp-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--sp-transition);
}

.social-panel-close:hover {
    background: var(--sp-gray-100);
    color: var(--sp-gray-700);
}

/* ─── Account Chips Bar (replaces old accounts bar) ─── */
.sp-accounts-chips-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-space-2);
    padding: var(--sp-space-2) var(--sp-space-5);
    background: #fff;
    border-bottom: 1px solid var(--sp-gray-200);
    flex-shrink: 0;
    min-height: 40px;
}

.sp-account-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    overflow: hidden;
}

.sp-account-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--sp-gray-50, #f9fafb);
    border: 1px solid var(--sp-gray-200);
    border-radius: 20px;
    font-size: 11px;
    color: var(--sp-gray-700);
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
}

.sp-account-chip svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.sp-account-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-no-accounts-hint {
    font-size: 12px;
    color: var(--sp-gray-400);
    flex: 1;
}

.sp-manage-accounts-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: none;
    border: 1.5px solid var(--sp-gold);
    border-radius: var(--sp-radius-md);
    color: var(--sp-gold);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--sp-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.sp-manage-accounts-btn:hover {
    background: var(--sp-gold);
    color: #fff;
}

.sp-manage-accounts-btn svg {
    width: 14px;
    height: 14px;
}

/* ─── Account Manager Modal ─── */
.sp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: sp-fade-in 0.2s ease;
}

.sp-modal {
    background: #fff;
    border-radius: 16px;
    width: 420px;
    max-width: 95vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: sp-modal-pop 0.25s ease;
    overflow: hidden;
}

@keyframes sp-modal-pop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes sp-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sp-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sp-gray-200);
}

.sp-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--sp-gray-800);
    margin: 0;
}

.sp-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--sp-gray-400);
    transition: all var(--sp-transition);
}

.sp-modal-close:hover {
    background: var(--sp-gray-100);
    color: var(--sp-gray-700);
}

/* Channel tabs */
.sp-channel-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--sp-gray-200);
    padding: 0 16px;
}

.sp-channel-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    color: var(--sp-gray-500);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--sp-transition);
}

.sp-channel-tab:hover {
    color: var(--sp-gray-700);
}

.sp-channel-tab.active {
    color: var(--sp-gold);
    border-bottom-color: var(--sp-gold);
    font-weight: 600;
}

.sp-channel-count {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--sp-gray-100);
    color: var(--sp-gray-600);
    font-weight: 600;
}

.sp-channel-tab.active .sp-channel-count {
    background: #fef3c7;
    color: #92400e;
}

/* Modal body */
.sp-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.sp-modal-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #eff6ff;
    border-radius: 8px;
    font-size: 12px;
    color: #1d4ed8;
    margin-bottom: 10px;
}

.sp-modal-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--sp-gray-400);
    font-size: 13px;
}

/* Account row */
.sp-account-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--sp-gray-200);
    margin-bottom: 6px;
    transition: all var(--sp-transition);
}

.sp-account-row.selected {
    border-color: var(--sp-gold);
    background: #fefce8;
}

.sp-account-row-check {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    cursor: pointer;
    min-width: 0;
}

.sp-account-row-check input[type="checkbox"] {
    accent-color: var(--sp-gold);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sp-account-row-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sp-gray-100);
    flex-shrink: 0;
}

.sp-account-row-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-account-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sp-account-row-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--sp-gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-account-type-badge {
    font-size: 10px;
    color: var(--sp-gray-500);
    font-weight: 500;
}

.sp-account-type-badge.personal {
    color: #7c3aed;
}

.sp-account-type-badge.business {
    color: #059669;
}

.sp-account-row-disconnect {
    display: none; /* moved to channel-level disconnect */
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--sp-gray-300);
    transition: all var(--sp-transition);
    flex-shrink: 0;
}

.sp-account-row-disconnect:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Connect button in modal */
.sp-modal-connect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: none;
    border: 1.5px dashed var(--sp-gray-300);
    border-radius: 10px;
    color: var(--sp-gray-500);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--sp-transition);
    margin-top: 4px;
}

.sp-modal-connect-btn:hover {
    border-color: var(--sp-gold);
    color: var(--sp-gold);
    border-style: solid;
}

.sp-modal-channel-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.sp-modal-channel-actions .sp-modal-connect-btn {
    margin-top: 0;
    flex: 1;
}

.sp-modal-disconnect-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: none;
    border: 1.5px solid #fecaca;
    border-radius: 10px;
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--sp-transition);
    white-space: nowrap;
}
.sp-modal-disconnect-btn:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* Modal footer */
.sp-modal-footer {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--sp-gray-200);
    justify-content: flex-end;
}

.sp-modal-cancel {
    padding: 8px 16px;
    border: 1px solid var(--sp-gray-300);
    background: #fff;
    border-radius: var(--sp-radius-md);
    color: var(--sp-gray-600);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--sp-transition);
}

.sp-modal-cancel:hover {
    background: var(--sp-gray-50, #f9fafb);
}

.sp-modal-save {
    padding: 8px 20px;
    border: none;
    background: var(--sp-gold);
    border-radius: var(--sp-radius-md);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--sp-transition);
}

.sp-modal-save:hover {
    background: var(--sp-gold-hover, #c49b2f);
}

.sp-modal-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 16px 12px;
    padding: 10px 12px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: #92400e;
}

.sp-modal-tip svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* ─── Publish Channel Accordions ─── */
.publish-channels {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.publish-channel {
    border: 1px solid var(--sp-gray-200);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.publish-channel:hover {
    border-color: var(--sp-gray-300);
}

.publish-channel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--sp-gray-50);
    cursor: pointer;
    user-select: none;
}

.publish-channel-left {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sp-gray-600);
}

.publish-channel-count {
    background: var(--sp-gold);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.publish-channel-chevron {
    transition: transform 0.2s ease;
    color: var(--sp-gray-400);
}

.publish-channel.open .publish-channel-chevron {
    transform: rotate(45deg);
}

.publish-channel-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.publish-channel.open .publish-channel-body {
    max-height: 200px;
}

.publish-channel-scroll {
    padding: 6px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
}

/* ─── Tab Bar ─── */
.sp-tab-bar {
    display: flex;
    background: #fff;
    border-bottom: 1px solid var(--sp-gray-200);
    flex-shrink: 0;
    padding: 0 var(--sp-space-5);
}

.sp-tab {
    flex: 1;
    padding: var(--sp-space-3) var(--sp-space-4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--sp-gray-500);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--sp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-space-2);
    position: relative;
}

.sp-tab:hover {
    color: var(--sp-gray-700);
}

.sp-tab.active {
    color: var(--sp-gold);
    border-bottom-color: var(--sp-gold);
    font-weight: 600;
}

.sp-tab-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--sp-gray-100);
    color: var(--sp-gray-500);
    font-weight: 500;
}

.sp-tab.active .sp-tab-badge {
    background: var(--sp-gold-lighter);
    color: var(--sp-gold-hover);
}

/* ─── Tab Content ─── */
.sp-tab-content {
    flex: 1;
    overflow-y: auto;
}

.sp-tab-content.sp-tab-animate {
    animation: spFadeIn 0.2s ease;
}

.sp-tab-hidden {
    display: none;
}

@keyframes spFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.social-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-space-4);
}

.social-panel-section {
    margin-bottom: var(--sp-space-5);
}

.social-panel-section label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--sp-space-2);
}

/* Platform selector - pill buttons */
.platform-selector {
    display: flex;
    gap: var(--sp-space-2);
    flex-wrap: wrap;
}

.platform-pill {
    padding: var(--sp-space-2) var(--sp-space-4);
    border-radius: 20px;
    border: 1.5px solid var(--sp-gray-200);
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--sp-transition);
    color: var(--sp-gray-600);
}

.platform-pill:hover {
    border-color: var(--sp-gold);
    color: var(--sp-gray-800);
}

.platform-pill.active {
    background: var(--sp-gold);
    border-color: var(--sp-gold);
    color: #fff;
    font-weight: 600;
}

.platform-pill:active {
    transform: scale(0.98);
}

/* Template grid 3 columns */
.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-space-2);
}

.template-grid.template-grid-vertical {
    grid-template-columns: repeat(4, 1fr);
}

.template-card {
    position: relative;
    border-radius: var(--sp-radius-md);
    overflow: hidden;
    border: 2px solid var(--sp-gray-200);
    cursor: pointer;
    transition: all var(--sp-transition);
    background: #fff;
}

.template-card:hover {
    border-color: var(--sp-gold);
    transform: translateY(-1px);
    box-shadow: var(--sp-shadow-md);
}

.template-card.active {
    border-color: var(--sp-gold);
    box-shadow: 0 0 0 2px rgba(212,175,55,0.25);
}

.template-card img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.template-card-name {
    padding: 5px var(--sp-space-2);
    font-size: 10px;
    font-weight: 600;
    color: var(--sp-gray-700);
    background: var(--sp-gray-50);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.template-card.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* Photo strip */
.photo-strip {
    display: flex;
    gap: var(--sp-space-2);
    overflow-x: auto;
    padding: var(--sp-space-1) 0;
    -webkit-overflow-scrolling: touch;
}

.photo-strip::-webkit-scrollbar {
    height: 4px;
}

.photo-strip::-webkit-scrollbar-thumb {
    background: var(--sp-gray-300);
    border-radius: 4px;
}

.photo-strip-item {
    width: 72px;
    height: 72px;
    border-radius: var(--sp-radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--sp-transition);
}

.photo-strip-item:hover {
    border-color: var(--sp-gold);
}

.photo-strip-item.selected {
    border-color: var(--sp-gold);
    box-shadow: 0 0 0 2px rgba(212,175,55,0.2);
}

.photo-strip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-strip-gallery-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: 3px dashed #d1d5db;
    color: #9ca3af;
    transition: all 0.2s;
}

.photo-strip-gallery-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
    background: #fefce8;
}

.photo-strip-open-gallery {
    margin-top: 8px;
    padding: 6px 14px;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.photo-strip-open-gallery:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.photo-strip-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s;
}
.photo-strip-upload-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
    background: #fefce8;
}
.photo-strip-upload-btn .spinner {
    width: 20px;
    height: 20px;
}

.photo-strip-empty {
    color: #9CA3AF;
    font-size: 13px;
    padding: 16px;
    text-align: center;
    background: #f0f2f7;
    border-radius: 8px;
}

.selected-photo-thumbnail {
    margin-top: 10px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #d4af37;
    box-shadow: 0 2px 8px rgba(212,175,55,0.15);
}

.selected-photo-thumbnail img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
}

.selected-photo-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(212,175,55,0.9);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Property inputs */
.property-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.property-inputs input,
.property-inputs textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8ebf0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.property-inputs input:focus,
.property-inputs textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.input-with-count {
    position: relative;
}

.input-with-count input {
    padding-right: 50px !important;
}

.char-count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #9ca3af;
    pointer-events: none;
}

.char-count.warn {
    color: #e67e22;
}

.property-inputs .input-row {
    display: flex;
    gap: 10px;
}

.property-inputs .input-row input {
    flex: 1;
}

/* Caption editor */
.caption-editor textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid #e8ebf0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    background: #ffffff;
    box-sizing: border-box;
}

.caption-editor textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

/* Generate button */
.social-generate-btn {
    width: 100%;
    padding: var(--sp-space-3);
    background: var(--sp-gold);
    border: none;
    border-radius: var(--sp-radius-md);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-space-2);
    transition: all var(--sp-transition);
    margin-top: var(--sp-space-2);
}

.social-generate-btn:hover {
    background: var(--sp-gold-hover);
    box-shadow: var(--sp-shadow-md);
}

.social-generate-btn:active {
    transform: scale(0.98);
}

.social-generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.social-generate-btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Result view */
.social-result-preview {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    margin-bottom: 16px;
    background: #fff;
}

.social-result-preview img {
    width: 100%;
    display: block;
}

.social-result-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.social-result-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.social-download-btn {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    border: none;
    color: #1A365D;
}

.social-download-btn:hover {
    box-shadow: 0 4px 12px rgba(212,175,55,0.3);
}

.social-newpost-btn {
    background: #ffffff;
    border: 2px solid #e8ebf0;
    color: #4B5563;
}

.social-newpost-btn:hover {
    border-color: #d4af37;
    color: #1A365D;
}

/* Caption & hashtags copy */
.social-copy-section {
    background: #ffffff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #e8ebf0;
}

.social-copy-section .copy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.social-copy-section .copy-header span {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
}

.social-copy-btn {
    padding: 4px 12px;
    background: #f0f2f7;
    border: 1px solid #e8ebf0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    color: #4B5563;
    transition: all 0.2s;
}

.social-copy-btn:hover {
    background: #e8ebf0;
}

.social-copy-btn.copied {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

.social-copy-section p {
    margin: 0;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Panel footer */
.social-panel-footer {
    padding: var(--sp-space-3) var(--sp-space-4);
    background: #fff;
    border-top: 1px solid var(--sp-gray-200);
    flex-shrink: 0;
}

/* Save draft button */
.sp-save-draft-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-space-2);
    width: 100%;
    padding: var(--sp-space-3);
    background: #fff;
    border: 1.5px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--sp-gray-600);
    cursor: pointer;
    transition: all var(--sp-transition);
    margin-top: var(--sp-space-2);
}

.sp-save-draft-btn:hover {
    border-color: var(--sp-gold);
    color: var(--sp-gold-hover);
}

.sp-save-draft-btn:active {
    transform: scale(0.98);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .social-media-panel {
        width: 100%;
        animation: slideInUp 0.3s ease;
    }
}

@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sp-tab {
        font-size: 12px;
        padding: var(--sp-space-2) var(--sp-space-3);
    }

    .calendar-grid .calendar-day {
        min-height: 36px;
    }
}

@media (max-width: 480px) {
    .sp-tab {
        font-size: 11px;
        gap: var(--sp-space-1);
    }

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

    .photo-strip-item {
        width: 56px;
        height: 56px;
    }

    .sp-draft-card-thumb {
        width: 48px !important;
        height: 48px !important;
    }
}

/* Photo source tabs */
.photo-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.photo-tab {
    flex: 1;
    padding: 8px 12px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.photo-tab:hover {
    color: #374151;
}

.photo-tab.active {
    color: #d4af37;
    border-bottom-color: #d4af37;
}

.photo-tab .tab-count {
    display: inline-block;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
}

.photo-tab.active .tab-count {
    background: #fef3c7;
    color: #92400e;
}

/* Caption generate row */
.caption-generate-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.caption-generate-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #1a365d, #2d4a7a);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.caption-generate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2d4a7a, #3b5998);
}

.caption-generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* AI Template section */
.ai-template-section {
    padding: 12px;
    background: linear-gradient(135deg, #fefce8, #fef3c7);
    border: 1px dashed #d4af37;
    border-radius: 10px;
    text-align: center;
}

.ai-template-section p {
    margin: 0 0 8px;
    font-size: 12px;
    color: #78716c;
}

.ai-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: transparent;
    color: #b8860b;
    border: 2px solid #d4af37;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-template-btn:hover:not(:disabled) {
    background: #d4af37;
    color: #fff;
}

.ai-template-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Logo section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.logo-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.logo-upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.logo-upload-btn:hover {
    border-color: #d4af37;
    color: #b8860b;
}

.brand-colors-preview {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.brand-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #d1d5db;
    cursor: default;
}

/* Credit warning */
.credit-warning {
    font-size: 11px;
    color: #92400e;
    background: #fef3c7;
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 6px;
    text-align: center;
}

/* AI result preview */
.ai-result-preview {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.ai-result-preview img {
    width: 100%;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════
   CONNECTED ACCOUNTS (legacy, used by expanded view)
   ═══════════════════════════════════════════════════════════════ */

.connected-accounts {
    padding: var(--sp-space-3) var(--sp-space-4);
    border-bottom: 1px solid var(--sp-gray-200);
}

.connected-accounts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.connected-accounts-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.connected-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.connected-account-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.connected-account-icon {
    display: flex;
    flex-shrink: 0;
}

.connected-account-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.connected-account-disconnect {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s;
}

.connected-account-disconnect:hover {
    background: #fee2e2;
    color: #ef4444;
}

.connect-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.connect-account-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.connect-account-btn:hover {
    border-color: #d4af37;
    color: #b8860b;
    border-style: solid;
}

/* ═══════════════════════════════════════════════════════════════
   PUBLISH SECTION
   ═══════════════════════════════════════════════════════════════ */

.publish-section {
    padding: 12px 0;
}

.publish-platforms {
    margin-bottom: 12px;
}

.publish-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
    display: block;
}

.publish-platform-group {
    margin-bottom: 8px;
}

.publish-platform-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
    padding: 0 2px;
}

.publish-account-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.publish-account-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: #374151;
}

.publish-account-check:hover {
    border-color: #d4af37;
}

.publish-account-check.checked {
    border-color: #d4af37;
    background: #fef9e7;
}

.publish-account-check input[type="checkbox"] {
    accent-color: #d4af37;
}

.publish-account-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.publish-account-type {
    font-size: 10px;
    color: #9ca3af;
    text-transform: capitalize;
}

.publish-results {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.publish-result-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
}

.publish-result-item.published {
    background: #ecfdf5;
    color: #065f46;
}

.publish-result-item.failed {
    background: #fef2f2;
    color: #991b1b;
}

.publish-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.publish-now-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #d4af37;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.publish-now-btn:hover:not(:disabled) {
    background: #b8860b;
}

.publish-now-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.schedule-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.schedule-btn:hover:not(:disabled) {
    border-color: #d4af37;
    color: #b8860b;
}

.schedule-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.publish-connect-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
    text-align: center;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   SCHEDULE CALENDAR
   ═══════════════════════════════════════════════════════════════ */

.schedule-calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.schedule-calendar {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.calendar-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.calendar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
}

.calendar-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.calendar-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s;
}

.calendar-nav button:hover {
    border-color: #d4af37;
    color: #b8860b;
}

.calendar-month-label {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 0 16px 12px;
}

.calendar-day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    padding: 6px 0;
    text-transform: uppercase;
}

.calendar-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.calendar-day:hover:not(.empty):not(.past) {
    background: #f3f4f6;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.past {
    opacity: 0.4;
    cursor: default;
}

.calendar-day.today .calendar-day-number {
    background: #d4af37;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day.selected {
    background: #fef9e7;
    border: 1px solid #d4af37;
}

.calendar-day-number {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.calendar-day-dots {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}

.calendar-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.calendar-detail {
    padding: 12px 20px 20px;
    border-top: 1px solid #f0f0f0;
}

.calendar-detail-header {
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 10px;
}

.calendar-day-posts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.calendar-post-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    cursor: grab;
}

.calendar-post-item[draggable="true"]:active {
    cursor: grabbing;
    opacity: 0.7;
}

.calendar-post-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.calendar-post-time {
    font-weight: 500;
    color: #374151;
}

.calendar-post-platforms {
    flex: 1;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-post-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #9ca3af;
    transition: all 0.2s;
}

.calendar-post-delete:hover {
    background: #fee2e2;
    color: #ef4444;
}

.calendar-schedule-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-time-picker {
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-time-picker select {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    cursor: pointer;
}

.calendar-time-picker span {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.calendar-schedule-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #d4af37;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.calendar-schedule-btn:hover:not(:disabled) {
    background: #b8860b;
}

.calendar-schedule-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════
   DRAFTS TAB
   ═══════════════════════════════════════════════════════════════ */

.sp-drafts-tab {
    padding: var(--sp-space-4);
}

.sp-drafts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--sp-space-8) var(--sp-space-4);
    color: var(--sp-gray-400);
    text-align: center;
}

.sp-drafts-empty svg {
    margin-bottom: var(--sp-space-3);
    color: var(--sp-gray-300);
}

.sp-drafts-empty p {
    font-size: 14px;
    margin-bottom: var(--sp-space-1);
}

.sp-drafts-empty span {
    font-size: 12px;
    color: var(--sp-gray-400);
}

.sp-drafts-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-space-2);
}

/* Draft Card (Notion-style) */
.sp-draft-card {
    background: #fff;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-md);
    transition: all var(--sp-transition);
    overflow: hidden;
}

.sp-draft-card:hover {
    border-color: var(--sp-gray-300);
    box-shadow: var(--sp-shadow-sm);
}

.sp-draft-card.expanded {
    border-color: var(--sp-gold);
}

.sp-draft-card-row {
    display: flex;
    align-items: center;
    gap: var(--sp-space-3);
    padding: var(--sp-space-3);
    cursor: pointer;
}

.sp-draft-card-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--sp-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--sp-gray-100);
}

.sp-draft-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-draft-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-draft-card-caption {
    font-size: 13px;
    color: var(--sp-gray-700);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-draft-card-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-space-2);
    font-size: 11px;
    color: var(--sp-gray-400);
}

.sp-draft-card-badges {
    display: flex;
    gap: var(--sp-space-1);
}

.sp-platform-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    background: var(--sp-gray-100);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    color: var(--sp-gray-500);
}

.sp-draft-card-expand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--sp-gray-400);
    transition: transform 0.2s ease;
}

.sp-draft-card.expanded .sp-draft-card-expand {
    transform: rotate(180deg);
}

/* Expanded details panel */
.sp-draft-card-details {
    border-top: 1px solid var(--sp-gray-200);
    padding: var(--sp-space-3);
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--sp-gray-50);
}

.sp-draft-detail-image {
    border-radius: var(--sp-radius-sm);
    overflow: hidden;
    max-height: 240px;
}

.sp-draft-detail-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 240px;
}

.sp-draft-detail-section {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.sp-draft-detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.sp-draft-detail-text {
    width: 100%;
    margin: 2px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--sp-gray-700);
    white-space: pre-wrap;
    word-break: break-word;
}

.sp-draft-detail-hashtags {
    color: var(--sp-gold-hover);
}

.sp-draft-detail-value {
    font-size: 12px;
    color: var(--sp-gray-600);
}

/* Action buttons inside expanded card */
.sp-draft-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.sp-draft-detail-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    background: #fff;
    color: var(--sp-gray-600);
    cursor: pointer;
    transition: all var(--sp-transition);
}

.sp-draft-detail-btn:hover {
    background: var(--sp-gray-50);
    border-color: var(--sp-gray-300);
    color: var(--sp-gray-700);
}

.sp-draft-detail-btn.publish {
    background: var(--sp-gold-light);
    border-color: var(--sp-gold);
    color: var(--sp-gold-hover);
}

.sp-draft-detail-btn.publish:hover {
    background: var(--sp-gold);
    color: #fff;
}

.sp-draft-detail-btn.delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--sp-red);
}

/* Status Badges */
.sp-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 18px;
    flex-shrink: 0;
}

.sp-status-badge.draft {
    background: var(--sp-gray-100);
    color: var(--sp-gray-500);
}

.sp-status-badge.published {
    background: #dcfce7;
    color: #15803d;
}

.sp-status-badge.scheduled {
    background: #dbeafe;
    color: #1d4ed8;
}

.sp-status-badge.failed {
    background: #fef2f2;
    color: #dc2626;
}

.sp-status-badge.partial {
    background: #fef3c7;
    color: #d97706;
}

.sp-draft-card-date {
    font-size: 11px;
    color: var(--sp-gray-400);
}

/* Editable textareas in PostPreview */
.sp-editable-textarea {
    width: 100%;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.5;
    color: var(--sp-gray-700);
    background: #fff;
    resize: vertical;
    transition: border-color var(--sp-transition);
    box-sizing: border-box;
}

.sp-editable-textarea:focus {
    outline: none;
    border-color: var(--sp-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

.sp-editable-textarea::placeholder {
    color: var(--sp-gray-400);
}

/* No template option */
.template-card-none .template-none-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--sp-gray-50);
    border: 2px dashed var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    color: var(--sp-gray-400);
}

.template-card-none.active .template-none-icon {
    border-color: var(--sp-gold);
    color: var(--sp-gold);
    background: var(--sp-gold-light);
}

/* ═══════════════════════════════════════════════════════════════
   CALENDAR TAB (embedded)
   ═══════════════════════════════════════════════════════════════ */

.sp-calendar-tab {
    padding: var(--sp-space-4);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sp-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-space-3);
}

.sp-calendar-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-md);
    cursor: pointer;
    color: var(--sp-gray-600);
    transition: all var(--sp-transition);
}

.sp-calendar-nav button:hover {
    border-color: var(--sp-gold);
    color: var(--sp-gold-hover);
}

.sp-calendar-month-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--sp-gray-800);
}

.sp-today-btn {
    font-size: 12px;
    padding: 4px 12px;
    background: none;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    color: var(--sp-gray-600);
    cursor: pointer;
    transition: all var(--sp-transition);
}

.sp-today-btn:hover {
    border-color: var(--sp-gold);
    color: var(--sp-gold-hover);
}

.sp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: var(--sp-space-3);
}

.sp-cal-day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-gray-400);
    padding: var(--sp-space-1) 0;
    text-transform: uppercase;
}

.sp-cal-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: var(--sp-radius-md);
    cursor: pointer;
    transition: all var(--sp-transition-fast);
}

.sp-cal-day:hover:not(.empty):not(.past) {
    background: var(--sp-gray-100);
}

.sp-cal-day.empty { cursor: default; }
.sp-cal-day.past { opacity: 0.35; cursor: default; }

.sp-cal-day.today .sp-cal-day-num {
    background: var(--sp-gold);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-cal-day.selected {
    background: var(--sp-gold-light);
    border: 1px solid var(--sp-gold);
}

.sp-cal-day-num {
    font-size: 13px;
    font-weight: 500;
    color: var(--sp-gray-700);
}

.sp-cal-day-dots {
    display: flex;
    gap: 3px;
    margin-top: 2px;
}

.sp-cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

/* Calendar detail section */
.sp-cal-detail {
    border-top: 1px solid var(--sp-gray-200);
    padding-top: var(--sp-space-3);
    animation: spFadeIn 0.2s ease;
}

.sp-cal-detail-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-gray-800);
    margin-bottom: var(--sp-space-2);
}

.sp-cal-posts {
    display: flex;
    flex-direction: column;
    gap: var(--sp-space-2);
    margin-bottom: var(--sp-space-3);
}

.sp-cal-post-item {
    display: flex;
    align-items: center;
    gap: var(--sp-space-2);
    padding: var(--sp-space-2) var(--sp-space-3);
    background: #fff;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    font-size: 12px;
}

.sp-cal-post-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sp-cal-post-time {
    font-weight: 500;
    color: var(--sp-gray-700);
}

.sp-cal-post-platforms {
    flex: 1;
    color: var(--sp-gray-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-cal-post-status-label {
    font-size: 11px;
    font-weight: 500;
}

.sp-cal-post-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--sp-gray-400);
    transition: all var(--sp-transition);
}

.sp-cal-post-delete:hover {
    background: #fef2f2;
    color: var(--sp-red);
}

/* Schedule banner (when coming from Create tab) */
.sp-schedule-banner {
    display: flex;
    align-items: center;
    gap: var(--sp-space-2);
    padding: var(--sp-space-3);
    background: var(--sp-gold-light);
    border: 1px solid var(--sp-gold);
    border-radius: var(--sp-radius-md);
    margin-bottom: var(--sp-space-3);
    font-size: 13px;
    color: var(--sp-gold-hover);
}

.sp-schedule-banner svg {
    flex-shrink: 0;
}

/* Time picker in calendar */
.sp-time-picker {
    display: flex;
    align-items: center;
    gap: var(--sp-space-2);
    margin-top: var(--sp-space-2);
}

.sp-time-picker select {
    padding: 6px 8px;
    border: 1px solid var(--sp-gray-300);
    border-radius: var(--sp-radius-sm);
    font-size: 13px;
    color: var(--sp-gray-700);
    background: #fff;
    cursor: pointer;
}

.sp-time-picker span {
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-gray-700);
}

.sp-schedule-confirm-btn {
    display: flex;
    align-items: center;
    gap: var(--sp-space-2);
    padding: var(--sp-space-2) var(--sp-space-4);
    background: var(--sp-gold);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--sp-transition);
    white-space: nowrap;
}

.sp-schedule-confirm-btn:hover:not(:disabled) {
    background: var(--sp-gold-hover);
}

.sp-schedule-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Post Preview actions row ─── */
.sp-post-actions {
    display: flex;
    gap: var(--sp-space-2);
    flex-wrap: wrap;
    margin-top: var(--sp-space-3);
}

.sp-post-actions button {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-space-1);
    padding: var(--sp-space-2) var(--sp-space-3);
    border-radius: var(--sp-radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--sp-transition);
    white-space: nowrap;
}

.sp-post-actions button:active {
    transform: scale(0.98);
}

.sp-btn-publish {
    background: var(--sp-gold);
    color: #fff;
    border: none;
}

.sp-btn-publish:hover { background: var(--sp-gold-hover); }

.sp-btn-schedule {
    background: #fff;
    color: var(--sp-gray-700);
    border: 1px solid var(--sp-gray-200);
}

.sp-btn-schedule:hover { border-color: var(--sp-gold); color: var(--sp-gold-hover); }

.sp-btn-draft {
    background: #fff;
    color: var(--sp-gray-700);
    border: 1px solid var(--sp-gray-200);
}

.sp-btn-draft:hover { border-color: var(--sp-blue); color: var(--sp-blue); }

.sp-btn-download {
    background: #fff;
    color: var(--sp-gray-700);
    border: 1px solid var(--sp-gray-200);
}

.sp-btn-download:hover { border-color: var(--sp-gray-400); }

/* ═══════════════════════════════════════════════════════
   CRM STYLES
   ═══════════════════════════════════════════════════════ */

/* ─── CRM Layout ─── */
.crm-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: var(--sp-gray-50);
}

.crm-main {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 0;
}

/* ─── Mobile Header ─── */
.crm-mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #1a1f2e;
    z-index: 1001;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}
.crm-mobile-hamburger {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.crm-mobile-hamburger:hover { color: #fff; background: rgba(255,255,255,0.1); }
.crm-mobile-hamburger svg { width: 22px; height: 22px; }
.crm-mobile-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--sp-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.crm-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1001;
    backdrop-filter: blur(2px);
}

/* ─── CRM Sidebar ─── */
.crm-sidebar {
    width: 240px;
    min-width: 240px;
    height: 100vh;
    background: #1a1f2e;
    color: #fff;
    display: flex;
    flex-direction: column;
    transition: width 0.2s, min-width 0.2s;
    z-index: 100;
}

.crm-sidebar.collapsed {
    width: 60px;
    min-width: 60px;
}

.crm-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.crm-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--sp-gold);
}

.logo-badge {
    font-size: 10px;
    font-weight: 600;
    background: var(--sp-gold);
    color: #1a1f2e;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.crm-sidebar-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.crm-sidebar-toggle:hover { color: #fff; background: rgba(255,255,255,0.1); }
.crm-sidebar-toggle svg { width: 18px; height: 18px; }

/* ─── Nav Items ─── */
.crm-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.crm-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--sp-radius-sm);
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.crm-nav-item svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    stroke-width: 1.8;
}

.crm-nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.crm-nav-item.active {
    color: var(--sp-gold);
    background: rgba(212, 175, 55, 0.12);
}

.crm-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 8px 12px;
}

/* Sidebar collapsed state */
.crm-sidebar.collapsed .crm-nav-item span { display: none; }
.crm-sidebar.collapsed .crm-nav-item { justify-content: center; padding: 10px; }
.crm-sidebar.collapsed .logo-text { display: none; }
.crm-sidebar.collapsed .crm-sidebar-header { justify-content: center; }

/* ─── Sidebar Footer ─── */
.crm-sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.crm-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crm-user-avatar, .crm-user-avatar-only {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sp-gold);
    color: #1a1f2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    min-width: 32px;
}

.crm-user-details {
    flex: 1;
    min-width: 0;
}

.crm-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crm-user-credits {
    font-size: 11px;
    color: var(--sp-gold);
}

.crm-logout-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}
.crm-logout-btn:hover { color: #ef4444; }
.crm-logout-btn svg { width: 16px; height: 16px; }

/* ─── App container in embedded mode (inside CRM layout) ─── */
.app-container.embedded {
    width: 100%;
    height: 100%;
}

.app-container.embedded .sidebar { display: none; }

.app-container.embedded .chat-container {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    margin: 0;
}

/* ─── CRM Page Shell ─── */
.crm-page {
    padding: 24px 32px;
    width: 100%;
}

.crm-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.crm-page-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--sp-navy);
    margin: 0;
}

.crm-page-actions {
    display: flex;
    gap: 8px;
}

.crm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.crm-breadcrumb a {
    color: var(--sp-gold);
    cursor: pointer;
    text-decoration: none;
}

.crm-breadcrumb span {
    color: var(--sp-gray-500);
}
.crm-breadcrumb-link {
    color: var(--sp-gold, var(--lk-gold-primary, #c8a951)) !important;
    cursor: pointer;
    transition: opacity 0.15s;
}
.crm-breadcrumb-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ─── Buttons ─── */
.btn-primary {
    background: var(--sp-gold);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--sp-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}
.btn-primary:hover { background: var(--sp-gold-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary svg { width: 16px; height: 16px; }

.btn-primary-sm {
    background: var(--sp-gold);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: var(--sp-radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary-sm:hover { background: var(--sp-gold-hover); }

.btn-secondary {
    background: #fff;
    color: var(--sp-gray-700);
    border: 1px solid var(--sp-gray-200);
    padding: 8px 16px;
    border-radius: var(--sp-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.btn-secondary:hover { border-color: var(--sp-gray-400); }

.btn-text {
    background: none;
    border: none;
    color: var(--sp-gray-500);
    font-size: 13px;
    cursor: pointer;
    padding: 8px 12px;
}
.btn-text:hover { color: var(--sp-gray-700); }

.btn-icon {
    background: #fff;
    border: 1px solid var(--sp-gray-200);
    color: var(--sp-gray-500);
    padding: 7px;
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
}
.btn-icon:hover { border-color: var(--sp-gray-400); color: var(--sp-gray-700); }
.btn-icon.active { border-color: var(--sp-gold); color: var(--sp-gold); }
.btn-icon svg { width: 18px; height: 18px; }

.btn-icon-sm {
    background: none;
    border: none;
    color: var(--sp-gray-400);
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
}
.btn-icon-sm:hover { color: var(--sp-gray-700); background: var(--sp-gray-100); }
.btn-icon-sm.danger:hover { color: #ef4444; background: #fef2f2; }
.btn-icon-sm svg { width: 16px; height: 16px; }

.btn-ai {
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.btn-ai:hover { opacity: 0.9; }

/* ─── Tabs ─── */
.crm-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--sp-gray-100);
    margin-bottom: 16px;
    overflow-x: auto;
}

.crm-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sp-gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all 0.15s;
}

.crm-tab:hover { color: var(--sp-gray-700); }
.crm-tab.active { color: var(--sp-gold); border-bottom-color: var(--sp-gold); }

/* ─── Toolbar ─── */
.crm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

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

.crm-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    padding: 0 12px;
    flex: 1;
    max-width: 400px;
}

.crm-search svg { width: 18px; height: 18px; color: var(--sp-gray-400); min-width: 18px; }
.crm-search input {
    border: none;
    background: none;
    padding: 8px 0;
    font-size: 13px;
    width: 100%;
    outline: none;
    color: var(--sp-gray-700);
}

.view-toggle {
    display: flex;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    overflow: hidden;
}

.view-toggle button {
    background: #fff;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--sp-gray-400);
    display: flex;
    align-items: center;
}
.view-toggle button + button { border-left: 1px solid var(--sp-gray-200); }
.view-toggle button.active { background: var(--sp-gold-light); color: var(--sp-gold); }
.view-toggle button svg { width: 18px; height: 18px; }

/* ─── Filters ─── */
.crm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--sp-gray-100);
    border-radius: var(--sp-radius-md);
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select, .filter-group input {
    padding: 6px 10px;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    font-size: 13px;
    min-width: 140px;
    color: var(--sp-gray-700);
}

/* ─── Table ─── */
.crm-table-wrapper {
    background: #fff;
    border: 1px solid var(--sp-gray-100);
    border-radius: var(--sp-radius-md);
    overflow-x: auto;
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.crm-table thead th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--sp-gray-100);
    white-space: nowrap;
    background: var(--sp-gray-50);
}

.crm-table tbody tr {
    border-bottom: 1px solid var(--sp-gray-50);
    transition: background 0.1s;
}

.crm-table tbody tr:hover { background: var(--sp-gray-50); }
.crm-table tbody tr.clickable { cursor: pointer; }

.crm-table td {
    padding: 10px 12px;
    color: var(--sp-gray-700);
    vertical-align: middle;
}

.col-photo { width: 50px; }
.col-photo img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }
.col-actions { width: 100px; text-align: right; white-space: nowrap; }
.col-actions .btn-icon-sm { display: inline-flex; }

.cell-multi { display: flex; flex-direction: column; }
.cell-main { font-weight: 500; }
.cell-sub { font-size: 11px; color: var(--sp-gray-400); }
.cell-price { font-weight: 600; color: var(--sp-navy); white-space: nowrap; }
.cell-date { font-size: 12px; color: var(--sp-gray-400); white-space: nowrap; }

.no-photo-sm {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sp-gray-100);
    border-radius: 6px;
    font-size: 18px;
}

/* ─── Status Badges ─── */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-draft { background: var(--sp-gray-100); color: var(--sp-gray-600); }
.status-active { background: #dcfce7; color: #166534; }
.status-reserved { background: #fef3c7; color: #92400e; }
.status-sold { background: #dbeafe; color: #1e40af; }
.status-rented { background: #ede9fe; color: #5b21b6; }
.status-archived { background: var(--sp-gray-100); color: var(--sp-gray-500); }

.lead-new { background: #dbeafe; color: #1d4ed8; }
.lead-active { background: #ede9fe; color: #7c3aed; }
.lead-contacted { background: #fef3c7; color: #d97706; }
.lead-viewing { background: #cffafe; color: #0891b2; }
.lead-negotiation { background: #ffedd5; color: #ea580c; }
.lead-won { background: #dcfce7; color: #16a34a; }
.lead-lost { background: #fecaca; color: #dc2626; }

.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.type-owner { background: #dbeafe; color: #1d4ed8; }
.type-buyer { background: #dcfce7; color: #16a34a; }
.type-renter { background: #ede9fe; color: #7c3aed; }
.type-agent { background: #fef3c7; color: #d97706; }
.type-developer { background: #ffedd5; color: #ea580c; }

/* ─── Pagination ─── */
.crm-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    font-size: 13px;
    color: var(--sp-gray-500);
}

.crm-pagination button {
    background: #fff;
    border: 1px solid var(--sp-gray-200);
    padding: 6px 12px;
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--sp-gray-700);
}
.crm-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.crm-pagination button:hover:not(:disabled) { border-color: var(--sp-gold); color: var(--sp-gold); }

/* ─── Properties Page Redesign (Studio-inspired) ─── */

.prop-page {
    --lk-bg-card: #ffffff;
    --lk-bg-elevated: #f7f8fc;
    --lk-border-light: #e8ebf0;
    --lk-border-medium: #dde1e8;
    --lk-gold-primary: #d4af37;
    --lk-gold-dark: #b8960c;
    --lk-gold-soft: rgba(212, 175, 55, 0.12);
    --lk-gold-glow: rgba(212, 175, 55, 0.3);
    --lk-gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    --lk-navy-gradient: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    --lk-text-primary: #1A365D;
    --lk-text-secondary: #4a5068;
    --lk-text-muted: #8b92a5;
    --lk-shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
    --lk-shadow-md: 0 4px 12px rgba(26, 26, 46, 0.06);
    --lk-shadow-lg: 0 8px 24px rgba(26, 26, 46, 0.08);
    --lk-shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --lk-radius-sm: 8px;
    --lk-radius-md: 12px;
    --lk-radius-lg: 16px;
    --lk-radius-xl: 24px;
}

/* Header with count badge */
.prop-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.crm-count-badge {
    background: var(--lk-navy-gradient);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(26, 54, 93, 0.2);
}
.prop-add-btn {
    padding: 10px 20px !important;
    border-radius: var(--lk-radius-md) !important;
    background: var(--lk-gold-gradient) !important;
    color: #1a1a2e !important;
    font-weight: 700 !important;
    box-shadow: var(--lk-shadow-gold);
    transition: all 0.2s !important;
}
.prop-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--lk-gold-glow) !important;
}

/* Quick Stats Pills */
.prop-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.prop-stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--lk-radius-md);
    border: 2px solid var(--lk-border-light);
    background: var(--lk-bg-card);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    box-shadow: var(--lk-shadow-sm);
}
.prop-stat-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--lk-shadow-md);
    border-color: var(--lk-border-medium);
}
.prop-stat-pill.active { border-width: 2px; transform: translateY(-2px); box-shadow: var(--lk-shadow-md); }
.pill-count { font-weight: 700; font-size: 16px; }
.pill-label { font-weight: 500; color: var(--lk-text-muted); font-size: 12px; }

.pill-green .pill-count { color: #16a34a; }
.pill-green.active { border-color: #16a34a; background: #f0fdf4; }
.pill-gray .pill-count { color: var(--lk-text-muted); }
.pill-gray.active { border-color: var(--lk-border-medium); background: var(--lk-bg-elevated); }
.pill-amber .pill-count { color: #d97706; }
.pill-amber.active { border-color: #d97706; background: #fffbeb; }
.pill-blue .pill-count { color: #2563eb; }
.pill-blue.active { border-color: #2563eb; background: #eff6ff; }
.pill-purple .pill-count { color: #7c3aed; }
.pill-purple.active { border-color: #7c3aed; background: #f5f3ff; }

/* Type Tabs - Studio card style */
.prop-type-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: var(--lk-bg-card);
    border-radius: var(--lk-radius-lg);
    border: 1px solid var(--lk-border-light);
    box-shadow: var(--lk-shadow-sm);
    overflow: hidden;
}
.prop-type-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--lk-text-muted);
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}
.prop-type-tab svg { width: 18px; height: 18px; transition: color 0.2s; }
.prop-type-tab:hover { color: var(--lk-text-primary); background: var(--lk-bg-elevated); }
.prop-type-tab.active {
    color: var(--lk-text-primary);
    border-bottom-color: var(--lk-gold-primary);
    font-weight: 600;
    background: var(--lk-gold-soft);
}
.prop-type-tab.active svg { color: var(--lk-gold-primary); }

/* Toolbar - Studio inspired */
.prop-toolbar {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-lg);
    padding: 10px 16px;
    box-shadow: var(--lk-shadow-sm);
    margin-bottom: 16px;
}
.prop-search {
    border: 1px solid var(--lk-border-light) !important;
    border-radius: var(--lk-radius-md) !important;
    background: var(--lk-bg-elevated) !important;
    padding: 0 14px !important;
    transition: all 0.2s;
}
.prop-search:focus-within {
    border-color: var(--lk-gold-primary) !important;
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
    background: var(--lk-bg-card) !important;
}
.prop-search input { padding: 10px 0 !important; font-size: 14px !important; }

/* Search clear button */
.search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    color: var(--lk-text-muted);
    border-radius: 50%;
    transition: all 0.15s;
}
.search-clear:hover { color: var(--lk-text-primary); background: var(--lk-bg-elevated); }
.search-clear svg { width: 16px; height: 16px; }

/* Filter button - styled */
.prop-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--lk-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.prop-filter-btn svg { width: 16px; height: 16px; }
.prop-filter-btn:hover { border-color: var(--lk-gold-primary); color: var(--lk-text-primary); }
.prop-filter-btn.active {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
}
.prop-filter-btn.has-filters { border-color: var(--lk-gold-primary); }
.filter-badge {
    background: var(--lk-gold-gradient);
    color: #1a1a2e;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    position: static;
}

/* View toggle - refined */
.prop-view-toggle {
    border-radius: var(--lk-radius-md) !important;
    border-color: var(--lk-border-light) !important;
}
.prop-view-toggle button { padding: 8px 12px !important; }
.prop-view-toggle button.active { background: var(--lk-gold-soft) !important; color: var(--lk-gold-dark) !important; }

/* ─── Advanced Filters Panel (Studio card) ─── */
.prop-adv-filters {
    padding: 20px 24px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-xl);
    margin-bottom: 16px;
    box-shadow: var(--lk-shadow-md);
    transition: all 0.2s;
}
.prop-adv-filters:hover {
    box-shadow: var(--lk-shadow-lg);
}
.adv-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--lk-border-light);
}
.adv-filters-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--lk-text-primary);
    margin: 0;
}
.adv-filters-header h3 svg { width: 16px; height: 16px; color: var(--lk-gold-primary); }
.adv-filter-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-gold-dark);
    background: var(--lk-gold-soft);
    padding: 3px 10px;
    border-radius: 20px;
}

.adv-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

/* Styled filter groups */
.prop-adv-filters .filter-group,
.prop-adv-filters .filter-range-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.prop-adv-filters label {
    font-size: 11px;
    font-weight: 600;
    color: var(--lk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Styled selects & inputs inside filters */
.prop-adv-filters select,
.prop-adv-filters input[type="text"],
.prop-adv-filters input[type="number"],
.prop-adv-filters input[type="date"] {
    padding: 10px 12px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    font-size: 13px;
    color: var(--lk-text-primary);
    background: var(--lk-bg-elevated);
    width: 100%;
    min-width: unset;
    transition: all 0.2s;
    outline: none;
    font-family: 'Montserrat', sans-serif;
}
.prop-adv-filters select {
    appearance: none;
    -webkit-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='%238b92a5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}
.prop-adv-filters select:hover,
.prop-adv-filters input:hover {
    border-color: var(--lk-border-medium);
    background: var(--lk-bg-card);
}
.prop-adv-filters select:focus,
.prop-adv-filters input:focus {
    border-color: var(--lk-gold-primary);
    background: var(--lk-bg-card);
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
}

/* Range inputs with dash */
.filter-range-group { display: flex; flex-direction: column; gap: 6px; }
.filter-range {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--lk-bg-elevated);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    overflow: hidden;
    transition: all 0.2s;
}
.filter-range:hover { border-color: var(--lk-border-medium); background: var(--lk-bg-card); }
.filter-range:focus-within {
    border-color: var(--lk-gold-primary);
    background: var(--lk-bg-card);
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
}
.filter-range input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 10px 10px !important;
    flex: 1;
    min-width: 0;
    text-align: center;
    border-radius: 0 !important;
}
.range-dash {
    color: var(--lk-text-muted);
    font-weight: 600;
    font-size: 16px;
    padding: 0 4px;
    flex-shrink: 0;
    user-select: none;
}

/* Filter actions */
.adv-filters-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid var(--lk-border-light);
    padding-top: 14px;
    align-items: center;
}
.prop-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--lk-gold-gradient);
    color: #1a1a2e;
    border: none;
    border-radius: var(--lk-radius-md);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: var(--lk-shadow-gold);
    transition: all 0.2s;
}
.prop-apply-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px var(--lk-gold-glow); }
.prop-apply-btn svg { width: 16px; height: 16px; }

/* Bulk Actions Bar */
.prop-bulk-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--lk-navy-gradient);
    color: #fff;
    border-radius: var(--lk-radius-lg);
    margin-bottom: 12px;
    font-size: 13px;
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.2);
}
.bulk-count { font-weight: 700; white-space: nowrap; }
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.bulk-actions select {
    padding: 7px 12px;
    border-radius: var(--lk-radius-sm);
    border: 1px solid rgba(255,255,255,0.25);
    background-color: rgba(255,255,255,0.1);
    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='%23ffffff' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    padding-right: 30px !important;
}
.bulk-actions select option { background: #1a1a2e; color: #fff; }
.prop-bulk-bar .btn-icon-sm { color: rgba(255,255,255,0.7); }
.prop-bulk-bar .btn-icon-sm.danger:hover { color: #fca5a5; background: rgba(239,68,68,0.2); }
.prop-bulk-bar .btn-text { color: rgba(255,255,255,0.7); }
.prop-bulk-bar .btn-text:hover { color: #fff; }

/* Table checkbox column */
.col-check { width: 36px; text-align: center; }
.col-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--lk-gold-primary);
    cursor: pointer;
}

/* Table wrapper with float effect */
.prop-table-wrapper {
    border-radius: var(--lk-radius-lg) !important;
    border: 1px solid var(--lk-border-light) !important;
    box-shadow: var(--lk-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow-x: auto;
}
.prop-table-wrapper:hover {
    box-shadow: var(--lk-shadow-lg);
}

/* Photo + Status overlay */
.prop-photo-cell {
    position: relative;
    width: 70px;
    height: 70px;
}
.prop-photo-cell img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--lk-radius-sm);
}
.prop-photo-cell .no-photo-sm {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lk-bg-elevated);
    border-radius: var(--lk-radius-sm);
    border: 1px solid var(--lk-border-light);
}
.prop-photo-cell .no-photo-sm svg { width: 22px; height: 22px; color: var(--lk-text-muted); }
.photo-status-badge {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.col-photo { width: 82px; padding-left: 8px; padding-right: 4px; }

/* Property ID badge */
.cell-id {
    font-size: 10px;
    color: var(--lk-text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Floor cell */
.cell-floor { white-space: nowrap; font-weight: 500; }

/* Portal chips in table */
.prop-portals-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.portal-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    text-transform: capitalize;
    white-space: nowrap;
}
.portal-icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    text-decoration: none;
}
.portal-icon-chip:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
/* Date column nowrap */
.prop-table .cell-sub { white-space: nowrap; }
/* Actions column in prop-table — sticky so buttons never scroll off screen */
.prop-table td.col-actions {
    white-space: nowrap;
    text-align: right;
    padding-right: 12px;
    position: sticky;
    right: 0;
    background: #fff;
    box-shadow: -4px 0 8px rgba(0,0,0,0.04);
}
.prop-table tr.selected td.col-actions,
.prop-table tr:hover td.col-actions {
    background: var(--lk-bg-elevated, #f8f9fb);
}
.prop-table th.col-actions {
    text-align: right;
    padding-right: 12px;
    position: sticky;
    right: 0;
    background: var(--lk-bg-elevated, #f8f9fb);
    box-shadow: -4px 0 8px rgba(0,0,0,0.04);
}

/* Prop table min-width so columns don't collapse on zoom/small screens */
.prop-table { min-width: 900px; }

/* Sortable table headers */
.prop-table thead th {
    background: var(--lk-bg-elevated) !important;
    border-bottom: 1px solid var(--lk-border-light) !important;
}
.prop-table thead th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
}
.prop-table thead th.sortable:hover {
    background: #eef0f5 !important;
    color: var(--lk-gold-primary);
}
.prop-table thead th.sorted {
    color: var(--lk-gold-dark) !important;
}
.th-content {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.sort-arrow {
    font-size: 11px;
    color: var(--lk-text-muted);
    transition: color 0.15s;
    display: inline-block;
    width: 14px;
    text-align: center;
}
.sort-arrow.active {
    color: var(--lk-gold-primary);
    font-weight: 700;
}

/* Table row hover with gold left border + selected */
.prop-table tbody tr {
    border-left: 3px solid transparent;
    transition: all 0.15s;
}
.prop-table tbody tr:hover {
    background: #fafbfd;
    border-left-color: var(--lk-gold-primary);
}
.prop-table tbody tr.selected {
    background: var(--lk-gold-soft);
    border-left-color: var(--lk-gold-primary);
}

/* Enhanced Pagination */
.crm-pagination-enhanced {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    font-size: 13px;
    color: var(--lk-text-muted);
    gap: 12px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-lg);
    margin-top: 12px;
    box-shadow: var(--lk-shadow-sm);
}
.pagination-info { white-space: nowrap; font-weight: 600; color: var(--lk-text-secondary); }
.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}
.pagination-pages button {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    padding: 6px 12px;
    border-radius: var(--lk-radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--lk-text-secondary);
    min-width: 34px;
    text-align: center;
    transition: all 0.15s;
    font-weight: 500;
}
.pagination-pages button:hover:not(:disabled):not(.active) {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-primary);
    transform: translateY(-1px);
}
.pagination-pages button.active {
    background: var(--lk-gold-gradient);
    color: #1a1a2e;
    border-color: transparent;
    font-weight: 700;
    box-shadow: var(--lk-shadow-gold);
}
.pagination-pages button:disabled { opacity: 0.35; cursor: not-allowed; }
.page-dots { padding: 0 4px; color: var(--lk-text-muted); }

.pagination-perpage {
    display: flex;
    gap: 4px;
    align-items: center;
    background: var(--lk-bg-elevated);
    border-radius: var(--lk-radius-sm);
    padding: 3px;
}
.pagination-perpage button {
    background: none;
    border: 1px solid transparent;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--lk-text-muted);
    font-weight: 500;
    transition: all 0.15s;
}
.pagination-perpage button:hover { color: var(--lk-text-primary); }
.pagination-perpage button.active {
    background: var(--lk-bg-card);
    color: var(--lk-text-primary);
    font-weight: 600;
    box-shadow: var(--lk-shadow-sm);
    border-color: var(--lk-border-light);
}

/* Responsive Properties */
@media (max-width: 1024px) {
    .adv-filters-grid { grid-template-columns: repeat(2, 1fr); }
    .prop-type-tabs { flex-wrap: wrap; }
    .prop-type-tab { padding: 8px 10px; font-size: 12px; gap: 4px; }
    .prop-table .col-check,
    .prop-table th:nth-child(7),  /* Floor */
    .prop-table td:nth-child(7),
    .prop-table th:nth-child(10), /* Owner */
    .prop-table td:nth-child(10),
    .prop-table th:nth-child(11), /* Publicat */
    .prop-table td:nth-child(11) { display: none; }
    .crm-pagination-enhanced { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 768px) {
    .prop-stats-row { gap: 6px; }
    .prop-stat-pill { padding: 7px 12px; font-size: 12px; }
    .adv-filters-grid { grid-template-columns: 1fr 1fr; }
    .prop-type-tabs { border-radius: var(--lk-radius-md); }
    .prop-type-tab { font-size: 11px; padding: 8px 8px; gap: 3px; }
    .prop-type-tab svg { display: none; }
    .prop-table th:nth-child(5),  /* Rooms */
    .prop-table td:nth-child(5),
    .prop-table th:nth-child(6),  /* Surface */
    .prop-table td:nth-child(6) { display: none; }
    /* Date (9) stays visible */
    .crm-toolbar.prop-toolbar { flex-wrap: wrap; padding: 8px 12px; }
    .prop-search { max-width: 100% !important; }
    .prop-bulk-bar { flex-wrap: wrap; gap: 8px; }
    .prop-table { min-width: 700px; }
}

@media (max-width: 640px) {
    .adv-filters-grid { grid-template-columns: 1fr; }
    .prop-type-tab span { font-size: 11px; }
}

/* ─── Empty + Loading States ─── */
.crm-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--sp-gray-400);
    font-size: 14px;
}

/* ─── Splash Screen (initial app load) ─── */
.lk-splash {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdfcf9;
    z-index: 99999;
    animation: lkSplashFadeIn 0.4s ease;
}
.lk-splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.lk-splash-logo {
    display: flex;
    gap: 2px;
}
.lk-splash-letter {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 42px;
    color: var(--sp-navy);
    letter-spacing: 5px;
    opacity: 0;
    transform: translateY(12px);
    animation: lkLetterIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.lk-splash-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--sp-gold), var(--sp-gold-hover));
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 14px;
    border-radius: 20px;
    opacity: 0;
    animation: lkBadgeIn 0.5s ease 0.6s forwards;
}
.lk-splash-bar {
    width: 180px;
    height: 3px;
    background: var(--sp-gray-200);
    border-radius: 3px;
    overflow: hidden;
    opacity: 0;
    animation: lkBadgeIn 0.4s ease 0.8s forwards;
}
.lk-splash-bar-fill {
    height: 100%;
    width: 40%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--sp-gold), var(--sp-gold-hover), var(--sp-gold));
    animation: lkBarSlide 1.2s ease-in-out infinite;
}

@keyframes lkSplashFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes lkLetterIn {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes lkBadgeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes lkBarSlide {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(200%); }
    100% { transform: translateX(-100%); }
}

/* ─── Page Loader (lazy chunk loading between pages) ─── */
.lk-page-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    animation: lkPageLoaderIn 0.3s ease;
}
.lk-page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}
.lk-page-loader-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 4px;
    color: var(--sp-navy);
    opacity: 0.15;
    animation: lkLoaderPulse 1.6s ease-in-out infinite;
}
.lk-page-loader-bar {
    width: 120px;
    height: 2px;
    background: var(--sp-gray-200);
    border-radius: 2px;
    overflow: hidden;
}
.lk-page-loader-bar-fill {
    height: 100%;
    width: 35%;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--sp-gold), transparent);
    animation: lkBarSlide 1.2s ease-in-out infinite;
}

@keyframes lkPageLoaderIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes lkLoaderPulse {
    0%, 100% { opacity: 0.12; }
    50% { opacity: 0.35; }
}

.crm-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--sp-gray-400);
}

.crm-empty svg { width: 48px; height: 48px; margin-bottom: 16px; color: var(--sp-gray-300); }
.crm-empty h3 { color: var(--sp-gray-600); margin: 0 0 8px; font-size: 16px; }
.crm-empty p { margin: 0 0 20px; font-size: 14px; }
.crm-empty-sm { text-align: center; padding: 40px 20px; color: var(--sp-gray-400); font-size: 13px; }

/* ─── Kanban ─── */
.crm-kanban {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 400px;
}

.kanban-column {
    flex: 0 0 220px;
    background: var(--sp-gray-50);
    border-radius: var(--sp-radius-md);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 12px;
    border-top: 3px solid var(--sp-gray-300);
    border-radius: var(--sp-radius-md) var(--sp-radius-md) 0 0;
}

.kanban-count {
    background: var(--sp-gray-200);
    color: var(--sp-gray-600);
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
}

.kanban-cards {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kanban-card {
    background: #fff;
    border: 1px solid var(--sp-gray-100);
    border-radius: var(--sp-radius-sm);
    padding: 10px;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.kanban-card:hover { box-shadow: var(--sp-shadow-sm); }

.kanban-card-photo {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.kanban-card-title {
    font-weight: 600;
    font-size: 12px;
    color: var(--sp-navy);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kanban-card-meta {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: var(--sp-gray-500);
}

.kanban-card-location {
    font-size: 11px;
    color: var(--sp-gray-400);
    margin-top: 4px;
}

/* ─── Property Preview Bottom Sheet ─── */
.prop-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 999;
    backdrop-filter: blur(2px);
    opacity: 1;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.prop-sheet-backdrop.closing { opacity: 0; pointer-events: none; }

.prop-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 90vh;
    background: #fff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
    will-change: transform;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.prop-sheet.snap-full { transform: translateY(10vh); }
.prop-sheet.snap-half { transform: translateY(50vh); }
.prop-sheet.snap-closed { transform: translateY(100vh); }
.prop-sheet.dragging { transition: none; }

/* Handle bar */
.prop-sheet-handle {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px 8px;
    cursor: grab;
    touch-action: none;
    user-select: none;
    background: #fdfcf9;
    border-radius: 16px 16px 0 0;
    border-bottom: 1px solid var(--sp-gray-100);
}
.prop-sheet-handle:active { cursor: grabbing; }
.prop-sheet-handle-bar {
    width: 36px;
    height: 4px;
    background: var(--sp-gray-300);
    border-radius: 2px;
    margin-bottom: 8px;
}
.prop-sheet-handle-info {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.prop-sheet-handle-btns {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.prop-sheet-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--sp-gray-100);
    color: var(--sp-gray-600);
    cursor: pointer;
    transition: all 0.15s;
}
.prop-sheet-close-btn:hover { background: #fef2f2; color: var(--sp-red); }
.prop-sheet-close-btn svg { width: 16px; height: 16px; }

/* Desktop: always full, no backdrop, rounded panel, no drag */
@media (min-width: 769px) {
    .prop-sheet-backdrop { display: none; }
    .prop-sheet {
        width: 50%;
        max-width: none;
        left: auto;
        right: 12px;
        top: 12px;
        height: calc(100vh - 24px);
        border-radius: 16px;
        box-shadow: -4px 0 30px rgba(0,0,0,0.12);
    }
    .prop-sheet.snap-full,
    .prop-sheet.snap-half { transform: translateY(0) !important; }
    .prop-sheet.snap-closed { transform: translateX(110%); }
    .prop-sheet-handle {
        cursor: default;
        touch-action: auto;
        padding: 10px 20px;
        border-radius: 16px 16px 0 0;
    }
    .prop-sheet-handle:active { cursor: default; }
    .prop-sheet-handle-bar { display: none; }
    .prop-sheet-handle-btns { display: flex; }
}

/* 2-column body layout */
.prop-sheet-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.prop-sheet-col-left {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.prop-sheet-col-right {
    display: none; /* hidden on mobile */
}
@media (min-width: 769px) {
    .prop-sheet-body {
        flex-direction: row;
    }
    .prop-sheet-col-left {
        flex: 1;
        min-width: 0;
        border-right: 1px solid var(--sp-gray-100);
    }
    .prop-sheet-col-right {
        display: block;
        width: 260px;
        flex-shrink: 0;
        overflow-y: auto;
        padding: 16px;
        background: var(--sp-gray-50);
    }
}

/* Gallery photo — aspect ratio, not stretched */
.prop-preview-main-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 300px;
    overflow: hidden;
    background: var(--sp-gray-100);
}
.prop-preview-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--sp-gray-100);
}
.prop-preview-main-photo img.main-photo-img {
    cursor: pointer;
    transition: filter 0.2s;
}
.prop-preview-main-photo img.main-photo-img:hover {
    filter: brightness(0.92);
}

/* Share section */
.prop-preview-share-section {
    padding: 12px 20px;
    border-bottom: 1px solid var(--sp-gray-100);
}
.prop-preview-share-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--sp-gray-200);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}
.share-btn svg { width: 18px; height: 18px; }
.share-whatsapp { color: #25d366; border-color: #25d366; }
.share-whatsapp:hover { background: #25d366; color: #fff; }
.share-facebook { color: #1877f2; border-color: #1877f2; }
.share-facebook:hover { background: #1877f2; color: #fff; }
.share-linkedin { color: #0a66c2; border-color: #0a66c2; }
.share-linkedin:hover { background: #0a66c2; color: #fff; }
.share-copy { color: var(--sp-gray-500); border-color: var(--sp-gray-300); }
.share-copy:hover { background: var(--sp-gray-100); color: var(--sp-gray-700); }

/* Portal badges inline */
.prop-preview-portals-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.portals-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.portal-badge-link { text-decoration: none; }
.portal-badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--sp-blue);
    color: #fff;
    transition: opacity 0.15s;
}
.portal-badge-link:hover .portal-badge { opacity: 0.85; }

/* Collapsible sections */
.prop-preview-section-header.collapsible {
    cursor: pointer;
    user-select: none;
    padding: 4px 0;
    border-radius: 6px;
    transition: background 0.15s;
}
.prop-preview-section-header.collapsible:hover { background: var(--sp-gray-50); }
.collapse-chevron {
    width: 16px;
    height: 16px;
    margin-left: auto;
    color: var(--sp-gray-400);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.collapse-chevron.collapsed { transform: rotate(-90deg); }

/* Utility sub-groups */
.prop-preview-utils-content { display: flex; flex-direction: column; gap: 10px; }
.prop-preview-util-group { display: flex; flex-direction: column; gap: 6px; }
.util-group-label { font-size: 11px; font-weight: 600; color: var(--sp-gray-400); text-transform: uppercase; letter-spacing: 0.5px; }

/* Sections inside left column */
.prop-sheet-col-left > .prop-preview-section {
    margin: 0;
    padding: 12px 20px;
    border-bottom: 1px solid var(--sp-gray-100);
}

/* Quick Edit Fields (right column) */
.qf-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--sp-gold-hover);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--sp-gray-200);
}
.qf-group {
    margin-bottom: 10px;
}
.qf-label {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--sp-gray-500);
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.qf-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.qf-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--sp-gray-200);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    color: var(--sp-navy);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.qf-input:focus {
    border-color: var(--sp-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}
.qf-input[type="number"] { -moz-appearance: textfield; }
.qf-input[type="number"]::-webkit-outer-spin-button,
.qf-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select.qf-input { cursor: pointer; appearance: auto; }
.qf-suffix {
    font-size: 11px;
    font-weight: 600;
    color: var(--sp-gray-400);
    white-space: nowrap;
    flex-shrink: 0;
}
.qf-row {
    display: flex;
    gap: 8px;
}
.qf-row > .qf-group { flex: 1; min-width: 0; }

/* Sticky Actions Bar */
.prop-preview-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    border-top: 1px solid var(--sp-gray-200);
    flex-shrink: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}
@media (min-width: 769px) {
    .prop-preview-actions-bar { border-radius: 0 0 16px 16px; }
}
.preview-action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 6px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.preview-action-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.action-edit {
    background: linear-gradient(135deg, var(--sp-gold) 0%, var(--sp-gold-hover) 100%);
    color: #fff;
}
.action-edit:hover { box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3); }
.action-clone {
    background: var(--sp-gray-50);
    color: var(--sp-gray-700);
    border: 1px solid var(--sp-gray-200);
}
.action-clone:hover { background: var(--sp-gray-100); }
.action-delete {
    background: #fff5f5;
    color: var(--sp-red);
    border: 1px solid #fecaca;
}
.action-delete:hover { background: #fef2f2; }
.action-pdf {
    background: var(--sp-navy);
    color: #fff;
}
.action-pdf:hover { background: var(--sp-navy-light); }
.action-evaluate {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}
.action-evaluate:hover { box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35); }

/* PDF Export Modal */
.pdf-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1100;
    backdrop-filter: blur(3px);
}
.pdf-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 440px;
    z-index: 1101;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.pdf-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.pdf-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--sp-navy);
}
.pdf-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--sp-gray-100);
    color: var(--sp-gray-600);
    cursor: pointer;
    transition: all 0.15s;
}
.pdf-modal-close:hover { background: #fef2f2; color: var(--sp-red); }
.pdf-modal-close svg { width: 16px; height: 16px; }
.pdf-modal-subtitle {
    font-size: 13px;
    color: var(--sp-gray-500);
    margin-bottom: 16px;
}
.pdf-template-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pdf-template-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border: 1.5px solid var(--sp-gray-200);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all 0.2s;
}
.pdf-template-card:hover {
    border-color: var(--sp-gold);
    background: var(--sp-gold-light);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.15);
}
.pdf-template-card.disabled {
    opacity: 0.6;
    cursor: wait;
}
.pdf-template-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--sp-navy);
}
.pdf-template-desc {
    font-size: 12.5px;
    color: var(--sp-gray-500);
    line-height: 1.4;
}
.pdf-template-loading {
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-gold-hover);
    margin-top: 4px;
}

/* Active row highlight */
.prop-table tbody tr.preview-active {
    background: var(--sp-gold-light) !important;
    border-left: 3px solid var(--sp-gold);
}

/* ID & Status badges (reused) */
.prop-preview-id {
    font-size: 13px;
    font-weight: 700;
    color: var(--sp-gold-hover);
    background: var(--sp-gold-light);
    padding: 2px 8px;
    border-radius: 6px;
}
.prop-preview-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Desktop: 50% width, right-aligned */
@media (min-width: 769px) {
    .prop-sheet {
        width: 50%;
        max-width: none;
        left: auto;
        right: 12px;
        border-radius: 18px 18px 0 0;
    }
}

/* Loading skeleton */
.prop-preview-loading {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.preview-skeleton-gallery {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, var(--sp-gray-100) 25%, var(--sp-gray-200) 50%, var(--sp-gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
.preview-skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, var(--sp-gray-100) 25%, var(--sp-gray-200) 50%, var(--sp-gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
.preview-skeleton-line.w60 { width: 60%; }
.preview-skeleton-line.w40 { width: 40%; }
.preview-skeleton-line.w80 { width: 80%; }
.preview-skeleton-line.w50 { width: 50%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Gallery Section */
.prop-preview-gallery-section {
    flex-shrink: 0;
}
.prop-preview-main-photo .photo-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.gallery-nav svg { width: 18px; height: 18px; color: var(--sp-gray-700); }
.gallery-nav.prev { left: 8px; }
.gallery-nav.next { right: 8px; }
.prop-preview-main-photo:hover .gallery-nav { opacity: 1; }
.gallery-nav:hover { background: #fff; }

.prop-preview-gallery {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    overflow-x: auto;
    background: var(--sp-gray-50);
}
.prop-preview-gallery::-webkit-scrollbar { height: 4px; }
.prop-preview-gallery img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.15s, opacity 0.15s;
    opacity: 0.7;
}
.prop-preview-gallery img:hover { opacity: 1; }
.prop-preview-gallery img.active {
    border-color: var(--sp-gold);
    opacity: 1;
}
.prop-preview-no-photo {
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--sp-gray-400);
    background: var(--sp-gray-50);
}
.prop-preview-no-photo svg { width: 36px; height: 36px; }
.prop-preview-no-photo span { font-size: 13px; }

/* Details content */
.prop-preview-details {
    padding: 16px 20px;
}

.prop-preview-type-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
}
.prop-preview-type-row > span:first-child {
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.prop-preview-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--sp-navy);
}

.prop-preview-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--sp-gray-100);
}
.prop-preview-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--sp-navy);
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}
.prop-preview-price .prop-preview-editable { font-size: 24px; font-weight: 700; padding: 0 2px; }
.prop-preview-price .currency { font-size: 15px; font-weight: 600; color: var(--sp-gray-500); margin-left: 1px; }
.prop-preview-price-sqm {
    font-size: 13px;
    color: var(--sp-gray-400);
    font-weight: 500;
    background: var(--sp-gray-50);
    padding: 2px 8px;
    border-radius: 6px;
}

/* Quick Stats */
.prop-preview-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--sp-gray-100);
}
.prop-preview-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--sp-gray-700);
    line-height: 1.3;
    padding: 5px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}
.prop-preview-stat-row:hover { background: var(--sp-gray-50); }
.prop-preview-stat-row .stat-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--sp-gold);
}
.prop-preview-stat-row .stat-icon svg { width: 18px; height: 18px; }
.prop-preview-stat-row .stat-text { font-weight: 500; }

/* Sections (collapsible) */
.prop-preview-section {
    margin-bottom: 12px;
    border-bottom: 1px solid var(--sp-gray-100);
    padding-bottom: 12px;
}
.prop-preview-section:last-child { border-bottom: none; }
.prop-preview-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-gray-600);
    margin-bottom: 10px;
}
.prop-preview-section-header svg:first-child,
.prop-preview-section-header span > svg { width: 16px; height: 16px; color: var(--sp-gold); flex-shrink: 0; }
.prop-preview-section-header > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Owner info */
.prop-preview-owner {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}
.prop-preview-owner .owner-name { font-weight: 600; color: var(--sp-navy); }
.prop-preview-owner .owner-phone { color: var(--sp-gray-500); }

/* Characteristics grid */
.prop-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
}
.preview-grid-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 3px 0;
}
.preview-grid-item .grid-label { color: var(--sp-gray-500); }
.preview-grid-item span:last-child { font-weight: 600; color: var(--sp-gray-700); }

/* Utilities tags */
.prop-preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.preview-tag {
    font-size: 11.5px;
    font-weight: 500;
    padding: 3px 10px;
    background: var(--sp-gray-100);
    border-radius: 12px;
    color: var(--sp-gray-600);
}

/* Description */
.prop-preview-description {
    font-size: 13px;
    color: var(--sp-gray-600);
    line-height: 1.6;
    white-space: pre-line;
}

/* Inline Editing */
.prop-preview-editable {
    cursor: pointer;
    position: relative;
    padding: 1px 4px;
    border-radius: 4px;
    transition: background 0.15s;
}
.prop-preview-editable:hover { background: var(--sp-gold-light); }
.prop-preview-editable .edit-icon {
    width: 12px;
    height: 12px;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.15s;
    vertical-align: middle;
    color: var(--sp-gold);
}
.prop-preview-editable:hover .edit-icon { opacity: 1; }

.prop-preview-edit-inline input,
.prop-preview-edit-inline select {
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    padding: 2px 6px;
    border: 1.5px solid var(--sp-gold);
    border-radius: 4px;
    outline: none;
    background: var(--sp-gold-light);
    color: var(--sp-navy);
    min-width: 60px;
    max-width: 140px;
}
.prop-preview-edit-inline input[type="number"] { width: 80px; }

/* Action buttons */
.preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.preview-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.preview-btn-primary {
    background: linear-gradient(135deg, var(--sp-gold) 0%, var(--sp-gold-hover) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}
.preview-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}
.preview-btn-primary:active { transform: translateY(0); }

.preview-btn-clone {
    background: var(--sp-gray-50);
    color: var(--sp-gray-700);
    border: 1.5px solid var(--sp-gray-200);
}
.preview-btn-clone:hover {
    background: var(--sp-gray-100);
    border-color: var(--sp-gray-300);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.preview-btn-clone:active { transform: translateY(0); }

.preview-btn-delete {
    background: #fff5f5;
    color: var(--sp-red);
    border: 1.5px solid #fecaca;
}
.preview-btn-delete:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.12);
}
.preview-btn-delete:active { transform: translateY(0); }

/* Lead kanban cards */
.leads-kanban .kanban-column-header { border-top-width: 3px; }

.lead-card-name { font-weight: 600; font-size: 13px; color: var(--sp-navy); }
.lead-card-phone { font-size: 11px; color: var(--sp-gray-500); margin-top: 2px; }
.lead-card-meta { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.lead-tx { font-size: 10px; font-weight: 600; background: var(--sp-gray-100); padding: 1px 6px; border-radius: 8px; color: var(--sp-gray-600); }
.lead-budget { font-size: 10px; font-weight: 600; color: var(--sp-gold-hover); }
.lead-card-type { font-size: 11px; color: var(--sp-gray-400); margin-top: 4px; }

.lead-card-actions select {
    margin-top: 8px;
    width: 100%;
    padding: 3px 6px;
    font-size: 11px;
    border: 1px solid var(--sp-gray-200);
    border-radius: 4px;
    color: var(--sp-gray-600);
}

/* ─── Dashboard ─── */
.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #fff;
    border: 1px solid var(--sp-gray-100);
    border-radius: var(--sp-radius-md);
    padding: 20px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.kpi-card:hover { box-shadow: var(--sp-shadow-sm); }

.kpi-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--sp-navy);
}

.kpi-label {
    font-size: 13px;
    color: var(--sp-gray-500);
    margin-top: 4px;
}

.kpi-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0.1;
}

.kpi-icon svg { width: 40px; height: 40px; color: var(--sp-navy); }

.kpi-card.sold .kpi-value { color: #1d4ed8; }
.kpi-card.rented .kpi-value { color: #7c3aed; }

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

.dashboard-card {
    background: #fff;
    border: 1px solid var(--sp-gray-100);
    border-radius: var(--sp-radius-md);
    overflow: hidden;
}

.dashboard-card.full-width { grid-column: 1 / -1; }

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--sp-gray-50);
}

.dashboard-card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-navy);
    margin: 0;
}

.dashboard-card-header a {
    font-size: 12px;
    color: var(--sp-gold);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
}

.dashboard-card-body { padding: 8px; }

.empty-state {
    text-align: center;
    padding: 24px;
    color: var(--sp-gray-400);
    font-size: 13px;
}

.empty-state p { margin: 0 0 12px; }

.mini-list { display: flex; flex-direction: column; }

.mini-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    transition: background 0.1s;
}

.mini-list-item:hover { background: var(--sp-gray-50); }

.mini-list-photo {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    min-width: 40px;
}

.mini-list-photo img { width: 100%; height: 100%; object-fit: cover; }
.no-photo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--sp-gray-100); font-size: 16px; }

.mini-list-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sp-gold-light);
    color: var(--sp-gold-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    min-width: 36px;
}

.mini-list-info { flex: 1; min-width: 0; }
.mini-list-title { font-weight: 500; font-size: 13px; color: var(--sp-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-list-meta { display: flex; gap: 8px; align-items: center; margin-top: 2px; font-size: 11px; color: var(--sp-gray-400); }
.mini-list-meta .price { font-weight: 600; color: var(--sp-navy); }
.mini-list-meta .budget { color: var(--sp-gold-hover); font-weight: 600; }

.activity-type-icon { font-size: 20px; min-width: 32px; text-align: center; }

/* ─── Forms ─── */
.crm-form {
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(26, 26, 46, 0.04);
    transition: box-shadow 0.2s;
}
.crm-form:hover { box-shadow: 0 8px 24px rgba(26, 26, 46, 0.08); }

.form-section {}

.form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-navy);
    margin: 20px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--sp-gray-50);
}

.form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.form-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}
.form-grid > * { min-width: 0; }

.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.form-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.form-grid.cols-6 { display: flex; gap: 10px; }
.form-grid.cols-6 > * { flex: 1 1 0; min-width: 0; }

/* Compact number counters row (camere, bai, balcoane, etc.) */
.form-grid-counters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.form-grid-counters .form-group {
    flex: 0 0 auto;
    min-width: 72px;
    max-width: 100px;
}
.form-grid-counters .form-group input {
    padding: 8px 6px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* ─── Informatii Generale split layout: left 75% fields + right 25% counters ─── */
.info-general-layout {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}
.info-general-fields {
    flex: 1 1 0%;
    min-width: 0;
}
.info-general-counters {
    flex: 0 0 25%;
    min-width: 0;
    background: var(--sp-bg-secondary, #f8f9fb);
    border: 1px solid var(--sp-gray-50, #e5e7eb);
    border-radius: 8px;
    padding: 12px;
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.info-general-counters .counter-title {
    position: absolute;
    top: -8px;
    left: 10px;
    background: #fff;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--sp-gray-400, #6b7280);
    letter-spacing: 0.5px;
    line-height: 1;
    z-index: 1;
}
.info-general-counters .counter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
    align-content: start;
}
.info-general-counters .counter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.info-general-counters .counter-item label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Total etaje + Mansarda compound column */
.etaje-mansarda-col {
    display: flex;
    gap: 6px;
    min-width: 0;
}
.etaje-mansarda-col .etaje-mansarda-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
    min-width: 0;
}
.etaje-mansarda-col .etaje-mansarda-item:first-child { flex: 2; }
.etaje-mansarda-col .etaje-mansarda-item:last-child { flex: 1; }
.etaje-mansarda-col label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-gray-600);
}

@media (max-width: 900px) {
    .info-general-layout { flex-direction: column; }
    .info-general-counters {
        flex: 1 1 auto;
        min-width: 0;
    }
    .info-general-counters .counter-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 480px) {
    .info-general-counters .counter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
    min-width: 0;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-gray-600);
}

.form-group input, .form-group select, .form-group textarea {
    padding: 10px 12px;
    border: 1px solid #e8ebf0;
    border-radius: 8px;
    font-size: 13px;
    color: #1A365D;
    background: #f7f8fc;
    transition: all 0.2s;
    font-family: inherit;
}
.form-group input:hover, .form-group select:hover, .form-group textarea:hover {
    border-color: #dde1e8;
    background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--sp-gold);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-hint { font-size: 12px; color: var(--sp-gray-400); font-style: italic; }

/* ─── Surface Input with suggestion chips ─── */
.surface-input-group input {
    padding: 8px 10px;
    font-size: 13px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
.surface-input-group label {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.surface-input-wrap {
    position: relative;
}
.surface-suggestions {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    z-index: 10;
    background: #fff;
    padding: 4px 2px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(26, 26, 46, 0.12);
    border: 1px solid #e8ebf0;
}
.surface-chip {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    background: #f7f8fc;
    border: 1px solid #e8ebf0;
    border-radius: 6px;
    cursor: pointer;
    color: #4a5068;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.surface-chip:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: #d4af37;
    color: #b8960c;
}
/* Hide number input spinners globally in property form */
.prop-form-card input[type=number]::-webkit-outer-spin-button,
.prop-form-card input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.prop-form-card input[type=number] {
    -moz-appearance: textfield;
}

/* ─── Global styled selects for Property pages ─── */
.crm-page select,
.crm-form select {
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%238b92a5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px !important;
    cursor: pointer;
}
.crm-page select:hover,
.crm-form select:hover {
    border-color: var(--sp-gray-400);
}
.crm-page select:focus,
.crm-form select:focus {
    border-color: var(--sp-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
    outline: none;
}

/* ─── Custom Select Component ─── */
.csel {
    position: relative;
    width: 100%;
}
.csel-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e8ebf0;
    border-radius: 8px;
    font-size: 13px;
    color: #1A365D;
    background: #f7f8fc;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    text-align: left;
    gap: 8px;
    min-height: 40px;
    outline: none;
}
.csel-trigger:hover {
    border-color: #dde1e8;
    background: #fff;
}
.csel-trigger:focus,
.csel-open .csel-trigger {
    border-color: #d4af37;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}
.csel-placeholder .csel-label {
    color: #8b92a5;
}
.csel-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.csel-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #8b92a5;
    transition: transform 0.2s;
}
.csel-open .csel-chevron {
    transform: rotate(180deg);
    color: #d4af37;
}
.csel-disabled {
    opacity: 0.5;
    pointer-events: none;
}
.csel-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 999;
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(26, 26, 46, 0.12), 0 2px 8px rgba(26, 26, 46, 0.06);
    overflow: hidden;
    animation: cselSlideIn 0.15s ease-out;
}
@keyframes cselSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.csel-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
}
.csel-options::-webkit-scrollbar { width: 6px; }
.csel-options::-webkit-scrollbar-track { background: transparent; }
.csel-options::-webkit-scrollbar-thumb { background: #dde1e8; border-radius: 3px; }
.csel-option {
    padding: 10px 14px;
    font-size: 13px;
    color: #1A365D;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.12s;
    font-family: 'Montserrat', sans-serif;
}
.csel-option:hover,
.csel-option.highlighted {
    background: #f7f8fc;
    color: #1A365D;
}
.csel-option.active {
    background: rgba(212, 175, 55, 0.12);
    color: #b8960c;
    font-weight: 600;
}
.csel-option.active.highlighted {
    background: rgba(212, 175, 55, 0.18);
}

/* Custom Select inside filter panel */
.prop-adv-filters .csel-trigger {
    padding: 10px 12px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    background: var(--lk-bg-elevated);
    font-size: 13px;
    color: var(--lk-text-primary);
}
.prop-adv-filters .csel-trigger:hover {
    border-color: var(--lk-border-medium);
    background: var(--lk-bg-card);
}
.prop-adv-filters .csel-open .csel-trigger,
.prop-adv-filters .csel-trigger:focus {
    border-color: var(--lk-gold-primary);
    background: var(--lk-bg-card);
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
}

/* Custom Select in bulk bar (dark bg) */
.prop-bulk-bar .csel-trigger {
    padding: 7px 12px;
    border-radius: var(--lk-radius-sm, 8px);
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 13px;
    backdrop-filter: blur(4px);
    min-height: unset;
}
.prop-bulk-bar .csel-trigger:hover { background: rgba(255,255,255,0.15); }
.prop-bulk-bar .csel-open .csel-trigger { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); box-shadow: none; }
.prop-bulk-bar .csel-placeholder .csel-label { color: rgba(255,255,255,0.6); }
.prop-bulk-bar .csel-chevron { color: rgba(255,255,255,0.5); }
.prop-bulk-bar .csel-dropdown { background: #1a1a2e; border-color: #353552; }
.prop-bulk-bar .csel-option { color: #e2e8f0; }
.prop-bulk-bar .csel-option:hover,
.prop-bulk-bar .csel-option.highlighted { background: #2a2a45; }
.prop-bulk-bar .csel-option.active { background: rgba(212, 175, 55, 0.2); color: #f4d03f; }

/* ─── Property Form Step Tabs ─── */
.prop-form-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8ebf0;
    box-shadow: 0 1px 3px rgba(26, 26, 46, 0.04);
    overflow: hidden;
}
.prop-form-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: #8b92a5;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
    white-space: nowrap;
}
.prop-form-tab:hover { color: #1A365D; background: #f7f8fc; }
.prop-form-tab.active {
    color: #1A365D;
    border-bottom-color: #d4af37;
    font-weight: 600;
    background: rgba(212, 175, 55, 0.08);
}
.prop-form-tab.completed .prop-form-tab-num {
    background: #10b981;
    color: #fff;
}
.prop-form-tab-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8ebf0;
    color: #8b92a5;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s;
}
.prop-form-tab.active .prop-form-tab-num {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    color: #1a1a2e;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}
.prop-form-tab-label { display: inline; }

/* ─── Form Step Navigation ─── */
.prop-form-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-top: 20px;
    border-top: 1px solid #e8ebf0;
}
.prop-nav-step {
    font-size: 12px;
    color: #8b92a5;
    font-weight: 500;
}
.prop-nav-prev,
.prop-nav-next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5068;
    cursor: pointer;
    transition: all 0.2s;
}
.prop-nav-prev:hover,
.prop-nav-next:hover {
    border-color: #d4af37;
    color: #d4af37;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.06);
}
.prop-nav-prev svg,
.prop-nav-next svg { width: 16px; height: 16px; }
.prop-nav-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    color: #1a1a2e;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    transition: all 0.2s;
}
.prop-nav-save:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4); }
.prop-nav-save:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.prop-nav-save svg { width: 16px; height: 16px; }

/* Floating Save Button */
.prop-fab-save {
    position: fixed;
    bottom: 2rem;
    right: 3rem;
    height: 52px;
    padding: 0 32px;
    border-radius: 26px;
    border: none;
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    color: #1a1a2e;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    z-index: 100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: all 0.3s;
    white-space: nowrap;
}
.prop-fab-save svg { flex-shrink: 0; }
.prop-fab-save:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.22); transform: scale(1.04); }
.prop-fab-save:active { transform: scale(0.97); }
.prop-fab-save:disabled { opacity: 0.6; cursor: not-allowed; }
.prop-fab-save:disabled:hover { transform: none; box-shadow: 0 4px 16px rgba(0,0,0,0.18); }
.prop-fab-save.success {
    background: #22c55e;
    color: #fff;
    transform: scale(1.06);
    box-shadow: 0 6px 24px rgba(34,197,94,0.4);
}
.prop-fab-spinner {
    animation: prop-fab-spin 1s linear infinite;
}
@keyframes prop-fab-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Save success overlay */
.save-success-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: save-overlay-fade-in 0.3s ease;
}
.save-success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: save-content-pop 0.4s ease;
}
.save-success-content span {
    font-size: 20px;
    font-weight: 700;
    color: #22c55e;
}
.save-success-check {
    width: 72px;
    height: 72px;
}
@keyframes save-overlay-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes save-content-pop {
    0% { opacity: 0; transform: scale(0.7); }
    50% { transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
}

/* History action badges */
.history-action-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.history-action-badge.action-create { background: #dcfce7; color: #16a34a; }
.history-action-badge.action-update { background: #dbeafe; color: #2563eb; }
.history-action-badge.action-republish { background: #ffedd5; color: #ea580c; }

/* Locked tab */
.prop-form-tab.locked { opacity: 0.5; cursor: not-allowed; }
.prop-form-tab.locked:hover { border-color: transparent; color: #8b92a5; }

/* Responsive form tabs & grids */
@media (max-width: 1200px) {
    .prop-form-card .form-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
    .prop-form-tab { padding: 10px 10px; font-size: 12px; }
    .prop-form-tab-label { display: none; }
    .prop-form-card .form-grid.cols-4 { grid-template-columns: 1fr 1fr; }
    .prop-form-card .form-grid.cols-3 { grid-template-columns: 1fr 1fr; }
    .prop-form-card .form-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .prop-form-tabs { flex-wrap: wrap; border-radius: 12px; }
    .prop-form-tab { flex: 0 0 25%; }
    .prop-form-tab-label { display: none; }
    .prop-form-card .form-grid.cols-5,
    .prop-form-card .form-grid.cols-4,
    .prop-form-card .form-grid.cols-3 { grid-template-columns: 1fr 1fr; }
    .prop-form-card .form-grid.cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .prop-form-card .form-grid.cols-5,
    .prop-form-card .form-grid.cols-4,
    .prop-form-card .form-grid.cols-3,
    .prop-form-card .form-grid.cols-2 { grid-template-columns: 1fr; }
}

/* ─── Property Form Cards ─── */
.prop-form-card {
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(26, 26, 46, 0.04);
    min-width: 0;
}
.prop-form-card-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #8b92a5;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f1f5;
}

/* ─── Price Tab: Summary Badge ─── */
.price-summary-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: #f6f8fb;
    border: 1px solid #e2e6ee;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 8px;
}
.price-summary-amount {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
}
.price-summary-sep { color: #c0c5d0; font-size: 16px; }
.price-summary-sqm { font-size: 13px; color: #6b7280; font-weight: 500; }
.price-summary-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: #e8ebf0;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.price-summary-pill.nego { background: #fef3c7; color: #92400e; }
.price-summary-pill.cerere { background: #dbeafe; color: #1e40af; }

/* ─── Price Tab: Computed Values ─── */
.price-computed-value {
    font-style: italic;
    color: #9ca3af !important;
    background: #f9fafb !important;
}

/* ─── Price Tab: Internal Hint Label ─── */
.price-internal-hint::after {
    content: '🔒 vizibil doar intern';
    font-size: 10px;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 6px;
    font-style: italic;
}

/* ─── Price Tab: Toggle Field (same height as inputs) ─── */
.price-toggle-field {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 1px solid #e0e3ea;
    border-radius: 10px;
    background: #f9fafb;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}
.price-toggle-field:hover { border-color: #d0d4e0; background: #f3f4f6; }
.price-toggle-field.active {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.45);
    color: #92700c;
    font-weight: 600;
}

/* ─── Price Tab: Commission Total Bar ─── */
.commission-total-bar {
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fef9e7 0%, #fdf6d8 100%);
    border: 1px solid #f5e6a3;
    color: #78600a;
    font-size: 14px;
    font-weight: 500;
}
.commission-total-bar strong {
    font-weight: 700;
    color: #5c4a08;
}

/* ─── Price Tab: Contract Type Badge ─── */
.contract-type-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.contract-type-badge.exclusiv { background: #ede9fe; color: #6d28d9; }
.contract-type-badge.neexclusiv { background: #e0f2fe; color: #0369a1; }
.contract-type-badge.co-exclusiv { background: #fce7f3; color: #be185d; }

/* ─── Price Tab: Contract Status Badge ─── */
.contract-status-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}
.contract-status-badge.green { background: #d1fae5; color: #065f46; }
.contract-status-badge.yellow { background: #fef3c7; color: #92400e; }
.contract-status-badge.red { background: #fee2e2; color: #991b1b; }
.contract-status-badge.expired { background: #fee2e2; color: #991b1b; }

/* ─── Localizare Layout (2 columns: fields + map) ─── */
.prop-loc-layout {
    display: grid;
    grid-template-columns: 1fr 510px;
    gap: 24px;
    align-items: start;
}
.prop-loc-fields { display: flex; flex-direction: column; gap: 4px; }
.prop-loc-map {
    position: sticky;
    top: 120px;
}

/* ─── Map ─── */
.prop-map-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e8ebf0;
}
.prop-map-container {
    width: 100%;
    height: 510px;
}
.prop-map-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #4a5068;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: all 0.15s;
}
.prop-map-toggle:hover { border-color: #d4af37; color: #d4af37; }

.prop-coords {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: #8b92a5;
    font-family: 'SF Mono', monospace;
}

/* ─── Wide form group (spans full width in location fields) ─── */
.form-group-wide {
    grid-column: 1 / -1;
}
.form-group-wide textarea {
    width: 100%;
    resize: vertical;
    min-height: 68px;
    font-size: 13px;
    padding: 10px 14px;
    border: 1px solid #e0e3eb;
    border-radius: 8px;
    font-family: inherit;
    color: #1a2233;
    transition: border-color 0.2s;
}
.form-group-wide textarea:focus {
    outline: none;
    border-color: var(--lk-gold, #c5a55a);
    box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.1);
}

/* ─── QuickAdd property reference note ─── */
.quick-add-property-ref {
    font-size: 12px;
    color: #6b7280;
    background: #f8f9fb;
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 3px solid var(--lk-gold, #c5a55a);
    margin-top: 4px;
}

/* ─── Source property link in contacts table ─── */
.source-property-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.prop-link-icon {
    color: var(--lk-gold, #c5a55a);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.prop-link-icon:hover {
    color: var(--lk-navy, #1a2233);
}

/* ─── Contact Chips ─── */
.contacts-chip-container {
    min-height: 42px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #e8ebf0;
    border-radius: 10px;
    min-width: 0;
    overflow: visible;
    transition: border-color 0.15s;
}
.contacts-chip-container:hover { border-color: #d4af37; }
.contacts-chip-area {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    min-height: 26px;
}
.contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(212, 175, 55, 0.12);
    color: #1A365D;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.contact-chip button {
    background: none;
    border: none;
    color: #8b92a5;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    line-height: 1;
}
.contact-chip button:hover { color: #e74c3c; }
.contact-add-picker { position: relative; }
.contact-add-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: #8b92a5;
    background: none;
    border: 1px dashed #d0d5dd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.contact-add-btn:hover { color: #d4af37; border-color: #d4af37; }
.contact-add-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.12);
    z-index: 999;
    padding: 4px;
}
.contact-add-option {
    padding: 8px 12px;
    font-size: 13px;
    color: #1A365D;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s;
}
.contact-add-option:hover { background: rgba(212, 175, 55, 0.1); }

/* ─── Small + Button ─── */
.btn-icon-xs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1px dashed #d4af37;
    background: rgba(212, 175, 55, 0.08);
    color: #d4af37;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.15s;
}
.btn-icon-xs:hover {
    background: rgba(212, 175, 55, 0.2);
    border-style: solid;
}

/* ─── Quick Add Modal ─── */
.quick-add-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 26, 46, 0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}
.quick-add-modal {
    background: #fff;
    border-radius: 16px;
    width: 440px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(26, 26, 46, 0.2);
    animation: slideUp 0.2s ease;
}
.quick-add-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f1f5;
}
.quick-add-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1A365D;
}
.quick-add-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #8b92a5;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.quick-add-close:hover { color: #1A365D; }
.quick-add-body { padding: 20px 24px; }
.quick-add-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid #f0f1f5;
}

/* ─── Unsaved Changes Modal ─── */
.unsaved-modal { max-width: 420px; }
.unsaved-modal-text {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}
.btn-danger {
    background: #e53e3e;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-danger:hover { background: #c53030; }

/* ─── Autocomplete ─── */
.autocomplete {
    position: relative;
}
.autocomplete-input {
    width: 100%;
    box-sizing: border-box;
}
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 12px;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 12px 36px rgba(26, 26, 46, 0.12);
    animation: cselOpen 0.15s ease;
}
.autocomplete-option {
    padding: 10px 14px;
    font-size: 13px;
    color: #4a5068;
    cursor: pointer;
    transition: background 0.1s;
}
.autocomplete-option:hover,
.autocomplete-option.highlighted {
    background: rgba(212, 175, 55, 0.1);
    color: #1A365D;
}
.autocomplete-option:first-child { border-radius: 12px 12px 0 0; }
.autocomplete-option:last-child { border-radius: 0 0 12px 12px; }
.autocomplete-add-new {
    border-top: 1px solid #f0f1f5;
    color: #d4af37;
    font-weight: 600;
}
.autocomplete-add-new:hover,
.autocomplete-add-new.highlighted {
    background: rgba(212, 175, 55, 0.12);
    color: #b8960c;
}
.autocomplete-add-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    font-size: 13px;
    margin-right: 4px;
}
/* Combo mode: input + chevron */
.autocomplete-combo { position: relative; }
.autocomplete-combo .autocomplete-input { padding-right: 32px; }
.autocomplete-chevron {
    position: absolute;
    right: 1px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
    color: #8891a5;
    display: flex;
    align-items: center;
    transition: color 0.15s, transform 0.15s;
}
.autocomplete-chevron:hover { color: #4a5068; }
.autocomplete-open .autocomplete-chevron { color: #d4af37; }
.autocomplete-open .autocomplete-chevron svg { transform: rotate(180deg); }
.autocomplete-option.selected {
    background: rgba(212, 175, 55, 0.08);
    color: #1A365D;
    font-weight: 600;
}
.autocomplete-option.selected::after {
    content: '✓';
    float: right;
    color: #d4af37;
    font-size: 12px;
}

/* ─── Required Field ─── */
.field-required-star {
    color: #e74c3c;
    font-weight: 700;
    margin-left: 2px;
}

/* ─── Responsive Localizare ─── */
@media (max-width: 1100px) {
    .prop-loc-layout {
        grid-template-columns: 1fr;
    }
    .prop-loc-map {
        position: static;
    }
    .prop-map-container {
        height: 350px;
    }
}

/* Checkboxes grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
    margin-bottom: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--sp-gray-700);
    transition: background 0.1s;
}

.checkbox-item:hover { background: var(--sp-gray-50); }
.checkbox-item input[type="checkbox"] { accent-color: var(--sp-gold); }

/* ─── Pill Toggle Groups (Utilitati tab) ─── */
.pill-group {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    align-items: flex-start;
}
.pill-group-label {
    flex: 0 0 100px;
    font-size: 11px;
    font-weight: 600;
    color: #8b92a5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 5px;
    line-height: 1.2;
}
.pill-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.pill-toggle {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
    color: #4a5068;
    background: #f7f8fc;
    border: 1px solid #e8ebf0;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
    font-family: inherit;
    line-height: 1;
}
.pill-toggle:hover {
    background: #eef0f6;
    border-color: #d0d4e0;
}
.pill-toggle.active {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.45);
    color: #7a6520;
    font-weight: 600;
}
.pill-toggle.active:hover {
    background: rgba(212, 175, 55, 0.2);
}
.pill-check {
    flex-shrink: 0;
    margin-right: 4px;
}

/* ─── Template Menu (Utilitati tab card headers) ─── */
.prop-form-card-title:has(.template-menu-wrap) {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.template-menu-wrap {
    position: relative;
}
.btn-template-main {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-gold, #d4af37);
    background: rgba(212, 175, 55, 0.08);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
    letter-spacing: 0.2px;
}
.btn-template-main:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
}
.template-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    border: 1px solid #e8ebf0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(26, 26, 46, 0.12);
    min-width: 220px;
    z-index: 100;
    padding: 6px;
    animation: tplDropIn 0.12s ease-out;
}
@keyframes tplDropIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.template-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #4a5068;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.1s;
}
.template-dropdown-item:hover {
    background: #f7f8fc;
}
.template-preset {
    font-weight: 600;
    font-size: 13px;
    padding: 10px 12px;
    gap: 6px;
}
.template-preset:hover {
    background: rgba(212, 175, 55, 0.06);
}
.template-active,
.template-active:hover {
    color: var(--sp-gold, #d4af37);
    background: rgba(212, 175, 55, 0.1);
}
.template-dropdown-divider {
    height: 1px;
    background: #f0f1f5;
    margin: 4px 0;
}
.template-save-trigger {
    color: #8b92a5;
    font-size: 11px;
}
.template-custom-row {
    padding: 0;
    gap: 0;
}
.template-custom-btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 500;
    color: #4a5068;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    border-radius: 6px;
    transition: background 0.1s;
}
.template-custom-btn:hover { background: #f7f8fc; }
.template-custom-btn.template-active,
.template-custom-btn.template-active:hover {
    color: var(--sp-gold, #d4af37);
    background: rgba(212, 175, 55, 0.1);
    font-weight: 600;
}
.template-delete-btn {
    padding: 4px 8px;
    font-size: 16px;
    color: #c0c4d0;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.1s;
}
.template-delete-btn:hover { color: #e74c3c; }
.template-save-row {
    display: flex;
    gap: 6px;
    padding: 6px;
}
.template-save-row input {
    flex: 1;
    padding: 5px 8px;
    font-size: 12px;
    border: 1px solid #e8ebf0;
    border-radius: 6px;
    outline: none;
    font-family: inherit;
}
.template-save-row input:focus {
    border-color: var(--sp-gold, #d4af37);
}
.template-save-row button {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--sp-gold, #d4af37);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.template-save-row button:hover {
    background: #c9a430;
}
@media (max-width: 640px) {
    .pill-group {
        flex-direction: column;
        gap: 6px;
    }
    .pill-group-label {
        flex: none;
        padding-top: 0;
        margin-bottom: 2px;
    }
}

/* ─── Photos Grid ─── */
/* ─── Photo: Toolbar ─── */
.photo-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--sp-gray-50);
    border-radius: 10px;
    border: 1px solid var(--sp-gray-100);
}
.photo-toolbar-left {
    display: flex;
    gap: 6px;
}
.photo-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 1px solid var(--sp-gray-200);
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-gray-600);
    cursor: pointer;
    transition: all 0.15s;
}
.photo-toolbar-btn:hover {
    border-color: var(--sp-gray-300);
    color: var(--sp-gray-800);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.photo-toolbar-btn svg { flex-shrink: 0; }
.photo-toolbar-studio {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #fff;
    border-color: #7c3aed;
}
.photo-toolbar-studio:hover {
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.35);
}
.photo-toolbar-ai {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    border-color: #d97706;
}
.photo-toolbar-ai:hover {
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.photo-toolbar-ai:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}
.photo-toolbar-select {
    color: #8b5cf6 !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    background: rgba(139, 92, 246, 0.06) !important;
}
.photo-toolbar-select:hover {
    border-color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.12) !important;
}
.photo-toolbar-deselect {
    background: #fff !important;
    color: var(--sp-gray-600) !important;
    border-color: var(--sp-gray-300) !important;
}
.photo-toolbar-deselect:hover {
    background: var(--sp-gray-50) !important;
    border-color: var(--sp-gray-400) !important;
}
.photo-toolbar-delete {
    background: #fff !important;
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}
.photo-toolbar-delete:hover {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.15) !important;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.photo-card {
    position: relative;
    border-radius: var(--sp-radius-sm);
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.photo-card { cursor: grab; transition: opacity 0.2s, transform 0.2s ease, box-shadow 0.2s; position: relative; }
.photo-card:active { cursor: grabbing; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; cursor: pointer; }
.photo-card.photo-dragging { opacity: 0.25; transform: scale(0.92); box-shadow: none; }
.photo-card.photo-drag-over-left::before,
.photo-card.photo-drag-over-right::after {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: #8b5cf6;
    border-radius: 3px;
    z-index: 5;
    animation: dropIndicatorPulse 0.8s ease infinite;
}
.photo-card.photo-drag-over-left::before { left: -8px; }
.photo-card.photo-drag-over-right::after { right: -8px; }
.photo-card.photo-drag-over-left { transform: translateX(4px); }
.photo-card.photo-drag-over-right { transform: translateX(-4px); }
@keyframes dropIndicatorPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.photo-card.photo-selected { box-shadow: 0 0 0 2.5px #8b5cf6; }

/* Photo checkbox */
.photo-check-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.8);
    border: 2px solid rgba(255,255,255,0.95);
    border-radius: 6px;
    cursor: pointer;
    /* Larger touch target via padding */
    padding: 4px;
    transition: all 0.15s;
    z-index: 2;
}
.photo-selected .photo-check-btn {
    background: #8b5cf6;
    border-color: #8b5cf6;
}
.photo-check-btn:hover {
    transform: scale(1.1);
}

/* Delete button — removed, bulk delete in toolbar now */

.photo-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: var(--sp-gold);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ─── Photo: Upload Dropzone ─── */
.photos-dropzone-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 36px 20px;
    border: 2px dashed var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    transition: border-color 0.2s, background 0.2s;
    color: var(--sp-gray-400);
}
.photos-dropzone-wrap.dragover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.04);
    color: #8b5cf6;
}
.photos-dropzone-wrap svg { opacity: 0.5; }
.photos-dropzone-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-gray-600);
    margin: 0;
}
.photos-dropzone-buttons {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}
.photos-dropzone-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid var(--sp-gray-200);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: var(--sp-gray-700);
    cursor: pointer;
    transition: all 0.15s;
}
.photos-dropzone-btn:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.04);
}
.photos-dropzone-hint {
    font-size: 12px;
    color: var(--sp-gray-400);
    margin: 0;
}

/* ─── Photo: Room Label from AI Analysis ─── */
.analysis-room-label {
    position: absolute;
    top: 4px;
    left: 32px;
    background: rgba(139, 92, 246, 0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: capitalize;
}

/* ─── Photo: Add Menu ─── */
.photo-add-menu-wrap {
    position: relative;
}
.photo-add-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid var(--sp-gray-200);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 20;
    min-width: 180px;
    overflow: hidden;
}
.photo-add-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    font-size: 13px;
    color: var(--sp-gray-700);
    cursor: pointer;
    transition: background 0.1s;
}
.photo-add-menu button:hover {
    background: var(--sp-gray-50);
}
.photo-add-menu button + button {
    border-top: 1px solid var(--sp-gray-100);
}

/* ─── Photo: Studio Gallery Button ─── */
.btn-studio-gallery {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.btn-studio-gallery:hover { opacity: 0.85; }

/* ─── Studio Sidebar ─── */
.studio-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1000;
}
.studio-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    animation: studio-slide-in 0.25s ease;
}
@keyframes studio-slide-in {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
.studio-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--sp-gray-200);
}
.studio-sidebar-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--sp-gray-800);
}
.studio-sidebar-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    font-size: 20px;
    color: var(--sp-gray-400);
    cursor: pointer;
    border-radius: 6px;
}
.studio-sidebar-close:hover { background: var(--sp-gray-100); }

.studio-sidebar-thumbs {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    overflow-x: auto;
    border-bottom: 1px solid var(--sp-gray-100);
}
.studio-thumb {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}
.studio-thumb.active { border-color: #8b5cf6; }
.studio-thumb.selected::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(139, 92, 246, 0.15);
}
.studio-thumb img { width: 100%; height: 100%; object-fit: cover; }
.studio-thumb-check {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.studio-thumb.selected .studio-thumb-check {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.studio-sidebar-preview {
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    background: var(--sp-gray-50);
}
.studio-sidebar-preview img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 8px;
    object-fit: contain;
}

.studio-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}
.studio-category {
    margin-bottom: 14px;
}
.studio-category-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--sp-gray-400);
    margin-bottom: 6px;
}
.studio-preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.studio-preset-chip {
    padding: 5px 11px;
    border: 1px solid var(--sp-gray-200);
    border-radius: 16px;
    background: #fff;
    font-size: 12px;
    color: var(--sp-gray-600);
    cursor: pointer;
    transition: all 0.15s;
}
.studio-preset-chip:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
}
.studio-preset-chip.active {
    background: #8b5cf6;
    color: #fff;
    border-color: #8b5cf6;
}

.studio-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--sp-gray-200);
}
.studio-process-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.15s;
}
.studio-process-btn:hover { opacity: 0.9; }
.studio-process-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Property Photo Lightbox ─── */
.prop-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.80);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(6px);
}
.prop-lightbox-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 2001;
    transition: background 0.15s;
}
.prop-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}
.prop-lightbox-img {
    max-width: 80vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.prop-lightbox-img img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.prop-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    z-index: 2001;
    transition: background 0.15s;
}
.prop-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}
.prop-lightbox-prev { left: 24px; }
.prop-lightbox-next { right: 24px; }
.prop-lightbox-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2001;
}
.prop-lightbox-thumbs {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2001;
    max-width: 80vw;
    overflow-x: auto;
    padding: 6px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}
.prop-lightbox-thumbs img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    flex-shrink: 0;
    transition: border-color 0.15s, opacity 0.15s;
}
.prop-lightbox-thumbs img:hover { opacity: 0.9; }
.prop-lightbox-thumbs img.active {
    border-color: var(--sp-gold, #d4af37);
    opacity: 1;
}
/* ─── Gallery Picker Modal ─── */
.gallery-picker-modal {
    background: #fff;
    border-radius: 14px;
    width: 780px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.gallery-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sp-gray-200);
}
.gallery-picker-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--sp-gray-800);
}
.gallery-picker-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}
.gallery-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.gallery-picker-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s, transform 0.15s;
}
.gallery-picker-item:hover {
    transform: scale(1.03);
}
.gallery-picker-item.selected {
    border-color: #8b5cf6;
}
.gallery-picker-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-picker-item-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3px 6px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-picker-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #8b5cf6;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-picker-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--sp-gray-200);
    display: flex;
    justify-content: flex-end;
}

/* ─── AI Analysis Progress Bar ─── */
.analysis-progress-bar {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--sp-gray-50);
    border-radius: var(--sp-radius-sm);
    border: 1px solid var(--sp-gray-100);
}
.analysis-progress-text {
    font-size: 12px;
    color: var(--sp-gray-600);
    margin-bottom: 8px;
    font-weight: 500;
}
.analysis-progress-track {
    height: 6px;
    background: var(--sp-gray-200);
    border-radius: 3px;
    overflow: hidden;
}
.analysis-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #d946ef);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* ─── AI Analysis Report Card ─── */
.analysis-report-card {
    border-left: 3px solid #8b5cf6;
}
.analysis-report-card .prop-form-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.analysis-score-badge {
    display: flex;
    align-items: baseline;
    gap: 1px;
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
}
.analysis-score-value {
    font-size: 16px;
    font-weight: 700;
}
.analysis-score-max {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
}
.analysis-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.analysis-summary-tag {
    background: var(--sp-gray-100);
    color: var(--sp-gray-700);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
}
.analysis-detail-row {
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--sp-gray-600);
}
.analysis-detail-row strong {
    color: var(--sp-gray-800);
    font-weight: 600;
}
.analysis-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.analysis-feature-pill {
    background: #ecfdf5;
    color: #065f46;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #a7f3d0;
}
.analysis-detractor-pill {
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #fed7aa;
}
.analysis-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--sp-gray-100);
}
.analysis-autofill-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    padding: 7px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.analysis-autofill-btn:hover { opacity: 0.9; }

/* ─── btn-ai spinner ─── */
.btn-ai-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-ai-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}
@keyframes btn-ai-spin {
    to { transform: rotate(360deg); }
}
.btn-ai:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ─── Studio Processing Overlay ─── */
.studio-processing-overlay {
    position: fixed;
    bottom: 20px;
    right: 600px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(30, 30, 40, 0.92);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10001;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: studio-overlay-in 0.3s ease-out;
}
@keyframes studio-overlay-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.studio-processing-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.25);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: btn-ai-spin 0.7s linear infinite;
}

/* Floating compare button — persists after editor close */
.studio-compare-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: all 0.2s;
    animation: studio-overlay-in 0.3s ease-out;
}
.studio-compare-float:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.35);
    background: linear-gradient(135deg, #252540 0%, #353560 100%);
}
.studio-compare-float svg {
    opacity: 0.8;
}

/* ─── History ─── */
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--sp-gray-50);
    border-radius: var(--sp-radius-sm);
    font-size: 13px;
}
.history-date { color: var(--sp-gray-500); }
.history-value { font-weight: 600; color: var(--sp-navy); }

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: var(--sp-radius-lg);
    width: 560px;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--sp-shadow-xl);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sp-gray-100);
}

.modal-header h2 { font-size: 16px; font-weight: 600; color: var(--sp-navy); margin: 0; }

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--sp-gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--sp-gray-100);
}

/* ═══════════════════════════════════════════════════════
   STANDALONE PAGES — Common Base
   ═══════════════════════════════════════════════════════ */

.standalone-page {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100%;
    animation: standaloneIn 0.3s ease;
}

@keyframes standaloneIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.standalone-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.standalone-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.standalone-header .subtitle {
    font-size: 14px;
    color: #64748b;
    margin-left: 4px;
}

.standalone-header .credits-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
}

.standalone-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.standalone-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.standalone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.standalone-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.standalone-card:hover {
    border-color: #6c63ff;
    box-shadow: 0 2px 8px rgba(108,99,255,0.1);
    transform: translateY(-1px);
}

.standalone-card.active {
    border-color: #6c63ff;
    background: #f8f7ff;
}

.standalone-tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    width: fit-content;
}

.standalone-tab {
    padding: 8px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.standalone-tab:hover {
    color: #1a1a2e;
}

.standalone-tab.active {
    background: #fff;
    color: #6c63ff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    font-weight: 600;
}

.standalone-tab .tab-badge {
    background: #6c63ff;
    color: #fff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.standalone-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.standalone-empty svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

.standalone-empty h3 {
    font-size: 16px;
    color: #64748b;
    margin: 0 0 8px 0;
}

.standalone-empty p {
    font-size: 13px;
    margin: 0;
}

.standalone-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.standalone-btn.primary {
    background: linear-gradient(135deg, #6c63ff, #5a52d5);
    color: #fff;
}

.standalone-btn.primary:hover {
    background: linear-gradient(135deg, #5a52d5, #4a43c5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108,99,255,0.3);
}

.standalone-btn.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.standalone-btn.secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.standalone-btn.secondary:hover {
    background: #e2e8f0;
}

/* ═══════════════════════════════════════════════════════
   STUDIO PAGE — Adapted from WP Plugin CSS
   (dashboard-v2.css Studio V3 + studio.css + studio-tutorial.css)
   ═══════════════════════════════════════════════════════ */
.studio-page {
    max-width: none;
    width: 100%;
    padding: 0 32px;
    /* Full CSS variable set from dashboard-v2.css */
    --lk-bg-primary: #f7f8fc;
    --lk-bg-secondary: #ffffff;
    --lk-bg-card: #ffffff;
    --lk-bg-card-hover: #fafbfd;
    --lk-bg-elevated: #f0f2f7;
    --lk-bg-input: #f7f8fc;
    --lk-border-light: #e8ebf0;
    --lk-border-medium: #dde1e8;
    --lk-border-dark: #c5cad4;
    --lk-navy-dark: #0f0f1a;
    --lk-navy-medium: #1A365D;
    --lk-navy-light: #252540;
    --lk-navy-gradient: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    --lk-gold-primary: #d4af37;
    --lk-gold-light: #f4d03f;
    --lk-gold-dark: #b8960c;
    --lk-gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    --lk-gold-soft: rgba(212, 175, 55, 0.12);
    --lk-gold-glow: rgba(212, 175, 55, 0.3);
    --lk-text-primary: #1A365D;
    --lk-text-secondary: #4a5068;
    --lk-text-muted: #8b92a5;
    --lk-text-on-dark: #ffffff;
    --lk-text-on-gold: #1a1a2e;
    --lk-success: #10b981;
    --lk-warning: #f59e0b;
    --lk-error: #ef4444;
    --lk-shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
    --lk-shadow-md: 0 4px 12px rgba(26, 26, 46, 0.06);
    --lk-shadow-lg: 0 8px 24px rgba(26, 26, 46, 0.08);
    --lk-shadow-xl: 0 20px 40px rgba(26, 26, 46, 0.12);
    --lk-shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --lk-shadow-navy: 0 4px 20px rgba(26, 26, 46, 0.2);
    --lk-radius-sm: 8px;
    --lk-radius-md: 12px;
    --lk-radius-lg: 16px;
    --lk-radius-xl: 24px;
}
/* Tutorial modals are fixed-positioned outside .studio-page, so they need vars too */
.lk-tutorial-welcome,
.lk-tutorial-complete,
.lk-tutorial-tooltip {
    --lk-gold-primary: #d4af37;
    --lk-gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    --lk-text-on-gold: #1a1a2e;
    --lk-success: #10b981;
}

/* ─── Top Tab Bar ─── */
.studio-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: var(--lk-bg-card);
    border-radius: var(--lk-radius-lg);
    border: 1px solid var(--lk-border-light);
    box-shadow: var(--lk-shadow-sm);
    overflow: hidden;
}
.studio-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--lk-text-muted);
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}
.studio-tab:hover { color: var(--lk-text-primary); background: var(--lk-bg-elevated); }
.studio-tab.active {
    color: var(--lk-text-primary);
    border-bottom-color: var(--lk-gold-primary);
    font-weight: 600;
}
.studio-tab.active svg { color: var(--lk-gold-primary); }
.studio-tab-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    padding-right: 12px;
}

/* Language toggle */
.studio-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border: 1px solid var(--lk-border-light);
    border-radius: 20px;
    background: var(--lk-bg-card);
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}
.studio-lang-toggle:hover { border-color: var(--lk-gold-primary); color: var(--lk-gold-primary); }

/* Credits badge — from dashboard-v2.css .lk-credits-badge */
.studio-credits-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--lk-gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}
.studio-credits-badge svg { width: 16px; height: 16px; color: var(--lk-gold-dark); }
.studio-credits-count { color: var(--lk-gold-dark); font-weight: 700; }

/* ─── Two-Column Layout — from dashboard-v2.css .lk-studio-main ─── */
.lk-studio-main {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 32px;
    align-items: start;
}

/* ─── Preview Section (Left) — from dashboard-v2.css .lk-preview-section ─── */
.lk-preview-section {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-xl);
    overflow: hidden;
    box-shadow: var(--lk-shadow-sm);
    min-height: 400px;
}
.lk-preview-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--lk-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--lk-bg-elevated);
}
.lk-preview-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--lk-text-primary);
}
.lk-preview-title-icon {
    width: 32px;
    height: 32px;
    background: var(--lk-gold-gradient);
    border-radius: var(--lk-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--lk-shadow-gold);
}
.lk-preview-title-icon svg { width: 16px; height: 16px; color: var(--lk-text-on-gold); }
.lk-preview-actions { display: flex; gap: 8px; }
.lk-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--lk-radius-sm);
    color: var(--lk-gold-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.lk-help-btn:hover { background: rgba(212, 175, 55, 0.2); color: #f4d03f; }
.lk-help-btn svg { width: 16px; height: 16px; }

/* ─── Upload Area — from dashboard-v2.css .lk-upload-* ─── */
.lk-upload-area { padding: 24px; }
.lk-upload-dropzone {
    border: 2px dashed var(--lk-border-medium);
    border-radius: var(--lk-radius-lg);
    padding: 50px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--lk-bg-elevated);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.lk-upload-dropzone:hover,
.lk-upload-dropzone.drag-over {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
}
.lk-upload-dropzone.lk-dropzone-compact {
    padding: 14px 20px;
    min-height: auto;
    flex-direction: row;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    border-style: dashed;
}
.lk-upload-dropzone.lk-dropzone-compact .lk-upload-icon,
.lk-upload-dropzone.lk-dropzone-compact .lk-upload-text,
.lk-upload-dropzone.lk-dropzone-compact .lk-upload-subtext,
.lk-upload-dropzone.lk-dropzone-compact .lk-upload-hint { display: none; }
.lk-compact-icon {
    width: 36px;
    height: 36px;
    background: var(--lk-gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lk-compact-icon svg { color: var(--lk-gold-primary); }
.lk-compact-label {
    font-size: 13px;
    color: var(--lk-text-muted);
    flex: 1;
    min-width: 0;
}
.lk-upload-icon {
    width: 72px;
    height: 72px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s;
}
.lk-upload-dropzone:hover .lk-upload-icon {
    background: var(--lk-gold-gradient);
    border-color: transparent;
    box-shadow: var(--lk-shadow-gold);
}
.lk-upload-icon svg { width: 32px; height: 32px; color: var(--lk-text-muted); transition: color 0.3s; }
.lk-upload-dropzone:hover .lk-upload-icon svg { color: var(--lk-text-on-gold); }
.lk-upload-text { font-size: 18px; font-weight: 600; color: var(--lk-text-primary); margin-bottom: 6px; }
.lk-upload-subtext { font-size: 14px; color: var(--lk-text-muted); margin-bottom: 16px; }
.lk-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--lk-navy-gradient);
    color: var(--lk-text-on-dark);
    border: none;
    border-radius: var(--lk-radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.lk-upload-btn:hover { transform: translateY(-2px); box-shadow: var(--lk-shadow-lg); }
.lk-upload-btn svg { width: 18px; height: 18px; }
.lk-upload-btn.lk-btn-sm { padding: 8px 16px; font-size: 13px; }
.lk-upload-hint { font-size: 12px; color: var(--lk-text-muted); margin-top: 12px; }

/* ─── Queue Section — from dashboard-v2.css .lk-queue-* + studio.css ─── */
.lk-queue-section {
    padding: 20px;
    background: var(--lk-bg-card);
    border-radius: var(--lk-radius-lg);
    margin: 0;
}
.lk-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.lk-queue-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--lk-text-primary);
    margin: 0;
}
.lk-queue-header h3 svg { width: 18px; height: 18px; color: var(--lk-gold-dark); }
.lk-queue-actions { display: flex; align-items: center; gap: 10px; }
.lk-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--lk-text-muted);
}
.lk-select-all input { width: 18px; height: 18px; cursor: pointer; }
.lk-clear-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: var(--lk-bg-card);
    color: var(--lk-error);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.lk-clear-btn:hover { background: #fef2f2; }

/* Queue grid — larger 260px cards with float effect */
.lk-queue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    max-width: 100%;
}
.lk-queue-item {
    position: relative;
    border-radius: var(--lk-radius-md);
    overflow: hidden;
    background: var(--lk-bg-card);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    max-width: 100%;
    min-width: 0;
}
.lk-queue-item:hover {
    border-color: var(--lk-gold-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.lk-queue-item.completed { opacity: 0.85; }
.lk-queue-item.error { }
.lk-queue-item.cancelled .lk-queue-thumb { opacity: 0.5; }
.lk-select-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}
.lk-select-checkbox input { width: 18px; height: 18px; cursor: pointer; }

/* Thumbnail — from studio.css .lustro-queue-thumb (4:3 aspect ratio) */
.lk-queue-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    max-width: 100%;
    position: relative;
}
.lk-queue-thumb img { width: 100%; height: 100%; object-fit: cover; max-width: 100%; }

/* Processing overlay — from studio.css .lustro-processing-overlay (dark navy) */
.lk-processing-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 54, 93, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 3;
}
.lk-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(201, 162, 39, 0.3);
    border-top-color: #C9A227;
    border-radius: 50%;
    animation: studio-spin 1s linear infinite;
}
.lk-percent { color: #E5C158; font-weight: 700; font-size: 16px; }
.lk-cancel-btn {
    background: rgba(201, 162, 39, 0.2);
    color: #E5C158;
    border: 1px solid rgba(201, 162, 39, 0.5);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 5px;
}
.lk-cancel-btn:hover { background: rgba(201, 162, 39, 0.3); }

/* Item info bar (below thumbnail) */
.lk-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--lk-bg-elevated);
    border-top: 1px solid var(--lk-border-light);
}
.lk-item-id {
    color: var(--lk-gold-primary);
    font-weight: 700;
    font-size: 11px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.lk-item-name {
    color: var(--lk-text-secondary);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Completed badge */
.lk-completed-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 3;
    background: var(--lk-success);
}

/* Error overlay with message */
.lk-error-overlay {
    position: absolute;
    inset: 0;
    background: rgba(239, 68, 68, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 3;
    color: white;
    padding: 12px;
    text-align: center;
}
.lk-error-overlay svg { flex-shrink: 0; }
.lk-error-msg {
    font-size: 11px;
    line-height: 1.3;
    max-height: 40px;
    overflow: hidden;
}

/* Remove button on queue items — from studio.css .lustro-queue-item-remove */
.lk-queue-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lk-queue-item:hover .lk-queue-item-remove { opacity: 1; }
.lk-queue-item-remove:hover { background: var(--lk-error); }

/* Progress bar — from studio.css .lustro-progress-bar */
.lk-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--lk-border-light);
}
.lk-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #C9A227, #E5C158);
    transition: width 0.3s ease;
}

/* ─── Controls Section (Right) — from dashboard-v2.css .lk-controls-section ─── */
.lk-controls-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 4px;
}
.lk-controls-section::-webkit-scrollbar { width: 4px; }
.lk-controls-section::-webkit-scrollbar-track { background: transparent; }
.lk-controls-section::-webkit-scrollbar-thumb { background: var(--lk-border-medium); border-radius: 2px; }

/* Provider selector — from dashboard-v2.css .lk-provider-* */
.lk-provider-selector {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-lg);
    padding: 10px;
    box-shadow: var(--lk-shadow-sm);
}
.lk-provider-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--lk-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.lk-provider-label svg { width: 12px; height: 12px; }
.lk-provider-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.lk-provider-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--lk-bg-elevated);
    border: 2px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    cursor: pointer;
    transition: all 0.2s;
}
.lk-provider-option:hover {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
}
.lk-provider-option.active {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
}
.lk-provider-icon {
    width: 28px;
    height: 28px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.lk-provider-option.active .lk-provider-icon { background: rgba(255,255,255,0.2); border-color: transparent; }
.lk-provider-icon svg { width: 14px; height: 14px; color: var(--lk-text-muted); }
.lk-provider-option.active .lk-provider-icon svg { color: var(--lk-text-on-gold); }
.lk-provider-text { display: flex; flex-direction: column; gap: 2px; }
.lk-provider-name { font-weight: 700; font-size: 11px; color: var(--lk-text-primary); line-height: 1.2; }
.lk-provider-option.active .lk-provider-name { color: var(--lk-text-on-gold); }
.lk-provider-desc { font-size: 9px; color: var(--lk-text-muted); text-align: left; line-height: 1.2; }
.lk-provider-option.active .lk-provider-desc { color: rgba(255,255,255,0.8); }

/* Control Tabs — from dashboard-v2.css .lk-control-tabs (4-column, vertical) */
.lk-control-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-lg);
}
.lk-control-tab {
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-radius: var(--lk-radius-md);
    font-weight: 600;
    font-size: 11px;
    color: var(--lk-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.lk-control-tab:hover { color: var(--lk-text-primary); background: var(--lk-bg-elevated); }
.lk-control-tab.active { background: var(--lk-gold-soft); color: var(--lk-gold-dark); box-shadow: var(--lk-shadow-sm); }
.lk-control-tab svg { width: 18px; height: 18px; }

/* Control Card — from dashboard-v2.css .lk-control-card */
.lk-control-card {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-xl);
    overflow: hidden;
    box-shadow: var(--lk-shadow-sm);
}
.lk-control-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--lk-border-light);
    background: var(--lk-bg-elevated);
}
.lk-control-card-icon {
    width: 32px;
    height: 32px;
    background: var(--lk-gold-gradient);
    border-radius: var(--lk-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--lk-shadow-gold);
    flex-shrink: 0;
}
.lk-control-card-icon svg { width: 16px; height: 16px; color: var(--lk-text-on-gold); }
.lk-control-card-title { font-weight: 600; font-size: 14px; color: var(--lk-text-primary); }
.lk-control-card-subtitle { font-size: 11px; color: var(--lk-text-muted); }
.lk-control-card-body { padding: 14px; }

/* Enhancement Grid — from dashboard-v2.css .lk-enhancement-* */
.lk-enhancement-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.lk-enhancement-grid.lk-grid-3 { grid-template-columns: repeat(3, 1fr); }
.lk-enhancement-item {
    background: var(--lk-bg-elevated);
    border: 2px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    padding: 14px 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lk-enhancement-item:hover {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
}
.lk-enhancement-item.selected {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
}
.lk-enhancement-icon {
    width: 36px;
    height: 36px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.2s;
}
.lk-enhancement-item:hover .lk-enhancement-icon,
.lk-enhancement-item.selected .lk-enhancement-icon {
    background: var(--lk-gold-gradient);
    border-color: transparent;
    box-shadow: var(--lk-shadow-gold);
}
.lk-enhancement-icon svg { width: 18px; height: 18px; color: var(--lk-text-muted); transition: color 0.2s; }
.lk-enhancement-item:hover .lk-enhancement-icon svg,
.lk-enhancement-item.selected .lk-enhancement-icon svg { color: var(--lk-text-on-gold); }
.lk-enhancement-label { font-weight: 600; font-size: 12px; color: var(--lk-text-primary); margin-bottom: 2px; }
.lk-enhancement-desc { font-size: 10px; color: var(--lk-text-muted); }

/* Room Grid (Staging) — from dashboard-v2.css .lk-room-* */
.lk-room-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.lk-room-item {
    background: var(--lk-bg-elevated);
    border: 2px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    padding: 10px 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 70px;
}
.lk-room-item:hover { border-color: var(--lk-gold-primary); background: var(--lk-gold-soft); }
.lk-room-item.selected {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
}
.lk-room-item svg { width: 24px; height: 24px; color: var(--lk-text-muted); transition: color 0.2s; flex-shrink: 0; }
.lk-room-item:hover svg,
.lk-room-item.selected svg { color: var(--lk-gold-dark); }
.lk-room-item span {
    font-weight: 600;
    font-size: 11px;
    color: var(--lk-text-primary);
    line-height: 1.25;
    text-align: center;
    max-width: 100%;
    padding: 0 2px;
}

/* Style Chips — from dashboard-v2.css .lk-style-* */
.lk-style-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lk-style-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--lk-bg-elevated);
    border: 2px solid var(--lk-border-light);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.lk-style-chip:hover { border-color: var(--lk-gold-primary); background: var(--lk-gold-soft); color: var(--lk-gold-dark); }
.lk-style-chip.selected {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
}
.lk-style-chip svg { width: 14px; height: 14px; }
.lk-style-chip.selected svg { color: var(--lk-text-on-gold); }

/* Custom Textarea — from dashboard-v2.css .lk-custom-textarea */
.lk-custom-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    background: var(--lk-bg-elevated);
    color: var(--lk-text-primary);
    transition: border-color 0.2s;
    min-height: 80px;
    box-sizing: border-box;
}
.lk-custom-textarea:focus { outline: none; border-color: var(--lk-gold-primary); }
.lk-custom-info { display: flex; justify-content: flex-end; margin-top: 8px; }
.lk-char-count { font-size: 11px; color: var(--lk-text-muted); }

/* Generate Button — from dashboard-v2.css .lk-generate-* */
.lk-generate-section {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-xl);
    padding: 16px;
    box-shadow: var(--lk-shadow-sm);
}
.lk-generate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    border: none;
    border-radius: var(--lk-radius-lg);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: var(--lk-shadow-gold);
    transition: all 0.2s;
}
.lk-generate-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 30px var(--lk-gold-glow); }
.lk-generate-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.lk-generate-btn svg { width: 20px; height: 20px; }
.lk-generate-btn-cost {
    background: rgba(0, 0, 0, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.studio-spinner { animation: studio-spin 1s linear infinite; }
@keyframes studio-spin { to { transform: rotate(360deg); } }

/* ─── Results Section — from dashboard-v2.css .lk-results-* ─── */
.lk-results-section {
    padding: 20px;
    background: var(--lk-bg-card);
    margin: 0;
}
.lk-results-header {
    margin-bottom: 16px;
}
.lk-results-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--lk-text-primary);
    margin: 0;
}
.lk-results-header h3 svg { width: 18px; height: 18px; color: var(--lk-success); }
.lk-results-grid-studio {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 25px;
}
.lk-result-item {
    background: var(--lk-bg-elevated);
    border-radius: var(--lk-radius-md);
    overflow: hidden;
    box-shadow: var(--lk-shadow-md);
}

/* Comparison Slider — from studio.css .lustro-comparison-* */
.studio-comparison {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
}
.studio-comparison-after-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.studio-comparison-after {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.studio-comparison-before {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
}
.studio-comparison-before img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.studio-comparison-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    margin-left: -2px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: ew-resize;
}
.studio-handle-line {
    flex: 1;
    width: 2px;
    background: white;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
}
.studio-handle-circle {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--lk-text-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    flex-shrink: 0;
}
.studio-comparison-label {
    position: absolute;
    bottom: 10px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 4;
}
.studio-label-before { left: 10px; }
.studio-label-after { right: 10px; }

/* Result actions — from dashboard-v2.css result actions */
.lk-result-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: var(--lk-bg-elevated);
}
.lk-result-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: var(--lk-radius-md);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--lk-border-light);
    background: var(--lk-bg-card);
    color: var(--lk-text-secondary);
    text-decoration: none;
}
.lk-result-btn:hover { background: var(--lk-gold-soft); border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); }
.lk-result-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.lk-result-btn-primary {
    background: var(--lk-gold-gradient);
    border: none;
    color: var(--lk-text-on-gold);
    box-shadow: var(--lk-shadow-gold);
}
.lk-result-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px var(--lk-gold-glow); color: var(--lk-text-on-gold); background: var(--lk-gold-gradient); }

.lk-results-cta {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--lk-border-light);
}

/* Error banner */
.studio-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--lk-radius-sm);
    color: var(--lk-error);
    font-size: 14px;
}
.studio-error p { margin: 0; flex: 1; }
.studio-error button { background: none; border: none; color: var(--lk-error); cursor: pointer; padding: 2px; }

/* ─── Feedback Section — from dashboard-v2.css .lk-feedback-* ─── */
.lk-feedback-section {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-xl);
    overflow: hidden;
    box-shadow: var(--lk-shadow-sm);
    padding: 0;
}
.lk-feedback-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--lk-border-light);
    background: var(--lk-bg-elevated);
}
.lk-feedback-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--lk-text-primary);
}
.lk-feedback-title svg { width: 18px; height: 18px; color: var(--lk-gold-dark); }
.lk-feedback-form { padding: 20px; }
.studio-feedback-success {
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--lk-radius-sm);
    color: #059669;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}
.lk-feedback-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.lk-feedback-row { margin-bottom: 12px; }
.lk-feedback-row label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: var(--lk-text-primary);
    margin-bottom: 6px;
}
.lk-input, .lk-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    font-family: inherit;
    font-size: 13px;
    background: var(--lk-bg-elevated);
    color: var(--lk-text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.lk-input:focus, .lk-select:focus {
    outline: none;
    border-color: var(--lk-gold-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.lk-feedback-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 16px;
}
.lk-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--lk-bg-elevated);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    font-size: 12px;
    color: var(--lk-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.lk-checkbox-label:hover { border-color: var(--lk-gold-primary); }
.lk-checkbox-label input { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.lk-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    font-family: inherit;
    font-size: 13px;
    background: var(--lk-bg-elevated);
    color: var(--lk-text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    resize: none;
    box-sizing: border-box;
}
.lk-textarea:focus { outline: none; border-color: var(--lk-gold-primary); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15); }

/* Action button — from dashboard-v2.css .lk-action-btn */
.lk-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--lk-bg-elevated);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    font-weight: 600;
    font-size: 13px;
    color: var(--lk-text-secondary);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.lk-action-btn:hover { border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); }
.lk-action-btn.primary {
    background: var(--lk-gold-gradient);
    border-color: transparent;
    color: var(--lk-text-on-gold);
    box-shadow: var(--lk-shadow-gold);
}
.lk-action-btn.primary:hover { transform: translateY(-2px); }
.lk-action-btn svg { width: 16px; height: 16px; }

/* ─── History Section — from dashboard-v2.css .lk-history-* ─── */
.lk-history-section {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-xl);
    overflow: hidden;
    box-shadow: var(--lk-shadow-sm);
    padding: 0;
}
.lk-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--lk-border-light);
    background: var(--lk-bg-elevated);
}
.lk-history-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: var(--lk-text-primary);
}
.lk-history-title svg { width: 18px; height: 18px; color: var(--lk-gold-dark); }
.lk-history-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.lk-history-action:hover { border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); }
.lk-history-action.danger:hover { border-color: var(--lk-error); color: var(--lk-error); }
.lk-history-action svg { width: 14px; height: 14px; }

.lk-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* History card layout — vertical cards with large thumbnails */
.lk-history-card {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--lk-shadow-sm);
}
.lk-history-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.lk-history-card-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--lk-border-light);
}
.lk-history-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lk-history-card-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lk-history-card-body { padding: 12px; }
.lk-history-card-info { margin-bottom: 10px; }
.lk-history-photo-id {
    display: inline-block;
    color: var(--lk-gold-primary);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    background: var(--lk-gold-soft);
    padding: 2px 8px;
    border-radius: 4px;
}
.lk-history-name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--lk-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
}
.lk-history-date { display: block; font-size: 11px; color: var(--lk-text-muted); margin-top: 2px; }
.lk-history-card-actions {
    display: flex;
    gap: 6px;
}
.lk-history-btn {
    flex: 1;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lk-bg-elevated);
    border: 1px solid var(--lk-border-light);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--lk-text-secondary);
    padding: 0;
}
.lk-history-btn:hover { background: var(--lk-gold-soft); border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); }
.lk-history-btn-danger:hover { background: var(--lk-error); border-color: transparent; color: white; }
.lk-history-btn svg { width: 14px; height: 14px; }

/* Loading and Empty states for history */
.studio-history-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--lk-gold-primary);
}
.studio-history-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--lk-text-muted);
}
.studio-history-empty svg { opacity: 0.3; margin-bottom: 12px; }
.studio-history-empty h3 { font-size: 16px; font-weight: 600; color: var(--lk-text-secondary); margin: 0 0 6px 0; }
.studio-history-empty p { font-size: 13px; margin: 0; }

/* ─── Preview Modal (History — After/Before/Compare) ─── */
.lk-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lk-fade-in 0.2s ease;
}
@keyframes lk-fade-in { from { opacity: 0; } to { opacity: 1; } }
.lk-preview-modal {
    background: var(--lk-bg-card, #fff);
    border-radius: 16px;
    max-width: 900px;
    width: 95vw;
    height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    /* Need CSS vars since modal is fixed outside .studio-page */
    --lk-bg-card: #ffffff;
    --lk-bg-elevated: #f0f2f7;
    --lk-border-light: #e8ebf0;
    --lk-gold-primary: #d4af37;
    --lk-gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    --lk-text-primary: #1A365D;
    --lk-text-secondary: #4a5068;
    --lk-text-on-gold: #1a1a2e;
    --lk-text-on-dark: #ffffff;
    --lk-shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --lk-radius-sm: 8px;
    --lk-radius-md: 12px;
}
.lk-pm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    border-radius: 16px 16px 0 0;
}
.lk-pm-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #fff;
}
.lk-pm-title svg { color: var(--lk-gold-primary); }
.lk-pm-photo-id {
    background: rgba(212, 175, 55, 0.2);
    color: var(--lk-gold-primary);
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.lk-pm-close {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lk-pm-close:hover { background: rgba(255,255,255,0.2); color: #fff; }
.lk-pm-tabs {
    display: flex;
    gap: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    justify-content: center;
    padding-bottom: 0;
}
.lk-pm-tab {
    padding: 12px 32px;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    border: none;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: rgba(255,255,255,0.5);
    transition: all 0.2s;
    letter-spacing: 0.3px;
}
.lk-pm-tab:hover { color: rgba(255,255,255,0.8); border-bottom-color: rgba(212, 175, 55, 0.3); }
.lk-pm-tab.active {
    background: transparent;
    color: var(--lk-gold-primary);
    border-bottom-color: var(--lk-gold-primary);
}
.lk-pm-header { flex-shrink: 0; }
.lk-pm-tabs { flex-shrink: 0; }
.lk-pm-body { padding: 0; flex: 1; min-height: 0; overflow: hidden; display: flex; }
.lk-pm-image { display: flex; justify-content: center; align-items: center; background: #0f0f1a; flex: 1; min-height: 0; overflow: hidden; }
.lk-pm-image img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.lk-pm-footer { flex-shrink: 0; }
.lk-pm-compare {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    background: #0f0f1a;
}
.lk-pm-compare-after { position: absolute; inset: 0; z-index: 1; }
.lk-pm-compare-after img { width: 100%; height: 100%; object-fit: contain; }
.lk-pm-compare-before { position: absolute; inset: 0; z-index: 2; overflow: hidden; }
.lk-pm-compare-before img { width: 100%; height: 100%; object-fit: contain; }
.lk-pm-no-before {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: rgba(255,255,255,0.35);
    text-align: center;
    background: #0f0f1a;
    flex: 1;
    width: 100%;
}
.lk-pm-no-before svg { opacity: 0.25; }
.lk-pm-no-before span { font-size: 14px; line-height: 1.5; }
.lk-pm-footer {
    display: flex;
    justify-content: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    border-radius: 0 0 16px 16px;
}

/* ─── Guide (Static tab with step cards) ─── */
.studio-guide { display: flex; flex-direction: column; gap: 14px; }
.studio-guide-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: var(--lk-radius-lg);
    padding: 24px;
    transition: all 0.2s;
}
.studio-guide-step:hover {
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.12);
}
.studio-guide-badge {
    width: 32px;
    height: 32px;
    background: var(--lk-gold-gradient);
    color: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.studio-guide-icon {
    width: 48px;
    height: 48px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--lk-gold-primary);
    flex-shrink: 0;
}
.studio-guide-content h3 { font-size: 16px; font-weight: 600; color: #fff; margin: 0 0 6px 0; }
.studio-guide-content p { font-size: 14px; color: rgba(255,255,255,0.7); margin: 0; line-height: 1.5; }

/* ═══════════════════════════════════════════════════════
   TUTORIAL SYSTEM — from studio-tutorial.css (exact copy)
   ═══════════════════════════════════════════════════════ */

/* Highlight */
.lk-tutorial-highlight {
    position: relative;
    z-index: 100 !important;
    outline: 4px solid #d4af37 !important;
    outline-offset: 4px;
    border-radius: 12px;
    animation: lk-pulse 2s ease-in-out infinite;
    background: rgba(212, 175, 55, 0.05);
}
@keyframes lk-pulse {
    0%, 100% { outline-color: rgba(212, 175, 55, 0.9); box-shadow: 0 0 20px rgba(212, 175, 55, 0.4); }
    50% { outline-color: rgba(244, 208, 63, 1); box-shadow: 0 0 40px rgba(212, 175, 55, 0.6); }
}

/* Tooltip */
.lk-tutorial-tooltip {
    position: fixed;
    z-index: 10000;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.3);
    padding: 24px;
    max-width: 380px;
    min-width: 300px;
}
.lk-tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #1a1a2e;
    border: 2px solid rgba(212, 175, 55, 0.5);
    transform: rotate(45deg);
}
.lk-tutorial-tooltip.arrow-top::before { top: -10px; left: 50%; margin-left: -8px; border-bottom: none; border-right: none; }
.lk-tutorial-tooltip.arrow-bottom::before { bottom: -10px; left: 50%; margin-left: -8px; border-top: none; border-left: none; }
.lk-tutorial-tooltip.arrow-left::before { left: -10px; top: 50%; margin-top: -8px; border-top: none; border-right: none; }
.lk-tutorial-tooltip.arrow-right::before { right: -10px; top: 50%; margin-top: -8px; border-bottom: none; border-left: none; }

.lk-tutorial-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s;
    z-index: 10;
    padding: 0;
    line-height: 1;
}
.lk-tutorial-close:hover { background: rgba(255, 255, 255, 0.35); border-color: rgba(255, 255, 255, 0.6); transform: scale(1.05); }
.lk-tutorial-close svg { width: 18px; height: 18px; }

/* Tutorial progress dots */
.lk-tutorial-progress { display: flex; align-items: center; gap: 6px; margin-bottom: 20px; }
.lk-tutorial-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}
.lk-tutorial-progress-dot.active {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 100%);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}
.lk-tutorial-progress-dot.completed { background: #10b981; }

/* Tutorial content */
.lk-tutorial-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.lk-tutorial-step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    color: #1a1a2e;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.lk-tutorial-title { font-size: 18px; font-weight: 700; color: #ffffff; margin: 0; line-height: 1.3; }
.lk-tutorial-body { color: rgba(255, 255, 255, 0.7); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }
.lk-tutorial-body p { margin: 0 0 8px 0; }
.lk-tutorial-body p:last-child { margin-bottom: 0; }

/* Tutorial buttons */
.lk-tutorial-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lk-tutorial-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    outline: none;
}
.lk-tutorial-btn-primary {
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    color: #1a1a2e;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}
.lk-tutorial-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5); }
.lk-tutorial-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.lk-tutorial-btn-secondary:hover { background: rgba(255, 255, 255, 0.15); color: #ffffff; }
.lk-tutorial-btn-skip { background: transparent; color: rgba(255, 255, 255, 0.5); padding: 10px 12px; }
.lk-tutorial-btn-skip:hover { color: rgba(255, 255, 255, 0.8); }

/* Welcome Modal */
.lk-tutorial-welcome {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    border: 2px solid rgba(212, 175, 55, 0.5);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.3);
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
}
.lk-tutorial-welcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
    animation: lk-float 3s ease-in-out infinite;
}
@keyframes lk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.lk-tutorial-welcome-icon svg { width: 40px; height: 40px; }
.lk-tutorial-welcome h2 { font-size: 24px; font-weight: 700; color: #ffffff; margin: 0 0 12px 0; }
.lk-tutorial-welcome p { color: rgba(255, 255, 255, 0.7); font-size: 16px; line-height: 1.6; margin: 0 0 32px 0; }
.lk-tutorial-welcome-actions { display: flex; flex-direction: column; gap: 12px; }
.lk-tutorial-welcome .lk-tutorial-btn-primary { padding: 14px 28px; font-size: 16px; }
.lk-tutorial-welcome .lk-tutorial-close { top: 16px; right: 16px; }

/* Complete Modal */
.lk-tutorial-complete {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    border: 2px solid rgba(16, 185, 129, 0.5);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(16, 185, 129, 0.3);
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
}
.lk-tutorial-complete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    animation: lk-success-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes lk-success-bounce { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }
.lk-tutorial-complete-icon svg { width: 40px; height: 40px; }
.lk-tutorial-complete h2 { font-size: 24px; font-weight: 700; color: #ffffff; margin: 0 0 12px 0; }
.lk-tutorial-complete p { color: rgba(255, 255, 255, 0.7); font-size: 15px; line-height: 1.6; margin: 0 0 24px 0; }

/* ─── Responsive — from dashboard-v2.css responsive ─── */
@media (max-width: 1024px) {
    .lk-studio-main {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }
    .lk-preview-section { order: 1; }
    .lk-controls-section { position: static; max-height: none; order: 2; }
    .lk-room-grid { grid-template-columns: repeat(3, 1fr); }
    .lk-provider-options { grid-template-columns: 1fr 1fr; }
    .lk-results-grid-studio { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .lk-room-grid { grid-template-columns: repeat(3, 1fr); }
    .lk-history-grid { grid-template-columns: 1fr; }
    .lk-tutorial-tooltip {
        max-width: calc(100vw - 32px);
        min-width: auto;
        padding: 20px;
        position: fixed !important;
        bottom: 20px !important;
        left: 16px !important;
        right: 16px !important;
        top: auto !important;
    }
    .lk-tutorial-tooltip::before { display: none; }
    .lk-tutorial-welcome,
    .lk-tutorial-complete { padding: 28px; width: calc(100% - 32px); }
    .lk-tutorial-welcome h2,
    .lk-tutorial-complete h2 { font-size: 20px; }
    .studio-tabs { flex-wrap: wrap; }
    .studio-tab { padding: 10px 12px; font-size: 13px; }
}

@media (max-width: 640px) {
    .lk-control-tabs { grid-template-columns: repeat(2, 1fr); }
    .lk-enhancement-grid { grid-template-columns: 1fr; }
    .lk-enhancement-grid.lk-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .lk-room-grid { grid-template-columns: repeat(2, 1fr); }
    .lk-room-item { min-height: 60px; padding: 8px 4px; }
    .lk-room-item svg { width: 18px; height: 18px; }
    .lk-room-item span { font-size: 9px; }
    .lk-style-chips { justify-content: center; }
    .lk-provider-options { grid-template-columns: 1fr; }
    .studio-guide-step { flex-direction: column; }
    .lk-queue-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ═══════════════════════════════════════════════════════
   SOCIAL PAGE — Navy + Gold (matching Studio)
   ═══════════════════════════════════════════════════════ */

.social-page {
    max-width: none;
    width: 100%;
    padding: 0 32px;
    --lk-bg-primary: #f7f8fc;
    --lk-bg-secondary: #ffffff;
    --lk-bg-card: #ffffff;
    --lk-bg-card-hover: #fafbfd;
    --lk-bg-elevated: #f0f2f7;
    --lk-bg-input: #f7f8fc;
    --lk-border-light: #e8ebf0;
    --lk-border-medium: #dde1e8;
    --lk-border-dark: #c5cad4;
    --lk-navy-dark: #0f0f1a;
    --lk-navy-medium: #1A365D;
    --lk-navy-light: #252540;
    --lk-navy-gradient: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    --lk-gold-primary: #d4af37;
    --lk-gold-light: #f4d03f;
    --lk-gold-dark: #b8960c;
    --lk-gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    --lk-gold-soft: rgba(212, 175, 55, 0.12);
    --lk-gold-glow: rgba(212, 175, 55, 0.3);
    --lk-text-primary: #1A365D;
    --lk-text-secondary: #4a5068;
    --lk-text-muted: #8b92a5;
    --lk-text-on-dark: #ffffff;
    --lk-text-on-gold: #1a1a2e;
    --lk-success: #10b981;
    --lk-warning: #f59e0b;
    --lk-error: #ef4444;
    --lk-shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
    --lk-shadow-md: 0 4px 12px rgba(26, 26, 46, 0.06);
    --lk-shadow-lg: 0 8px 24px rgba(26, 26, 46, 0.08);
    --lk-shadow-xl: 0 20px 40px rgba(26, 26, 46, 0.12);
    --lk-shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --lk-shadow-navy: 0 4px 20px rgba(26, 26, 46, 0.2);
    --lk-radius-sm: 8px;
    --lk-radius-md: 12px;
    --lk-radius-lg: 16px;
    --lk-radius-xl: 24px;
}

/* ─── Header card ─── */
.soc-header {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-lg);
    box-shadow: var(--lk-shadow-sm);
    padding: 18px 24px;
    margin-bottom: 16px;
}

.soc-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.soc-header-top h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--lk-text-primary);
    margin: 0;
}

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

/* Credits badge — gold (like Studio) */
.soc-credits-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--lk-gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--lk-gold-dark);
}
.soc-credits-badge svg { color: var(--lk-gold-dark); }

/* Manage button — gold-tinted */
.soc-manage-btn {
    padding: 8px 16px;
    border: 1px solid var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    font-size: 13px;
    font-weight: 500;
    background: var(--lk-bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--lk-text-secondary);
    transition: all 0.2s;
}
.soc-manage-btn:hover {
    background: var(--lk-gold-soft);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--lk-gold-dark);
}
.soc-manage-btn:hover svg { color: var(--lk-gold-dark); }

/* Accounts bar */
.soc-accounts-bar {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--lk-border-light);
}

.soc-account-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.soc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--lk-gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: var(--lk-gold-dark);
    font-weight: 500;
}

.soc-no-accounts-hint {
    font-size: 13px;
    color: var(--lk-text-muted);
}

/* ─── Tab bar card (like .studio-tabs) ─── */
.soc-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: var(--lk-bg-card);
    border-radius: var(--lk-radius-lg);
    border: 1px solid var(--lk-border-light);
    box-shadow: var(--lk-shadow-sm);
    overflow: hidden;
}

.soc-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--lk-text-muted);
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
    position: relative;
}

.soc-tab:hover {
    color: var(--lk-text-primary);
    background: var(--lk-bg-elevated);
}

.soc-tab.active {
    color: var(--lk-text-primary);
    border-bottom-color: var(--lk-gold-primary);
    font-weight: 600;
}
.soc-tab.active svg { color: var(--lk-gold-primary); }

.soc-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    font-size: 10px;
    font-weight: 700;
}

/* ─── Tab content ─── */
.social-page-content {
    min-height: 400px;
}

.sp-tab-content {
    animation: standaloneIn 0.2s ease;
}

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

.sp-tab-animate {
    animation: standaloneIn 0.2s ease;
}

.social-create-columns {
    max-width: 100%;
}

/* Full-width calendar in standalone */
.social-page .calendar-container {
    max-width: 100%;
}

/* ─── Scoped overrides for inner components ─── */

/* Drafts tab wrapper */
.social-page .sp-drafts-tab {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-lg);
    padding: 20px;
    box-shadow: var(--lk-shadow-sm);
}

/* Draft cards — larger radius, gold expand */
.social-page .sp-draft-card {
    border-radius: var(--lk-radius-md);
    border-color: var(--lk-border-light);
}
.social-page .sp-draft-card.expanded {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: var(--lk-shadow-md);
}

/* Calendar tab wrapper */
.social-page .sp-calendar-tab {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-lg);
    padding: 20px;
    box-shadow: var(--lk-shadow-sm);
}

/* Generate / publish buttons — gold gradient */
.social-page .social-generate-btn,
.social-page .sp-publish-btn {
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    border: none;
    border-radius: var(--lk-radius-lg);
    font-weight: 700;
    box-shadow: var(--lk-shadow-gold);
    transition: all 0.2s;
}
.social-page .social-generate-btn:hover:not(:disabled),
.social-page .sp-publish-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--lk-gold-glow);
}

/* Panel footer elevation */
.social-page .social-panel-footer {
    border-top: 1px solid var(--lk-border-light);
    background: var(--lk-bg-elevated);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .social-page { padding: 0 12px; }
    .soc-header { padding: 14px 16px; }
    .soc-header-top { flex-wrap: wrap; gap: 10px; }
    .soc-header-top h1 { font-size: 18px; }
    .soc-header-right { width: 100%; justify-content: flex-end; }
    .soc-tabs { border-radius: var(--lk-radius-md); }
    .soc-tab { padding: 10px 12px; font-size: 12px; gap: 5px; }
    .soc-credits-badge { padding: 6px 10px; font-size: 12px; }
    .soc-manage-btn { padding: 6px 10px; font-size: 12px; }
}

/* ─── Social V2 — Two-column layout (like Studio) ─── */

.soc-v2-main {
    display: grid;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.soc-v2-preview-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
}
.soc-v2-controls-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}
.soc-v2-controls-col .lk-control-card {
    overflow: visible;
}

/* ─── Preview card ─── */
.soc-v2-preview-card {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-xl);
    overflow: hidden;
    box-shadow: var(--lk-shadow-sm);
    position: relative;
}
.soc-v2-preview-card img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
    transition: filter 0.25s;
}
.soc-v2-preview-card.clickable { cursor: zoom-in; }
.soc-v2-preview-card.clickable::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.25s;
    pointer-events: none;
    border-radius: var(--lk-radius-xl);
}
.soc-v2-preview-card.clickable:hover::after {
    background: rgba(0,0,0,0.25);
}
.soc-v2-preview-card.clickable .soc-v2-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    transition: all 0.25s;
    z-index: 3;
    pointer-events: none;
    color: #fff;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.soc-v2-preview-card.clickable:hover .soc-v2-zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.soc-v2-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    color: var(--lk-text-muted);
    text-align: center;
    gap: 12px;
}
.soc-v2-preview-placeholder svg { color: var(--lk-border-medium); }
.soc-v2-preview-placeholder p { margin: 0; font-size: 14px; }

/* ─── Photo grid ─── */
.soc-v2-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    overflow-y: auto;
    padding: 4px;
}
.soc-v2-gallery-card .soc-v2-photo-grid {
    max-height: calc(100vh - 220px);
    min-height: 100px;
}
.soc-v2-photo-grid::-webkit-scrollbar { width: 4px; }
.soc-v2-photo-grid::-webkit-scrollbar-thumb { background: var(--lk-border-medium); border-radius: 4px; }

.soc-v2-photo-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}
.soc-v2-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.soc-v2-photo-item:hover {
    border-color: var(--lk-border-medium);
    transform: scale(1.03);
}
.soc-v2-photo-item.selected {
    border-color: var(--lk-gold-primary);
    box-shadow: 0 0 0 2px var(--lk-gold-glow);
}
.soc-v2-photo-item.selected::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.soc-v2-upload-card {
    aspect-ratio: 1;
    border-radius: 12px;
    border: 2px dashed var(--lk-border-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--lk-text-muted);
    font-size: 11px;
    font-weight: 500;
}
.soc-v2-upload-card:hover {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
    background: var(--lk-gold-soft);
}
.soc-v2-upload-card svg { color: inherit; }

/* ─── Photo tabs ─── */
.soc-v2-photo-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.soc-v2-photo-tab {
    padding: 6px 14px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: var(--lk-bg-elevated);
    color: var(--lk-text-muted);
    transition: all 0.2s;
}
.soc-v2-photo-tab.active {
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
    font-weight: 600;
}
.soc-v2-photo-tab .tab-count {
    margin-left: 4px;
    opacity: 0.6;
}

/* ─── Template card grid ─── */
.soc-v2-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.soc-v2-template-grid.vertical {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
}

.soc-v2-template-card {
    border: 2px solid var(--lk-border-light);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--lk-bg-card);
}
.soc-v2-template-card img {
    width: 100%;
    display: block;
}
.soc-v2-template-card:hover {
    border-color: var(--lk-border-medium);
    transform: translateY(-2px);
    box-shadow: var(--lk-shadow-md);
}
.soc-v2-template-card.active {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
    box-shadow: 0 0 0 2px var(--lk-gold-glow);
}
.soc-v2-template-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.soc-v2-template-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--lk-border-light);
}
.soc-v2-template-name {
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--lk-text-primary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.soc-v2-template-card.active .soc-v2-template-name {
    color: var(--lk-gold-dark);
}
.soc-v2-template-example-btn {
    display: block;
    width: 100%;
    padding: 4px 8px 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--lk-gold-dark);
    background: var(--lk-gold-soft);
    border: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    letter-spacing: 0.02em;
}
.soc-v2-template-example-btn:hover {
    background: var(--lk-gold-primary);
    color: var(--lk-text-on-gold);
}
.soc-v2-template-example-btn .spinner {
    width: 10px;
    height: 10px;
    border-width: 1.5px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}
.soc-v2-example-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: var(--lk-shadow-sm);
    z-index: 2;
}
.soc-v2-example-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 2;
    transition: background 0.15s;
}
.soc-v2-example-close:hover {
    background: rgba(0,0,0,0.7);
}

/* Template none card */
.soc-v2-template-none {
    border-style: dashed;
}
.soc-v2-template-none-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lk-bg-elevated);
    color: var(--lk-text-muted);
}
.soc-v2-template-card.active .soc-v2-template-none-icon {
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
}

/* ─── Category tabs ─── */
.soc-v2-category-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.soc-v2-category-tab {
    padding: 5px 12px;
    border: 1px solid var(--lk-border-light);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--lk-text-muted);
    transition: all 0.2s;
}
.soc-v2-category-tab.active {
    background: var(--lk-gold-soft);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--lk-gold-dark);
    font-weight: 600;
}
.soc-v2-category-tab:hover:not(.active) {
    border-color: var(--lk-border-medium);
    color: var(--lk-text-primary);
}

.soc-v2-coming-soon {
    text-align: center;
    padding: 20px;
    color: var(--lk-text-muted);
    font-size: 13px;
    font-style: italic;
}

/* ─── Platform pills v2 ─── */
.soc-v2-platform-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.soc-v2-platform-pill {
    padding: 8px 16px;
    border: 2px solid var(--lk-border-light);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--lk-text-secondary);
    transition: all 0.2s;
}
.soc-v2-platform-pill:hover {
    border-color: var(--lk-border-medium);
}
.soc-v2-platform-pill.active {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
    background: var(--lk-gold-soft);
    font-weight: 600;
}

/* ─── Caption v2 ─── */
.soc-v2-textarea {
    width: 100%;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--lk-text-primary);
    background: var(--lk-bg-input);
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.soc-v2-textarea:focus {
    outline: none;
    border-color: var(--lk-gold-primary);
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
}
.soc-v2-textarea.hashtags {
    font-size: 12px;
    color: var(--lk-text-muted);
}

.soc-v2-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--lk-border-medium);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: var(--lk-bg-card);
    color: var(--lk-text-secondary);
    transition: all 0.2s;
    margin-top: 8px;
}
.soc-v2-ai-btn:hover:not(:disabled) {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
    background: var(--lk-gold-soft);
}
.soc-v2-ai-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Property inputs v2 ─── */
.soc-v2-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.soc-v2-inputs input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--lk-text-primary);
    background: var(--lk-bg-input);
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.soc-v2-inputs input:focus {
    outline: none;
    border-color: var(--lk-gold-primary);
    box-shadow: 0 0 0 3px var(--lk-gold-soft);
}
.soc-v2-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.soc-v2-input-with-count {
    position: relative;
}
.soc-v2-input-with-count .char-count {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--lk-text-muted);
}
.soc-v2-input-with-count .char-count.warn {
    color: var(--lk-warning);
}

/* ─── Logo section v2 ─── */
.soc-v2-logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}
.soc-v2-logo-section .logo-preview {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--lk-border-light);
}
.soc-v2-logo-btn {
    padding: 6px 14px;
    border: 1px solid var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    font-size: 12px;
    cursor: pointer;
    background: var(--lk-bg-card);
    color: var(--lk-text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.soc-v2-logo-btn:hover {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
}
.soc-v2-color-swatches {
    display: flex;
    gap: 6px;
    margin-left: auto;
}
.soc-v2-color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--lk-bg-card);
    box-shadow: 0 0 0 1px var(--lk-border-light);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.soc-v2-color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--lk-gold-primary);
}
.soc-v2-color-swatch.active {
    box-shadow: 0 0 0 2px var(--lk-gold-primary);
}
.soc-v2-color-swatch-label {
    font-size: 9px;
    color: var(--lk-text-muted);
    text-align: center;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Color picker popover */
.soc-v2-color-picker-wrap {
    position: relative;
}
.soc-v2-color-picker {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 100;
    min-width: 220px;
    animation: soc-picker-in 0.15s ease-out;
}
@keyframes soc-picker-in {
    from { opacity: 0; transform: translateY(6px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.soc-v2-color-picker-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--lk-text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.soc-v2-color-picker-group {
    margin-bottom: 10px;
}
.soc-v2-color-picker-group:last-child {
    margin-bottom: 0;
}
.soc-v2-color-picker-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--lk-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.soc-v2-color-picker-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.soc-v2-color-option {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.soc-v2-color-option:hover {
    transform: scale(1.15);
    border-color: var(--lk-border-medium);
}
.soc-v2-color-option.selected {
    border-color: var(--lk-gold-primary);
    box-shadow: 0 0 0 2px var(--lk-gold-glow);
}
.soc-v2-color-option.selected::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.soc-v2-color-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--lk-border-light);
}
.soc-v2-color-hex-input {
    width: 80px;
    padding: 4px 8px;
    border: 1px solid var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    font-size: 12px;
    font-family: monospace;
    color: var(--lk-text-primary);
    background: var(--lk-bg-elevated);
}
.soc-v2-color-hex-input:focus {
    outline: none;
    border-color: var(--lk-gold-primary);
}
.soc-v2-color-native {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid var(--lk-border-medium);
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    background: none;
}
.soc-v2-color-native::-webkit-color-swatch-wrapper { padding: 0; }
.soc-v2-color-native::-webkit-color-swatch { border: none; border-radius: 50%; }
.soc-v2-color-native::-moz-color-swatch { border: none; border-radius: 50%; }

/* ─── AI Template section ─── */
.soc-v2-ai-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.soc-v2-ai-section p {
    margin: 0;
    font-size: 12px;
    color: var(--lk-text-muted);
}
.soc-v2-ai-generate-btn {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--lk-bg-card);
    color: var(--lk-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.soc-v2-ai-generate-btn:hover:not(:disabled) {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
}
.soc-v2-ai-generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.soc-v2-credit-warning {
    font-size: 11px;
    color: var(--lk-text-muted);
    text-align: center;
}

/* ─── PostPreview v2 (in 2-column layout) ─── */
.soc-v2-result-image {
    border-radius: var(--lk-radius-xl);
    overflow: hidden;
    box-shadow: var(--lk-shadow-md);
    background: var(--lk-bg-card);
    cursor: zoom-in;
    position: relative;
}
.soc-v2-result-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.25s;
    pointer-events: none;
    border-radius: var(--lk-radius-xl);
}
.soc-v2-result-image:hover::after {
    background: rgba(0,0,0,0.25);
}
.soc-v2-result-image .soc-v2-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    transition: all 0.25s;
    z-index: 3;
    pointer-events: none;
    color: #fff;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.soc-v2-result-image:hover .soc-v2-zoom-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.soc-v2-result-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    background: #f0f0f0;
}

.soc-v2-post-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.soc-v2-action-btn {
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--lk-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.soc-v2-action-btn.publish {
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    border: none;
    box-shadow: var(--lk-shadow-gold);
}
.soc-v2-action-btn.publish:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--lk-gold-glow);
}
.soc-v2-action-btn.publish:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.soc-v2-action-btn.secondary {
    background: var(--lk-bg-card);
    color: var(--lk-text-secondary);
    border: 1px solid var(--lk-border-medium);
}
.soc-v2-action-btn.secondary:hover:not(:disabled) {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
    background: var(--lk-gold-soft);
}
.soc-v2-action-btn.secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.soc-v2-action-btn.reset {
    background: transparent;
    color: var(--lk-text-muted);
    border: 1px solid var(--lk-border-light);
    font-weight: 500;
}
.soc-v2-action-btn.reset:hover {
    border-color: var(--lk-border-medium);
    color: var(--lk-text-secondary);
}

/* ─── Publish channels v2 ─── */
.soc-v2-channels .publish-channel {
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    margin-bottom: 6px;
    overflow: hidden;
}
.soc-v2-channels .publish-channel-header {
    padding: 8px 12px;
    background: var(--lk-bg-elevated);
}

/* ─── Copy section v2 ─── */
.soc-v2-copy-section {
    background: var(--lk-bg-input);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    padding: 10px 12px;
}
.soc-v2-copy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.soc-v2-copy-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--lk-text-muted);
    text-transform: uppercase;
}
.soc-v2-copy-btn {
    padding: 3px 10px;
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    color: var(--lk-text-muted);
    transition: all 0.2s;
}
.soc-v2-copy-btn:hover { background: var(--lk-bg-elevated); }
.soc-v2-copy-btn.copied { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }

/* ─── DraftsTab v2 grid ─── */
.soc-v2-drafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.soc-v2-draft-card {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-xl);
    overflow: hidden;
    box-shadow: var(--lk-shadow-sm);
    transition: all 0.2s;
}
.soc-v2-draft-card:hover {
    box-shadow: var(--lk-shadow-md);
    transform: translateY(-2px);
}
.soc-v2-draft-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.soc-v2-draft-card-body {
    padding: 16px;
}
.soc-v2-draft-card-caption {
    font-size: 13px;
    color: var(--lk-text-primary);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.soc-v2-draft-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.soc-v2-engagement-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--lk-text-secondary);
    font-weight: 500;
}
.soc-v2-engagement-item {
    display: flex;
    align-items: center;
    gap: 3px;
}
.sp-cal-post-engagement {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--lk-text-secondary);
    font-weight: 500;
    margin-left: 4px;
}
.sp-cal-post-engagement svg { flex-shrink: 0; }
.soc-v2-draft-card-date {
    font-size: 11px;
    color: var(--lk-text-muted);
    margin-left: auto;
}
.soc-v2-draft-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.soc-v2-draft-btn {
    padding: 6px 12px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: var(--lk-bg-card);
    color: var(--lk-text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}
.soc-v2-draft-btn:hover {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
}
.soc-v2-draft-btn.publish {
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    border: none;
    font-weight: 600;
}
.soc-v2-draft-btn.publish:hover {
    box-shadow: var(--lk-shadow-gold);
}
.soc-v2-draft-btn.delete {
    color: var(--lk-error);
    border-color: transparent;
}
.soc-v2-draft-btn.delete:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

/* ─── CalendarTab v2 ─── */
.social-page .sp-calendar-tab {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-xl);
    padding: 24px;
    box-shadow: var(--lk-shadow-sm);
}
.social-page .sp-cal-day {
    border-radius: var(--lk-radius-sm);
    transition: all 0.15s;
}
.social-page .sp-cal-day:hover:not(.empty):not(.past) {
    background: var(--lk-gold-soft);
}
.social-page .sp-cal-day.selected {
    border: 2px solid var(--lk-gold-primary) !important;
    background: var(--lk-gold-soft);
}
.social-page .sp-cal-day.today .sp-cal-day-num {
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.social-page .sp-schedule-banner {
    background: var(--lk-gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--lk-radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--lk-gold-dark);
    font-weight: 500;
    font-size: 14px;
}
.social-page .sp-schedule-banner svg { color: var(--lk-gold-dark); }
.social-page .sp-schedule-confirm-btn {
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    border: none;
    border-radius: var(--lk-radius-sm);
    font-weight: 600;
    box-shadow: var(--lk-shadow-gold);
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.social-page .sp-schedule-confirm-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--lk-gold-glow);
}

/* Drafts empty state */
.soc-v2-drafts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--lk-text-muted);
    gap: 12px;
}
.soc-v2-drafts-empty svg { color: var(--lk-border-medium); }
.soc-v2-drafts-empty p { margin: 0; font-size: 15px; font-weight: 500; color: var(--lk-text-secondary); }
.soc-v2-drafts-empty span { font-size: 13px; }

/* ─── Publish results ─── */
.soc-v2-publish-results {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.soc-v2-publish-result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--lk-radius-sm);
    font-size: 13px;
}
.soc-v2-publish-result-item.published {
    background: #ecfdf5;
    color: #065f46;
}
.soc-v2-publish-result-item.failed {
    background: #fef2f2;
    color: #991b1b;
}

/* ─── Social V2 Responsive ─── */
@media (max-width: 900px) {
    .soc-v2-main {
        grid-template-columns: 1fr;
    }
    .soc-v2-preview-col {
        position: static;
    }
    .soc-v2-preview-card img {
        max-height: 300px;
    }
}
@media (max-width: 768px) {
    .soc-v2-drafts-grid {
        grid-template-columns: 1fr;
    }
    .soc-v2-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    .soc-v2-template-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

/* ═══════════════════════════════════════════════════════
   VIRTUAL TOUR PAGE — Navy + Gold
   ═══════════════════════════════════════════════════════ */

.vtour-page {
    max-width: 1260px;
    width: 100%;
    padding: 0 32px;
    --lk-bg-primary: #f7f8fc;
    --lk-bg-secondary: #ffffff;
    --lk-bg-card: #ffffff;
    --lk-bg-card-hover: #fafbfd;
    --lk-bg-elevated: #f0f2f7;
    --lk-bg-input: #f7f8fc;
    --lk-border-light: #e8ebf0;
    --lk-border-medium: #dde1e8;
    --lk-border-dark: #c5cad4;
    --lk-navy-dark: #0f0f1a;
    --lk-navy-medium: #1A365D;
    --lk-navy-light: #252540;
    --lk-navy-gradient: linear-gradient(135deg, #1a1a2e 0%, #252540 100%);
    --lk-gold-primary: #d4af37;
    --lk-gold-light: #f4d03f;
    --lk-gold-dark: #b8960c;
    --lk-gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    --lk-gold-soft: rgba(212, 175, 55, 0.12);
    --lk-gold-glow: rgba(212, 175, 55, 0.3);
    --lk-text-primary: #1A365D;
    --lk-text-secondary: #4a5068;
    --lk-text-muted: #8b92a5;
    --lk-text-on-dark: #ffffff;
    --lk-text-on-gold: #1a1a2e;
    --lk-success: #10b981;
    --lk-warning: #f59e0b;
    --lk-error: #ef4444;
    --lk-shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
    --lk-shadow-md: 0 4px 12px rgba(26, 26, 46, 0.06);
    --lk-shadow-lg: 0 8px 24px rgba(26, 26, 46, 0.08);
    --lk-shadow-xl: 0 20px 40px rgba(26, 26, 46, 0.12);
    --lk-shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --lk-shadow-navy: 0 4px 20px rgba(26, 26, 46, 0.2);
    --lk-radius-sm: 8px;
    --lk-radius-md: 12px;
    --lk-radius-lg: 16px;
    --lk-radius-xl: 24px;
}

/* ─── Header ─── */
.vt-header {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-lg);
    box-shadow: var(--lk-shadow-sm);
    padding: 18px 24px;
    margin-bottom: 16px;
}
.vt-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.vt-header-top h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--lk-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.vt-header-top h1 svg { color: var(--lk-gold-primary); }
.vt-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vt-credits-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--lk-gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--lk-gold-dark);
}
.vt-credits-badge svg { color: var(--lk-gold-dark); }

/* ─── Tabs ─── */
.vt-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    background: var(--lk-bg-card);
    border-radius: var(--lk-radius-lg);
    border: 1px solid var(--lk-border-light);
    box-shadow: var(--lk-shadow-sm);
    overflow: hidden;
}
.vt-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--lk-text-muted);
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}
.vt-tab:hover { color: var(--lk-text-primary); background: var(--lk-bg-elevated); }
.vt-tab.active {
    color: var(--lk-text-primary);
    border-bottom-color: var(--lk-gold-primary);
    font-weight: 600;
}
.vt-tab.active svg { color: var(--lk-gold-primary); }

/* ─── Error ─── */
.vt-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--lk-radius-md);
    margin-bottom: 16px;
    color: var(--lk-error);
    font-size: 14px;
}
.vt-error button {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--lk-error);
    cursor: pointer;
    padding: 2px;
}

/* ─── Two-Column Editor Layout ─── */
.vt-editor-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}
.vt-editor-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.vt-editor-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── White Cards ─── */
.vt-card {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    box-shadow: var(--lk-shadow-sm);
    padding: 20px;
}
.vt-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.vt-card-header h3 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--lk-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.vt-card-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vt-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    font-size: 12px;
    font-weight: 700;
}
.vt-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    background: var(--lk-bg-card);
    color: var(--lk-text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.vt-add-btn:hover {
    background: var(--lk-gold-soft);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--lk-gold-dark);
}

/* ─── Dropzone ─── */
.vt-dropzone {
    border: 2px dashed var(--lk-border-medium);
    border-radius: var(--lk-radius-md);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--lk-bg-input);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--lk-text-muted);
}
.vt-dropzone:hover,
.vt-dropzone.drag-over {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
}
.vt-dropzone-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vt-dropzone-text strong {
    font-size: 15px;
    color: var(--lk-text-primary);
}
.vt-dropzone-text span {
    font-size: 12px;
    color: var(--lk-text-muted);
}

/* ─── Image Strip ─── */
.vt-image-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
}
.vt-image-thumb {
    position: relative;
    width: 100px;
    height: 75px;
    border-radius: var(--lk-radius-sm);
    overflow: hidden;
    border: 2px solid var(--lk-border-light);
    flex-shrink: 0;
    transition: all 0.2s;
}
.vt-image-thumb:hover { border-color: var(--lk-gold-primary); }
.vt-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vt-image-num {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vt-image-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 1px;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    transition: opacity 0.2s;
}
.vt-image-thumb:hover .vt-image-actions { opacity: 1; }
.vt-image-actions button {
    flex: 1;
    padding: 3px;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.vt-image-actions button:hover { background: rgba(255,255,255,0.2); }
.vt-image-actions button:disabled { opacity: 0.3; cursor: default; }
.vt-img-remove:hover { background: rgba(220,38,38,0.7) !important; }
.vt-image-add {
    border: 2px dashed var(--lk-border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--lk-text-muted);
    transition: all 0.2s;
}
.vt-image-add:hover {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
}
.vt-hint {
    font-size: 13px;
    color: var(--lk-warning);
    margin: 8px 0 0;
}

/* ─── Style Bar ─── */
.vt-style-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--lk-bg-input);
    border-radius: var(--lk-radius-sm);
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.vt-style-bar label {
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.vt-style-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.vt-style-chip {
    padding: 5px 12px;
    border: 1px solid var(--lk-border-medium);
    border-radius: 16px;
    font-size: 12px;
    background: var(--lk-bg-card);
    color: var(--lk-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.vt-style-chip:hover {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
}
.vt-style-chip.active {
    background: var(--lk-gold-gradient);
    border-color: var(--lk-gold-primary);
    color: var(--lk-text-on-gold);
    font-weight: 600;
}

/* ─── Clip Cards ─── */
.vt-clips-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}
.vt-clip-card {
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    padding: 14px;
    background: var(--lk-bg-card);
    transition: all 0.2s;
}
.vt-clip-card:hover { border-color: rgba(212, 175, 55, 0.3); }
.vt-clip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.vt-clip-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    white-space: nowrap;
}
.vt-clip-type-toggle {
    display: flex;
    gap: 2px;
    background: var(--lk-bg-elevated);
    padding: 2px;
    border-radius: 6px;
}
.vt-clip-type-toggle button {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: transparent;
    color: var(--lk-text-muted);
    transition: all 0.2s;
}
.vt-clip-type-toggle button.active {
    background: var(--lk-bg-card);
    color: var(--lk-gold-dark);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    font-weight: 600;
}
.vt-clip-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}
.vt-clip-actions button {
    padding: 4px;
    border: 1px solid var(--lk-border-light);
    border-radius: 4px;
    background: var(--lk-bg-card);
    color: var(--lk-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.vt-clip-actions button:hover { background: var(--lk-bg-elevated); color: var(--lk-text-primary); }
.vt-clip-actions button:disabled { opacity: 0.3; cursor: default; }
.vt-clip-delete:hover { background: #fef2f2 !important; color: var(--lk-error) !important; border-color: #fecaca !important; }

.vt-clip-body {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.vt-clip-images {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
}
.vt-clip-img-slot {
    position: relative;
    width: 72px;
    height: 54px;
    border: 2px dashed var(--lk-border-medium);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lk-bg-input);
}
.vt-clip-img-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.vt-empty-slot {
    font-size: 18px;
    color: var(--lk-text-muted);
}
.vt-slot-num {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vt-clip-arrow { color: var(--lk-text-muted); flex-shrink: 0; }

.vt-clip-selectors {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.vt-clip-select {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.vt-clip-select label {
    font-size: 11px;
    font-weight: 600;
    color: var(--lk-text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}
.vt-clip-select select {
    padding: 6px 10px;
    border: 1px solid var(--lk-border-medium);
    border-radius: 6px;
    font-size: 12px;
    background: var(--lk-bg-card);
    color: var(--lk-text-primary);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s;
}
.vt-clip-select select:focus {
    outline: none;
    border-color: var(--lk-gold-primary);
}

/* Add clip button */
.vt-add-clip-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    background: transparent;
    color: var(--lk-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}
.vt-add-clip-btn:hover {
    border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark);
    background: var(--lk-gold-soft);
}

/* Clip type info cards */
.vt-clip-types-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.vt-clip-type-card {
    padding: 12px;
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm);
    background: var(--lk-bg-input);
}
.vt-clip-type-card strong {
    font-size: 12px;
    color: var(--lk-text-primary);
    display: block;
    margin-bottom: 4px;
}
.vt-clip-type-card p {
    font-size: 11px;
    color: var(--lk-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* ─── Overlay Section (collapsible) ─── */
.vt-card-header-collapsible {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}
.vt-card-header-collapsible:hover h3 { color: var(--lk-gold-dark); }
.vt-chevron {
    transition: transform 0.2s;
    color: var(--lk-text-muted);
}
.vt-chevron.open { transform: rotate(90deg); }
.vt-overlay-body {
    padding-top: 16px;
}
.vt-overlay-desc {
    font-size: 13px;
    color: var(--lk-text-muted);
    margin: 0 0 14px 0;
}
.vt-overlay-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.vt-overlay-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.vt-overlay-field-full { grid-column: 1 / -1; }
.vt-overlay-field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--lk-text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
}
.vt-overlay-field input {
    padding: 8px 12px;
    border: 1px solid var(--lk-border-medium);
    border-radius: 6px;
    font-size: 13px;
    color: var(--lk-text-primary);
    font-family: inherit;
    transition: border-color 0.2s;
    background: var(--lk-bg-card);
}
.vt-overlay-field input:focus {
    outline: none;
    border-color: var(--lk-gold-primary);
}
.vt-overlay-apply {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    border: none;
    border-radius: var(--lk-radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.vt-overlay-apply:hover:not(:disabled) { box-shadow: var(--lk-shadow-gold); }
.vt-overlay-apply:disabled { opacity: 0.5; cursor: not-allowed; }

/* ─── Sidebar Cards ─── */
.vt-sidebar-card {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    box-shadow: var(--lk-shadow-sm);
    padding: 16px;
}
.vt-sidebar-card h4 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--lk-text-primary);
    margin: 0 0 12px 0;
}
.vt-sidebar-empty {
    font-size: 13px;
    color: var(--lk-text-muted);
    text-align: center;
    padding: 12px 0;
    margin: 0;
}

/* Timeline strip */
.vt-timeline-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0;
}
.vt-timeline-item {
    position: relative;
    width: 52px;
    height: 38px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--lk-border-light);
    flex-shrink: 0;
}
.vt-timeline-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vt-timeline-item span {
    position: absolute;
    bottom: 1px;
    right: 1px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}
.vt-timeline-placeholder {
    width: 100%;
    height: 100%;
    background: var(--lk-bg-elevated);
}

/* Duration toggle */
.vt-duration-toggle {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.vt-dur-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 2px solid var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    background: var(--lk-bg-card);
    cursor: pointer;
    transition: all 0.2s;
}
.vt-dur-btn:hover { border-color: var(--lk-gold-primary); }
.vt-dur-btn.active {
    border-color: var(--lk-gold-primary);
    background: var(--lk-gold-soft);
}
.vt-dur-btn.active svg { color: var(--lk-gold-dark); }
.vt-dur-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--lk-text-primary);
}
.vt-dur-price {
    font-size: 11px;
    color: var(--lk-text-muted);
    margin-left: auto;
}
.vt-dur-btn.active .vt-dur-price { color: var(--lk-gold-dark); font-weight: 600; }

/* Cost table */
.vt-cost-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.vt-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--lk-text-secondary);
}
.vt-cost-row.vt-cost-total {
    font-weight: 700;
    font-size: 15px;
    color: var(--lk-gold-dark);
}
.vt-free-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--lk-success);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 8px;
}
.vt-cost-divider {
    height: 1px;
    background: var(--lk-border-light);
    margin: 4px 0;
}
.vt-insufficient {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--lk-radius-sm);
    margin-top: 10px;
    color: var(--lk-error);
    font-size: 12px;
}

/* Generate button */
.vt-generate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    border: none;
    border-radius: var(--lk-radius-lg);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: var(--lk-shadow-gold);
    transition: all 0.2s;
}
.vt-generate-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 30px var(--lk-gold-glow); }
.vt-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.vt-generate-btn svg { width: 20px; height: 20px; }
.vt-gen-cost {
    background: rgba(0, 0, 0, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ─── Progress Card ─── */
.vt-progress-card { }
.vt-progress-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.vt-progress-status strong {
    font-size: 14px;
    color: var(--lk-text-primary);
    display: block;
}
.vt-progress-status p {
    font-size: 12px;
    color: var(--lk-text-muted);
    margin: 2px 0 0;
}
.vt-spinner { animation: vt-spin 1s linear infinite; }
@keyframes vt-spin { to { transform: rotate(360deg); } }

.vt-progress-bar-wrap {
    height: 6px;
    background: var(--lk-bg-elevated);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}
.vt-progress-bar {
    height: 100%;
    background: var(--lk-gold-gradient);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.vt-clip-statuses {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.vt-clip-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border: 1px solid var(--lk-border-light);
    border-radius: 6px;
    font-size: 12px;
    color: var(--lk-text-secondary);
}
.vt-status-done { color: var(--lk-success); display: flex; align-items: center; gap: 3px; }
.vt-status-failed { color: var(--lk-error); display: flex; align-items: center; gap: 3px; }
.vt-status-pending { color: var(--lk-warning); display: flex; align-items: center; gap: 3px; }

/* ─── Result Card ─── */
.vt-result-card { }
.vt-result-player {
    border-radius: var(--lk-radius-sm);
    overflow: hidden;
    background: #000;
    margin-bottom: 12px;
}
.vt-result-player video {
    width: 100%;
    display: block;
}
.vt-result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
}
.vt-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    border: 1px solid var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    font-size: 12px;
    font-weight: 500;
    background: var(--lk-bg-card);
    color: var(--lk-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}
.vt-action-btn:hover {
    background: var(--lk-bg-elevated);
    color: var(--lk-text-primary);
}
.vt-action-primary {
    background: var(--lk-gold-gradient);
    color: var(--lk-text-on-gold);
    border-color: transparent;
    font-weight: 600;
}
.vt-action-primary:hover {
    box-shadow: var(--lk-shadow-gold);
    color: var(--lk-text-on-gold);
    background: var(--lk-gold-gradient);
}
.vt-new-tour-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    background: transparent;
    color: var(--lk-text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.vt-new-tour-btn:hover { background: var(--lk-bg-elevated); color: var(--lk-text-primary); }

/* ─── Library ─── */
.vt-library { }
.vt-library-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.vt-library-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--lk-text-primary);
    margin: 0;
}
.vt-library-usage {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    font-size: 13px;
    color: var(--lk-text-muted);
}
.vt-usage-bar {
    flex: 1;
    max-width: 200px;
    height: 6px;
    background: var(--lk-bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}
.vt-usage-fill {
    height: 100%;
    background: var(--lk-gold-gradient);
    border-radius: 3px;
    transition: width 0.3s;
}
.vt-refresh-btn {
    margin-left: auto;
    padding: 8px;
    border: 1px solid var(--lk-border-medium);
    border-radius: var(--lk-radius-sm);
    background: var(--lk-bg-card);
    color: var(--lk-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}
.vt-refresh-btn:hover { color: var(--lk-gold-dark); border-color: var(--lk-gold-primary); }

.vt-library-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--lk-text-muted);
}
.vt-library-empty p {
    font-size: 15px;
    color: var(--lk-text-secondary);
    margin: 12px 0 4px;
}
.vt-library-empty span {
    font-size: 13px;
    color: var(--lk-text-muted);
}

.vt-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.vt-video-card {
    background: var(--lk-bg-card);
    border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md);
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: var(--lk-shadow-sm);
}
.vt-video-card:hover { box-shadow: var(--lk-shadow-md); }
.vt-video-preview {
    position: relative;
    background: #000;
}
.vt-video-preview video {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}
.vt-video-poster {
    cursor: pointer;
    position: relative;
}
.vt-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    color: #fff;
    transition: background 0.2s;
}
.vt-play-overlay:hover { background: rgba(0,0,0,0.5); }
.vt-video-info { padding: 12px; }
.vt-video-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--lk-text-primary);
    margin-bottom: 6px;
}
.vt-video-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--lk-text-muted);
}
.vt-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}
.vt-badge-final { background: rgba(16, 185, 129, 0.12); color: #059669; }
.vt-badge-expiry { background: #fef9c3; color: #a16207; }
.vt-badge-expired { background: #fef2f2; color: var(--lk-error); }

.vt-video-actions {
    display: flex;
    gap: 6px;
    padding: 0 12px 12px;
}
.vt-video-actions button {
    flex: 1;
    padding: 7px;
    border: 1px solid var(--lk-border-medium);
    border-radius: 6px;
    background: var(--lk-bg-card);
    color: var(--lk-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.vt-video-actions button:hover { background: var(--lk-bg-elevated); color: var(--lk-text-primary); }
.vt-vid-danger:hover { background: #fef2f2 !important; color: var(--lk-error) !important; border-color: #fecaca !important; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .vtour-page { padding: 0 12px; }
    .vt-editor-layout {
        grid-template-columns: 1fr;
    }
    .vt-editor-sidebar {
        position: static;
    }
    .vt-clip-body { flex-direction: column; }
    .vt-overlay-fields { grid-template-columns: 1fr; }
    .vt-result-actions { grid-template-columns: 1fr; }
    .vt-clip-types-info { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════
   EVALUATIONS PAGE
   ═══════════════════════════════════════════════════════ */

.eval-page { max-width: 1300px; }

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

.eval-header-text h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.eval-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 4px 0 0;
}

.eval-credits-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
}

/* Split view */
.eval-split-view {
    display: flex;
    gap: 24px;
    min-height: calc(100vh - 200px);
}

.eval-list-panel {
    width: 40%;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.eval-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.eval-search-bar svg {
    color: #94a3b8;
    flex-shrink: 0;
}

.eval-search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    color: #1a1a2e;
}

.eval-search-bar input::placeholder {
    color: #94a3b8;
}

.eval-list-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Empty state */
.eval-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #94a3b8;
    text-align: center;
}

.eval-empty-state p {
    font-size: 14px;
    color: #64748b;
    margin: 12px 0 4px;
}

.eval-empty-hint {
    font-size: 12px;
    color: #94a3b8;
}

.eval-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Eval cards (list) */
.eval-card {
    padding: 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.eval-card:hover {
    background: #f8fafc;
}

.eval-card-active {
    background: #f8f7ff !important;
    border-color: #c7d2fe !important;
}

.eval-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.eval-card-location {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 5px;
}

.eval-card-date {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}

.eval-card-info {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.eval-card-detail {
    display: flex;
    align-items: center;
    gap: 3px;
}

.eval-card-price {
    font-size: 15px;
    font-weight: 700;
    color: #6c63ff;
    margin-bottom: 4px;
}

.eval-card-quality {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
}

.eval-card-quality.top_10,
.eval-card-quality.top_25 {
    background: #dcfce7;
    color: #15803d;
}

.eval-card-quality.average {
    background: #fef9c3;
    color: #a16207;
}

.eval-card-quality.below_average {
    background: #fed7aa;
    color: #9a3412;
}

.eval-card-quality.bottom_25 {
    background: #fef2f2;
    color: #dc2626;
}

/* Detail panel */
.eval-detail-panel {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow-y: auto;
    padding: 24px;
}

.eval-detail-scroll { }

/* Sections */
.eval-section {
    margin-bottom: 20px;
}

.eval-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.eval-section-toggle {
    cursor: pointer;
    padding: 6px 0;
    justify-content: space-between;
}

.eval-section-toggle:hover {
    color: #6c63ff;
}

/* Property summary */
.eval-property-summary { }

.eval-summary-grid {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.eval-summary-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #475569;
}

/* Estimate box */
.eval-estimate-box {
    background: linear-gradient(135deg, #f8f7ff, #f0f9ff);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.eval-estimate-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.eval-estimate-value {
    font-size: 28px;
    font-weight: 700;
    color: #6c63ff;
}

.eval-estimate-sqm {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Score gauges */
.eval-scores {
    margin-bottom: 20px;
}

.eval-score-gauge {
    margin-bottom: 12px;
}

.eval-score-gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.eval-score-gauge-label {
    font-size: 13px;
    color: #64748b;
}

.eval-score-gauge-value {
    font-size: 14px;
    font-weight: 700;
}

.eval-score-gauge-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.eval-score-gauge-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Quality badge */
.eval-quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.eval-quality-excellent {
    background: #dcfce7;
    color: #15803d;
}

.eval-quality-good {
    background: #e0f2fe;
    color: #0369a1;
}

.eval-quality-average {
    background: #fef9c3;
    color: #a16207;
}

.eval-quality-below,
.eval-quality-poor {
    background: #fef2f2;
    color: #dc2626;
}

/* Atmosphere */
.eval-atmosphere {
    font-style: italic;
    color: #64748b;
    font-size: 14px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #6c63ff;
    margin-bottom: 16px;
}

/* Adjectives */
.eval-adjectives {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.eval-adj-tag {
    padding: 3px 10px;
    background: #f1f5f9;
    border-radius: 12px;
    font-size: 12px;
    color: #475569;
}

/* Features lists */
.eval-features-positive,
.eval-features-negative { }

.eval-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.eval-features-list li {
    padding: 4px 0;
    font-size: 13px;
    color: #475569;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.eval-features-positive .eval-features-list li svg { color: #22c55e; flex-shrink: 0; }
.eval-features-negative .eval-features-list li svg { color: #f59e0b; flex-shrink: 0; }

/* Market stats */
.eval-market-stats {
    padding: 8px 0;
}

.eval-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.eval-stat-row strong {
    color: #1a1a2e;
}

/* Adjustments */
.eval-adjustments {
    padding: 4px 0;
}

.eval-adj-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}

.eval-adj-row strong {
    font-weight: 600;
}

.eval-adj-neg strong { color: #ef4444; }
.eval-adj-pos strong { color: #22c55e; }

/* Comparables table */
.eval-comps-table {
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.eval-comps-header {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.7fr 0.5fr 1.2fr;
    padding: 8px 12px;
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.eval-comps-header.eval-comps-selectable,
.eval-comps-row.eval-comps-selectable {
    grid-template-columns: 28px 1.4fr 0.9fr 0.6fr 0.4fr 0.7fr 1.1fr;
}

.eval-comps-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.7fr 0.5fr 1.2fr;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    text-decoration: none;
    transition: background 0.2s;
}

.eval-comps-row:hover {
    background: #f8fafc;
}

a.eval-comps-row {
    color: #475569;
}

a.eval-comps-row:hover {
    background: #f8f7ff;
}

.eval-comps-zone {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Disclaimer */
.eval-disclaimer {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
    padding: 16px 0 0;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

/* Detail toolbar (save + PDF) */
.eval-detail-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    background: #fff;
    padding: 8px 0;
    z-index: 2;
    border-bottom: 1px solid #f1f5f9;
}
.eval-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s;
}
.eval-toolbar-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.eval-toolbar-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.eval-toolbar-pdf { background: var(--sp-navy, #1a1a2e); color: #fff; border-color: var(--sp-navy, #1a1a2e); }
.eval-toolbar-pdf:hover { opacity: 0.9; }

/* Photo grid in detail */
.eval-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.eval-photo-thumb-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Estimate override hint */
.eval-estimate-override-hint {
    font-size: 11px;
    color: #f59e0b;
    margin-top: 6px;
    font-style: italic;
}

/* Editable adjustment input */
.eval-adj-input {
    width: 64px;
    text-align: center;
    padding: 2px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    background: #fff;
    color: inherit;
    transition: border-color 0.2s;
}
.eval-adj-input:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 2px rgba(108,99,255,0.1);
}
.eval-adj-neg .eval-adj-input { color: #ef4444; }
.eval-adj-pos .eval-adj-input { color: #22c55e; }

/* Comp checkbox column */
.eval-comp-check {
    display: flex;
    align-items: center;
    justify-content: center;
}
.eval-comp-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #6c63ff;
}
.eval-comp-excluded {
    opacity: 0.4;
    text-decoration: line-through;
}
.eval-comp-excluded:hover { opacity: 0.6; }
.eval-comps-zone a, .eval-comp-source a {
    color: #6c63ff;
    text-decoration: none;
}
.eval-comps-zone a:hover, .eval-comp-source a:hover { text-decoration: underline; }
.eval-comp-source { font-size: 11px; font-weight: 600; }

/* Recalculate button */
.eval-recalc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #6c63ff, #5b54e0);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.eval-recalc-btn:hover { box-shadow: 0 2px 8px rgba(108,99,255,0.3); }

/* Custom notes textarea */
.eval-notes-area {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: #475569;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s;
}
.eval-notes-area:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 2px rgba(108,99,255,0.1);
}
.eval-notes-area::placeholder { color: #94a3b8; }

/* ═══════════════════════════════════════════════════════
   EVALUATION FORM (New Evaluation)
   ═══════════════════════════════════════════════════════ */

.eval-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--sp-gold, #d4af37);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius-md, 8px);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--sp-transition-fast);
    white-space: nowrap;
}
.eval-new-btn:hover { background: var(--sp-gold-hover, #b8860b); }

.eval-new-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    margin-top: 12px;
    background: var(--sp-gold, #d4af37);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius-sm, 6px);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--sp-transition-fast);
}
.eval-new-btn-small:hover { background: var(--sp-gold-hover, #b8860b); }

/* Form container */
.eval-form {
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.eval-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.eval-form-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--sp-gray-800);
    margin: 0;
}
.eval-form-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: var(--sp-gray-100);
    color: var(--sp-gray-500);
    cursor: pointer;
    transition: all var(--sp-transition-fast);
}
.eval-form-close:hover {
    background: var(--sp-gray-200);
    color: var(--sp-gray-700);
}

.eval-form-error {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--sp-radius-sm);
    color: #dc2626;
    font-size: 13px;
}

/* Form sections */
.eval-form-section {
    padding: 14px 0;
    border-bottom: 1px solid var(--sp-gray-100);
}
.eval-form-section:last-of-type {
    border-bottom: none;
}
.eval-form-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sp-gray-700);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Form grid (2 columns: label + input) */
.eval-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    align-items: center;
}
.eval-form-grid label {
    font-size: 13px;
    color: var(--sp-gray-600);
    white-space: nowrap;
}
.eval-form-grid input,
.eval-form-grid select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    font-size: 13px;
    color: var(--sp-gray-800);
    background: #fff;
    transition: border-color var(--sp-transition-fast);
    box-sizing: border-box;
}
.eval-form-grid input:focus,
.eval-form-grid select:focus {
    outline: none;
    border-color: var(--sp-gold, #d4af37);
    box-shadow: 0 0 0 2px rgba(212,175,55,0.15);
}
.eval-form-grid input::placeholder {
    color: var(--sp-gray-400);
}

/* Features toggle grid */
.eval-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.eval-feature-toggle {
    padding: 6px 8px;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    background: #fff;
    font-size: 12px;
    color: var(--sp-gray-600);
    cursor: pointer;
    transition: all var(--sp-transition-fast);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eval-feature-toggle:hover {
    border-color: var(--sp-gold, #d4af37);
    color: var(--sp-gray-800);
}
.eval-feature-toggle.active {
    background: var(--sp-gold-light, #fef9e7);
    border-color: var(--sp-gold, #d4af37);
    color: var(--sp-gold-hover, #b8860b);
    font-weight: 600;
}

/* Photos upload zone */
.eval-photos-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    border: 2px dashed var(--sp-gray-300);
    border-radius: var(--sp-radius-md);
    cursor: pointer;
    transition: all var(--sp-transition-fast);
    color: var(--sp-gray-400);
    font-size: 13px;
}
.eval-photos-zone:hover,
.eval-photos-zone.dragover {
    border-color: var(--sp-gold, #d4af37);
    background: var(--sp-gold-light, #fef9e7);
    color: var(--sp-gold-hover, #b8860b);
}
.eval-photos-zone-hint {
    font-size: 11px;
    color: var(--sp-gray-400);
}

/* Photo thumbnails */
.eval-photo-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-top: 10px;
}
.eval-photo-thumb {
    position: relative;
    border-radius: var(--sp-radius-sm);
    overflow: hidden;
    aspect-ratio: 1;
}
.eval-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.eval-photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--sp-transition-fast);
}
.eval-photo-thumb:hover .eval-photo-remove { opacity: 1; }

/* Form actions (sticky bottom) */
.eval-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 0 0;
    margin-top: auto;
    border-top: 1px solid var(--sp-gray-100);
}
.eval-form-cancel {
    padding: 8px 16px;
    border: 1px solid var(--sp-gray-200);
    border-radius: var(--sp-radius-sm);
    background: #fff;
    color: var(--sp-gray-600);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--sp-transition-fast);
}
.eval-form-cancel:hover { background: var(--sp-gray-50); }
.eval-form-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--sp-gold, #d4af37);
    color: #fff;
    border: none;
    border-radius: var(--sp-radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--sp-transition-fast);
}
.eval-form-submit:hover { background: var(--sp-gold-hover, #b8860b); }
.eval-form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress container */
.eval-progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
}
.eval-progress-container h3 {
    margin: 0;
    font-size: 16px;
    color: var(--sp-gray-800);
}
.eval-progress-msg {
    font-size: 14px;
    color: var(--sp-gold-hover, #b8860b);
    min-height: 20px;
}
.eval-progress-hint {
    font-size: 12px;
    color: var(--sp-gray-400);
}
.eval-progress-bar-wrap {
    width: 80%;
    max-width: 300px;
    height: 6px;
    background: var(--sp-gray-100);
    border-radius: 3px;
    overflow: hidden;
}
.eval-progress-bar {
    height: 100%;
    background: var(--sp-gold, #d4af37);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Spin animation for Loader icon */
@keyframes eval-spin-anim {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.eval-spin { animation: eval-spin-anim 1.2s linear infinite; }

/* ═══════════════════════════════════════════════════════
   CHAT RIGHT TOOLBAR
   ═══════════════════════════════════════════════════════ */

.chat-right-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 6px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    width: 48px;
    align-items: center;
}

.chat-right-toolbar .toolbar-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
    color: #64748b;
}

.chat-right-toolbar .toolbar-btn:hover {
    background: #f8f7ff;
    border-color: #c7d2fe;
    color: #6c63ff;
}

.chat-right-toolbar .toolbar-btn.active {
    background: #6c63ff;
    border-color: #6c63ff;
    color: #fff;
}

.chat-right-toolbar .toolbar-btn .tooltip {
    position: absolute;
    right: 48px;
    background: #1a1a2e;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.chat-right-toolbar .toolbar-btn:hover .tooltip {
    opacity: 1;
}

/* Panel expand button */
.panel-expand-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
    cursor: pointer;
    color: #6c63ff;
    transition: all 0.2s;
    margin-left: 8px;
}

.panel-expand-btn:hover {
    background: #f8f7ff;
    border-color: #c7d2fe;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .crm-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1002;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .crm-sidebar.mobile-open {
        transform: translateX(0);
    }
    .crm-mobile-header { display: flex !important; }
    .crm-main { padding-top: 56px; }
    .crm-page { padding: 16px; }
    .dashboard-kpis { grid-template-columns: 1fr 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-grid.cols-3, .form-grid.cols-4 { grid-template-columns: 1fr 1fr; }
    .form-grid.cols-5 { grid-template-columns: 1fr 1fr 1fr; }
    .form-grid-counters .form-group { min-width: 64px; max-width: 90px; }
    .info-general-layout { flex-direction: column; }
    .info-general-counters { flex: 1 1 auto; min-width: 0; }
    .info-general-counters .counter-grid { grid-template-columns: repeat(4, 1fr); }
    .crm-kanban { gap: 8px; }
    .kanban-column { flex: 0 0 180px; }
    .modal-content { width: 95vw; }

    .standalone-page { padding: 16px; }
    .eval-split-view { flex-direction: column; }
    .eval-list-panel { width: 100%; min-width: auto; max-height: 40vh; }
    .studio-preset-grid { grid-template-columns: repeat(3, 1fr); }
    .studio-category-tabs { flex-wrap: wrap; }
    .vtour-overlay-fields { grid-template-columns: 1fr; }
    .vtour-style-bar { flex-direction: column; align-items: flex-start; }
    .vtour-image-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .vtour-library-grid { grid-template-columns: 1fr; }
    .vtour-steps { gap: 0; }
    .vtour-step-label { display: none; }
    .eval-comps-header, .eval-comps-row { grid-template-columns: 1.5fr 1fr 0.7fr; }
    .eval-comps-header span:nth-child(n+4), .eval-comps-row span:nth-child(n+4) { display: none; }
    .eval-comps-header.eval-comps-selectable, .eval-comps-row.eval-comps-selectable { grid-template-columns: 24px 1.3fr 1fr 0.7fr; }
    .eval-comps-header.eval-comps-selectable span:nth-child(n+5), .eval-comps-row.eval-comps-selectable span:nth-child(n+5) { display: none; }
    .chat-right-toolbar { display: none; }
}

/* ========================================
   AUTH MODAL
   ======================================== */

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: authFadeIn 0.3s ease;
}

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

@keyframes authSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-modal {
    background: #fff;
    border-radius: 16px;
    width: 420px;
    max-width: 95vw;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: authSlideIn 0.4s ease;
    overflow: hidden;
}

.auth-header {
    text-align: center;
    padding: 32px 32px 0;
}

.auth-logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 32px;
    color: #1b2a4a;
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.auth-badge {
    display: inline-block;
    background: var(--sp-gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.auth-subtitle {
    color: var(--sp-gray-500);
    font-size: 14px;
    margin: 0;
}

.auth-error {
    margin: 16px 32px 0;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.auth-form {
    padding: 24px 32px 16px;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-gray-700);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--sp-gray-200);
    border-radius: 8px;
    font-size: 14px;
    color: var(--sp-gray-800);
    background: var(--sp-gray-50);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.auth-field input:focus {
    border-color: var(--sp-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    background: #fff;
}

.auth-field input::placeholder {
    color: var(--sp-gray-400);
}

.auth-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-pw-wrap input {
    padding-right: 40px;
}

.auth-pw-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--sp-gray-400);
    padding: 4px;
    display: flex;
    align-items: center;
}

.auth-pw-toggle:hover {
    color: var(--sp-gray-600);
}

.auth-footer a {
    color: var(--sp-gold);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--sp-gold-hover);
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    padding: 12px;
    background: var(--sp-gold);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}

.auth-submit:hover:not(:disabled) {
    background: var(--sp-gold-hover);
}

.auth-submit:active:not(:disabled) {
    transform: scale(0.98);
}

.auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-actions {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-actions .auth-submit {
    text-align: center;
    text-decoration: none;
    display: block;
}

.auth-submit-secondary {
    background: var(--sp-gray-100) !important;
    color: var(--sp-gray-700) !important;
    border: 1px solid var(--sp-gray-200);
}

.auth-submit-secondary:hover {
    background: var(--sp-gray-200) !important;
}

.auth-footer {
    text-align: center;
    padding: 0 32px 24px;
    border-top: 1px solid var(--sp-gray-100);
    padding-top: 16px;
}

.auth-footer p {
    margin: 0;
    font-size: 14px;
    color: var(--sp-gray-500);
}

.auth-footer button {
    background: none;
    border: none;
    color: var(--sp-gold);
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.auth-footer button:hover {
    color: var(--sp-gold-hover);
    text-decoration: underline;
}

.auth-pending {
    text-align: center;
    padding: 24px 32px 16px;
}

.auth-pending-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.auth-pending h3 {
    color: var(--sp-gray-800);
    font-size: 18px;
    margin: 0 0 8px;
}

.auth-pending p {
    color: var(--sp-gray-500);
    font-size: 14px;
    margin: 0 0 8px;
}

.auth-pending-hint {
    color: var(--sp-gray-400) !important;
    font-size: 13px !important;
    margin-top: 16px !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .auth-modal {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-header {
        padding: 24px 24px 0;
    }

    .auth-form {
        padding: 24px;
    }

    .auth-error {
        margin: 16px 24px 0;
    }

    .auth-footer {
        padding: 0 24px 24px;
        padding-top: 16px;
    }
}

/* ========================================
   EMBEDDED CONVERSATION BAR
   ======================================== */

.chat-conv-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--sp-gray-200);
    background: var(--sp-gray-50);
    position: relative;
    flex-shrink: 0;
}

.chat-conv-bar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--sp-gray-200);
    border-radius: 6px;
    background: #fff;
    color: var(--sp-gray-700);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.chat-conv-bar-btn:hover {
    background: var(--sp-gray-100);
    border-color: var(--sp-gray-300);
}

.chat-conv-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--sp-gray-200);
    border-top: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
}

.chat-conv-dropdown-empty {
    padding: 16px;
    text-align: center;
    color: var(--sp-gray-400);
    font-size: 13px;
}

.chat-conv-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--sp-gray-100);
    transition: background 0.15s;
}

.chat-conv-dropdown-item:hover {
    background: var(--sp-gray-50);
}

.chat-conv-dropdown-item.active {
    background: var(--sp-gold-light);
    border-left: 3px solid var(--sp-gold);
}

.chat-conv-dropdown-title {
    flex: 1;
    font-size: 13px;
    color: var(--sp-gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-conv-dropdown-date {
    font-size: 11px;
    color: var(--sp-gray-400);
    white-space: nowrap;
}

.chat-conv-dropdown-del {
    background: none;
    border: none;
    color: var(--sp-gray-400);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
}

.chat-conv-dropdown-del:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* ═══════════════════════════════════════════════════════════
   GALLERY PAGE
   ═══════════════════════════════════════════════════════════ */
.gallery-page {
    --gal-navy: #0f1a2e;
    --gal-navy-light: #1a2744;
    --gal-navy-lighter: #243352;
    --gal-gold: #d4a853;
    --gal-gold-light: rgba(212, 168, 83, 0.12);
    --gal-gold-dark: #b8923f;
    --gal-border: rgba(255, 255, 255, 0.08);
    --gal-text: #e8e0d4;
    --gal-text-muted: #8a94a6;
    --gal-bg: #0b1322;
    padding: 0 !important;
    background: var(--gal-bg);
    color: var(--gal-text);
    min-height: 100vh;
}

/* ─── Header ──────────────────────────────── */
.gal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--gal-border);
    background: var(--gal-navy);
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 16px;
    flex-wrap: wrap;
}

.gal-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.gal-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.3px;
}

.gal-filters {
    display: flex;
    gap: 6px;
}

.gal-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--gal-border);
    border-radius: 20px;
    background: transparent;
    color: var(--gal-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.gal-filter-btn:hover {
    border-color: var(--gal-gold);
    color: var(--gal-gold);
}

.gal-filter-btn.active {
    background: var(--gal-gold);
    border-color: var(--gal-gold);
    color: var(--gal-navy);
    font-weight: 600;
}

.gal-filter-count {
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.12);
    padding: 1px 6px;
    border-radius: 10px;
}

.gal-filter-btn.active .gal-filter-count {
    background: rgba(15, 26, 46, 0.2);
    color: var(--gal-navy);
}

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

.gal-stats-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--gal-navy-light);
    border: 1px solid var(--gal-border);
    font-size: 12px;
    color: var(--gal-text-muted);
}

.gal-stats-sep {
    color: var(--gal-border);
    margin: 0 2px;
}

/* ─── Grid ────────────────────────────────── */
.gal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    padding: 24px 28px;
}

.gal-card {
    border-radius: 12px;
    background: var(--gal-navy);
    border: 1px solid var(--gal-border);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* ─── Card Thumbnail ──────────────────────── */
.gal-card-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--gal-navy-light);
}

.gal-card-thumb img,
.gal-card-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── Hover Overlay ───────────────────────── */
.gal-card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 26, 46, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.gal-card:hover .gal-card-overlay {
    opacity: 1;
}

.gal-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.gal-action-btn:hover {
    background: var(--gal-gold);
    border-color: var(--gal-gold);
    color: var(--gal-navy);
    transform: scale(1.1);
}

.gal-action-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

/* ─── Card Info ───────────────────────────── */
.gal-card-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gal-card-info-top {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gal-photo-id {
    font-size: 10px;
    font-weight: 700;
    color: var(--gal-gold);
    background: var(--gal-gold-light);
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.gal-type-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gal-type-original {
    color: var(--gal-text-muted);
    background: rgba(138, 148, 166, 0.15);
}

.gal-type-result {
    color: var(--gal-gold);
    background: var(--gal-gold-light);
}

.gal-card-info-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gal-filename {
    font-size: 12px;
    color: var(--gal-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.gal-date {
    font-size: 11px;
    color: var(--gal-text-muted);
    opacity: 0.7;
    white-space: nowrap;
}

/* ─── Loading / Empty ─────────────────────── */
.gal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 16px;
    color: var(--gal-text-muted);
}

.gal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 12px;
    color: var(--gal-text-muted);
    text-align: center;
}

.gal-empty h3 {
    color: var(--gal-text);
    font-size: 18px;
    margin: 0;
}

.gal-empty p {
    font-size: 14px;
    margin: 0;
    max-width: 360px;
}

/* ─── Responsive ──────────────────────────── */
@media (max-width: 768px) {
    .gal-header {
        padding: 16px 16px;
    }
    .gal-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
        padding: 16px;
    }
    .gal-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .gal-action-btn {
        width: 34px;
        height: 34px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   WhatsApp Page (.wa-*)
   ═══════════════════════════════════════════════════════════════ */

.wa-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f0f2f5;
    overflow: hidden;
}

.wa-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.wa-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-page-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.wa-config-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-config-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Layout */
.wa-layout {
    display: grid;
    grid-template-columns: 55% 45%;
    flex: 1;
    overflow: hidden;
}

/* Setup banner */
.wa-setup-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1;
    padding: 40px;
    text-align: center;
}

.wa-setup-banner h3 {
    margin: 0;
    color: #1a1a2e;
    font-size: 18px;
}

.wa-setup-banner p {
    margin: 0;
    color: #6b7280;
    max-width: 400px;
}

/* ─── Conversation List ──────────────────────────────────── */
.wa-conv-list {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    overflow: hidden;
}

.wa-conv-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.wa-conv-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-conv-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.wa-conv-stats {
    display: flex;
    gap: 6px;
}

.wa-conv-stat {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.wa-conv-stat--bot {
    background: #ecfdf5;
    color: #059669;
}

.wa-conv-stat--agent {
    background: #eff6ff;
    color: #2563eb;
}

.wa-btn-new {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.wa-btn-new:hover { background: #1da851; }

.wa-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 12px;
    padding: 7px 12px;
    background: #f0f2f5;
    border-radius: 8px;
}

.wa-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    outline: none;
    color: #333;
}

.wa-filter-tabs {
    display: flex;
    padding: 4px 12px 6px;
    gap: 4px;
}

.wa-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: none;
    border-radius: 14px;
    background: #f0f2f5;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-filter-tab.active {
    background: #25D366;
    color: #fff;
}

.wa-filter-count {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.8;
}

.wa-conv-scroll {
    flex: 1;
    overflow-y: auto;
}

.wa-conv-empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

/* ─── Campaign groups in conversation list ─── */
.wa-conv-camp-group {
    border-bottom: 1px solid #e5e7eb;
}

.wa-conv-camp-header {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 10px;
}
.wa-conv-camp-header:hover { background: #f9fafb; }
.wa-conv-camp-header.expanded { background: #f0fdf4; }

.wa-conv-camp-toggle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #4b5563;
    flex-shrink: 0;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.wa-conv-camp-header.expanded .wa-conv-camp-toggle {
    background: #25D366;
    color: #fff;
}

.wa-conv-camp-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0fdf4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #25D366;
}
.wa-conv-camp-header.expanded .wa-conv-camp-icon {
    background: #dcfce7;
}

.wa-conv-camp-body {
    flex: 1;
    min-width: 0;
}

.wa-conv-camp-top-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}

.wa-conv-camp-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-conv-camp-badge {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.wa-conv-camp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.wa-conv-camp-date,
.wa-conv-camp-count {
    font-size: 11px;
    color: #9ca3af;
}

.wa-conv-camp-stat {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #4b5563;
    white-space: nowrap;
}
.wa-conv-camp-stat--reply { background: #dbeafe; color: #1d4ed8; }
.wa-conv-camp-stat--bot { background: #d1fae5; color: #059669; }
.wa-conv-camp-stat--agent { background: #fef3c7; color: #d97706; }
.wa-conv-camp-stat--closed { background: #f3f4f6; color: #6b7280; }
.wa-conv-camp-stat--lead { background: #ede9fe; color: #7c3aed; }
.wa-conv-camp-stat--fail { background: #fee2e2; color: #dc2626; }

.wa-conv-camp-children {
    border-top: 1px solid #e5e7eb;
    background: #fafafa;
}
.wa-conv-camp-children .wa-conv-card {
    padding-left: 24px;
    border-left: 3px solid #25D366;
}

.wa-conv-camp-empty {
    padding: 16px 24px;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

.wa-conv-camp-detail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: #25D366;
    background: none;
    border: none;
    border-top: 1px solid #e5e7eb;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
}
.wa-conv-camp-detail-btn:hover {
    background: #f0fdf4;
}

.wa-conv-card {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
    position: relative;
}

.wa-conv-card:hover { background: #f9fafb; }
.wa-conv-card.active { background: #f0fdf4; border-left: 3px solid #25D366; }
.wa-conv-card--unread { background: #fefff7; }

.wa-conv-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.wa-conv-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    border: 2px solid transparent;
}

.wa-conv-avatar--bot { border-color: #10b981; }
.wa-conv-avatar--agent { border-color: #3b82f6; }

.wa-conv-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wa-conv-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wa-conv-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.wa-conv-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-conv-type-tag {
    padding: 1px 6px;
    border-radius: 4px;
    background: #f3f4f6;
    font-size: 10px;
    font-weight: 500;
    color: #6b7280;
    flex-shrink: 0;
    white-space: nowrap;
}

.wa-conv-time-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
    margin-left: 8px;
}

.wa-conv-time {
    font-size: 11px;
    color: #9ca3af;
}

.wa-conv-phone {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1;
}

.wa-conv-context {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #0d9488;
    font-weight: 500;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-conv-context svg {
    flex-shrink: 0;
    stroke: #0d9488;
}

.wa-conv-preview-row {
    margin-top: 2px;
}

.wa-conv-preview {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.wa-preview-sender {
    color: #9ca3af;
}

.wa-conv-quick-handoff {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 3px 10px;
    border: 1px solid #93c5fd;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    width: fit-content;
}

.wa-conv-quick-handoff:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

.wa-unread-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: #25D366;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Checkbox column ─── */
.wa-conv-check-col {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
    flex-shrink: 0;
}

.wa-conv-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #25D366;
    cursor: pointer;
    margin: 0;
}

.wa-conv-card--checked {
    background: #f0fdf4 !important;
}

/* ─── Select-all row ─── */
.wa-select-all-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 11px;
    color: #9ca3af;
}

.wa-select-all-row input {
    width: 15px;
    height: 15px;
    accent-color: #25D366;
    cursor: pointer;
    margin: 0;
}

/* ─── Bulk actions bar ─── */
.wa-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    gap: 8px;
}

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

.wa-bulk-check-all {
    width: 15px;
    height: 15px;
    accent-color: #25D366;
    cursor: pointer;
    margin: 0;
}

.wa-bulk-count {
    font-size: 12px;
    font-weight: 600;
    color: #166534;
}

.wa-bulk-clear {
    border: none;
    background: none;
    color: #6b7280;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.wa-bulk-clear:hover { color: #374151; }

.wa-bulk-actions {
    display: flex;
    gap: 6px;
}

.wa-bulk-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.wa-bulk-btn--export {
    color: #059669;
    border-color: #6ee7b7;
}

.wa-bulk-btn--export:hover {
    background: #ecfdf5;
}

.wa-bulk-btn--delete {
    color: #ef4444;
    border-color: #fca5a5;
}

.wa-bulk-btn--delete:hover {
    background: #fef2f2;
}

/* ─── Status Badge ───────────────────────────────────────── */
.wa-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.wa-badge-sm {
    padding: 2px 6px;
    font-size: 10px;
}

.wa-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.wa-badge-bot { background: #ecfdf5; color: #059669; }
.wa-badge-bot .wa-badge-dot { background: #10b981; }
.wa-badge-agent { background: #eff6ff; color: #2563eb; }
.wa-badge-agent .wa-badge-dot { background: #3b82f6; }
.wa-badge-closed { background: #f3f4f6; color: #6b7280; }
.wa-badge-closed .wa-badge-dot { background: #9ca3af; }

/* ─── Message View ───────────────────────────────────────── */
.wa-msg-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.wa-msg-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    color: #9ca3af;
    font-size: 15px;
}

.wa-msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    gap: 8px;
}

.wa-msg-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wa-msg-header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.wa-msg-header-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wa-msg-header-phone {
    font-size: 11px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.wa-type-badge {
    padding: 1px 6px;
    border-radius: 4px;
    background: #f3f4f6;
    font-size: 10px;
    font-weight: 500;
    color: #6b7280;
}

.wa-msg-header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.wa-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.wa-btn-handoff { color: #2563eb; border-color: #93c5fd; }
.wa-btn-handoff:hover { background: #eff6ff; }
.wa-btn-return { color: #059669; border-color: #6ee7b7; }
.wa-btn-return:hover { background: #ecfdf5; }
.wa-btn-close { color: #6b7280; padding: 6px; }
.wa-btn-close:hover { background: #f3f4f6; }
.wa-btn-delete { color: #ef4444; padding: 6px; border-color: #fca5a5; }
.wa-btn-delete:hover { background: #fef2f2; }

/* 24h Warning Banner */
.wa-24h-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    font-size: 13px;
    color: #92400e;
}

.wa-24h-link {
    background: none;
    border: none;
    color: #d97706;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: 13px;
}

/* Messages Scroll */
.wa-msg-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 60px;
    background: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4cfc4' fill-opacity='0.15'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40z'/%3E%3C/g%3E%3C/svg%3E");
}

.wa-msg-loading {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 13px;
}

/* ─── Message Bubbles ────────────────────────────────────── */
.wa-bubble-row {
    display: flex;
    margin-bottom: 4px;
}

.wa-bubble-in { justify-content: flex-start; }
.wa-bubble-out { justify-content: flex-end; }

.wa-bubble {
    max-width: 65%;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
    word-wrap: break-word;
}

.wa-bubble-white {
    background: #fff;
    border-top-left-radius: 0;
}

.wa-bubble-green {
    background: #dcf8c6;
    border-top-right-radius: 0;
}

.wa-sender-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 2px;
}

.wa-sender-bot { color: #059669; }
.wa-sender-agent { color: #2563eb; }

.wa-msg-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #111;
    white-space: pre-wrap;
}

.wa-template-msg {
    font-style: italic;
    color: #6b7280;
}

.wa-bubble-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 2px;
}

.wa-bubble-time {
    font-size: 11px;
    color: #8696a0;
}

.wa-ticks {
    font-size: 12px;
    color: #8696a0;
}

.wa-ticks-double { letter-spacing: -4px; }
.wa-ticks-read { color: #53bdeb; }
.wa-ticks-failed { color: #ef4444; font-weight: 700; }
.wa-ticks-pending { font-size: 10px; }

/* Media in bubbles */
.wa-media-bubble img { max-width: 100%; border-radius: 6px; }
.wa-media-caption { margin: 6px 0 0; font-size: 14px; color: #111; }

.wa-document-bubble, .wa-audio-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
}

/* ─── Input Bar ──────────────────────────────────────────── */
.wa-msg-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: #f0f2f5;
    border-top: 1px solid #e5e7eb;
}

.wa-msg-input-bar.wa-input-disabled {
    padding: 12px 20px;
}

.wa-msg-input {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    background: #fff;
    resize: none;
    outline: none;
    max-height: 100px;
    font-family: inherit;
}

.wa-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.wa-send-btn:hover { background: #1da851; }
.wa-send-btn:disabled { background: #d1d5db; cursor: default; }

.wa-bot-notice {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: #6b7280;
}

.wa-bot-notice button {
    background: none;
    border: none;
    color: #2563eb;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: 13px;
}

.wa-template-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-template-btn:hover { border-color: #25D366; color: #25D366; }

/* ─── Modals ─────────────────────────────────────────────── */
.wa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.wa-modal {
    background: #fff;
    border-radius: 12px;
    width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.wa-modal-config { width: 540px; }

.wa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.wa-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}

.wa-modal-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-modal-close:hover { background: #f3f4f6; }

.wa-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.wa-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
}

.wa-modal-empty {
    text-align: center;
    color: #9ca3af;
    padding: 20px;
}

/* Buttons */
.wa-btn-cancel {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
}

.wa-btn-cancel:hover { background: #f9fafb; }

.wa-btn-send {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    background: #25D366;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.wa-btn-send:hover { background: #1da851; }
.wa-btn-send:disabled { background: #d1d5db; cursor: default; }

/* Template Modal */
.wa-tpl-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.wa-tpl-card {
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.wa-tpl-card:hover { border-color: #25D366; }
.wa-tpl-card.active { border-color: #25D366; background: #f0fdf4; }

.wa-tpl-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.wa-tpl-lang {
    font-size: 11px;
    color: #9ca3af;
}

.wa-tpl-body {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.wa-tpl-params h4, .wa-tpl-preview h4 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #374151;
}

.wa-tpl-param-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.wa-tpl-param-row label {
    font-size: 13px;
    color: #6b7280;
    font-family: monospace;
    min-width: 40px;
}

.wa-tpl-param-row input {
    flex: 1;
}

.wa-tpl-no-params {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

.wa-tpl-preview-text {
    padding: 10px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    white-space: pre-wrap;
}

/* New Conversation Modal */
.wa-mode-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.wa-mode-tab {
    flex: 1;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.wa-mode-tab.active {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}

.wa-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.wa-input:focus { border-color: #25D366; }
.wa-input-sm { width: 120px; }

.wa-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: #fff;
    box-sizing: border-box;
}

.wa-new-contact-section, .wa-new-phone-section {
    margin-bottom: 16px;
}

.wa-phone-input-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.wa-phone-prefix {
    padding: 10px 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.wa-input-phone {
    border-radius: 0 8px 8px 0 !important;
    flex: 1;
}

.wa-phone-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

.wa-new-phone-section label, .wa-new-type-row label, .wa-new-template label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.wa-new-type-row, .wa-new-template {
    margin-bottom: 12px;
}

.wa-selected-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin: 8px 0;
    font-size: 13px;
}

.wa-selected-phone { color: #6b7280; }

.wa-selected-contact button {
    margin-left: auto;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
}

.wa-contact-results {
    max-height: 200px;
    overflow-y: auto;
}

.wa-contact-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.wa-contact-result:hover { background: #f9fafb; }
.wa-contact-result.active { background: #f0fdf4; }

.wa-cr-name { font-size: 14px; font-weight: 500; color: #1a1a2e; }
.wa-cr-phone { font-size: 12px; color: #6b7280; }
.wa-cr-type { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #f3f4f6; color: #6b7280; margin-left: auto; }

/* Config Modal */
.wa-config-section {
    margin-bottom: 20px;
}

.wa-config-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    padding-bottom: 6px;
    border-bottom: 1px solid #f3f4f6;
}

.wa-config-field {
    margin-bottom: 12px;
}

.wa-config-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
}

.wa-config-info {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
}

.wa-config-info p {
    margin: 4px 0;
}

.wa-config-info code {
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.wa-config-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}

.wa-config-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #25D366;
}

.wa-btn-sync {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-btn-sync:hover { border-color: #25D366; color: #25D366; }
.wa-btn-sync:disabled { opacity: 0.6; cursor: default; }

/* ─── WhatsApp Tab Bar ───────────────────────────────────── */
.wa-tabs {
    display: flex;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
}

.wa-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.wa-tab:hover { color: #1a1a2e; }

.wa-tab.active {
    color: #25D366;
    border-bottom-color: #25D366;
}

/* ─── Campaign Content Area ──────────────────────────────── */
.wa-camp-content {
    flex: 1;
    overflow: auto;
    background: #f0f2f5;
}

/* ─── Campaign List ──────────────────────────────────────── */
.wa-camp-list {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
}

.wa-camp-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.wa-camp-list-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.wa-camp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    text-align: center;
}

.wa-camp-empty p {
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

.wa-camp-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wa-camp-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-camp-card:hover {
    border-color: #25D366;
    box-shadow: 0 2px 8px rgba(37,211,102,0.1);
}

.wa-camp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.wa-camp-name {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a2e;
}

.wa-camp-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.wa-camp-card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.wa-camp-card-date {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

/* ─── Campaign Progress Bar ──────────────────────────────── */
.wa-camp-progress {
    margin-top: 8px;
}

.wa-camp-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.wa-camp-progress-fill {
    height: 100%;
    background: #25D366;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.wa-camp-progress-text {
    display: flex;
    gap: 12px;
    font-size: 12px;
    margin-top: 4px;
}

.wa-camp-sent { color: #25D366; }
.wa-camp-failed { color: #ef4444; }

/* ─── Campaign Detail ────────────────────────────────────── */
.wa-camp-detail {
    max-width: 1000px;
    margin: 0 auto;
    padding: 24px;
}

.wa-camp-detail-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #9ca3af;
}

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

.wa-camp-back {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-camp-back:hover { border-color: #25D366; color: #25D366; }

.wa-camp-detail-actions {
    display: flex;
    gap: 8px;
}

.wa-camp-delete-btn {
    padding: 8px 16px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff;
    color: #ef4444;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-camp-delete-btn:hover { background: #fef2f2; }

.wa-camp-detail-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.wa-camp-detail-title h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.wa-camp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.wa-camp-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.wa-camp-stat-val {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1;
    margin-bottom: 4px;
}

.wa-camp-stat-label {
    font-size: 12px;
    color: #6b7280;
}

.wa-camp-progress-big {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.wa-camp-progress-big .wa-camp-progress-bar {
    flex: 1;
    height: 10px;
}

.wa-camp-progress-pct {
    font-size: 14px;
    font-weight: 600;
    color: #25D366;
    min-width: 40px;
}

.wa-camp-info-row {
    display: flex;
    gap: 24px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #6b7280;
}

.wa-camp-info-row strong { color: #1a1a2e; }

/* ─── Recipients Table ───────────────────────────────────── */
.wa-camp-recipients-table {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: auto;
    max-height: 400px;
}

.wa-camp-recipients-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.wa-camp-recipients-table th {
    position: sticky;
    top: 0;
    background: #f9fafb;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.wa-camp-recipients-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.wa-camp-phone {
    font-family: monospace;
    font-size: 12px;
}

.wa-camp-recip-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

/* ─── Campaign Wizard ────────────────────────────────────── */
.wa-wizard {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
}

.wa-wizard-steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.wa-wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #9ca3af;
    font-weight: 500;
}

.wa-wizard-step.active {
    color: #25D366;
}

.wa-wizard-step.done {
    color: #1a1a2e;
}

.wa-wizard-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.wa-wizard-step.active .wa-wizard-step-num {
    background: #25D366;
    color: #fff;
}

.wa-wizard-step.done .wa-wizard-step-num {
    background: #1a1a2e;
    color: #fff;
}

.wa-wizard-body {
    flex: 1;
    overflow: auto;
    padding: 24px;
}

.wa-wizard-import h3,
.wa-wizard-template h4,
.wa-wizard-review h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}

.wa-wizard-hint {
    color: #6b7280;
    font-size: 13px;
    margin: 0 0 16px 0;
}

/* ─── Import Drop Zone ───────────────────────────────────── */
.wa-import-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 40px 20px;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.wa-import-drop:hover,
.wa-import-drop.over {
    border-color: #25D366;
    background: rgba(37,211,102,0.04);
}

.wa-import-drop.loading {
    opacity: 0.6;
    pointer-events: none;
}

.wa-import-drop small {
    font-size: 12px;
    color: #9ca3af;
}

/* ─── Import Preview ─────────────────────────────────────── */
.wa-import-preview {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.wa-import-stats {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.wa-import-stat {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.wa-import-stat.good { color: #25D366; font-weight: 600; }
.wa-import-stat.warn { color: #f59e0b; }
.wa-import-stat.dup { color: #EF4444; font-weight: 600; }

.wa-import-table-wrap {
    overflow: auto;
    max-height: 400px;
}

.wa-import-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.wa-import-table--dynamic {
    width: max-content;
    min-width: 100%;
}
.wa-import-th-actions { width: 40px; min-width: 40px; }
.wa-import-th-status { width: 110px; min-width: 110px; }
.wa-import-th-num { width: 32px; min-width: 32px; }
.wa-import-th-phone { width: 140px; min-width: 140px; }
.wa-import-th-data { min-width: 140px; }

.wa-import-table th {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    z-index: 1;
}

.wa-import-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    white-space: nowrap;
}
.wa-import-td-edit { padding: 2px 4px !important; }

.wa-import-cell-input {
    width: 100%;
    min-width: 100px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-size: 12px;
    color: #374151;
    transition: border-color 0.15s, background 0.15s;
}
.wa-import-cell-input:hover {
    border-color: #e5e7eb;
    background: #f9fafb;
}
.wa-import-cell-input:focus {
    outline: none;
    border-color: #25D366;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(37,211,102,0.12);
}

.wa-import-phone-edit {
    display: flex;
    align-items: center;
    gap: 0;
}
.wa-import-phone-plus {
    font-size: 12px;
    color: #6b7280;
    padding-left: 4px;
    flex-shrink: 0;
}

.wa-import-edit-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin: 8px 12px;
    font-size: 12px;
    color: #1e40af;
    line-height: 1.4;
}
.wa-import-edit-hint svg { flex-shrink: 0; }

/* ─── Campaign Import: Duplicate Detection & Row Actions ─── */
.wa-import-dup-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    margin: 8px 12px;
    font-size: 12px;
    color: #92400E;
    line-height: 1.4;
}
.wa-import-dup-banner svg { flex-shrink: 0; margin-top: 1px; }
.wa-import-dup-text strong { display: block; margin-bottom: 2px; }

.wa-import-row-removed {
    opacity: 0.35;
    text-decoration: line-through;
}

.wa-import-status-cell {
    white-space: nowrap;
    min-width: 120px;
    padding: 6px 10px !important;
}

.wa-import-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.wa-import-badge--valid {
    color: #25D366;
    background: #DCFCE7;
}
.wa-import-badge--active {
    color: #fff;
    background: #EF4444;
}
.wa-import-badge--archived {
    color: #7C3AED;
    background: #EDE9FE;
}
.wa-import-badge--closed {
    color: #6B7280;
    background: #F3F4F6;
}
.wa-import-badge--imported {
    color: #D97706;
    background: #FEF3C7;
}
.wa-import-removed-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    color: #EF4444;
    background: #FEE2E2;
    margin-left: 4px;
}

.wa-import-actions-cell {
    width: 36px;
    text-align: center;
}
.wa-import-remove-btn,
.wa-import-undo-btn {
    background: none;
    border: none;
    padding: 3px;
    cursor: pointer;
    border-radius: 4px;
    color: #9CA3AF;
    transition: all 0.15s;
}
.wa-import-remove-btn:hover {
    color: #EF4444;
    background: #FEE2E2;
}
.wa-import-undo-btn:hover {
    color: #25D366;
    background: #DCFCE7;
}

.wa-import-copy-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #9CA3AF;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
    transition: all 0.15s;
}
.wa-import-copy-btn:hover {
    color: #3B82F6;
    background: #EFF6FF;
}

/* ─── Wizard Template Step ───────────────────────────────── */
.wa-wizard-template-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.wa-wizard-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.wa-wizard-field input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.wa-wizard-field input:focus {
    border-color: #25D366;
}

.wa-wizard-toggle {
    display: flex;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.wa-wizard-toggle button {
    flex: 1;
    padding: 8px;
    border: none;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
}

.wa-wizard-toggle button.active {
    background: #25D366;
    color: #fff;
    font-weight: 600;
}

.wa-wizard-tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.wa-wizard-tpl-card {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-wizard-tpl-card:hover {
    border-color: #25D366;
}

.wa-wizard-tpl-card.selected {
    border-color: #25D366;
    background: rgba(37,211,102,0.05);
}

.wa-wizard-tpl-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.wa-wizard-tpl-body {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Wizard Mapping ─────────────────────────────────────── */
.wa-wizard-mapping {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}

.wa-wizard-map-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.wa-wizard-param {
    min-width: 100px;
    font-family: monospace;
    font-size: 13px;
    color: #25D366;
    font-weight: 600;
}

.wa-wizard-map-row select {
    flex: 1;
    max-width: 250px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

.wa-wizard-map-row select:focus {
    border-color: #25D366;
}

/* ─── Wizard Preview Bubble ──────────────────────────────── */
.wa-wizard-preview {
    margin-top: 16px;
}

.wa-wizard-preview h5 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.wa-wizard-preview-bubble {
    background: #dcf8c6;
    border-radius: 8px 8px 0 8px;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #111;
    max-width: 420px;
    white-space: pre-wrap;
}

/* ─── Wizard Review ──────────────────────────────────────── */
.wa-wizard-review-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.wa-wizard-review-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
}

.wa-wizard-review-row:last-child { border-bottom: none; }
.wa-wizard-review-row strong { color: #1a1a2e; }

.wa-wizard-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
}

/* ─── Wizard Footer ──────────────────────────────────────── */
.wa-wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.wa-wizard-footer-right {
    display: flex;
    gap: 8px;
}

.wa-wizard-btn-cancel {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-wizard-btn-cancel:hover { border-color: #9ca3af; }

.wa-wizard-btn-back {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.wa-wizard-btn-back:hover { border-color: #25D366; color: #25D366; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .wa-layout {
        grid-template-columns: 1fr;
    }
    .wa-msg-scroll {
        padding: 12px 16px;
    }
    .wa-bubble {
        max-width: 85%;
    }
    .wa-camp-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .wa-wizard-template-top {
        grid-template-columns: 1fr;
    }
    .wa-wizard-steps {
        gap: 16px;
    }
    .wa-wizard-steps span {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   WhatsApp — Qualification Badges
   ═══════════════════════════════════════════════════════════════ */

.wa-qual-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.wa-qual-small { padding: 1px 6px; font-size: 10px; }
.wa-qual-interested {
    background: #fef3cd;
    color: #856404;
    border: 1px solid #ffc107;
}
.wa-qual-qualified {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}
.wa-qual-declined {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #dc3545;
}

/* ═══════════════════════════════════════════════════════════════
   WhatsApp — Leads Tab
   ═══════════════════════════════════════════════════════════════ */

.wa-leads-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}
.wa-leads-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.wa-leads-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
}
.wa-leads-count {
    font-size: 13px;
    color: #555;
    background: #f0f0f5;
    padding: 3px 10px;
    border-radius: 12px;
}
.wa-leads-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.wa-leads-filter-group {
    display: flex;
    gap: 4px;
    background: #f0f0f5;
    border-radius: 8px;
    padding: 3px;
}
.wa-leads-filter {
    padding: 5px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    color: #555;
    transition: all 0.15s;
}
.wa-leads-filter.active {
    background: #fff;
    color: #1a1a2e;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.wa-leads-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wa-leads-card {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e8e8ee;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
.wa-leads-card:hover {
    border-color: #25D366;
    box-shadow: 0 2px 8px rgba(37,211,102,0.1);
}
.wa-leads-card-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}
.wa-leads-card-info {
    flex: 1;
    min-width: 0;
}
.wa-leads-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}
.wa-leads-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}
.wa-leads-card-time {
    font-size: 11px;
    color: #666;
}
.wa-leads-card-phone {
    font-size: 12px;
    color: #555;
    margin-bottom: 4px;
}
.wa-leads-card-msg {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}
.wa-leads-card-badges {
    display: flex;
    gap: 6px;
    align-items: center;
}
.wa-leads-type-badge {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}
.wa-leads-type-client {
    background: #e3f2fd;
    color: #1565c0;
}
.wa-leads-type-owner {
    background: #f3e5f5;
    color: #7b1fa2;
}
.wa-leads-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}
.wa-leads-empty svg { margin-bottom: 12px; }
.wa-leads-empty p {
    font-size: 15px;
    font-weight: 500;
    color: #666;
    margin: 0 0 6px;
}
.wa-leads-empty span {
    font-size: 13px;
    color: #aaa;
}
.wa-leads-loading {
    text-align: center;
    padding: 40px;
    color: #555;
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   WhatsApp — Bot Personality Modal
   ═══════════════════════════════════════════════════════════════ */

.wa-pers-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.wa-pers-modal {
    background: #fff;
    border-radius: 14px;
    width: 500px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.wa-pers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #eee;
}
.wa-pers-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
}
.wa-pers-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}
.wa-pers-close:hover { color: #333; }
.wa-pers-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}
.wa-pers-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.wa-pers-tab.active {
    color: #25D366;
    border-bottom-color: #25D366;
    font-weight: 600;
}
.wa-pers-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.wa-pers-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.wa-pers-label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    min-width: 130px;
}
.wa-pers-segmented {
    display: flex;
    gap: 0;
    background: #f0f0f5;
    border-radius: 8px;
    padding: 3px;
}
.wa-pers-seg-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    color: #666;
    transition: all 0.15s;
    white-space: nowrap;
}
.wa-pers-seg-btn.active {
    background: #fff;
    color: #1a1a2e;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.wa-pers-seg-btn:hover:not(.active) {
    color: #333;
}
.wa-pers-preview {
    background: #f8f9fb;
    border: 1px solid #e8e8ee;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 4px;
}
.wa-pers-preview-title {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wa-pers-preview ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wa-pers-preview li {
    font-size: 12px;
    color: #555;
    padding: 3px 0;
    padding-left: 14px;
    position: relative;
}
.wa-pers-preview li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #25D366;
}
.wa-pers-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #eee;
}
.wa-pers-cancel {
    padding: 8px 18px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    color: #666;
}
.wa-pers-cancel:hover { background: #f5f5f5; }
.wa-pers-save {
    padding: 8px 22px;
    border: none;
    background: #25D366;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.wa-pers-save:hover { background: #20bd5a; }
.wa-pers-save:disabled { opacity: 0.6; cursor: default; }

/* Wider modal variant */
.wa-pers-modal--wide {
    width: 580px;
}

/* ─── Profile bar ─────────────────────────────── */
.wa-prof-bar {
    display: flex;
    gap: 6px;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    background: #fafbfc;
    align-items: center;
    flex-wrap: wrap;
}
.wa-prof-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}
.wa-prof-chip.selected {
    border-color: #1a1a2e;
    color: #1a1a2e;
    font-weight: 600;
    background: #fff;
}
.wa-prof-chip.is-active {
    border-color: #25D366;
}
.wa-prof-chip.selected.is-active {
    border-color: #25D366;
}
.wa-prof-active-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #25D366;
    flex-shrink: 0;
}
.wa-prof-add {
    width: 28px;
    height: 28px;
    border: 1.5px dashed #ccc;
    border-radius: 50%;
    background: transparent;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.wa-prof-add:hover {
    border-color: #25D366;
    color: #25D366;
}

/* ─── Profile header ──────────────────────────── */
.wa-prof-header {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
}
.wa-prof-header-fields {
    display: flex;
    gap: 10px;
    flex: 1;
}
.wa-prof-field {
    flex: 1;
}
.wa-prof-field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.wa-prof-field input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
    transition: border 0.15s;
}
.wa-prof-field input:focus {
    border-color: #25D366;
}
.wa-prof-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    padding-bottom: 2px;
}
.wa-prof-activate {
    padding: 6px 14px;
    border: 1.5px solid #25D366;
    border-radius: 8px;
    background: #fff;
    color: #25D366;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.wa-prof-activate:hover {
    background: #25D366;
    color: #fff;
}
.wa-prof-active-badge {
    padding: 6px 14px;
    border-radius: 8px;
    background: #25D366;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.wa-prof-delete {
    padding: 6px 8px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.wa-prof-delete:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Section tabs inside personality modal */
.wa-agency-section-tabs {
    display: flex;
    padding: 0 20px;
    gap: 4px;
    border-bottom: 1px solid #eee;
}
.wa-agency-section-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.wa-agency-section-tab.active {
    color: #1a1a2e;
    border-bottom-color: #1a1a2e;
    font-weight: 600;
}

/* Agency info form */
.wa-agency-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.wa-agency-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}
.wa-agency-row input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border 0.15s;
    box-sizing: border-box;
}
.wa-agency-row input[type="text"]:focus {
    border-color: #25D366;
}
.wa-agency-row-pair {
    display: flex;
    gap: 12px;
}
.wa-agency-row-pair .wa-agency-row {
    flex: 1;
}

/* Phone multi-input */
.wa-agency-phones {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wa-agency-phone-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.wa-agency-phone-row input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}
.wa-agency-phone-row input:focus {
    border-color: #25D366;
}
.wa-agency-phone-remove {
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
}
.wa-agency-phone-remove:hover { color: #ef4444; }
.wa-agency-phone-add {
    background: none;
    border: 1px dashed #ccc;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
}
.wa-agency-phone-add:hover {
    border-color: #25D366;
    color: #25D366;
}

/* Services chips */
.wa-agency-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.wa-agency-svc-chip {
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}
.wa-agency-svc-chip.active {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
}
.wa-agency-svc-chip:hover:not(.active) {
    border-color: #25D366;
    color: #25D366;
}
.wa-agency-custom-svc {
    margin-top: 4px;
}

/* Header actions row */
.wa-page-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ─── Test Bot Sandbox ─────────────────────────────────── */
.wa-test-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 160px);
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8ee;
    overflow: hidden;
}
.wa-test-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #FFFBEB;
    border-bottom: 1px solid #FDE68A;
    font-size: 12px;
    color: #92400E;
    font-weight: 500;
}
.wa-test-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    background: #fafbfc;
}
.wa-test-bot-select {
    display: flex;
    gap: 0;
    background: #f0f0f5;
    border-radius: 8px;
    padding: 3px;
}
.wa-test-bot-btn {
    padding: 6px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: #666;
    transition: all 0.15s;
}
.wa-test-bot-btn.active {
    background: #fff;
    color: #1a1a2e;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.wa-test-reset {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}
.wa-test-reset:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* Profile selector in sandbox */
.wa-test-profile-select {
    display: flex;
    gap: 0;
    background: #f0f0f5;
    border-radius: 8px;
    padding: 3px;
}
.wa-test-prof-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    color: #666;
    transition: all 0.15s;
    white-space: nowrap;
}
.wa-test-prof-btn.active {
    background: #fff;
    color: #1a1a2e;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.wa-test-prof-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #25D366;
    flex-shrink: 0;
}
.wa-test-profile-info {
    padding: 6px 16px;
    background: #f0f7ff;
    border-bottom: 1px solid #dbeafe;
    font-size: 12px;
    color: #1e40af;
}
.wa-test-profile-info strong {
    font-weight: 600;
}

/* ─── Setup screen ────────────────────────── */
.wa-test-setup {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.wa-test-setup-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wa-test-setup-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wa-test-setup-optional {
    font-weight: 400;
    text-transform: none;
    color: #666;
    font-size: 11px;
}
.wa-test-setup-hint {
    font-size: 11px;
    color: #555;
}

/* Template list */
.wa-test-tpl-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}
.wa-test-tpl-empty {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 13px;
}
.wa-test-tpl-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 14px;
    border: 1.5px solid #e8e8ee;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}
.wa-test-tpl-card:hover {
    border-color: #25D366;
}
.wa-test-tpl-card.selected {
    border-color: #25D366;
    background: #f0fdf4;
}
.wa-test-tpl-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}
.wa-test-tpl-body {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* Template params */
.wa-test-tpl-params {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wa-test-tpl-param {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wa-test-tpl-param label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    min-width: 90px;
    font-family: monospace;
}
.wa-test-tpl-param input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: border 0.15s;
}
.wa-test-tpl-param input:focus {
    border-color: #25D366;
}

/* Template preview */
.wa-test-tpl-preview {
    padding: 10px 14px;
    background: #f8f9fb;
    border: 1px solid #e8e8ee;
    border-radius: 10px;
    font-size: 13px;
    color: #333;
    line-height: 1.45;
    white-space: pre-wrap;
}

/* Launch button */
.wa-test-setup-actions {
    padding-top: 4px;
}
.wa-test-launch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    background: #25D366;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.wa-test-launch:hover {
    background: #20bd5a;
}

/* Toolbar info in chat mode */
.wa-test-toolbar-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wa-test-toolbar-bot {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}
.wa-test-toolbar-profile {
    font-size: 12px;
    color: #555;
    padding-left: 8px;
    border-left: 1px solid #ddd;
}

/* Template badge in chat */
.wa-test-tpl-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #E0F2FE;
    border: 1px solid #BAE6FD;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #0369A1;
    margin-bottom: 2px;
}
.wa-test-bubble--tpl {
    border-color: #BAE6FD;
    background: #F0F9FF;
}

/* Messages area */
.wa-test-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f5f6f8;
}
.wa-test-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    color: #94a3b8;
    font-size: 13px;
}
.wa-test-empty p { margin: 0; }
.wa-test-msg {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}
.wa-test-msg--user {
    align-self: flex-end;
    align-items: flex-end;
}
.wa-test-msg--bot {
    align-self: flex-start;
    align-items: flex-start;
    gap: 4px;
}
.wa-test-msg--system {
    align-self: center;
}
.wa-test-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.wa-test-bubble--user {
    background: #DCF8C6;
    color: #1a1a2e;
    border-bottom-right-radius: 4px;
}
.wa-test-bubble--bot {
    background: #fff;
    color: #1a1a2e;
    border: 1px solid #e8e8ee;
    border-bottom-left-radius: 4px;
}
.wa-test-bubble--system {
    background: #FEE2E2;
    color: #991B1B;
    font-size: 12px;
    border-radius: 8px;
}

/* Typing indicator */
.wa-test-typing {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
}
.wa-test-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #aaa;
    animation: waTypingBounce 1.2s infinite;
}
.wa-test-typing span:nth-child(2) { animation-delay: 0.2s; }
.wa-test-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes waTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Actions & handoff badges */
.wa-test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}
.wa-test-action-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}
.wa-test-handoff {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 6px 10px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    font-size: 11px;
    color: #991B1B;
}

/* Input bar */
.wa-test-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #fff;
}
.wa-test-input-bar input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 13px;
    outline: none;
    transition: border 0.15s;
}
.wa-test-input-bar input:focus {
    border-color: #25D366;
}
.wa-test-send {
    width: 38px;
    height: 38px;
    border: none;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
}
.wa-test-send:hover { background: #20bd5a; }
.wa-test-send:disabled { opacity: 0.5; cursor: default; }

/* ─── Test Layout with Session Sidebar ─── */
.wa-test-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    height: calc(100vh - 160px);
    max-width: 1000px;
    margin: 0 auto;
}
.wa-test-layout .wa-test-container {
    max-width: none;
    height: 100%;
    border-radius: 0 12px 12px 0;
    border-left: none;
}

/* Session sidebar */
.wa-test-sidebar {
    background: #f8f9fb;
    border: 1px solid #e8e8ee;
    border-right: none;
    border-radius: 12px 0 0 12px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.wa-test-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e8e8ee;
}
.wa-test-sidebar-header h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}
.wa-test-sidebar-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}
.wa-test-sidebar-empty {
    padding: 32px 16px;
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}

/* Session cards */
.wa-test-session-card {
    padding: 10px 14px;
    border-bottom: 1px solid #eff1f5;
    cursor: pointer;
    transition: background 0.15s;
}
.wa-test-session-card:hover {
    background: #eef1f6;
}
.wa-test-session-card.active {
    background: #e8f5e9;
    border-left: 3px solid #25D366;
    padding-left: 11px;
}
.wa-test-session-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.wa-test-session-type {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 4px;
}
.wa-test-session-type--client {
    background: #DCFCE7;
    color: #166534;
}
.wa-test-session-type--owner {
    background: #DBEAFE;
    color: #1e40af;
}
.wa-test-session-time {
    font-size: 10px;
    color: #94a3b8;
}
.wa-test-session-profile {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 2px;
}
.wa-test-session-tpl {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #8b5cf6;
    margin-bottom: 3px;
}
.wa-test-session-preview {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wa-test-session-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}
.wa-test-session-msgs {
    font-size: 10px;
    color: #94a3b8;
}
.wa-test-session-delete {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #cbd5e1;
    border-radius: 4px;
    transition: all 0.15s;
    opacity: 0;
}
.wa-test-session-card:hover .wa-test-session-delete {
    opacity: 1;
}
.wa-test-session-delete:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Responsive: stack sidebar on small screens */
@media (max-width: 768px) {
    .wa-test-layout {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .wa-test-sidebar {
        max-height: 200px;
        border-radius: 12px 12px 0 0;
        border-right: 1px solid #e8e8ee;
        border-bottom: none;
        overflow-y: auto;
    }
    .wa-test-layout .wa-test-container {
        border-radius: 0 0 12px 12px;
        border-left: 1px solid #e8e8ee;
        border-top: none;
    }
}

/* ─── Profile Chips (shared: NewConv, Campaign, MessageView) ─── */
.wa-profile-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.wa-profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}
.wa-profile-chip:hover {
    border-color: #25D366;
    background: #f0fdf4;
}
.wa-profile-chip.active {
    border-color: #25D366;
    background: #DCFCE7;
    color: #166534;
    font-weight: 600;
}
.wa-profile-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #25D366;
    flex-shrink: 0;
}

/* ─── MessageView Profile Badge & Dropdown ─── */
.wa-msg-profile-wrap {
    position: relative;
}
.wa-msg-profile-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.wa-msg-profile-badge:hover {
    border-color: #25D366;
    background: #f0fdf4;
}
.wa-msg-profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 180px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 100;
    overflow: hidden;
}
.wa-msg-profile-option {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: none;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}
.wa-msg-profile-option:hover {
    background: #f0fdf4;
}
.wa-msg-profile-option.active {
    background: #DCFCE7;
    font-weight: 600;
    color: #166534;
}
.wa-msg-profile-default {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 400;
    margin-left: auto;
}

/* ─── Photo Select & Transfer ────────────────────────────────── */

.wa-photo-select-check {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.wa-photo-select-check.checked {
    background: #25D366;
    border-color: #25D366;
}

.wa-media-bubble { position: relative; }
.wa-media-selectable { cursor: pointer; }
.wa-media-selectable:hover { opacity: 0.9; }
.wa-media-selected {
    outline: 3px solid #25D366;
    outline-offset: -3px;
    border-radius: 8px;
}

.wa-photo-select-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f0fdf4;
    border-top: 1px solid #bbf7d0;
    gap: 12px;
}
.wa-photo-select-count {
    font-size: 13px;
    color: #166534;
    font-weight: 500;
}
.wa-photo-select-actions {
    display: flex;
    gap: 8px;
}

.wa-btn-active {
    background: #dcfce7 !important;
    color: #166534 !important;
    border-color: #25D366 !important;
}

/* Transfer Modal */
.wa-modal-transfer { width: 520px; }

.wa-transfer-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    transition: border-color 0.15s;
}
.wa-transfer-search-wrap:focus-within { border-color: #25D366; }

.wa-transfer-search {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #1a1a2e;
    background: transparent;
}
.wa-transfer-search::placeholder { color: #9ca3af; }

.wa-transfer-section { margin-bottom: 16px; }
.wa-transfer-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin: 0 0 8px;
    font-weight: 600;
}

.wa-transfer-card {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 6px;
}
.wa-transfer-card:hover { border-color: #25D366; background: #fafffe; }
.wa-transfer-card.active {
    border-color: #25D366;
    background: #f0fdf4;
}

.wa-transfer-card-info { flex: 1; min-width: 0; }
.wa-transfer-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-transfer-card-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.wa-transfer-card-check { flex-shrink: 0; margin-left: 10px; }

.wa-transfer-status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: #fff;
    font-weight: 500;
}
.wa-transfer-photo-count {
    font-size: 11px;
    color: #9ca3af;
}

.wa-transfer-empty {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
    margin: 0;
}

.wa-transfer-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.wa-transfer-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 20px;
    text-align: center;
}
.wa-transfer-success p {
    font-size: 14px;
    color: #166534;
    font-weight: 500;
    margin: 0;
}

.wa-transfer-error {
    margin-top: 12px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 13px;
    color: #dc2626;
}

@media (max-width: 640px) {
    .wa-pers-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .wa-leads-filters {
        flex-direction: column;
    }
    .wa-agency-row-pair {
        flex-direction: column;
    }
    .wa-test-container {
        height: calc(100vh - 140px);
        border-radius: 0;
        border: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════════════════════ */

.sett-page { padding-bottom: 32px; }
.sett-tabs.wa-tabs .wa-tab.active { color: var(--lk-gold-primary, #c8a951); border-bottom-color: var(--lk-gold-primary, #c8a951); }
.sett-content { padding: 24px; }

/* ─── Summary Cards ─────────────────────────────────────────── */
.sett-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.sett-summary-card {
    background: var(--lk-bg-card, #fff);
    border: 1px solid var(--lk-border-light, #e5e7eb);
    border-radius: var(--lk-radius-lg, 12px);
    padding: 20px;
    text-align: center;
    box-shadow: var(--lk-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
}
.sett-summary-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--lk-text-primary, #1a1a2e);
    line-height: 1.2;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sett-summary-label {
    font-size: 12px;
    color: var(--lk-text-muted, #9ca3af);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── Filters ───────────────────────────────────────────────── */
.sett-logs-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.sett-filter-select, .sett-filter-input {
    padding: 8px 12px;
    border: 1px solid var(--lk-border-light, #e5e7eb);
    border-radius: var(--lk-radius-sm, 8px);
    font-size: 13px;
    color: var(--lk-text-primary, #1a1a2e);
    background: var(--lk-bg-card, #fff);
    min-width: 160px;
}
.sett-filter-select:focus, .sett-filter-input:focus {
    outline: none;
    border-color: var(--lk-gold-primary, #c8a951);
    box-shadow: 0 0 0 3px rgba(200,169,81,.12);
}

/* ─── Logs Table ────────────────────────────────────────────── */
.sett-logs-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--lk-border-light, #e5e7eb);
    border-radius: var(--lk-radius-lg, 12px);
    background: var(--lk-bg-card, #fff);
    box-shadow: var(--lk-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
}
.sett-logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.sett-logs-table thead th {
    background: var(--lk-bg-elevated, #f8f9fa);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--lk-text-secondary, #6b7280);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--lk-border-light, #e5e7eb);
}
.sett-logs-table tbody tr { border-bottom: 1px solid var(--lk-border-light, #e5e7eb); }
.sett-logs-table tbody tr:nth-child(even) { background: var(--lk-bg-elevated, #f8f9fa); }
.sett-logs-table tbody tr:hover { background: rgba(200,169,81,.04); }
.sett-logs-table td { padding: 10px 16px; color: var(--lk-text-primary, #1a1a2e); }
.sett-cell-date { white-space: nowrap; }
.sett-time { color: var(--lk-text-muted, #9ca3af); font-size: 12px; }
.sett-cell-credits { font-weight: 600; text-align: center; }
.sett-cell-details { font-size: 12px; color: var(--lk-text-muted, #9ca3af); }
.sett-cell-details span { margin-right: 10px; }
.sett-op-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--lk-bg-elevated, #f3f4f6);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.sett-op-icon { font-size: 14px; }
.sett-loading, .sett-empty { text-align: center; padding: 32px; color: var(--lk-text-muted, #9ca3af); }
.sett-loading-box { text-align: center; padding: 48px; color: var(--lk-text-muted, #9ca3af); font-size: 14px; }

/* ─── Agents ────────────────────────────────────────────────── */
.sett-agents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.sett-agents-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--lk-text-primary, #1a1a2e);
    margin: 0;
}
.sett-btn-add {
    background: var(--lk-gold-gradient, linear-gradient(135deg, #c8a951, #e0c068));
    color: #1a1a2e;
    border: none;
    padding: 8px 18px;
    border-radius: var(--lk-radius-sm, 8px);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.sett-btn-add:hover { transform: translateY(-1px); box-shadow: var(--lk-shadow-gold, 0 4px 12px rgba(200,169,81,.3)); }

.sett-add-form {
    background: var(--lk-bg-card, #fff);
    border: 1px solid var(--lk-border-light, #e5e7eb);
    border-radius: var(--lk-radius-lg, 12px);
    padding: 20px;
    margin-bottom: 20px;
}
.sett-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.sett-form-row:last-child { margin-bottom: 0; }
.sett-input, .sett-select {
    padding: 8px 12px;
    border: 1px solid var(--lk-border-light, #e5e7eb);
    border-radius: var(--lk-radius-sm, 8px);
    font-size: 13px;
    color: var(--lk-text-primary, #1a1a2e);
    background: var(--lk-bg-card, #fff);
    flex: 1;
    min-width: 140px;
}
.sett-input:focus, .sett-select:focus {
    outline: none;
    border-color: var(--lk-gold-primary, #c8a951);
    box-shadow: 0 0 0 3px rgba(200,169,81,.12);
}
.sett-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}
.sett-success {
    background: #f0fdf4;
    color: #16a34a;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

.sett-agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.sett-agent-card {
    background: var(--lk-bg-card, #fff);
    border: 1px solid var(--lk-border-light, #e5e7eb);
    border-radius: var(--lk-radius-lg, 12px);
    padding: 20px;
    box-shadow: var(--lk-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
    transition: all 0.2s;
}
.sett-agent-card:hover { border-color: var(--lk-gold-primary, #c8a951); box-shadow: 0 4px 12px rgba(200,169,81,.1); }
.sett-agent-card.inactive { opacity: 0.55; }

.sett-agent-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.sett-agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--lk-gold-gradient, linear-gradient(135deg, #c8a951, #e0c068));
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}
.sett-agent-info { flex: 1; min-width: 0; }
.sett-agent-name { font-weight: 600; font-size: 14px; color: var(--lk-text-primary, #1a1a2e); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sett-agent-email { font-size: 12px; color: var(--lk-text-muted, #9ca3af); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sett-role-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.sett-role-badge.admin { background: #fef3c7; color: #92400e; }
.sett-role-badge.agent { background: #e0e7ff; color: #3730a3; }

/* ─── Credit Bar ────────────────────────────────────────────── */
.sett-credit-section { margin-bottom: 12px; }
.sett-credit-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--lk-text-muted, #9ca3af);
    margin-bottom: 6px;
}
.sett-credit-bar {
    height: 6px;
    background: var(--lk-bg-elevated, #e5e7eb);
    border-radius: 3px;
    overflow: hidden;
}
.sett-credit-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.sett-credit-fill.green { background: #22c55e; }
.sett-credit-fill.yellow { background: #eab308; }
.sett-credit-fill.red { background: #ef4444; }

.sett-agent-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.sett-agent-edit { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--lk-border-light, #e5e7eb); }

.sett-btn-edit, .sett-btn-delete, .sett-btn-save, .sett-btn-cancel {
    padding: 5px 14px;
    border-radius: var(--lk-radius-sm, 8px);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--lk-border-light, #e5e7eb);
    transition: all 0.15s;
}
.sett-btn-edit { background: var(--lk-bg-card, #fff); color: var(--lk-text-secondary, #6b7280); }
.sett-btn-edit:hover { border-color: var(--lk-gold-primary, #c8a951); color: var(--lk-gold-primary, #c8a951); }
.sett-btn-delete { background: var(--lk-bg-card, #fff); color: #ef4444; border-color: #fecaca; }
.sett-btn-delete:hover { background: #fef2f2; }
.sett-btn-save { background: var(--lk-gold-gradient, linear-gradient(135deg, #c8a951, #e0c068)); color: #1a1a2e; border: none; font-weight: 600; }
.sett-btn-save:disabled { opacity: 0.5; cursor: not-allowed; }
.sett-btn-cancel { background: var(--lk-bg-elevated, #f3f4f6); color: var(--lk-text-secondary, #6b7280); border: none; }

.sett-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--lk-text-primary, #1a1a2e);
    cursor: pointer;
}
.sett-edit-actions { display: flex; gap: 6px; margin-left: auto; }

/* ─── Profile ───────────────────────────────────────────────── */
.sett-profile { max-width: 600px; }
.sett-profile-form {
    background: var(--lk-bg-card, #fff);
    border: 1px solid var(--lk-border-light, #e5e7eb);
    border-radius: var(--lk-radius-lg, 12px);
    padding: 24px;
    box-shadow: var(--lk-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
}
.sett-form-group { margin-bottom: 20px; }
.sett-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--lk-text-secondary, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.sett-logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}
.sett-logo-preview {
    width: 80px;
    height: 80px;
    border-radius: var(--lk-radius-lg, 12px);
    object-fit: contain;
    border: 1px solid var(--lk-border-light, #e5e7eb);
    background: var(--lk-bg-elevated, #f8f9fa);
}
.sett-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--lk-radius-lg, 12px);
    border: 2px dashed var(--lk-border-light, #d1d5db);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--lk-text-muted, #9ca3af);
}
.sett-btn-upload {
    background: var(--lk-bg-elevated, #f3f4f6);
    border: 1px solid var(--lk-border-light, #e5e7eb);
    padding: 8px 16px;
    border-radius: var(--lk-radius-sm, 8px);
    font-size: 13px;
    cursor: pointer;
    color: var(--lk-text-secondary, #6b7280);
    transition: all 0.15s;
}
.sett-btn-upload:hover { border-color: var(--lk-gold-primary, #c8a951); color: var(--lk-gold-primary, #c8a951); }

.sett-colors-display {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.sett-color-swatch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--lk-text-secondary, #6b7280);
}
.sett-color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,.1);
}
.sett-btn-save-profile {
    background: var(--lk-gold-gradient, linear-gradient(135deg, #c8a951, #e0c068));
    color: #1a1a2e;
    border: none;
    padding: 10px 24px;
    border-radius: var(--lk-radius-sm, 8px);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.sett-btn-save-profile:hover { transform: translateY(-1px); box-shadow: var(--lk-shadow-gold, 0 4px 12px rgba(200,169,81,.3)); }
.sett-btn-save-profile:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── Agents Table (Row Layout) ─────────────────────────────── */
.sett-agents-table-header {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr 1.5fr 1.2fr;
    gap: 12px;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--lk-text-muted, #9ca3af);
    border-bottom: 2px solid var(--lk-border-light, #e5e7eb);
}

.sett-agent-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr 1.5fr 1.2fr;
    gap: 12px;
    padding: 12px 16px;
    align-items: center;
    border-bottom: 1px solid var(--lk-border-light, #e5e7eb);
    font-size: 13px;
    color: var(--lk-text-primary, #1a1a2e);
    transition: background 0.15s;
}
.sett-agent-row:hover { background: var(--lk-bg-elevated, #f8f9fa); }
.sett-agent-row.inactive { opacity: 0.5; }

.sett-agent-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sett-agent-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.sett-agent-photo-placeholder {
    background: var(--lk-gold-gradient, linear-gradient(135deg, #c8a951, #e0c068));
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.sett-agent-title {
    font-size: 11px;
    color: var(--lk-text-muted, #9ca3af);
}
.sett-agent-email-cell {
    font-size: 12px;
    color: var(--lk-text-secondary, #6b7280);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sett-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}
.sett-type-badge.agent { background: #e0e7ff; color: #3730a3; }
.sett-type-badge.manager { background: #fef3c7; color: #92400e; }
.sett-type-badge.secretara { background: #fce7f3; color: #9d174d; }
.sett-type-badge.asistent_manager { background: #d1fae5; color: #065f46; }
.sett-type-badge.marketing { background: #ede9fe; color: #5b21b6; }

.sett-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    margin-right: 6px;
    vertical-align: middle;
}
.sett-status-dot.active { background: #22c55e; }

.sett-credit-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}
.sett-credit-cell .sett-credit-bar {
    flex: 1;
    max-width: 80px;
}
.sett-credit-text {
    font-size: 11px;
    color: var(--lk-text-muted, #9ca3af);
    white-space: nowrap;
}

.sett-agent-row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.sett-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--lk-text-muted, #9ca3af);
    font-size: 14px;
}

/* ─── Agent Form ───────────────────────────────────────────── */
.sett-agent-photo-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.sett-agent-photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--lk-border-light, #e5e7eb);
}

/* ─── Tags/Chips ───────────────────────────────────────────── */
.sett-tags-input {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.sett-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--lk-border-light, #d1d5db);
    background: var(--lk-bg-card, #fff);
    color: var(--lk-text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.15s;
}
.sett-tag:hover { border-color: var(--lk-gold-primary, #c8a951); }
.sett-tag.active {
    background: var(--lk-gold-gradient, linear-gradient(135deg, #c8a951, #e0c068));
    color: #1a1a2e;
    border-color: transparent;
    font-weight: 600;
}

/* ─── Agency Profile Redesign ──────────────────────────────── */
.sett-profile-redesign { max-width: 900px; }

.sett-logo-upload-area {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.sett-working-hours-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--lk-border-light, #f0f0f0);
}
.sett-working-hours-row input[type="time"] {
    padding: 6px 10px;
    border: 1px solid var(--lk-border-light, #d1d5db);
    border-radius: 6px;
    font-size: 13px;
    width: 120px;
}
.sett-working-hours-row input[type="time"]:disabled {
    opacity: 0.4;
    background: var(--lk-bg-elevated, #f3f4f6);
}

.sett-tva-toggle {
    display: flex;
    gap: 8px;
}

.sett-profile-actions {
    display: flex;
    justify-content: flex-end;
    padding: 20px 0;
    position: sticky;
    bottom: 0;
    background: var(--lk-bg-main, #f5f0e8);
    z-index: 5;
}

/* ─── Permissions Tab ──────────────────────────────────────── */
.sett-permissions { max-width: 900px; }

.sett-perm-agent-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--lk-border-light, #e5e7eb);
}
.sett-perm-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 2px solid var(--lk-border-light, #e5e7eb);
    background: var(--lk-bg-card, #fff);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
}
.sett-perm-pill:hover { border-color: var(--lk-gold-primary, #c8a951); }
.sett-perm-pill.active {
    border-color: var(--lk-gold-primary, #c8a951);
    background: linear-gradient(135deg, rgba(200,169,81,.08), rgba(224,192,104,.08));
    box-shadow: 0 0 0 3px rgba(200,169,81,.1);
}
.sett-perm-pill.inactive { opacity: 0.5; }
.sett-perm-pill-name { font-weight: 600; color: var(--lk-text-primary, #1a1a2e); }

.sett-perm-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sett-perm-card { padding: 16px 20px; }
.sett-perm-card h4 { margin: 0; font-size: 14px; }

.sett-perm-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--lk-border-light, #f0f0f0);
}
.sett-perm-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--lk-text-primary, #1a1a2e);
}
.sett-perm-group-title svg { color: var(--lk-gold-primary, #c8a951); }

.sett-perm-toggle-all {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--lk-text-muted, #9ca3af);
    cursor: pointer;
    user-select: none;
}

.sett-perm-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 4px 24px;
}

.sett-perm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--lk-text-primary, #1a1a2e);
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}
.sett-perm-item:hover { background: var(--lk-bg-elevated, #f8f9fa); }

.sett-perm-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--lk-gold-primary, #c8a951);
    cursor: pointer;
    flex-shrink: 0;
}
.sett-perm-toggle-all input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--lk-gold-primary, #c8a951);
    cursor: pointer;
}

.sett-perm-save-bar {
    position: sticky;
    bottom: 0;
    background: var(--lk-bg-main, #f5f0e8);
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    z-index: 5;
    border-top: 1px solid var(--lk-border-light, #e5e7eb);
    margin-top: 16px;
}
.sett-perm-save-bar span {
    font-size: 13px;
    color: var(--lk-gold-primary, #c8a951);
    font-weight: 600;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sett-content { padding: 16px; }
    .sett-summary-cards { grid-template-columns: 1fr; }
    .sett-agents-grid { grid-template-columns: 1fr; }
    .sett-logs-filters { flex-direction: column; }
    .sett-filter-select, .sett-filter-input { min-width: 100%; }
    .sett-form-row { flex-direction: column; }
    .sett-agents-header { flex-direction: column; gap: 10px; align-items: stretch; }
    .sett-btn-add { text-align: center; }
    .sett-agents-table-header { display: none; }
    .sett-agent-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .sett-agent-identity { grid-column: 1 / -1; }
    .sett-agent-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
    .sett-working-hours-row { flex-wrap: wrap; }
    .sett-perm-list { grid-template-columns: 1fr; }
    .sett-perm-agent-pills { gap: 6px; }
    .sett-perm-pill { padding: 6px 10px; font-size: 12px; }
}


/* ═══════════════════════════════════════════════════════════════
   VIDEO STUDIO PAGE (vs-*)
   ═══════════════════════════════════════════════════════════════ */

.vs-page {
    --lk-bg-primary: #f7f8fc;
    --lk-bg-secondary: #ffffff;
    --lk-bg-card: #ffffff;
    --lk-bg-card-hover: #fafbfd;
    --lk-bg-elevated: #f0f2f7;
    --lk-bg-input: #f7f8fc;
    --lk-border-light: #e8ebf0;
    --lk-border-medium: #dde1e8;
    --lk-navy-dark: #0f0f1a;
    --lk-navy-medium: #1A365D;
    --lk-navy-light: #252540;
    --lk-gold-primary: #d4af37;
    --lk-gold-light: #f4d03f;
    --lk-gold-dark: #b8960c;
    --lk-gold-gradient: linear-gradient(135deg, #f4d03f 0%, #d4af37 50%, #b8960c 100%);
    --lk-gold-soft: rgba(212, 175, 55, 0.12);
    --lk-text-primary: #1A365D;
    --lk-text-secondary: #4a5068;
    --lk-text-muted: #8b92a5;
    --lk-success: #10b981;
    --lk-warning: #f59e0b;
    --lk-error: #ef4444;
    --lk-shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.04);
    --lk-shadow-md: 0 4px 12px rgba(26, 26, 46, 0.06);
    --lk-shadow-lg: 0 8px 24px rgba(26, 26, 46, 0.08);
    --lk-radius-sm: 8px;
    --lk-radius-md: 12px;
    --lk-radius-lg: 16px;
    max-width: 1280px;
}

/* --- Header --- */
.vs-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.vs-header-left { display: flex; align-items: center; gap: 12px; }
.vs-header-left h1 { font-size: 22px; font-weight: 700; color: var(--lk-navy-medium); margin: 0; }
.vs-header-left svg { color: var(--lk-gold-primary); }
.vs-credits-badge {
    display: flex; align-items: center; gap: 6px;
    background: var(--lk-gold-soft); border: 1px solid rgba(212,175,55,0.25);
    border-radius: 20px; padding: 6px 14px; font-size: 13px; font-weight: 600;
    color: var(--lk-gold-dark);
}
.vs-credits-badge svg { color: var(--lk-gold-primary); }

/* --- Tabs --- */
.vs-tabs {
    display: flex; gap: 0; margin-bottom: 20px;
    background: var(--lk-bg-card); border-radius: var(--lk-radius-lg);
    border: 1px solid var(--lk-border-light); box-shadow: var(--lk-shadow-sm);
    overflow: hidden;
}
.vs-tab {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 24px; border: none; background: transparent; cursor: pointer;
    font-size: 14px; font-weight: 500; color: var(--lk-text-secondary);
    border-bottom: 2px solid transparent; transition: all 0.2s;
}
.vs-tab:hover { background: var(--lk-bg-elevated); }
.vs-tab.active { color: var(--lk-navy-medium); font-weight: 600; border-bottom-color: var(--lk-gold-primary); }
.vs-tab.active svg { color: var(--lk-gold-primary); }

/* --- Error --- */
.vs-error {
    display: flex; align-items: center; gap: 10px;
    background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--lk-radius-md);
    padding: 12px 16px; margin-bottom: 16px; color: #b91c1c; font-size: 13px;
}
.vs-error span { flex: 1; }
.vs-error button { background: none; border: none; cursor: pointer; color: #b91c1c; padding: 2px; }

/* --- Steps indicator --- */
.vs-steps {
    display: flex; align-items: center; justify-content: center; gap: 0;
    margin-bottom: 28px; padding: 16px 0;
}
.vs-step {
    display: flex; align-items: center; gap: 8px; cursor: default;
    font-size: 13px; font-weight: 500; color: var(--lk-text-muted);
}
.vs-step.done { cursor: pointer; color: var(--lk-success); }
.vs-step.active { color: var(--lk-navy-medium); font-weight: 600; }
.vs-step-num {
    width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; border: 2px solid var(--lk-border-medium);
    background: var(--lk-bg-card); color: var(--lk-text-muted);
}
.vs-step.active .vs-step-num { border-color: var(--lk-gold-primary); background: var(--lk-gold-primary); color: #fff; }
.vs-step.done .vs-step-num { border-color: var(--lk-success); background: var(--lk-success); color: #fff; }
.vs-step-line { width: 40px; height: 2px; background: var(--lk-border-medium); margin: 0 8px; }
.vs-step-line.done { background: var(--lk-success); }

/* --- Template Selection (Step 1) --- */
.vs-category-bar {
    display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.vs-cat-btn {
    padding: 8px 16px; border-radius: 20px; border: 1px solid var(--lk-border-light);
    background: var(--lk-bg-card); cursor: pointer; font-size: 13px; color: var(--lk-text-secondary);
    transition: all 0.2s;
}
.vs-cat-btn:hover { border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); }
.vs-cat-btn.active {
    background: var(--lk-gold-soft); border-color: var(--lk-gold-primary);
    color: var(--lk-gold-dark); font-weight: 600;
}

.vs-template-grid { display: flex; flex-direction: column; gap: 10px; }

.vs-template-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--lk-bg-card); border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md); padding: 16px 20px;
    cursor: pointer; transition: all 0.2s;
}
.vs-template-card:hover {
    border-color: var(--lk-gold-primary); box-shadow: var(--lk-shadow-md);
    transform: translateY(-1px);
}
.vs-tpl-icon { font-size: 32px; flex-shrink: 0; }
.vs-tpl-info { flex: 1; min-width: 0; }
.vs-tpl-info h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--lk-navy-medium); }
.vs-tpl-info p { margin: 0 0 8px; font-size: 13px; color: var(--lk-text-secondary); line-height: 1.4; }
.vs-tpl-meta { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--lk-text-muted); }
.vs-tpl-meta span { display: flex; align-items: center; gap: 4px; }
.vs-tpl-arrow { color: var(--lk-text-muted); flex-shrink: 0; }
.vs-template-card:hover .vs-tpl-arrow { color: var(--lk-gold-primary); }

.vs-tier-badge {
    padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.vs-tier-standard { background: #dbeafe; color: #1d4ed8; }
.vs-tier-premium { background: #ede9fe; color: #6d28d9; }
.vs-tier-economy { background: #d1fae5; color: #047857; }
.vs-tier-hero { background: #fef3c7; color: #b45309; }

.vs-empty-templates { text-align: center; padding: 60px 20px; color: var(--lk-text-muted); }
.vs-empty-templates svg { margin-bottom: 12px; opacity: 0.4; }

/* --- Photos Section (Step 2) --- */
.vs-section-header {
    display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.vs-section-title { display: flex; align-items: center; gap: 12px; flex: 1; flex-wrap: wrap; }
.vs-section-title h2 { margin: 0; font-size: 18px; color: var(--lk-navy-medium); }
.vs-back-btn {
    display: flex; align-items: center; gap: 4px;
    padding: 8px 12px; border-radius: var(--lk-radius-sm); border: 1px solid var(--lk-border-light);
    background: var(--lk-bg-card); cursor: pointer; font-size: 13px; color: var(--lk-text-secondary);
    transition: all 0.2s;
}
.vs-back-btn:hover { border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); }
.vs-photo-count {
    font-size: 13px; color: var(--lk-text-muted); background: var(--lk-bg-elevated);
    padding: 4px 12px; border-radius: 12px;
}

.vs-dropzone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; padding: 60px 20px; border: 2px dashed var(--lk-border-medium);
    border-radius: var(--lk-radius-lg); cursor: pointer; transition: all 0.2s;
    background: var(--lk-bg-card); min-height: 280px;
}
.vs-dropzone svg { color: var(--lk-text-muted); }
.vs-dropzone:hover, .vs-dropzone.drag-over {
    border-color: var(--lk-gold-primary); background: var(--lk-gold-soft);
}
.vs-dropzone.drag-over svg { color: var(--lk-gold-primary); }
.vs-dropzone-text { text-align: center; line-height: 1.8; }
.vs-dropzone-text strong { display: block; font-size: 16px; color: var(--lk-navy-medium); }
.vs-dropzone-text span { display: block; font-size: 13px; color: var(--lk-text-muted); }
.vs-dropzone-hint { font-size: 12px !important; margin-top: 4px; }

.vs-photo-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px; margin-bottom: 20px;
}
.vs-photo-item {
    position: relative; border-radius: var(--lk-radius-md); overflow: hidden;
    aspect-ratio: 4/3; background: var(--lk-bg-elevated);
    border: 2px solid var(--lk-border-light); transition: border-color 0.2s;
}
.vs-photo-item:hover { border-color: var(--lk-gold-primary); }
.vs-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.vs-photo-num {
    position: absolute; top: 6px; left: 6px;
    background: rgba(26,26,46,0.7); color: #fff; font-size: 11px; font-weight: 700;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.vs-photo-room {
    position: absolute; bottom: 6px; left: 6px; right: 6px;
    background: rgba(26,26,46,0.75); color: #fff; font-size: 10px;
    padding: 3px 6px; border-radius: 4px; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vs-photo-actions {
    position: absolute; top: 6px; right: 6px;
    display: flex; gap: 3px; opacity: 0; transition: opacity 0.2s;
}
.vs-photo-item:hover .vs-photo-actions { opacity: 1; }
.vs-photo-actions button {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(255,255,255,0.9); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--lk-text-secondary); transition: all 0.15s;
}
.vs-photo-actions button:hover { background: #fff; color: var(--lk-navy-medium); }
.vs-photo-actions button:disabled { opacity: 0.3; cursor: default; }
.vs-photo-remove:hover { color: var(--lk-error) !important; }

.vs-photo-add {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; cursor: pointer; border-style: dashed; color: var(--lk-text-muted);
    font-size: 12px;
}
.vs-photo-add:hover { border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); background: var(--lk-gold-soft); }

/* Photo quality & upscale */
.vs-photo-low { border: 2px solid #f59e0b !important; }
.vs-photo-upscale {
    position: absolute; bottom: 6px; right: 6px;
    background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
    border: none; border-radius: 6px; padding: 4px 8px; font-size: 10px; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; gap: 4px;
    box-shadow: 0 2px 6px rgba(245,158,11,0.4); transition: all 0.15s; z-index: 2;
}
.vs-photo-upscale:hover { transform: scale(1.05); box-shadow: 0 3px 10px rgba(245,158,11,0.5); }
.vs-photo-upscaling {
    position: absolute; bottom: 6px; right: 6px;
    background: rgba(26,26,46,0.8); color: #f59e0b;
    border-radius: 6px; padding: 4px 8px; font-size: 10px; font-weight: 500;
    display: flex; align-items: center; gap: 4px; z-index: 2;
}
.vs-photo-upscaled {
    position: absolute; top: 6px; left: 6px;
    background: linear-gradient(135deg, #10b981, #059669); color: #fff;
    border-radius: 4px; padding: 2px 6px; font-size: 9px; font-weight: 700;
    letter-spacing: 0.5px; z-index: 2;
}

/* Analysis */
.vs-analysis-bar {
    display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
    padding: 12px 16px; background: var(--lk-bg-elevated); border-radius: var(--lk-radius-md);
}
.vs-analyze-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--lk-radius-sm);
    border: 1px solid var(--lk-border-medium); background: var(--lk-bg-card);
    cursor: pointer; font-size: 13px; font-weight: 500; color: var(--lk-navy-medium);
    transition: all 0.2s;
}
.vs-analyze-btn:hover:not(:disabled) { border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); }
.vs-analyze-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.vs-analyze-hint { font-size: 12px; color: var(--lk-text-muted); }

.vs-analysis-results {
    background: var(--lk-bg-card); border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md); padding: 16px; margin-bottom: 16px;
}
.vs-tips h4, .vs-missing h4 { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--lk-navy-medium); }
.vs-tips ul { margin: 0; padding-left: 20px; font-size: 13px; color: var(--lk-text-secondary); line-height: 1.8; }
.vs-tips + .vs-missing { margin-top: 12px; }
.vs-chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.vs-chip {
    padding: 4px 10px; border-radius: 12px; font-size: 12px;
    background: #fef3c7; color: #92400e; font-weight: 500;
}

/* Next button */
.vs-next-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; margin-top: 12px;
    background: var(--lk-gold-gradient); color: var(--lk-navy-dark);
    border: none; border-radius: var(--lk-radius-md); cursor: pointer;
    font-size: 15px; font-weight: 600; transition: all 0.2s;
}
.vs-next-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* --- Config Section (Step 3) --- */
.vs-config-layout {
    display: grid; grid-template-columns: 1fr 360px; gap: 24px;
}
.vs-config-card {
    background: var(--lk-bg-card); border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md); padding: 20px; margin-bottom: 16px;
}
.vs-config-card h3 {
    font-size: 14px; font-weight: 600; color: var(--lk-navy-medium);
    margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.3px;
}
.vs-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vs-field label {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; color: var(--lk-text-secondary);
    margin-bottom: 6px;
}
.vs-field input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-sm); font-size: 13px; background: var(--lk-bg-input);
    color: var(--lk-text-primary); transition: border-color 0.2s;
    box-sizing: border-box;
}
.vs-field input:focus { outline: none; border-color: var(--lk-gold-primary); }

/* Style grid */
.vs-style-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.vs-style-btn {
    padding: 10px 18px; border-radius: var(--lk-radius-sm);
    border: 1px solid var(--lk-border-light); background: var(--lk-bg-card);
    cursor: pointer; transition: all 0.2s; font-size: 13px;
}
.vs-style-btn:hover { border-color: var(--lk-gold-primary); }
.vs-style-btn.active {
    border-color: var(--lk-gold-primary); background: var(--lk-gold-soft);
    color: var(--lk-gold-dark);
}
.vs-style-btn.active strong { color: var(--lk-gold-dark); }

/* Tier grid */
.vs-tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vs-tier-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-radius: var(--lk-radius-sm);
    border: 1px solid var(--lk-border-light); background: var(--lk-bg-card);
    cursor: pointer; transition: all 0.2s; text-align: left;
}
.vs-tier-btn:hover { border-color: var(--lk-gold-primary); }
.vs-tier-btn.active { border-color: var(--lk-gold-primary); background: var(--lk-gold-soft); }
.vs-tier-text { flex: 1; min-width: 0; }
.vs-tier-text strong { display: block; font-size: 13px; color: var(--lk-navy-medium); }
.vs-tier-text span { display: block; font-size: 11px; color: var(--lk-text-muted); margin-top: 2px; }
.vs-tier-cost {
    font-size: 11px; font-weight: 600; color: var(--lk-gold-dark);
    background: var(--lk-gold-soft); padding: 3px 8px; border-radius: 10px;
    white-space: nowrap;
}

/* Format grid */
.vs-format-grid { display: flex; gap: 10px; }
.vs-format-btn {
    display: flex; align-items: center; gap: 10px; flex: 1;
    padding: 12px 14px; border-radius: var(--lk-radius-sm);
    border: 1px solid var(--lk-border-light); background: var(--lk-bg-card);
    cursor: pointer; transition: all 0.2s; text-align: left;
}
.vs-format-btn:hover { border-color: var(--lk-gold-primary); }
.vs-format-btn.active { border-color: var(--lk-gold-primary); background: var(--lk-gold-soft); }
.vs-format-btn strong { display: block; font-size: 13px; color: var(--lk-navy-medium); }
.vs-format-btn span { display: block; font-size: 11px; color: var(--lk-text-muted); }
.vs-format-icon {
    border: 2px solid var(--lk-border-medium); border-radius: 3px;
    background: var(--lk-bg-elevated);
}
.vs-fmt-landscape { width: 32px; height: 18px; }
.vs-fmt-portrait { width: 18px; height: 32px; }
.vs-fmt-square { width: 24px; height: 24px; }

/* Sidebar - Summary + Cost */
.vs-config-sidebar { position: sticky; top: 20px; align-self: start; }
.vs-summary-card, .vs-cost-card {
    background: var(--lk-bg-card); border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md); padding: 20px; margin-bottom: 16px;
}
.vs-summary-card h3, .vs-cost-card h3 {
    font-size: 13px; font-weight: 600; color: var(--lk-navy-medium);
    margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.3px;
}
.vs-summary-rows { display: flex; flex-direction: column; gap: 10px; }
.vs-summary-row {
    display: flex; justify-content: space-between; font-size: 13px;
}
.vs-summary-row span { color: var(--lk-text-muted); }
.vs-summary-row strong { color: var(--lk-navy-medium); font-weight: 600; }

.vs-cost-rows { display: flex; flex-direction: column; gap: 8px; }
.vs-cost-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--lk-text-secondary); }
.vs-free { color: var(--lk-success); font-weight: 600; font-size: 11px; }
.vs-cost-divider { height: 1px; background: var(--lk-border-light); margin: 10px 0; }
.vs-cost-total {
    display: flex; justify-content: space-between; font-size: 15px; font-weight: 700;
    color: var(--lk-navy-medium);
}
.vs-balance-row {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--lk-text-muted); margin-top: 12px;
}
.vs-balance-row strong { color: var(--lk-navy-medium); }
.vs-insufficient {
    display: flex; align-items: center; gap: 6px;
    margin-top: 8px; font-size: 12px; color: var(--lk-error); font-weight: 600;
}
.vs-estimating {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--lk-text-muted); padding: 8px 0;
}

/* Generate button */
.vs-generate-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 16px 20px;
    background: var(--lk-gold-gradient); color: var(--lk-navy-dark);
    border: none; border-radius: var(--lk-radius-md); cursor: pointer;
    font-size: 16px; font-weight: 700; transition: all 0.2s;
    position: relative;
}
.vs-generate-btn:hover:not(:disabled) { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(212,175,55,0.3); }
.vs-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; transform: none; }
.vs-gen-cost {
    position: absolute; right: 16px;
    font-size: 12px; font-weight: 600; opacity: 0.8;
}

/* --- Progress Section (Step 4) --- */
.vs-progress-section { max-width: 680px; margin: 0 auto; }

.vs-generating { text-align: center; padding: 40px 0; }
.vs-gen-header { margin-bottom: 32px; }
.vs-gen-header svg:first-child { color: var(--lk-gold-primary); margin-bottom: 16px; }
.vs-gen-header h2 { margin: 0 0 8px; font-size: 20px; color: var(--lk-navy-medium); }
.vs-gen-header p { margin: 0; font-size: 14px; color: var(--lk-text-muted); }

.vs-gen-progress { margin-bottom: 24px; display: flex; align-items: center; gap: 12px; }
.vs-gen-bar {
    flex: 1; height: 8px; background: var(--lk-bg-elevated);
    border-radius: 4px; overflow: hidden;
}
.vs-gen-fill {
    height: 100%; background: var(--lk-gold-gradient);
    border-radius: 4px; transition: width 0.5s ease;
}
.vs-gen-pct { font-size: 14px; font-weight: 700; color: var(--lk-navy-medium); min-width: 40px; }

.vs-gen-clips {
    font-size: 13px; color: var(--lk-text-secondary); margin-bottom: 24px;
}

.vs-gen-info {
    background: var(--lk-bg-card); border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md); padding: 16px; text-align: left;
}
.vs-gen-info-row {
    display: flex; justify-content: space-between; padding: 6px 0;
    font-size: 13px; color: var(--lk-text-secondary);
    border-bottom: 1px solid var(--lk-bg-elevated);
}
.vs-gen-info-row:last-child { border-bottom: none; }
.vs-status-text { font-weight: 600; }
.vs-status-queued { color: var(--lk-warning); }
.vs-status-processing, .vs-status-generating_clips { color: var(--lk-gold-primary); }
.vs-status-post_processing { color: #8b5cf6; }

/* Result */
.vs-result { text-align: center; padding: 40px 0; }
.vs-result-header { margin-bottom: 28px; }
.vs-success-circle {
    width: 64px; height: 64px; border-radius: 50%;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.vs-success-circle svg { color: #047857; }
.vs-result-header h2 { margin: 0 0 8px; font-size: 22px; color: var(--lk-navy-medium); }
.vs-result-header p { margin: 0; font-size: 14px; color: var(--lk-text-muted); }

.vs-result-thumb {
    max-width: 400px; margin: 0 auto 28px; border-radius: var(--lk-radius-lg); overflow: hidden;
    box-shadow: var(--lk-shadow-lg); border: 2px solid var(--lk-border-light);
}
.vs-result-thumb img { width: 100%; display: block; }

.vs-result-downloads {
    display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap;
}
.vs-download-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--lk-radius-md);
    border: 1px solid var(--lk-border-light); background: var(--lk-bg-card);
    cursor: pointer; font-size: 14px; font-weight: 600; color: var(--lk-navy-medium);
    transition: all 0.2s;
}
.vs-download-btn:hover { border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); box-shadow: var(--lk-shadow-md); }

.vs-result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.vs-action-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 20px; border-radius: var(--lk-radius-sm);
    border: 1px solid var(--lk-border-light); background: var(--lk-bg-card);
    cursor: pointer; font-size: 13px; color: var(--lk-text-secondary); transition: all 0.2s;
}
.vs-action-btn:hover { border-color: var(--lk-border-medium); color: var(--lk-navy-medium); }
.vs-action-primary {
    background: var(--lk-gold-gradient) !important; border-color: transparent !important;
    color: var(--lk-navy-dark) !important; font-weight: 600;
}
.vs-action-primary:hover { filter: brightness(1.05); }

/* --- Library --- */
.vs-library-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.vs-library-header h2 { margin: 0; font-size: 18px; color: var(--lk-navy-medium); }
.vs-refresh-btn {
    padding: 8px; border-radius: var(--lk-radius-sm); border: 1px solid var(--lk-border-light);
    background: var(--lk-bg-card); cursor: pointer; color: var(--lk-text-secondary);
    transition: all 0.2s;
}
.vs-refresh-btn:hover { color: var(--lk-gold-primary); border-color: var(--lk-gold-primary); }

.vs-library-empty {
    text-align: center; padding: 60px 20px; color: var(--lk-text-muted);
}
.vs-library-empty svg { margin-bottom: 12px; opacity: 0.4; }
.vs-library-empty p { font-size: 16px; margin: 8px 0; color: var(--lk-text-secondary); }
.vs-library-empty span { font-size: 13px; }

.vs-library-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.vs-job-card {
    display: flex; gap: 14px;
    background: var(--lk-bg-card); border: 1px solid var(--lk-border-light);
    border-radius: var(--lk-radius-md); padding: 14px; transition: all 0.2s;
}
.vs-job-card:hover { box-shadow: var(--lk-shadow-md); }
.vs-job-thumb {
    width: 100px; height: 70px; border-radius: var(--lk-radius-sm); overflow: hidden;
    flex-shrink: 0; position: relative; background: var(--lk-bg-elevated);
}
.vs-job-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vs-job-no-thumb {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--lk-text-muted);
}
.vs-job-badge {
    position: absolute; bottom: 4px; left: 4px;
    font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px;
}
.vs-jb-completed { background: #d1fae5; color: #047857; }
.vs-jb-failed { background: #fef2f2; color: #b91c1c; }
.vs-jb-processing, .vs-jb-queued { background: #fef3c7; color: #92400e; }

.vs-job-info { flex: 1; min-width: 0; }
.vs-job-info h4 {
    margin: 0 0 6px; font-size: 14px; font-weight: 600; color: var(--lk-navy-medium);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vs-job-meta {
    display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--lk-text-muted);
    flex-wrap: wrap;
}
.vs-job-meta span { display: flex; align-items: center; gap: 3px; }

.vs-job-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.vs-job-actions button {
    width: 32px; height: 32px; border-radius: var(--lk-radius-sm);
    border: 1px solid var(--lk-border-light); background: var(--lk-bg-card);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--lk-text-secondary); transition: all 0.15s;
}
.vs-job-actions button:hover { border-color: var(--lk-gold-primary); color: var(--lk-gold-dark); }
.vs-job-play:hover { color: var(--lk-gold-primary) !important; }

/* --- Video Preview Modal --- */
.vs-preview-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.vs-preview-modal {
    position: relative; max-width: 90vw; max-height: 90vh;
    border-radius: var(--lk-radius-lg); overflow: hidden;
    background: #000;
}
.vs-preview-modal video { max-width: 90vw; max-height: 85vh; display: block; }
.vs-preview-close {
    position: absolute; top: 12px; right: 12px; z-index: 1;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.2); border: none; cursor: pointer;
    color: #fff; display: flex; align-items: center; justify-content: center;
}
.vs-preview-close:hover { background: rgba(255,255,255,0.4); }

/* --- Spinner --- */
@keyframes vs-spin { to { transform: rotate(360deg); } }
.vs-spinner { animation: vs-spin 1s linear infinite; }

/* ═══════════ Content Engine ═══════════ */
.vs-content { margin-top: 16px; }
.vs-content-nav {
    display: flex; gap: 8px; margin-bottom: 20px;
    border-bottom: 2px solid var(--vs-border, #e2e8f0); padding-bottom: 0;
}
.vs-content-nav-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 18px; border: none; background: none; cursor: pointer;
    font-size: 14px; font-weight: 500; color: var(--vs-muted, #64748b);
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.vs-content-nav-btn:hover { color: var(--vs-text, #1e293b); }
.vs-content-nav-btn.active {
    color: var(--vs-primary, #1a365d); border-bottom-color: var(--vs-primary, #1a365d); font-weight: 600;
}
.vs-content-section { animation: vs-fadeIn 0.3s ease; }
@keyframes vs-fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.vs-content-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.vs-content-header h3 { font-size: 18px; font-weight: 600; color: var(--vs-text, #1e293b); margin: 0; }
.vs-content-header .vs-refresh-btn {
    display: flex; align-items: center; gap: 6px; padding: 8px 16px;
    background: var(--vs-primary, #1a365d); color: #fff; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 500; cursor: pointer; transition: opacity 0.2s;
}
.vs-content-header .vs-refresh-btn:hover { opacity: 0.9; }
.vs-content-header .vs-refresh-btn:disabled { opacity: 0.5; cursor: wait; }

.vs-content-loading, .vs-content-empty {
    text-align: center; padding: 60px 20px; color: var(--vs-muted, #64748b);
}
.vs-content-loading p, .vs-content-empty p { margin-top: 12px; font-size: 15px; }

/* Ideas Grid */
.vs-ideas-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px;
}
.vs-idea-card {
    background: var(--vs-card, #fff); border: 1px solid var(--vs-border, #e2e8f0);
    border-radius: 12px; padding: 18px; transition: box-shadow 0.2s;
}
.vs-idea-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.vs-idea-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.vs-idea-engagement {
    font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
}
.vs-eng-viral { background: #fef2f2; color: #dc2626; }
.vs-eng-high { background: #f0fdf4; color: #16a34a; }
.vs-eng-medium { background: #eff6ff; color: #2563eb; }
.vs-idea-platform {
    font-size: 11px; font-weight: 500; color: var(--vs-muted, #64748b);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.vs-idea-card h4 { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: var(--vs-text, #1e293b); }
.vs-idea-desc { font-size: 13px; color: var(--vs-muted, #64748b); line-height: 1.5; margin: 0 0 12px; }
.vs-idea-template {
    display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 10px;
}
.vs-idea-template-label { color: var(--vs-muted, #64748b); }
.vs-idea-template-name {
    background: var(--vs-bg, #f8fafc); padding: 2px 8px; border-radius: 4px;
    font-weight: 500; color: var(--vs-primary, #1a365d);
}
.vs-idea-hashtags {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; align-items: center;
}
.vs-hashtag {
    font-size: 11px; padding: 3px 8px; border-radius: 4px;
    background: #eef2ff; color: #4f46e5; font-weight: 500;
}
.vs-copy-tags {
    display: flex; align-items: center; gap: 3px; border: none; background: none;
    color: var(--vs-muted, #64748b); cursor: pointer; font-size: 11px; padding: 2px 4px;
}
.vs-copy-tags:hover { color: var(--vs-primary, #1a365d); }
.vs-idea-use {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 14px; border: 1px solid var(--vs-primary, #1a365d); background: none;
    color: var(--vs-primary, #1a365d); border-radius: 6px; font-size: 12px;
    font-weight: 500; cursor: pointer; transition: all 0.2s;
}
.vs-idea-use:hover { background: var(--vs-primary, #1a365d); color: #fff; }

/* Calendar */
.vs-calendar-week-label {
    font-size: 14px; font-weight: 600; color: var(--vs-muted, #64748b);
    margin-bottom: 16px; text-align: center;
}
.vs-calendar-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px;
}
.vs-calendar-day {
    background: var(--vs-card, #fff); border: 1px solid var(--vs-border, #e2e8f0);
    border-radius: 10px; overflow: hidden;
}
.vs-calendar-day-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 14px; background: var(--vs-bg, #f8fafc);
    border-bottom: 1px solid var(--vs-border, #e2e8f0);
}
.vs-day-name { font-weight: 600; font-size: 14px; color: var(--vs-text, #1e293b); }
.vs-day-date { font-size: 12px; color: var(--vs-muted, #64748b); }
.vs-calendar-video { padding: 12px 14px; border-bottom: 1px solid var(--vs-border, #e2e8f0); }
.vs-calendar-video:last-child { border-bottom: none; }
.vs-cal-video-top {
    display: flex; justify-content: space-between; margin-bottom: 6px;
}
.vs-cal-time { font-size: 12px; font-weight: 600; color: var(--vs-primary, #1a365d); }
.vs-cal-platform {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--vs-muted, #64748b); font-weight: 500;
}
.vs-calendar-video h5 { font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--vs-text, #1e293b); }
.vs-cal-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.vs-cal-template {
    font-size: 11px; background: var(--vs-bg, #f8fafc); padding: 2px 6px;
    border-radius: 4px; color: var(--vs-muted, #64748b);
}
.vs-cal-priority {
    font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 600;
}
.vs-pri-high { background: #fef2f2; color: #dc2626; }
.vs-pri-medium { background: #fffbeb; color: #d97706; }
.vs-pri-low { background: #f0fdf4; color: #16a34a; }
.vs-cal-caption { font-size: 12px; color: var(--vs-muted, #64748b); line-height: 1.4; margin: 0; }
.vs-cal-use { font-size: 11px; padding: 4px 10px; margin-top: 8px; }

/* Trends */
.vs-trends-section { margin-bottom: 28px; }
.vs-trends-section h4 {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: var(--vs-text, #1e293b); margin: 0 0 14px;
}
.vs-trends-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
.vs-trend-card {
    background: var(--vs-card, #fff); border: 1px solid var(--vs-border, #e2e8f0);
    border-radius: 10px; padding: 16px;
}
.vs-trend-top { display: flex; justify-content: space-between; margin-bottom: 8px; }
.vs-trend-eng { font-size: 12px; font-weight: 600; }
.vs-trend-platform { font-size: 11px; text-transform: uppercase; color: var(--vs-muted, #64748b); }
.vs-trend-card h5 { font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.vs-trend-card p { font-size: 13px; color: var(--vs-muted, #64748b); margin: 0 0 4px; line-height: 1.4; }
.vs-trend-example { font-style: italic; font-size: 12px; }

.vs-hashtag-groups { display: flex; flex-direction: column; gap: 16px; }
.vs-hashtag-group {
    background: var(--vs-card, #fff); border: 1px solid var(--vs-border, #e2e8f0);
    border-radius: 10px; padding: 14px 18px;
}
.vs-hashtag-group-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
    font-size: 14px; font-weight: 600;
}
.vs-hashtag-list { display: flex; flex-wrap: wrap; gap: 6px; }

.vs-posting-times {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px;
}
.vs-posting-platform {
    background: var(--vs-card, #fff); border: 1px solid var(--vs-border, #e2e8f0);
    border-radius: 10px; padding: 14px 18px;
}
.vs-posting-name {
    font-size: 14px; font-weight: 600; text-transform: capitalize;
    display: block; margin-bottom: 8px; color: var(--vs-text, #1e293b);
}
.vs-posting-best { font-size: 13px; display: block; margin-bottom: 4px; }
.vs-posting-good { font-size: 12px; color: var(--vs-muted, #64748b); display: block; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .vs-config-layout { grid-template-columns: 1fr; }
    .vs-config-sidebar { position: static; }
    .vs-form-grid { grid-template-columns: 1fr; }
    .vs-tier-grid { grid-template-columns: 1fr; }
    .vs-format-grid { flex-direction: column; }
    .vs-steps { flex-wrap: wrap; gap: 4px; }
    .vs-step-line { width: 20px; }
    .vs-calendar-grid { grid-template-columns: 1fr 1fr; }
    .vs-ideas-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .vs-page { padding: 16px !important; }
    .vs-photo-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .vs-library-grid { grid-template-columns: 1fr; }
    .vs-result-downloads { flex-direction: column; align-items: center; }
    .vs-content-nav { overflow-x: auto; }
    .vs-content-nav-btn { white-space: nowrap; font-size: 13px; padding: 8px 12px; }
    .vs-calendar-grid { grid-template-columns: 1fr; }
    .vs-trends-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   CONTRACTS MODULE (.ct-*)
   ═══════════════════════════════════════════════ */

/* Status Tabs */
.ct-status-tabs { display: flex; gap: 4px; padding: 0 0 12px; overflow-x: auto; flex-wrap: wrap; }
.ct-status-tab { padding: 6px 14px; border: 1px solid #e2e8f0; border-radius: 20px; background: white; font-size: 13px; cursor: pointer; font-family: inherit; color: #718096; display: flex; align-items: center; gap: 6px; transition: all 0.2s; white-space: nowrap; }
.ct-status-tab:hover { border-color: #cbd5e0; color: #4a5568; }
.ct-status-tab.active { background: #1a365d; color: white; border-color: #1a365d; }
.ct-tab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ct-status-tab.active .ct-tab-dot { background: white !important; opacity: 0.6; }

/* Status Badges */
.ct-status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 500; border: 1px solid; }

/* Type Badge */
.ct-type-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; background: #edf2f7; color: #4a5568; text-transform: uppercase; letter-spacing: 0.5px; }

/* Actions row */
.ct-actions { display: flex; gap: 4px; }
.ct-action-btn { width: 32px; height: 32px; border: 1px solid #e2e8f0; border-radius: 6px; background: white; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #718096; transition: all 0.15s; }
.ct-action-btn:hover { background: #f7fafc; color: #1a365d; border-color: #cbd5e0; }
.ct-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ct-send-btn { border-color: #1a365d; color: #1a365d; }
.ct-send-btn:hover { background: #1a365d; color: white; }

/* Buttons */
.ct-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid #e2e8f0; border-radius: 8px; background: white; font-size: 13px; cursor: pointer; font-family: inherit; color: #4a5568; transition: all 0.15s; }
.ct-btn:hover { background: #f7fafc; border-color: #cbd5e0; }
.ct-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ct-btn-primary { background: #1a365d; color: white; border-color: #1a365d; }
.ct-btn-primary:hover { background: #2a4a7f; }
.ct-btn-primary:disabled { background: #a0aec0; border-color: #a0aec0; }
.ct-btn-danger { color: #e53e3e; border-color: #fed7d7; }
.ct-btn-danger:hover { background: #fff5f5; }

/* Detail Drawer */
.ct-detail-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 100; display: flex; justify-content: flex-end; }
.ct-detail { width: 480px; max-width: 100vw; background: white; height: 100%; display: flex; flex-direction: column; box-shadow: -4px 0 24px rgba(0,0,0,0.1); animation: ct-slide-in 0.2s ease-out; }
@keyframes ct-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.ct-detail-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #e2e8f0; }
.ct-detail-header h2 { font-size: 16px; font-weight: 600; color: #1a202c; }
.ct-detail-close { background: none; border: none; cursor: pointer; color: #718096; padding: 4px; border-radius: 6px; }
.ct-detail-close:hover { background: #f7fafc; color: #1a202c; }
.ct-detail-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.ct-detail-section { margin-bottom: 16px; }
.ct-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f7fafc; font-size: 13px; }
.ct-detail-label { color: #718096; font-size: 13px; }

/* Detail Actions */
.ct-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0; border-bottom: 1px solid #e2e8f0; }

/* Audit Trail */
.ct-audit { margin-top: 20px; }
.ct-audit h3 { font-size: 14px; font-weight: 600; color: #1a365d; margin-bottom: 12px; }
.ct-audit-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; position: relative; }
.ct-audit-item:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 22px; bottom: -8px; width: 1px; background: #e2e8f0; }
.ct-audit-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.ct-audit-content { display: flex; flex-direction: column; gap: 2px; }
.ct-audit-action { font-size: 13px; font-weight: 500; color: #2d3748; }
.ct-audit-time { font-size: 12px; color: #a0aec0; }

/* Form Modal + Wizard */
.ct-form-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ct-form-modal { background: white; border-radius: 16px; width: 640px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 8px 40px rgba(0,0,0,0.15); }
.ct-form-wizard { width: 680px; }
.ct-form-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #e2e8f0; }
.ct-form-header h2 { font-size: 18px; font-weight: 600; }
.ct-form-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.ct-form-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid #e2e8f0; }

/* Wizard step indicator */
.ct-wizard-steps { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 16px 24px 0; }
.ct-wizard-step { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #a0aec0; }
.ct-wizard-step.active { color: #1a365d; font-weight: 600; }
.ct-wizard-step.done { color: #38a169; }
.ct-wizard-step:not(:last-child)::after { content: ''; display: block; width: 24px; height: 1px; background: #e2e8f0; margin-left: 4px; }
.ct-wizard-step.done:not(:last-child)::after { background: #c6f6d5; }
.ct-wizard-dot { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: #f7fafc; border: 2px solid #e2e8f0; color: #a0aec0; flex-shrink: 0; }
.ct-wizard-step.active .ct-wizard-dot { background: #1a365d; color: white; border-color: #1a365d; }
.ct-wizard-step.done .ct-wizard-dot { background: #38a169; color: white; border-color: #38a169; }
.ct-wizard-content h3 { font-size: 16px; font-weight: 600; color: #1a365d; margin-bottom: 16px; }

/* Type selection grid */
.ct-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-type-card { background: white; border: 2px solid #e2e8f0; border-radius: 12px; padding: 20px 16px; text-align: center; cursor: pointer; transition: all 0.2s; }
.ct-type-card:hover { border-color: #cbd5e0; background: #f7fafc; }
.ct-type-card.selected { border-color: #1a365d; background: #ebf4ff; }
.ct-type-icon { margin-bottom: 10px; color: #718096; display: flex; justify-content: center; }
.ct-type-card.selected .ct-type-icon { color: #1a365d; }
.ct-type-label { font-size: 14px; font-weight: 600; color: #2d3748; margin-bottom: 4px; }
.ct-type-desc { font-size: 12px; color: #a0aec0; }

/* Form groups */
.ct-form-group { margin-bottom: 12px; }
.ct-form-group label { display: block; font-size: 12px; font-weight: 500; color: #4a5568; margin-bottom: 4px; }
.ct-form-group input, .ct-form-group select { width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.15s; }
.ct-form-group input:focus, .ct-form-group select:focus { border-color: #1a365d; }
.ct-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-form-divider { font-size: 12px; font-weight: 600; color: #1a365d; text-transform: uppercase; letter-spacing: 0.5px; margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid #e2e8f0; }

/* Prefill info box */
.ct-prefill-info { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.ct-prefill-row { font-size: 13px; color: #4a5568; padding: 3px 0; display: flex; gap: 8px; }
.ct-prefill-row span { color: #718096; min-width: 60px; }
.ct-prefill-row strong { color: #2d3748; }

/* OCR Upload */
.ct-ocr-upload { border: 2px dashed #cbd5e0; border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #718096; font-size: 14px; margin-bottom: 12px; }
.ct-ocr-upload:hover { border-color: #1a365d; background: #ebf4ff; }
.ct-ocr-loading { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #d69e2e; }
.ct-spinner { width: 20px; height: 20px; border: 2px solid #e2e8f0; border-top-color: #1a365d; border-radius: 50%; animation: ct-spin 0.6s linear infinite; }
@keyframes ct-spin { to { transform: rotate(360deg); } }
.ct-ocr-status { font-size: 13px; padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; }
.ct-ocr-status.success { background: #f0fdf4; color: #15803d; }
.ct-ocr-status.error { background: #fef2f2; color: #dc2626; }

/* Signature preview */
.ct-sig-preview { margin-top: 12px; }
.ct-sig-preview label { display: block; font-size: 12px; font-weight: 500; color: #4a5568; margin-bottom: 6px; }
.ct-sig-preview img { max-width: 180px; max-height: 70px; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px; background: white; }

/* Summary */
.ct-summary { background: #f7fafc; border-radius: 10px; padding: 14px 16px; }
.ct-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid #edf2f7; }
.ct-summary-row:last-child { border-bottom: none; }
.ct-summary-row span { color: #718096; }
.ct-summary-row strong { color: #2d3748; }

/* Send options grid */
.ct-send-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.ct-send-option { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 12px; border: 2px solid #e2e8f0; border-radius: 12px; background: white; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500; color: #4a5568; transition: all 0.2s; }
.ct-send-option:hover { border-color: #1a365d; background: #ebf4ff; color: #1a365d; }
.ct-send-option:disabled { opacity: 0.5; cursor: not-allowed; }
.ct-send-option svg { color: #718096; }
.ct-send-option:hover svg { color: #1a365d; }

/* Filter select */
.crm-filter-select { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; font-family: inherit; background: white; color: #4a5568; outline: none; cursor: pointer; }
.crm-filter-select:focus { border-color: #1a365d; }

/* Responsive */
@media (max-width: 768px) {
    .ct-detail { width: 100vw; }
    .ct-form-modal, .ct-form-wizard { width: 100%; max-height: 95vh; border-radius: 12px 12px 0 0; margin-top: auto; }
    .ct-form-row { grid-template-columns: 1fr; }
    .ct-type-grid { grid-template-columns: 1fr; }
    .ct-status-tabs { gap: 4px; }
    .ct-status-tab { padding: 5px 10px; font-size: 12px; }
    .ct-wizard-steps span { display: none; }
    .ct-wizard-step:not(:last-child)::after { width: 12px; }
    .ct-send-grid { grid-template-columns: 1fr; }
}

/* ─── Site Save Bar ─── */
.site-save-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: #1a202c;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 24px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    pointer-events: none;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25);
}
.site-save-bar.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.site-save-bar.success {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    background: #1a3a2a;
}
.site-save-bar-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    font-size: 13.5px;
    font-weight: 500;
    color: #e2e8f0;
}
.site-save-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4af37;
    flex-shrink: 0;
    animation: saveDotPulse 2s ease-in-out infinite;
}
@keyframes saveDotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(212, 175, 55, 0); }
}
.site-save-btn {
    margin-left: auto;
    padding: 8px 24px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.site-save-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
}
.site-save-btn:active:not(:disabled) {
    transform: translateY(0);
}
.site-save-spinner {
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}
.site-save-check {
    width: 22px;
    height: 22px;
    color: #48bb78;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: checkDraw 0.4s ease forwards 0.1s;
}
@keyframes checkDraw {
    to { stroke-dashoffset: 0; }
}
.site-save-bar.success .site-save-bar-content {
    color: #9ae6b4;
    font-weight: 600;
}
@media (max-width: 768px) {
    .site-save-bar-content { padding: 12px 0; font-size: 12.5px; }
    .site-save-btn { padding: 7px 16px !important; font-size: 12.5px !important; }
}

/* ============================================================
   Blog Editor Styles
   ============================================================ */
.blog-status-badge {
    display: inline-block;
    white-space: nowrap;
}

.blog-html-preview h2 { font-size: 18px; font-weight: 700; color: #1a202c; margin: 16px 0 8px; }
.blog-html-preview h3 { font-size: 16px; font-weight: 600; color: #2d3748; margin: 12px 0 6px; }
.blog-html-preview p { margin-bottom: 10px; }
.blog-html-preview ul { list-style: disc; padding-left: 20px; margin-bottom: 10px; }
.blog-html-preview ol { list-style: decimal; padding-left: 20px; margin-bottom: 10px; }
.blog-html-preview blockquote { border-left: 3px solid #4a90d9; padding: 8px 14px; background: #f7fafc; margin: 12px 0; border-radius: 0 8px 8px 0; color: #4a5568; }
.blog-html-preview a { color: #4a90d9; text-decoration: underline; }

/* ── Billing Page ── */
.bill-page { max-width: 960px; }
.bill-tabs { margin-bottom: 24px; }
.bill-content { padding: 0 4px; }
.bill-loading { text-align: center; padding: 48px 0; color: #718096; font-size: 14px; }
.bill-empty { text-align: center; padding: 48px 0; color: #718096; font-size: 14px; }
.bill-error { color: #e53e3e; font-size: 13px; margin: 8px 0; padding: 8px 12px; background: #fff5f5; border-radius: 8px; }

/* Banners */
.bill-banner { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 10px; font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.bill-banner.success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.bill-banner.cancelled { background: #fff5f5; color: #9b2c2c; border: 1px solid #fed7d7; }
.bill-banner.error { background: #fff5f5; color: #9b2c2c; border: 1px solid #fed7d7; }

/* Overview cards */
.bill-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.bill-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; text-align: center; }
.bill-card-label { font-size: 12px; color: #718096; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.bill-card-value { font-size: 28px; font-weight: 700; color: #1a202c; }
.bill-card-unit { font-size: 12px; color: #a0aec0; margin-top: 2px; }
.bill-updated { font-size: 12px; color: #a0aec0; text-align: right; }

/* Buy credits */
.bill-buy-header { margin-bottom: 20px; }
.bill-buy-header h3 { font-size: 18px; font-weight: 700; color: #1a202c; margin-bottom: 4px; }
.bill-buy-header p { font-size: 14px; color: #718096; }
.bill-packages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.bill-package-card { background: #fff; border: 2px solid #e2e8f0; border-radius: 12px; padding: 20px 12px; text-align: center; cursor: pointer; transition: all 0.2s; position: relative; }
.bill-package-card:hover { border-color: #b7a26e; box-shadow: 0 2px 12px rgba(183,162,110,0.12); }
.bill-package-card.selected { border-color: #b7a26e; background: #fefcf5; box-shadow: 0 2px 16px rgba(183,162,110,0.18); }
.bill-pkg-credits { font-size: 24px; font-weight: 700; color: #1a202c; }
.bill-pkg-label { font-size: 11px; color: #a0aec0; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.bill-pkg-price { font-size: 16px; font-weight: 600; color: #b7a26e; }
.bill-pkg-badge { position: absolute; top: -8px; right: -8px; background: #b7a26e; color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.bill-custom-row { margin-bottom: 24px; }
.bill-custom-row label { display: block; font-size: 13px; color: #718096; margin-bottom: 8px; }
.bill-custom-input-wrap { display: flex; align-items: center; gap: 8px; max-width: 280px; }
.bill-custom-input { flex: 1; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 15px; outline: none; }
.bill-custom-input:focus { border-color: #b7a26e; box-shadow: 0 0 0 3px rgba(183,162,110,0.15); }
.bill-custom-suffix { font-size: 14px; color: #718096; font-weight: 600; }
.bill-custom-preview { margin-top: 8px; font-size: 14px; color: #4a5568; }
.bill-buy-btn { display: block; width: 100%; max-width: 480px; margin: 0 auto; padding: 14px 24px; background: linear-gradient(135deg, #b7a26e, #d4c48a); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; text-align: center; }
.bill-buy-btn:hover:not(:disabled) { box-shadow: 0 4px 16px rgba(183,162,110,0.3); transform: translateY(-1px); }
.bill-buy-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Billing details form */
.bill-form { max-width: 640px; }
.bill-form-section { margin-bottom: 28px; }
.bill-form-section h3 { font-size: 15px; font-weight: 600; color: #1a202c; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid #edf2f7; }
.bill-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bill-form-group { margin-bottom: 14px; }
.bill-form-group label { display: block; font-size: 12px; font-weight: 500; color: #718096; margin-bottom: 4px; }
.bill-form-input { width: 100%; padding: 9px 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; color: #1a202c; outline: none; box-sizing: border-box; }
.bill-form-input:focus { border-color: #b7a26e; box-shadow: 0 0 0 3px rgba(183,162,110,0.12); }
.bill-radio-row { display: flex; gap: 12px; }
.bill-radio { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border: 2px solid #e2e8f0; border-radius: 10px; cursor: pointer; font-size: 14px; color: #4a5568; transition: all 0.2s; }
.bill-radio.active { border-color: #b7a26e; background: #fefcf5; color: #1a202c; }
.bill-radio input { display: none; }

/* Tables */
.bill-table-wrap { overflow-x: auto; }
.bill-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bill-table th { text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #718096; border-bottom: 2px solid #edf2f7; white-space: nowrap; }
.bill-table td { padding: 10px 12px; border-bottom: 1px solid #edf2f7; color: #2d3748; }
.bill-table tr:hover { background: #f7fafc; }
.bill-positive { color: #38a169; font-weight: 600; }
.bill-negative { color: #e53e3e; font-weight: 600; }
.bill-type-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; color: #fff; font-size: 11px; font-weight: 600; }
.bill-desc { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-status { font-size: 12px; font-weight: 500; }
.bill-status.paid { color: #38a169; }
.bill-status.pending { color: #d69e2e; }
.bill-status.cancelled { color: #e53e3e; }
.bill-pdf-btn { padding: 4px 12px; border: 1px solid #b7a26e; background: transparent; color: #b7a26e; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.bill-pdf-btn:hover { background: #b7a26e; color: #fff; }
.bill-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px 0; font-size: 13px; color: #718096; }
.bill-pagination button { padding: 6px 14px; border: 1px solid #e2e8f0; background: #fff; border-radius: 6px; font-size: 13px; cursor: pointer; color: #4a5568; }
.bill-pagination button:hover:not(:disabled) { border-color: #b7a26e; color: #b7a26e; }
.bill-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Responsive */
@media (max-width: 768px) {
    .bill-cards { grid-template-columns: repeat(2, 1fr); }
    .bill-packages { grid-template-columns: repeat(2, 1fr); }
    .bill-form-row { grid-template-columns: 1fr; }
    .bill-radio-row { flex-direction: column; }
}

/* ── Pricing Page (public) ── */
.pricing-wrapper { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.pricing-page { max-width: 960px; margin: 0 auto; padding: 40px 20px 80px; flex: 1; }

/* Pricing Header */
.pricing-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid #edf2f7; }
.pricing-header-inner { max-width: 960px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.pricing-logo { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 800; color: #1a202c; cursor: pointer; text-decoration: none; letter-spacing: -0.5px; }
.pricing-logo-badge { font-size: 10px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #b7a26e, #8B7355); padding: 2px 7px; border-radius: 5px; letter-spacing: 0.5px; }
.pricing-nav { display: flex; align-items: center; gap: 4px; }
.pricing-nav-link { padding: 8px 16px; font-size: 14px; font-weight: 600; color: #718096; cursor: pointer; text-decoration: none; border-radius: 8px; transition: all 0.15s; }
.pricing-nav-link:hover { color: #1a202c; background: #f7fafc; }
.pricing-nav-link.active { color: #b7a26e; }
.pricing-header-actions { display: flex; align-items: center; }
.pricing-header-btn { padding: 8px 20px; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #b7a26e, #8B7355); border: none; border-radius: 8px; cursor: pointer; transition: all 0.15s; }
.pricing-header-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Pricing Footer */
.pricing-footer { background: #1a202c; color: #a0aec0; padding: 48px 0 0; }
.pricing-footer-inner { max-width: 960px; margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; gap: 40px; }
.pricing-footer-brand { max-width: 240px; }
.pricing-footer-logo { font-size: 20px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 6px; }
.pricing-footer-tagline { font-size: 13px; color: #718096; margin-top: 8px; line-height: 1.5; }
.pricing-footer-links { display: flex; gap: 48px; }
.pricing-footer-col { display: flex; flex-direction: column; gap: 8px; }
.pricing-footer-col h4 { font-size: 13px; font-weight: 700; color: #e2e8f0; margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.pricing-footer-col a { font-size: 13px; color: #718096; text-decoration: none; cursor: pointer; transition: color 0.15s; }
.pricing-footer-col a:hover { color: #b7a26e; }
.pricing-footer-bottom { max-width: 960px; margin: 32px auto 0; padding: 16px 20px; border-top: 1px solid #2d3748; }
.pricing-footer-bottom p { font-size: 12px; color: #4a5568; margin: 0; }

/* Hero */
.pricing-hero { text-align: center; padding: 48px 0 40px; }
.pricing-hero-badge { display: inline-block; background: linear-gradient(135deg, #b7a26e20, #c9b57020); color: #b7a26e; font-size: 13px; font-weight: 600; padding: 6px 16px; border-radius: 20px; margin-bottom: 20px; border: 1px solid #b7a26e30; }
.pricing-hero-title { font-size: 48px; font-weight: 800; line-height: 1.1; margin: 0 0 16px; color: #1a202c; }
.pricing-hero-price { background: linear-gradient(135deg, #b7a26e, #8B7355); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.pricing-hero-per { font-size: 24px; font-weight: 500; color: #718096; }
.pricing-hero-sub { font-size: 17px; color: #718096; max-width: 500px; margin: 0 auto; line-height: 1.6; }

/* Section */
.pricing-section { margin: 48px 0; }
.pricing-section-title { font-size: 22px; font-weight: 700; color: #1a202c; text-align: center; margin: 0 0 28px; }

/* Package cards */
.pricing-packages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.pricing-card { position: relative; text-align: center; padding: 28px 12px; background: #fff; border: 2px solid #e2e8f0; border-radius: 16px; cursor: pointer; transition: all 0.2s; }
.pricing-card:hover { border-color: #b7a26e; transform: translateY(-4px); box-shadow: 0 12px 32px rgba(183,162,110,0.15); }
.pricing-card.popular { border-color: #b7a26e; background: linear-gradient(180deg, #faf8f4, #fff); }
.pricing-card-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #b7a26e, #8B7355); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 14px; border-radius: 12px; white-space: nowrap; }
.pricing-card-credits { font-size: 28px; font-weight: 800; color: #1a202c; }
.pricing-card-label { font-size: 13px; color: #a0aec0; margin: 2px 0 12px; }
.pricing-card-price { font-size: 18px; font-weight: 700; color: #b7a26e; }
.pricing-card-unit { font-size: 11px; color: #a0aec0; margin-top: 4px; }
.pricing-custom-note { text-align: center; font-size: 14px; color: #a0aec0; margin-top: 16px; }

/* Features grid */
.pricing-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pricing-feature-card { text-align: center; padding: 24px 16px; background: #f7fafc; border-radius: 14px; border: 1px solid #edf2f7; transition: all 0.2s; }
.pricing-feature-card:hover { background: #fff; border-color: #e2e8f0; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
.pricing-feature-icon { font-size: 28px; margin-bottom: 10px; }
.pricing-feature-title { font-size: 14px; font-weight: 700; color: #1a202c; margin-bottom: 4px; }
.pricing-feature-desc { font-size: 12px; color: #718096; line-height: 1.4; }

/* CTA */
.pricing-cta { text-align: center; padding: 40px 0; }
.pricing-cta-btn { display: inline-block; padding: 16px 48px; background: linear-gradient(135deg, #b7a26e, #8B7355); color: #fff; font-size: 16px; font-weight: 700; border: none; border-radius: 12px; cursor: pointer; transition: all 0.2s; box-shadow: 0 4px 16px rgba(183,162,110,0.3); }
.pricing-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(183,162,110,0.4); }
.pricing-cta-sub { font-size: 14px; color: #718096; margin-top: 12px; }

/* FAQ */
.pricing-faq-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pricing-faq-item { padding: 20px 24px; background: #f7fafc; border-radius: 12px; border: 1px solid #edf2f7; }
.pricing-faq-item h3 { font-size: 14px; font-weight: 700; color: #1a202c; margin: 0 0 8px; }
.pricing-faq-item p { font-size: 13px; color: #718096; line-height: 1.5; margin: 0; }

/* Pricing responsive */
@media (max-width: 768px) {
    .pricing-hero-title { font-size: 36px; }
    .pricing-hero-per { font-size: 18px; }
    .pricing-packages { grid-template-columns: repeat(2, 1fr); }
    .pricing-features { grid-template-columns: repeat(2, 1fr); }
    .pricing-faq-list { grid-template-columns: 1fr; }
    .pricing-nav { display: none; }
    .pricing-footer-inner { flex-direction: column; gap: 32px; }
    .pricing-footer-links { gap: 32px; }
}
