/* Resume Builder Styles */

/* CSS Variables for this page */
:root {
    --primary: #5865f2;
    --secondary: #7c3aed;
    --success: #22c55e;
    --error: #ef4444;
    --surface-color: rgba(255, 255, 255, 0.05);
    --dark-bg: rgba(0, 0, 0, 0.3);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-light: #ffffff;
    --text-muted: #b9bbbe;
}

.builder-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.builder-header {
    text-align: center;
    margin-bottom: 2rem;
}

.builder-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.builder-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Document Type Tabs */
.doc-type-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.doc-tab {
    padding: 0.875rem 2rem;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.doc-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.doc-tab.active {
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    border-color: var(--primary);
    color: var(--primary);
}

/* Main Layout */
.builder-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Editor Panel */
.editor-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    max-height: 800px;
    overflow-y: auto;
}

.form-group-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-group-section:last-of-type {
    border-bottom: none;
}

.form-group-section h3 {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    margin-bottom: 0;
}

.add-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: var(--primary);
    color: white;
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #ffffff !important;
    font-size: 0.95rem;
    font-family: inherit;
}

/* Ensure all selects in the builder have dark background */
.editor-panel select,
.dynamic-item select,
.form-group select {
    background: rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
    cursor: pointer;
}

.editor-panel select option,
.dynamic-item select option,
.form-group select option {
    background: #1a1a2e !important;
    color: #ffffff !important;
    padding: 10px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Dynamic List Items */
.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dynamic-item {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    position: relative;
}

.dynamic-item .remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
}

.dynamic-item .remove-btn:hover {
    color: var(--error);
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    border: 1px solid var(--primary);
    border-radius: 20px;
    color: var(--primary);
    font-size: 0.85rem;
}

.tag .remove-tag {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

/* Editor Actions - Clean Professional Layout */
.editor-actions-wrapper {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.editor-actions.three-col {
    grid-template-columns: 1fr 1fr 1fr;
}

.save-draft-btn,
.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-draft-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.save-draft-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(88, 101, 242, 0.1);
}

.download-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.4);
}

.save-draft-btn svg,
.download-btn svg,
.share-link-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Share Link Button - styled like save draft */
.share-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}

.share-link-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(88, 101, 242, 0.1);
}

/* Share Result */
.share-result {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid var(--primary);
    border-radius: 10px;
}

.share-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.share-url-wrapper {
    display: flex;
    gap: 0.5rem;
}

.share-url-wrapper input {
    flex: 1;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.85rem;
    font-family: monospace;
}

.copy-share-btn {
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-share-btn:hover {
    background: var(--secondary);
}

/* Preview Panel */
.preview-panel {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.preview-header h3 {
    color: var(--text-light);
    font-size: 1rem;
}

.preview-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    min-width: 120px;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #252542 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.dropdown-toggle:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #252542 0%, #2a2a50 100%);
}

.custom-dropdown.open .dropdown-toggle {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.2);
}

.dropdown-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    width: 10px;
    height: 10px;
    fill: rgba(255, 255, 255, 0.7);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.color-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.custom-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: rgba(88, 101, 242, 0.2);
    color: #ffffff;
}

.dropdown-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #ffffff;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.dropdown-item.active .color-dot {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Scrollbar for dropdown menu */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.preview-container {
    flex: 1;
    background: white;
    border-radius: 8px;
    overflow: auto;
    max-height: 700px;
}

/* Resume Preview Styles */
.resume-preview {
    padding: 40px;
    color: #1a1a1a;
    font-family: 'Georgia', serif;
    font-size: 11pt;
    line-height: 1.5;
    min-height: 100%;
    position: relative;
}

/* Background Themes - Use !important and direct class selectors */
.resume-preview.bg-clean,
#resumePreview.bg-clean {
    background: #ffffff !important;
}

.resume-preview.bg-ivory,
#resumePreview.bg-ivory {
    background: linear-gradient(180deg, #fffef5 0%, #fdf8e8 50%, #faf5e0 100%) !important;
}

.resume-preview.bg-elegant,
#resumePreview.bg-elegant {
    background:
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23c9a227' fill-opacity='0.08'%3E%3Cpath d='M20 0L40 20L20 40L0 20z'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, #fefdfb 0%, #f8f4ef 100%) !important;
    border-top: 4px solid #c9a227 !important;
}

.resume-preview.bg-professional,
#resumePreview.bg-professional {
    background: linear-gradient(180deg, #e8eef4 0%, #ffffff 15%, #ffffff 85%, #e8eef4 100%) !important;
    border-top: 3px solid #2c3e50 !important;
}

.resume-preview.bg-corporate,
#resumePreview.bg-corporate {
    background: #ffffff !important;
    border-left: 6px solid #1a365d !important;
    padding-left: 45px !important;
}

