* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Professional Helper Classes */
.help-text {
    font-size: 13px;
    color: #64748b;
    margin-top: 5px;
    font-style: italic;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #dbeafe;
    color: #1e40af;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 10px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* Login Screen */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.logo {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.logo p {
    font-size: 18px;
    opacity: 0.9;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    margin-bottom: 24px;
    color: var(--dark);
}

.login-card input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.login-card input:focus {
    outline: none;
    border-color: var(--primary);
}

.error-message {
    color: var(--danger);
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Admin Panel */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    color: var(--dark);
}

.header-subtitle {
    font-size: 12px;
    color: #64748b;
    font-weight: normal;
    margin-top: -5px;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-email {
    font-size: 14px;
    color: #64748b;
}

/* Navigation Tabs */
.nav-tabs {
    background: white;
    border-bottom: 2px solid var(--border);
    display: flex;
    gap: 4px;
    padding: 0 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.tab-btn {
    padding: 16px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--primary);
    background: #f1f5f9;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Tab Content */
.tab-content {
    display: none;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    font-size: 40px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
}

.stat-info h3 {
    font-size: 32px;
    color: var(--dark);
    margin-bottom: 4px;
}

.stat-info p {
    color: #64748b;
    font-size: 14px;
}

.recent-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.recent-section h2 {
    margin-bottom: 20px;
    color: var(--dark);
}

/* Forms */
.form-container {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-container h2 {
    margin-bottom: 24px;
    color: var(--dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--dark);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-danger {
    padding: 8px 16px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-edit {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: var(--primary-dark);
}

/* Image Preview */
.image-preview {
    margin-top: 12px;
    display: none;
}

.image-preview.show {
    display: block;
}

.image-preview img {
    max-width: 300px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item.selected {
    border-color: var(--primary);
}

.gallery-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

/* Quotes List */
.quotes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.quote-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.quote-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    margin-bottom: 8px;
}

.quote-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #64748b;
    margin-top: 12px;
}

.quote-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.quote-actions {
    display: flex;
    gap: 8px;
}

/* Filter Section */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.filter-section h2 {
    margin-bottom: 16px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 12px;
}

.filter-row select,
.filter-row input {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

/* Upload Media */
.upload-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.upload-section {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.upload-section h2 {
    margin-bottom: 8px;
}

.upload-section p {
    color: #64748b;
    margin-bottom: 20px;
}

.upload-area {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary);
    background: #f8fafc;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-label {
    display: inline-block;
    cursor: pointer;
}

.upload-label span {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 8px;
}

.upload-label small {
    color: #64748b;
}

.upload-progress {
    margin-top: 20px;
}

.progress-item {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s;
}

.uploaded-media-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.media-item img,
.media-item video {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.media-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
}

.media-item:hover .media-delete {
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 2px solid var(--border);
}

.modal-header h2 {
    margin: 0;
}

.close {
    font-size: 32px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--danger);
}

.modal-content form {
    padding: 24px;
}

/* Status Message */
.status-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    display: none;
}

.status-message.show {
    display: block;
}

.status-message.success {
    background: #d1fae5;
    color: #065f46;
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== NOTIFICATIONS TAB ===== */

.notifications-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: #64748b;
    font-size: 16px;
}

.notification-form {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 40px;
}

.notification-preview, .notification-composer {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.notification-preview h3, .notification-composer h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #1e293b;
}

.phone-mockup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 30px;
    padding: 50px 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    position: relative;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.notification-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-icon {
    font-size: 28px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 4px;
}

.notif-body {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.char-count {
    float: right;
    font-size: 12px;
    color: #94a3b8;
}

.notification-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.notification-actions button {
    flex: 1;
}

.notification-history {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.notification-history h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.history-item {
    border-left: 4px solid #6366f1;
    padding: 15px;
    margin-bottom: 15px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.2s;
}

.history-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-header strong {
    color: #1e293b;
    font-size: 15px;
}

.badge-sent {
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-scheduled {
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.history-body {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 10px;
}

.history-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #94a3b8;
}

.notification-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.notification-stats .stat-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    border-top: 4px solid #6366f1;
}

.notification-stats .stat-number {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.notification-stats .stat-label {
    font-size: 14px;
    color: #64748b;
    margin-top: 5px;
}

/* Settings Tab */
.settings-container {
    max-width: 1000px;
    margin: 0 auto;
}

.settings-section {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.settings-section h3 {
    margin-bottom: 12px;
    color: var(--dark);
}

.settings-section p {
    color: #64748b;
    margin-bottom: 20px;
}

.api-key-item {
    margin-bottom: 24px;
}

.api-key-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark);
}

.key-input-group {
    display: flex;
    gap: 8px;
}

.key-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.key-input-group button {
    white-space: nowrap;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 14px;
}

.category-chip button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.bulk-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.bulk-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.bulk-card h4 {
    margin-bottom: 8px;
    color: var(--dark);
}

.bulk-card p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
}

.bulk-card input[type="file"] {
    display: none;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.analytics-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.analytics-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
}

.analytics-label {
    font-size: 13px;
    opacity: 0.9;
}

/* Mobile Improvements */
@media (max-width: 768px) {
    .header-content {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .user-email {
        font-size: 12px;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-tabs {
        overflow-x: auto;
        padding: 0 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .tab-content {
        padding: 16px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        flex-direction: row;
        text-align: left;
        padding: 16px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .stat-info h3 {
        font-size: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .form-container {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }

    .quote-item {
        padding: 16px;
    }

    .quote-header {
        flex-direction: column;
        gap: 12px;
    }

    .quote-actions {
        width: 100%;
        justify-content: space-between;
    }

    .upload-container {
        gap: 16px;
    }

    .upload-section {
        padding: 20px;
    }

    .uploaded-media-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .key-input-group {
        flex-direction: column;
    }

    .key-input-group button {
        width: 100%;
    }

    .bulk-actions {
        grid-template-columns: 1fr;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .login-card {
        padding: 24px;
    }

    .logo h1 {
        font-size: 36px;
    }

    /* Better touch targets */
    button, .tab-btn, .btn-primary, .btn-secondary, .btn-danger, .btn-edit {
        min-height: 44px;
        padding: 12px 20px;
    }

    /* Improved form inputs */
    input, textarea, select {
        font-size: 16px; /* Prevents iOS zoom */
    }

    /* Notifications Mobile */
    .notification-form {
        grid-template-columns: 1fr;
    }

    .notification-preview {
        order: 2;
        padding: 20px;
    }

    .notification-composer {
        order: 1;
        padding: 20px;
    }

    .phone-mockup {
        padding: 30px 15px;
    }

    .notification-stats {
        grid-template-columns: 1fr;
    }

    .notification-actions {
        flex-direction: column;
    }

    .notification-actions button {
        width: 100%;
    }
}

/* ================================================================
   AI GENERATE TAB
   ================================================================ */
.ai-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px;
}

.ai-header {
    margin-bottom: 24px;
}

.ai-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.ai-header p {
    color: #64748b;
    font-size: 14px;
}

/* Config cards */
.ai-config-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.ai-config-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-field-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.ai-field-row .form-group {
    flex: 1;
    min-width: 180px;
}

.link-small {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    margin-left: 4px;
    opacity: 0.85;
}

.link-small:hover { text-decoration: underline; opacity: 1; }

code {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

.btn-generate {
    width: 100%;
    margin-top: 6px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 7px;
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s, transform 0.1s;
}

.btn-sm:hover { transform: translateY(-1px); }
.btn-sm.btn-outline { background: transparent; color: var(--dark); }
.btn-sm.btn-outline:hover { background: #f1f5f9; }

.badge {
    background: var(--primary);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* Results card */
.ai-results-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
}

.ai-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.ai-results-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
}

.ai-results-actions { display: flex; gap: 8px; flex-wrap: wrap; }

#aiUploadStatus {
    margin-top: 14px;
    font-size: 14px;
    font-weight: 500;
    min-height: 22px;
}

/* Quote list */
.ai-quotes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
}

.ai-quote-item {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    transition: background 0.15s, border-color 0.15s;
}

.ai-quote-item.selected {
    border-color: var(--primary);
    background: #f0f7ff;
}

.ai-quote-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    flex: 1;
}

.ai-quote-check {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.ai-quote-text {
    font-size: 14px;
    color: var(--dark);
    line-height: 1.55;
    word-break: break-word;
}

.ai-quote-edit-input {
    flex: 1;
    font-size: 14px;
    color: var(--dark);
    border: 1px solid var(--primary);
    border-radius: 5px;
    padding: 4px 8px;
    width: 100%;
    outline: none;
}

.btn-icon-sm {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.45;
    flex-shrink: 0;
    padding: 2px 4px;
    border-radius: 4px;
    transition: opacity 0.15s, background 0.15s;
}

.btn-icon-sm:hover { opacity: 1; background: #f1f5f9; }

/* Connection status inline text */
#aiConnectionStatus {
    font-size: 13px;
    font-weight: 500;
    margin-left: 10px;
}

@media (max-width: 600px) {
    .ai-results-header { flex-direction: column; align-items: flex-start; }
    .ai-field-row { flex-direction: column; }
}
/* Duplicate badges */
.ai-quote-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.dup-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
}

.dup-db {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.dup-batch {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.dup-item {
    opacity: 0.65;
    border-color: #fca5a5 !important;
    background: #fff8f8 !important;
}

.dup-uploaded {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.uploaded-item {
    opacity: 0.55;
    border-color: #6ee7b7 !important;
    background: #f0fdf4 !important;
    pointer-events: none;
}