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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    background: white;
}

/* Sidebar Navigation */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #34495e;
}

.sidebar-header {
    padding: 20px;
    background: #34495e;
    border-bottom: 1px solid #4a5f7a;
}

.sidebar-header h1 {
    font-size: 18px;
    margin-bottom: 10px;
}

.sidebar-header .subtitle {
    font-size: 12px;
    opacity: 0.7;
}

.sidebar-nav {
    flex: 1;
    padding: 0;
}

.nav-item {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid #34495e;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-item:hover {
    background: #34495e;
}

.nav-item.active {
    background: #3498db;
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #34495e;
}

.settings-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
}

.settings-btn:hover {
    background: #2ecc71;
}

/* Main Content Area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-header {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h2 {
    color: #2c3e50;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

/* Content Panels */
.content-panels {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.items-panel {
    width: 300px;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.items-header {
    padding: 15px;
    background: white;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
    color: #2c3e50;
}

.items-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.item-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.item-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.item-card.active {
    border-color: #3498db;
    background: #f8fbff;
}

.item-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.item-subtitle {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 5px;
}

.item-meta {
    font-size: 12px;
    color: #95a5a6;
    display: flex;
    justify-content: space-between;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-applied { background: #e8f5e8; color: #27ae60; }
.status-interviewing { background: #fff3cd; color: #f39c12; }
.status-offered { background: #d1ecf1; color: #17a2b8; }
.status-rejected { background: #f8d7da; color: #dc3545; }
.status-accepted { background: #d4edda; color: #28a745; }
.status-saved { background: #e2e3e5; color: #6c757d; }

/* Details Panel */
.details-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
}

.details-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

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

.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: between;
    align-items: center;
}

.modal-title {
    margin: 0;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    margin-left: auto;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.hidden {
    display: none !important;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: #27ae60;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    background-color: #e74c3c;
}

.toast.warning {
    background-color: #f39c12;
}

.toast.info {
    background-color: #3498db;
}

/* Resume Editor Integration */
.resume-editor-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.resume-editor-modal-container {
    position: relative;
}

.field-help {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.field-help small {
    display: block;
    margin-bottom: 10px;
    color: #6c757d;
}

/* Resume Editor Component Styles */
.resume-editor {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.resume-editor .tabs {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    overflow-x: auto;
}

.resume-editor .tab {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    background: none;
    border: none;
    color: #495057;
}

.resume-editor .tab:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.resume-editor .tab.active {
    border-bottom-color: #3498db;
    font-weight: 600;
    color: #3498db;
    background-color: white;
}

.resume-editor .panel {
    display: none;
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.resume-editor .panel.active {
    display: block;
}

.resume-editor .resume-section {
    margin-bottom: 2rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
}

.resume-editor .resume-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.resume-editor .resume-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.resume-editor .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.resume-editor .input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.resume-editor .input-group label {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.resume-editor .input-group input,
.resume-editor .input-group textarea,
.resume-editor .input-group select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.resume-editor .input-group input:focus,
.resume-editor .input-group textarea:focus,
.resume-editor .input-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.1);
}

.resume-editor .input-group textarea {
    min-height: 80px;
    resize: vertical;
}

.resume-editor .small-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.resume-editor .small-button:hover {
    background: #2980b9;
}

.resume-editor .button-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.resume-editor .success {
    background-color: #27ae60 !important;
}

.resume-editor .success:hover {
    background-color: #229954 !important;
}

.resume-editor .secondary {
    background-color: #6c757d !important;
    color: white !important;
}

.resume-editor .secondary:hover {
    background-color: #545b62 !important;
}

.resume-editor .resume-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.resume-editor .resume-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.resume-editor .resume-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.resume-editor .resume-item-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
}

.resume-editor .resume-item-buttons {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.resume-editor .icon-button {
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    color: #6c757d;
    transition: all 0.2s;
}

.resume-editor .icon-button:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.resume-editor .empty-state {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.resume-editor .empty-state i {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.resume-editor .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.resume-editor .modal {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.resume-editor .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.resume-editor .modal-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.resume-editor .modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resume-editor .modal-close:hover {
    color: #2c3e50;
}

.resume-editor .help-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.resume-editor .card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 1rem;
}

/* Preview styles for resume editor */
.resume-editor .preview-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.resume-editor .resume-preview {
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding: 1rem;
}

.resume-editor .resume-preview .resume-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #2c3e50;
}

.resume-editor .resume-preview .resume-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    color: #2c3e50;
}

.resume-editor .resume-preview .resume-header h2 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #6c757d;
}

.resume-editor .resume-preview .contact-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.resume-editor .resume-preview .resume-section {
    margin-bottom: 1.5rem;
}

.resume-editor .resume-preview .resume-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.resume-editor .resume-preview .work-item,
.resume-editor .resume-preview .education-item,
.resume-editor .resume-preview .project-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.resume-editor .resume-preview .work-item:last-child,
.resume-editor .resume-preview .education-item:last-child,
.resume-editor .resume-preview .project-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.resume-editor .resume-preview .skills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.resume-editor .resume-preview .skill-item {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar-header h1,
    .sidebar-header .subtitle,
    .nav-item span {
        display: none;
    }

    .nav-item {
        text-align: center;
        padding: 15px 10px;
    }

    .items-panel {
        width: 250px;
    }

    .modal {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 600px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        flex: 1;
    }

    .nav-item {
        white-space: nowrap;
        flex: 1;
        text-align: center;
        min-width: 80px;
    }

    .content-panels {
        flex-direction: column;
    }

    .items-panel {
        width: 100%;
        height: 200px;
    }

    .details-panel {
        flex: 1;
    }
}

/* Resume Content Container Styles */
.resume-content-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 10px;
}

.resume-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #333;
}

.tab-btn.active {
    color: #2980b9;
    border-bottom-color: #2980b9;
    background: white;
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
    padding: 20px;
    min-height: 400px;
}

.tab-panel.active {
    display: block;
}

.resume-viewer-controls {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.resume-viewer-controls label {
    font-weight: 500;
    color: #555;
}

.resume-viewer-controls select {
    margin-left: 10px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#resume-viewer-details {
    border: 1px solid #eee;
    border-radius: 4px;
    background: white;
    max-height: 600px;
    overflow-y: auto;
}

#resume-editor-details {
    min-height: 500px;
}

/* Open in New Window Button */
.btn-secondary {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.resume-viewer-controls button {
    vertical-align: middle;
}