.resume-preview.bg-corporate .section-title {
    color: #1a365d !important;
    border-bottom-color: #2b6cb0 !important;
}

.resume-preview.bg-creative,
#resumePreview.bg-creative {
    background:
        linear-gradient(135deg, rgba(88, 101, 242, 0.03) 0%, transparent 50%),
        linear-gradient(225deg, rgba(124, 58, 237, 0.03) 0%, transparent 50%),
        #ffffff !important;
    border-top: 4px solid linear-gradient(90deg, #5865f2, #7c3aed) !important;
    border-image: linear-gradient(90deg, #5865f2, #7c3aed) 1 !important;
}

.resume-preview.bg-premium,
#resumePreview.bg-premium {
    background: linear-gradient(180deg, #f5f0ea 0%, #efe8df 50%, #e8dfd3 100%) !important;
    border-top: 3px solid #8b7355 !important;
}

/* Modern Template */
.resume-preview.template-modern {
    font-family: 'Poppins', sans-serif;
}

.resume-preview.template-modern .preview-name {
    font-size: 28pt;
    font-weight: 700;
    color: #5865f2;
    margin-bottom: 4px;
}

.resume-preview.template-modern .preview-title {
    font-size: 14pt;
    color: #666;
    margin-bottom: 12px;
}

.resume-preview.template-modern .preview-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 10pt;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #5865f2;
}

.resume-preview.template-modern .section-title {
    font-size: 12pt;
    font-weight: 700;
    color: #5865f2;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ddd;
}

/* Classic Template */
.resume-preview.template-classic .preview-name {
    font-size: 24pt;
    font-weight: bold;
    text-align: center;
    margin-bottom: 4px;
}

.resume-preview.template-classic .preview-title {
    font-size: 12pt;
    text-align: center;
    color: #444;
    margin-bottom: 10px;
}

.resume-preview.template-classic .preview-contact {
    text-align: center;
    font-size: 10pt;
    color: #666;
    margin-bottom: 20px;
}

.resume-preview.template-classic .section-title {
    font-size: 12pt;
    font-weight: bold;
    text-transform: uppercase;
    margin: 20px 0 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #1a1a1a;
}

/* Minimal Template */
.resume-preview.template-minimal {
    font-family: 'Helvetica', sans-serif;
}

.resume-preview.template-minimal .preview-name {
    font-size: 22pt;
    font-weight: 300;
    margin-bottom: 4px;
}

.resume-preview.template-minimal .preview-title {
    font-size: 11pt;
    color: #888;
    margin-bottom: 15px;
}

.resume-preview.template-minimal .preview-contact {
    font-size: 9pt;
    color: #888;
    margin-bottom: 25px;
}

.resume-preview.template-minimal .section-title {
    font-size: 10pt;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin: 25px 0 10px;
}

/* Executive Template */
.resume-preview.template-executive {
    font-family: 'Garamond', 'Georgia', serif;
}

