/* Books Page Styles */

/* Login Container */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    max-width: 400px;
}

.login-card h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.login-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md, 8px);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-google:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-google svg {
    flex-shrink: 0;
}

/* Main Container */
.books-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.books-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.books-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.books-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.books-actions {
    display: flex;
    gap: 0.75rem;
}

/* Layout */
.books-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
}

/* Sidebar */
.books-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

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

.sidebar-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-icon {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* View/List Items */
.view-list,
.list-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.view-item,
.list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.15s;
    font-size: 0.9rem;
}

.view-item:hover,
.list-item:hover {
    background: var(--background);
}

.view-item.active,
.list-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.view-icon,
.list-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.view-name,
.list-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-count,
.list-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--background);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
}

.view-item.active .view-count,
.list-item.active .list-count {
    background: white;
    color: var(--primary-color);
}

.empty-lists {
    text-align: center;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.empty-lists p {
    margin-bottom: 0.5rem;
}

/* Main Content */
.books-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Toolbar */
.books-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    flex: 1;
    max-width: 400px;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

/* Active View Indicator */
.active-view {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--accent-light);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--accent-color);
}

.btn-clear {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

/* Book Card */
.book-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
}

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

.book-cover {
    aspect-ratio: 2/3;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

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

.book-cover .no-cover {
    font-size: 3rem;
    color: var(--text-muted);
}

.book-card-info {
    padding: 0.75rem;
}

.book-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-card-author {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.book-card-rating {
    display: flex;
    gap: 0.125rem;
    margin-top: 0.5rem;
}

.book-card-rating .star {
    color: var(--border-color);
    font-size: 0.875rem;
}

.book-card-rating .star.filled {
    color: var(--accent-color);
}

.book-card-status {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.book-card-status.reading {
    background: var(--primary-light);
    color: var(--primary-color);
}

.book-card-status.to-read {
    background: var(--accent-light);
    color: var(--accent-color);
}

.book-card-status.finished {
    background: var(--success-light);
    color: var(--success-color);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

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

.empty-state p {
    margin-bottom: 1.5rem;
}

/* List View */
.list-view {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.list-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.list-info p {
    color: var(--text-secondary);
}

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

.list-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.list-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.section-header h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
}

.section-books {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Modal Styles */
.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: 1000;
    padding: 1rem;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

.search-modal {
    max-width: 600px;
}

.list-modal,
.add-to-list-modal {
    max-width: 480px;
}

.book-modal {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--background);
}

/* Search Modal */
.search-input-group {
    display: flex;
    gap: 0.5rem;
}

.search-input-group .form-input {
    flex: 1;
}

.book-search-textarea {
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 150px;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.search-results {
    margin-top: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

/* Bulk search result grouping */
.bulk-search-group {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.bulk-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    font-weight: 500;
}

.bulk-search-query {
    color: var(--text-primary);
}

.bulk-search-status {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.bulk-search-status.added {
    color: var(--success-color);
}

.bulk-search-options {
    padding: 0;
}

.bulk-search-option {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
}

.bulk-search-option:last-child {
    border-bottom: none;
}

.bulk-search-option:hover {
    background: var(--background-warm);
}

.bulk-search-option.selected {
    background: rgba(201, 91, 42, 0.08);
}

.bulk-search-option-cover {
    width: 40px;
    height: 60px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.bulk-search-option-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bulk-search-option-info {
    flex: 1;
    min-width: 0;
}

.bulk-search-option-title {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.125rem;
}

.bulk-search-option-author {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bulk-search-option-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bulk-search-option-check {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.bulk-search-no-results {
    padding: 1rem;
    color: var(--text-muted);
    font-style: italic;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.bulk-search-no-results .btn-sm {
    font-style: normal;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

.bulk-search-no-results .btn-outline {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.bulk-search-no-results .btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.bulk-add-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background);
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
}

.bulk-add-count {
    color: var(--text-secondary);
}

.search-form-collapsed {
    display: none;
}

.search-result {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.search-result:hover {
    border-color: var(--primary-color);
    background: var(--background-warm);
}

.search-result-cover {
    width: 60px;
    height: 90px;
    background: var(--background);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.search-result-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.search-result-author {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.search-result-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.search-result-action {
    display: flex;
    align-items: center;
}

.search-loading,
.search-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Book Detail Modal */
.book-detail {
    display: flex;
    gap: 1.5rem;
}

.book-cover-large {
    width: 180px;
    flex-shrink: 0;
    position: relative;
}

.book-cover-large img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* Cover Edit Overlay */
.cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.book-cover-large:hover .cover-overlay {
    opacity: 1;
}

.cover-edit-icon {
    font-size: 1.25rem;
}

.cover-edit-text {
    font-size: 0.75rem;
    font-weight: 500;
}

.cover-overlay.uploading {
    opacity: 1;
    background: rgba(0, 0, 0, 0.85);
}

.cover-overlay.uploading .cover-edit-text {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.book-info {
    flex: 1;
}

.book-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.book-author {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.book-published {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.book-rating,
.book-status,
.book-notes,
.book-editions,
.book-lists {
    margin-bottom: 1rem;
}

.book-rating label,
.book-status label,
.book-notes label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.star-rating {
    display: flex;
    gap: 0.25rem;
}

.star-rating .star {
    font-size: 1.5rem;
    color: var(--border-color);
    cursor: pointer;
    transition: color 0.15s;
}

.star-rating .star:hover,
.star-rating .star.filled {
    color: var(--accent-color);
}

.book-notes textarea {
    margin-bottom: 0.5rem;
}

.book-editions h4,
.book-lists h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.edition-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.edition-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--background);
    border-radius: 4px;
    font-size: 0.8rem;
}

.edition-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.edition-item a:hover {
    text-decoration: underline;
}

.list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.list-tag {
    padding: 0.25rem 0.75rem;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.8rem;
}

/* Add to List Modal */
.list-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.list-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s;
}

.list-checkbox:hover {
    border-color: var(--primary-color);
}

.list-checkbox input {
    width: 18px;
    height: 18px;
}

.list-checkbox-name {
    flex: 1;
    font-weight: 500;
}

.list-checkbox-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.empty-lists-modal {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

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

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox input {
    width: 18px;
    height: 18px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

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

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

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--background);
    border-color: var(--border-hover);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

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

/* ==================== Selection & Bulk Operations ==================== */

/* Book card selection states */
.book-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(201, 91, 42, 0.2);
}

.book-checkbox {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
}

.book-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.book-card-content {
    cursor: pointer;
}

/* Selection Action Bar */
.selection-action-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: bottom 0.3s ease;
    z-index: 1000;
}

.selection-action-bar.visible {
    bottom: 2rem;
}

.selection-count {
    font-size: 0.9rem;
    font-weight: 500;
}

.selection-bar-actions {
    display: flex;
    gap: 0.5rem;
}

.selection-cancel {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.25rem;
    opacity: 0.7;
}

.selection-cancel:hover {
    opacity: 1;
}

/* Selection bar button overrides for dark background */
.selection-action-bar .btn-outline {
    background: #4b5563;
    border-color: #6b7280;
    color: white;
}

.selection-action-bar .btn-outline:hover {
    background: #6b7280;
    border-color: #9ca3af;
}

.selection-action-bar .btn-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.selection-action-bar .btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-icon {
    font-size: 1rem;
}

/* Bulk Move Modal */
.bulk-move-modal {
    max-width: 400px;
}

.modal-hint {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

#bulk-move-list-checkboxes {
    max-height: 300px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .books-layout {
        grid-template-columns: 1fr;
    }

    .books-sidebar {
        order: 2;
    }

    .books-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .books-toolbar {
        flex-direction: column;
    }

    .search-box {
        max-width: none;
    }

    .book-detail {
        flex-direction: column;
    }

    .book-cover-large {
        width: 120px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Manual Book Entry Modal
   ========================================================================== */

.manual-entry-modal {
    max-width: 500px;
}

.manual-entry-modal .modal-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.manual-entry-modal .modal-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

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

.manual-entry-modal .parsed-preview {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--background-warm, #fef3c7);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.manual-entry-modal .parsed-preview strong {
    color: var(--primary-color);
}

@media (max-width: 480px) {
    .manual-entry-modal .form-row {
        grid-template-columns: 1fr;
    }
}

/* Sharing Section (matching bookmarks style) */
.sharing-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.sharing-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.sharing-controls {
    margin-bottom: 1rem;
}

.sharing-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.sharing-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sharing-toggle input:checked + .toggle-slider {
    background: var(--primary-color);
}

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

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.sharing-link-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sharing-link-input {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
    background: var(--bg-secondary, #fef3c7);
    color: var(--text-muted);
}

.slug-edit-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-label-inline {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.slug-input {
    flex: 1;
    font-family: monospace;
    font-size: 0.85rem;
    padding: 0.375rem 0.5rem;
}

.slug-error {
    display: none;
    margin-top: 0.25rem;
    color: var(--danger);
    font-size: 0.8rem;
}

/* Inline list share section */
.list-share-section {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary, #fef3c7);
    border-radius: var(--radius-md, 8px);
    margin-bottom: 1rem;
}

.list-share-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.list-share-link-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 250px;
}

.list-share-link-group .sharing-link-input {
    flex: 1;
    background: white;
    margin-bottom: 0;
}