.resume-preview.template-executive .preview-name {
    font-size: 26pt;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.resume-preview.template-executive .preview-title {
    font-size: 13pt;
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
}

.resume-preview.template-executive .preview-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 10pt;
    color: #666;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}

.resume-preview.template-executive .section-title {
    font-size: 12pt;
    font-weight: bold;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 25px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ccc;
}

/* Professional Template */
.resume-preview.template-professional {
    font-family: 'Calibri', 'Arial', sans-serif;
}

.resume-preview.template-professional .preview-name {
    font-size: 24pt;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.resume-preview.template-professional .preview-title {
    font-size: 14pt;
    color: #7f8c8d;
    margin-bottom: 12px;
}

.resume-preview.template-professional .preview-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 10pt;
    color: #555;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

.resume-preview.template-professional .section-title {
    font-size: 11pt;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #3498db;
}

/* Font Classes - Use !important to override template defaults */
.resume-preview.font-georgia { font-family: 'Georgia', serif !important; }
.resume-preview.font-arial { font-family: 'Arial', 'Helvetica', sans-serif !important; }
.resume-preview.font-times { font-family: 'Times New Roman', 'Times', serif !important; }
.resume-preview.font-calibri { font-family: 'Calibri', 'Segoe UI', sans-serif !important; }
.resume-preview.font-garamond { font-family: 'Garamond', 'Georgia', serif !important; }

/* Color Classes */
.resume-preview.color-blue .preview-name,
.resume-preview.color-blue .section-title { color: #2563eb; }
.resume-preview.color-blue .section-title { border-bottom-color: #2563eb; }
.resume-preview.color-blue .preview-skill { background: #dbeafe; color: #1e40af; }

.resume-preview.color-navy .preview-name,
.resume-preview.color-navy .section-title { color: #1e3a5f; }
.resume-preview.color-navy .section-title { border-bottom-color: #1e3a5f; }
.resume-preview.color-navy .preview-skill { background: #e0e7ef; color: #1e3a5f; }

.resume-preview.color-green .preview-name,
.resume-preview.color-green .section-title { color: #059669; }
.resume-preview.color-green .section-title { border-bottom-color: #059669; }
.resume-preview.color-green .preview-skill { background: #d1fae5; color: #065f46; }

.resume-preview.color-burgundy .preview-name,
.resume-preview.color-burgundy .section-title { color: #7c2d36; }
.resume-preview.color-burgundy .section-title { border-bottom-color: #7c2d36; }
.resume-preview.color-burgundy .preview-skill { background: #fce7e9; color: #7c2d36; }

.resume-preview.color-black .preview-name,
.resume-preview.color-black .section-title { color: #1a1a1a; }
.resume-preview.color-black .section-title { border-bottom-color: #1a1a1a; }
.resume-preview.color-black .preview-skill { background: #e5e5e5; color: #1a1a1a; }

.resume-preview.color-teal .preview-name,
.resume-preview.color-teal .section-title { color: #0d9488; }
.resume-preview.color-teal .section-title { border-bottom-color: #0d9488; }
.resume-preview.color-teal .preview-skill { background: #ccfbf1; color: #115e59; }

.resume-preview.color-purple .preview-name,
.resume-preview.color-purple .section-title { color: #7c3aed; }
.resume-preview.color-purple .section-title { border-bottom-color: #7c3aed; }
.resume-preview.color-purple .preview-skill { background: #ede9fe; color: #5b21b6; }

/* Languages Preview */
.preview-languages {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.preview-language {
    font-size: 10pt;
}

.preview-language em {
    color: #666;
    font-size: 9pt;
}

/* Project Link */
.preview-item-link {
    font-size: 9pt;
    color: #3498db;
    margin-top: 4px;
}

/* Common Preview Styles */
.preview-summary {
    margin-bottom: 15px;
    text-align: justify;
}

.preview-item {
    margin-bottom: 15px;
}

.preview-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.preview-item-title {
    font-weight: 600;
}

.preview-item-date {
    color: #666;
    font-size: 10pt;
}

.preview-item-subtitle {
    color: #666;
    font-size: 10pt;
    margin-bottom: 4px;
}

.preview-item-description {
    font-size: 10pt;
}

.preview-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-skill {
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 15px;
    font-size: 9pt;
}

/* Cover Letter Preview */
.cover-letter-preview {
    font-family: 'Georgia', serif;
}

.cover-letter-preview .letter-header {
    margin-bottom: 30px;
}

.cover-letter-preview .letter-date {
    margin-bottom: 20px;
}

.cover-letter-preview .letter-recipient {
    margin-bottom: 20px;
}

.cover-letter-preview .letter-greeting {
    margin-bottom: 15px;
}

.cover-letter-preview .letter-body p {
    margin-bottom: 15px;
    text-align: justify;
}

.cover-letter-preview .letter-closing {
    margin-top: 30px;
}

.cover-letter-preview .letter-signature {
    margin-top: 40px;
    font-weight: 600;
}

/* Saved Section */
.saved-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.saved-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.saved-header h3 {
    color: var(--text-light);
    font-size: 1.1rem;
}

.clear-all-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-all-btn:hover {
    border-color: var(--error);
    color: var(--error);
}

.saved-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.saved-item {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.saved-item:hover {
    border-color: var(--primary);
}

.saved-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.saved-item-title {
    color: var(--text-light);
    font-weight: 600;
}

.saved-item-type {
    padding: 0.25rem 0.5rem;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2) 0%, rgba(124, 58, 237, 0.2) 100%);
    border-radius: 4px;
    color: var(--primary);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.saved-item-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.saved-item-actions {
    display: flex;
    gap: 0.5rem;
}

.saved-item-actions button {
    flex: 1;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saved-item-actions button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.saved-item-actions .delete-btn:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 1200px) {
    .builder-main {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        order: -1;
    }

    .preview-container {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .builder-container {
        padding: 1rem;
    }

    .builder-header h1 {
        font-size: 2rem;
    }

    .doc-type-tabs {
        flex-direction: column;
    }

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

    .editor-actions,
    .editor-actions.three-col {
        grid-template-columns: 1fr;
    }

    .share-url-wrapper {
        flex-direction: column;
    }

    .resume-preview {
        padding: 20px;
    }

    .saved-list {
        grid-template-columns: 1fr;
    }

    .preview-header {
        flex-direction: column;
        align-items: stretch;
    }

    .preview-options {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .custom-dropdown {
        min-width: 0;
    }

    .dropdown-toggle {
        font-size: 0.75rem;
        padding: 0.5rem 0.6rem;
    }

    .dropdown-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .preview-options {
        grid-template-columns: 1fr;
    }

    .custom-dropdown {
        width: 100%;
    }

    .dropdown-toggle {
        width: 100%;
    }

    .doc-tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}
