/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
    color: #333;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* ===== Header ===== */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.app-header h1 {
    margin: 0 0 4px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.app-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* ===== Card (Form & Output) ===== */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

/* ===== Form ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #555;
}

.form-group label .optional {
    font-weight: 400;
    color: #999;
    font-size: 12px;
}

.form-group input[type="number"],
.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #fff;
}

.form-group select {
    appearance: auto;
    cursor: pointer;
}

.form-group input[type="checkbox"] {
    margin-top: 8px;
    transform: scale(1.2);
    margin-right: 8px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group label {
    display: inline;
    font-weight: 400;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 14px 20px;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* ===== Project Cards ===== */
.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.project-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #667eea;
}

.project-card h3 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 18px;
    line-height: 1.3;
}

.project-card .card-desc {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;
}

.project-card .card-meta {
    font-size: 13px;
    color: #888;
    margin: 2px 0;
}

.project-card .card-meta strong {
    color: #555;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.card-actions .btn {
    flex: 1;
}

/* ===== Project Detail ===== */
.project-detail {
    padding: 0;
}

.project-detail h2 {
    color: #2c3e50;
    font-size: 24px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
    margin: 0 0 16px 0;
}

.project-detail h3 {
    color: #2c3e50;
    font-size: 18px;
    margin: 24px 0 10px 0;
}

.project-detail h4 {
    color: #444;
    font-size: 16px;
    margin: 20px 0 8px 0;
}

.project-detail p {
    line-height: 1.6;
    margin: 8px 0;
    color: #444;
}

.project-detail ul, .project-detail ol {
    margin: 8px 0 16px 0;
    padding-left: 20px;
}

.project-detail li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #444;
}

/* ===== Steps ===== */
.project-detail ol li {
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.project-detail ol li strong {
    color: #2c3e50;
}

.project-detail ol li .tip {
    display: block;
    font-style: italic;
    color: #888;
    font-size: 13px;
    margin-top: 6px;
}

.project-detail ol li .visual-desc {
    background: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 14px;
    color: #555;
    border: 1px solid #e8e8e8;
}

.project-detail ol li .visual-desc em {
    color: #667eea;
    font-weight: 600;
}

/* ===== Summary Box ===== */
.summary-box {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0e8fd 100%);
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid #d0d8f0;
}

.summary-box p {
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}

/* ===== Missing Materials ===== */
.missing-materials {
    color: #e74c3c;
    background: #fdf0ef;
    border-radius: 6px;
    padding: 8px 12px;
}

.missing-materials li {
    color: #c0392b;
}

/* ===== Glossary ===== */
.glossary-term {
    color: #667eea;
    text-decoration: underline dotted;
    cursor: help;
    position: relative;
}

.glossary-term:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    z-index: 100;
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    width: max-content;
    max-width: min(300px, 90vw);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
    margin-top: 4px;
    text-align: left;
}

.glossary-section {
    margin-top: 24px;
    border-top: 2px solid #667eea;
    padding-top: 12px;
}

.glossary-section summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    padding: 8px 0;
}

.glossary-section ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.glossary-section li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.glossary-section li:last-child {
    border-bottom: none;
}

.glossary-section li strong {
    color: #667eea;
}

/* ===== Feedback Section ===== */
.feedback-section {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 2px solid #667eea;
}

.feedback-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #2c3e50;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-rating label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f5a623;
}

.feedback-comment label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.feedback-comment label .optional {
    font-weight: 400;
    color: #999;
    font-size: 12px;
}

.feedback-comment textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

.feedback-comment textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #fff;
}

.feedback-submit {
    align-self: flex-start;
}

.feedback-thanks {
    color: #28a745;
    font-weight: 600;
    padding: 12px 0;
}

/* ===== Card Hero Image ===== */
.card-hero {
    margin: -20px -20px 12px -20px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    height: 160px;
    background: #f5f0ff;
}

.card-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.project-card:hover .card-hero-img {
    transform: scale(1.03);
}

/* ===== Detail Hero Image ===== */
.detail-hero {
    margin: 12px 0 20px 0;
    border-radius: 12px;
    overflow: hidden;
    max-height: 340px;
    background: #f5f0ff;
}

.detail-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===== Step Images ===== */
.step-image {
    margin-top: 8px;
    max-width: 280px;
    border-radius: 6px;
    overflow: hidden;
}

.step-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    border: 1px solid #eee;
}

/* ===== Loading ===== */
.loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* ===== Error ===== */
.error {
    background: #fdf0ef;
    color: #c0392b;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* ===== Back Button ===== */
.back-btn {
    margin-bottom: 16px;
}

/* ===== Share Buttons ===== */
.share-btns {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s;
    color: #fff;
}

.share-fb { background: #1877f2; }
.share-fb:hover { background: #0d5fc7; }
.share-pin { background: #e60023; }
.share-pin:hover { background: #b8001b; }
.share-email { background: #666; }
.share-email:hover { background: #444; }
.share-copy {
    background: #555;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    line-height: 1;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.share-copy:hover { background: #333; }

.card-actions .share-btns {
    margin-left: auto;
}

.detail-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* ===== Contact Form ===== */
#contact-card .form-row {
    margin-bottom: 12px;
}

#contact-card textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafafa;
}

#contact-card textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: #fff;
}

.form-group .required {
    color: #e74c3c;
    font-weight: 600;
}

.contact-thanks {
    color: #28a745;
    font-weight: 600;
    padding: 12px 0;
}

/* ===== Welcome Banner ===== */
.welcome-banner {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #81c784;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.welcome-content {
    flex: 1;
}

.welcome-content h2 {
    margin: 0 0 6px 0;
    font-size: 18px;
    color: #2e7d32;
    border: none;
    padding: 0;
}

.welcome-content p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #388e3c;
    line-height: 1.5;
}

.welcome-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #66bb6a;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.welcome-close:hover {
    color: #2e7d32;
}

[data-theme="dark"] .welcome-banner {
    background: linear-gradient(135deg, #1b3a1b 0%, #2e5a2e 100%);
    border-color: #4caf50;
}

[data-theme="dark"] .welcome-content h2 {
    color: #81c784;
}

[data-theme="dark"] .welcome-content p {
    color: #a5d6a7;
}

[data-theme="dark"] .welcome-close {
    color: #66bb6a;
}

/* ===== Find Projects Primary Button ===== */
.find-projects-primary {
    font-size: 20px !important;
    padding: 16px 24px !important;
    letter-spacing: 0.3px;
}

.surprise-me-secondary {
    font-size: 14px !important;
    padding: 8px 16px !important;
    opacity: 0.8;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state h3 {
    color: #2c3e50;
    margin: 0 0 12px 0;
    font-size: 20px;
}

.empty-state p {
    color: #888;
    margin: 0 0 20px 0;
    font-size: 15px;
    line-height: 1.5;
}

[data-theme="dark"] .empty-state h3 {
    color: #e0d8f0;
}

/* ===== Loading Skeleton ===== */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.skeleton-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-card .skeleton-img {
    width: 100%;
    height: 120px;
    background: #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-card .skeleton-line {
    height: 14px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-card .skeleton-line:last-child {
    width: 60%;
}

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

[data-theme="dark"] .skeleton-card {
    background: #2a2a3e;
    border-color: #3a3a5e;
}

[data-theme="dark"] .skeleton-card .skeleton-img,
[data-theme="dark"] .skeleton-card .skeleton-line {
    background: #3a3a5e;
}

/* ===== Mobile Header Toggle ===== */
.header-nav-toggle {
    display: none;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

@media (max-width: 600px) {
    .header-nav-toggle {
        display: inline-flex;
    }
}

.header-extra-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-extra-nav .btn {
    white-space: nowrap;
}

@media (max-width: 600px) {
    .header-extra-nav .btn:not(#darkToggle):not(.header-nav-toggle) {
        display: none;
    }
    .header-extra-nav.mobile-open .btn:not(#darkToggle):not(.header-nav-toggle) {
        display: inline-flex;
    }
}

/* Gauge Calculator collapsible */
.gauge-collapsible {
    margin-top: 0;
}

.gauge-collapsible summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

[data-theme="dark"] .gauge-collapsible summary {
    color: #e0d8f0;
    border-bottom-color: #3a3a5e;
}

/* ===== Catalog Trending ===== */
#catFilterTrending.active {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}
.support-section {
    text-align: center;
}

.support-section .btn-group {
    justify-content: center;
}

.support-link {
    text-decoration: none;
}

.support-note {
    margin-top: 12px;
    font-size: 13px;
    color: #888;
}

.support-note em {
    font-style: italic;
}

.affiliate-links {
    text-align: center;
    font-size: 13px;
    color: #888;
    margin: 12px 0;
}

.affiliate-links a {
    color: #667eea;
    text-decoration: none;
}

.affiliate-links a:hover {
    text-decoration: underline;
}

/* ===== Gauge Calculator ===== */
#gauge-calculator p {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px 0;
}

.gauge-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.gauge-tab.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.gauge-panel {
    display: none;
}

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

.gauge-result {
    margin-top: 16px;
}

.gauge-result .summary-box {
    margin: 0;
}

/* ===== Weight Label ===== */
.weight-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.weight-input-row input {
    flex: 0 0 80px;
}

.weight-label-display {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== Favorites ===== */
.fav-btn {
    background: none;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 10px;
    line-height: 1;
    color: #bbb;
    transition: all 0.15s;
    flex: 0 0 auto;
}

.fav-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.fav-btn.faved {
    color: #e74c3c;
    border-color: #e74c3c;
    background: #fff0f0;
}

.fav-btn-lg {
    font-size: 28px;
    padding: 6px 14px;
    border-width: 2px;
}

#catFilterFaves.active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.detail-header h2 {
    margin: 0;
    flex: 1;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.done-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.done-badge-lg {
    font-size: 14px;
    padding: 6px 14px;
}

.done-st {
    opacity: 0.7;
}

.done-st h3 {
    text-decoration: line-through;
    color: #888;
}

[data-theme="dark"] .done-badge {
    background: #50c878;
}

[data-theme="dark"] .done-st {
    opacity: 0.6;
}

/* ===== Weight Help Button & Popup ===== */
.weight-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
    user-select: none;
}

.weight-help-btn:hover {
    background: #764ba2;
}

.weight-popup {
    display: none;
    position: absolute;
    z-index: 200;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 8px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    margin-top: 4px;
    min-width: 260px;
}

.weight-popup.visible {
    display: block;
}

.weight-popup table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.weight-popup th {
    text-align: left;
    color: #667eea;
    font-weight: 600;
    padding: 3px 8px;
    border-bottom: 1px solid #e0e0e0;
}

.weight-popup td {
    padding: 3px 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.weight-popup tr:last-child td {
    border-bottom: none;
}

.weight-popup td:first-child {
    font-weight: 600;
    color: #333;
    width: 24px;
}

/* ===== Stash Status ===== */
.stash-status {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    text-align: center;
    min-height: 20px;
}

.stash-status .stash-saved {
    color: #28a745;
}

.stash-status .clear-stash {
    color: #c0392b;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 8px;
}

.stash-status .clear-stash:hover {
    color: #e74c3c;
}

/* ===== Stash Match (Reverse Matching) ===== */
.stash-match-section {
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.stash-match-section h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #2c3e50;
    border: none;
    padding: 0;
}

.stash-match-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}

.stash-match-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
}

.stash-match-item.match-yes {
    background: #e8f5e9;
}

.stash-match-item.match-no {
    background: #fef3e2;
}

.stash-match-icon {
    font-weight: 700;
    width: 18px;
    text-align: center;
}

.match-yes .stash-match-icon { color: #2e7d32; }
.match-no .stash-match-icon { color: #e65100; }

.stash-match-name {
    font-weight: 600;
    color: #2c3e50;
}

.stash-match-detail {
    color: #888;
    font-size: 12px;
}

.stash-match-reason {
    color: #e65100;
    font-size: 11px;
    width: 100%;
    padding-left: 24px;
}

[data-theme="dark"] .stash-match-section {
    background: #1e1e38;
    border-color: #2a2a4a;
}

[data-theme="dark"] .stash-match-section h4 {
    color: #c8b8e8;
}

[data-theme="dark"] .stash-match-item.match-yes {
    background: #1a2e1a;
}

[data-theme="dark"] .stash-match-item.match-no {
    background: #2e2a1a;
}

[data-theme="dark"] .match-yes .stash-match-icon { color: #66bb6a; }
[data-theme="dark"] .match-no .stash-match-icon { color: #ffa726; }

[data-theme="dark"] .stash-match-name {
    color: #c8b8e8;
}

[data-theme="dark"] .stash-match-detail {
    color: #6a6a8a;
}

[data-theme="dark"] .stash-match-reason {
    color: #ffa726;
}

/* ===== Form Button Group ===== */
.form-btn-group {
    margin-top: 8px;
}

.form-btn-group .btn {
    flex: 1;
}

/* ===== Catalog Button ===== */
.catalog-btn-group {
    margin-bottom: 20px;
}

.catalog-btn-group .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* ===== Yarn Manager ===== */
.yarn-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yarn-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.yarn-item:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.yarn-item-info {
    flex: 1;
}

.yarn-item-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
}

.yarn-item-detail {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.yarn-item-delete {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
}

.yarn-item-delete:hover {
    background: #fdf0ef;
}

.yarn-add-form {
    margin-top: 8px;
}

.yarn-add-form[open] summary {
    margin-bottom: 12px;
}

.yarn-form-fields {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.yarn-form-fields .form-row {
    margin-bottom: 12px;
}

.yarn-form-fields .form-group {
    margin-bottom: 0;
}

/* ===== Quick Add from Label ===== */
.yarn-quick-add {
    margin-top: 12px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #667eea;
}

.quick-add-layout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.quick-add-image {
    flex: 0 0 auto;
    max-width: 160px;
}

.quick-add-form {
    flex: 1;
    min-width: 0;
}

.quick-add-form .form-group {
    margin-bottom: 8px;
}

.quick-add-form .form-group label {
    font-size: 12px;
}

.qa-weight-select {
    padding: 8px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    background: #fff;
}

.qa-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-bottom: 8px;
}

.qa-preset-label {
    font-size: 11px;
    color: #888;
    margin-right: 4px;
}

.qa-preset-btn {
    padding: 3px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    transition: all 0.1s;
}

.qa-preset-btn:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

.quick-add-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.qa-label-guide {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.qa-label-guide summary {
    cursor: pointer;
    color: #667eea;
    font-size: 12px;
}

.qa-guide-content {
    margin-top: 6px;
    padding: 8px 10px;
    background: #f0f2ff;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.qa-guide-content p {
    margin: 4px 0;
    line-height: 1.5;
}

[data-theme="dark"] .yarn-quick-add {
    background: #1e1e38;
    border-color: #764ba2;
}

[data-theme="dark"] .qa-weight-select {
    background: #222240;
    border-color: #3a3a5a;
    color: #d0d0d8;
}

[data-theme="dark"] .qa-preset-btn {
    background: #2a2a4a;
    border-color: #3a3a5a;
    color: #9a9ab0;
}

[data-theme="dark"] .qa-preset-btn:hover {
    background: #764ba2;
    color: #fff;
    border-color: #764ba2;
}

[data-theme="dark"] .qa-label-guide summary {
    color: #9a7aea;
}

[data-theme="dark"] .qa-guide-content {
    background: #2a2a50;
    border-left-color: #764ba2;
    color: #b0b0c0;
}

[data-theme="dark"] .quick-add-form .form-group label {
    color: #9a8ab8;
}

@media (max-width: 600px) {
    .quick-add-layout {
        flex-direction: column;
    }
    .quick-add-image {
        max-width: 100%;
        text-align: center;
    }
}

/* ===== Stash Gallery ===== */
.stash-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.stash-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.15s;
    position: relative;
}

.stash-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.stash-card-img {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.stash-card-placeholder {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stash-card-weight-badge {
    background: rgba(0,0,0,0.3);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.stash-card-body {
    padding: 10px 12px;
    position: relative;
}

.stash-card-name {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 2px;
    padding-right: 24px;
}

.stash-card-detail {
    font-size: 12px;
    color: #888;
}

.stash-card-notes {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
    font-style: italic;
}

.stash-card-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    color: #c0392b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.stash-card:hover .stash-card-delete {
    opacity: 1;
}

.stash-card-delete:hover {
    background: rgba(192,57,43,0.15);
}

[data-theme="dark"] .stash-card {
    background: #1e1e38;
    border-color: #2a2a4a;
}

[data-theme="dark"] .stash-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .stash-card-img {
    background: #222240;
}

[data-theme="dark"] .stash-card-name {
    color: #c8b8e8;
}

[data-theme="dark"] .stash-card-detail {
    color: #6a6a8a;
}

[data-theme="dark"] .stash-card-notes {
    color: #6a6a8a;
}

/* ===== Catalog Filters ===== */
.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.catalog-filters select,
.catalog-filters input {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    flex: 1;
    min-width: 130px;
}

.catalog-filters select:focus,
.catalog-filters input:focus {
    outline: none;
    border-color: #667eea;
}

.catalog-count {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

/* ===== Header Row ===== */
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.header-row > div {
    flex: 1;
    text-align: left;
}

.stats-bar {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 13px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.stats-bar span {
    opacity: 0.85;
}

.stats-bar strong {
    opacity: 1;
}

[data-theme="dark"] .stats-bar {
    border-top-color: rgba(255,255,255,0.1);
}

/* ===== Dark Mode Toggle ===== */
.dark-toggle {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    color: #fff;
    font-size: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.dark-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(15deg);
}

/* ===== Dark Mode ===== */
[data-theme="dark"] body {
    background: #121220;
    color: #d0d0d8;
}

[data-theme="dark"] .card {
    background: #1a1a30;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .card h2,
[data-theme="dark"] .project-detail h2,
[data-theme="dark"] .project-detail h3,
[data-theme="dark"] .project-detail h4,
[data-theme="dark"] .feedback-section h4,
[data-theme="dark"] .glossary-section summary {
    color: #c8b8e8;
    border-bottom-color: #764ba2;
}

[data-theme="dark"] .app-header {
    background: linear-gradient(135deg, #3a2a6a 0%, #5a2a8a 100%);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

[data-theme="dark"] .dark-toggle {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

[data-theme="dark"] .form-group input[type="number"],
[data-theme="dark"] .form-group input[type="text"],
[data-theme="dark"] .form-group select {
    background: #222240;
    border-color: #3a3a5a;
    color: #d0d0d8;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus {
    border-color: #8a6aea;
    background: #2a2a50;
}

[data-theme="dark"] .form-group label {
    color: #9a8ab8;
}

[data-theme="dark"] .form-group label .optional {
    color: #6a6a8a;
}

[data-theme="dark"] .project-card {
    background: #1e1e38;
    border-color: #2a2a4a;
}

[data-theme="dark"] .project-card:hover {
    border-color: #8a6aea;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

[data-theme="dark"] .project-card h3 {
    color: #c8b8e8;
}

[data-theme="dark"] .project-card .card-desc {
    color: #9a9ab0;
}

[data-theme="dark"] .project-detail p,
[data-theme="dark"] .project-detail li {
    color: #b0b0c0;
}

[data-theme="dark"] .project-detail ol li {
    background: #1a1a30;
    border-left-color: #764ba2;
}

[data-theme="dark"] .project-detail ol li strong {
    color: #c8b8e8;
}

[data-theme="dark"] .project-detail ol li .visual-desc {
    background: #222240;
    border-color: #3a3a5a;
    color: #9a9ab0;
}

[data-theme="dark"] .summary-box {
    background: linear-gradient(135deg, #1e1a3a 0%, #2a1a4e 100%);
    border-color: #3a2a5a;
}

[data-theme="dark"] .summary-box p {
    color: #b0b0c0;
}

[data-theme="dark"] .glossary-term {
    color: #9a7aea;
}

[data-theme="dark"] .glossary-section li {
    border-bottom-color: #2a2a4a;
    color: #9a9ab0;
}

[data-theme="dark"] .glossary-section li strong {
    color: #9a7aea;
}

[data-theme="dark"] .missing-materials {
    background: #2a1a1a;
}

[data-theme="dark"] .missing-materials li {
    color: #e07070;
}

[data-theme="dark"] .feedback-comment textarea {
    background: #222240;
    border-color: #3a3a5a;
    color: #d0d0d8;
}

[data-theme="dark"] .feedback-comment textarea:focus {
    border-color: #8a6aea;
    background: #2a2a50;
}

[data-theme="dark"] .error {
    background: #2a1a1a;
    border-color: #4a2020;
}

[data-theme="dark"] .loading {
    color: #6a6a8a;
}

[data-theme="dark"] .support-note {
    color: #6a6a8a;
}

[data-theme="dark"] .affiliate-links {
    color: #6a6a8a;
}

[data-theme="dark"] .weight-popup {
    background: #1e1e38;
    border-color: #764ba2;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

[data-theme="dark"] .weight-popup th {
    color: #9a7aea;
    border-bottom-color: #3a3a5a;
}

[data-theme="dark"] .weight-popup td {
    color: #9a9ab0;
    border-bottom-color: #2a2a4a;
}

[data-theme="dark"] .weight-label-display {
    color: #9a7aea;
}

[data-theme="dark"] .fav-btn {
    border-color: #3a3a5a;
    color: #6a6a8a;
}

[data-theme="dark"] .fav-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

[data-theme="dark"] .fav-btn.faved {
    color: #e07070;
    border-color: #e07070;
    background: #2a1a1a;
}

[data-theme="dark"] #catFilterFaves.active {
    background: #c03030;
    border-color: #c03030;
}

[data-theme="dark"] .weight-popup td:first-child {
    color: #d0d0d8;
}

[data-theme="dark"] .share-fb { background: #1877f2; }
[data-theme="dark"] .share-fb:hover { background: #0d5fc7; }
[data-theme="dark"] .share-pin { background: #e60023; }
[data-theme="dark"] .share-pin:hover { background: #b8001b; }
[data-theme="dark"] .share-email { background: #6a6a8a; }
[data-theme="dark"] .share-email:hover { background: #4a4a6a; }
[data-theme="dark"] .share-copy { background: #4a4a6a; }
[data-theme="dark"] .share-copy:hover { background: #3a3a5a; }

[data-theme="dark"] #contact-card textarea {
    background: #222240;
    border-color: #3a3a5a;
    color: #d0d0d8;
}

[data-theme="dark"] #contact-card textarea:focus {
    border-color: #8a6aea;
    background: #2a2a50;
}

[data-theme="dark"] .contact-thanks {
    color: #50c878;
}

[data-theme="dark"] #catFilterTrending.active {
    background: #c07020;
    border-color: #c07020;
}

[data-theme="dark"] .stash-status {
    color: #6a6a8a;
}

[data-theme="dark"] .btn-outline {
    border-color: #8a6aea;
    color: #9a7aea;
}

[data-theme="dark"] .btn-outline:hover {
    background: #8a6aea;
    color: #fff;
}

[data-theme="dark"] .btn-secondary {
    background: #3a3a5a;
    color: #d0d0d8;
}

[data-theme="dark"] .btn-secondary:hover {
    background: #4a4a6a;
}

[data-theme="dark"] .catalog-filters select,
[data-theme="dark"] .catalog-filters input {
    background: #222240;
    border-color: #3a3a5a;
    color: #d0d0d8;
}

[data-theme="dark"] .catalog-filters select:focus,
[data-theme="dark"] .catalog-filters input:focus {
    border-color: #8a6aea;
}

[data-theme="dark"] .catalog-count {
    color: #6a6a8a;
}

[data-theme="dark"] .yarn-item {
    background: #1e1e38;
    border-color: #2a2a4a;
}

[data-theme="dark"] .yarn-item:hover {
    border-color: #8a6aea;
    background: #2a2a50;
}

[data-theme="dark"] .yarn-item-name {
    color: #c8b8e8;
}

[data-theme="dark"] .yarn-item-detail {
    color: #6a6a8a;
}

[data-theme="dark"] .yarn-form-fields {
    background: #1e1e38;
    border-color: #2a2a4a;
}

[data-theme="dark"] #gauge-calculator p {
    color: #9a9ab0;
}

[data-theme="dark"] .feedback-section h4 {
    color: #c8b8e8;
}

[data-theme="dark"] .feedback-rating label,
[data-theme="dark"] .feedback-comment label {
    color: #9a8ab8;
}

[data-theme="dark"] .feedback-thanks {
    color: #50c878;
}

[data-theme="dark"] .star-rating label {
    color: #3a3a5a;
}

[data-theme="dark"] .star-rating label:hover,
[data-theme="dark"] .star-rating label:hover ~ label,
[data-theme="dark"] .star-rating input:checked ~ label {
    color: #f0c040;
}

[data-theme="dark"] .checkbox-group label {
    color: #9a8ab8;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .container {
        padding: 12px 8px;
    }

    .app-header {
        padding: 16px;
        border-radius: 10px;
    }

    .app-header h1 {
        font-size: 22px;
    }

    .card {
        padding: 16px;
        border-radius: 10px;
    }

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

    .project-cards {
        grid-template-columns: 1fr;
    }

    .project-card:hover {
        transform: none;
    }

    .card-actions {
        flex-direction: column;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }

    .form-btn-group {
        flex-direction: column;
        gap: 8px;
    }

    .project-detail ol li {
        margin-left: 0;
    }

    .glossary-term:hover::after {
        white-space: normal;
        max-width: min(260px, 85vw);
    }

    .weight-popup {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 280px;
        z-index: 300;
        box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    }

    .project-detail h2 {
        font-size: 20px;
    }

    .project-detail ol li {
        padding: 10px;
    }

    .star-rating label {
        font-size: 32px;
    }

    .gauge-tabs {
        flex-wrap: wrap;
    }

    .gauge-tab {
        flex: 1;
        min-width: 120px;
    }

    .weight-input-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .weight-input-row input {
        flex: 0 0 auto;
        width: 100%;
    }

    .detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .fav-btn-lg {
        align-self: flex-end;
    }

    .fav-btn {
        font-size: 16px;
        padding: 6px 8px;
    }

    .detail-top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-top-bar .share-btns {
        justify-content: center;
    }

    .card-actions .share-btns {
        margin-left: 0;
        justify-content: center;
    }

    .step-image {
        max-width: 100%;
    }

    .detail-hero {
        max-height: 200px;
    }

    .stash-gallery {
        grid-template-columns: 1fr;
    }

    .catalog-filters select,
    .catalog-filters input {
        min-width: 100%;
    }

    .pagination {
        gap: 8px;
        flex-wrap: wrap;
    }

    .modal-content {
        padding: 24px 20px;
    }

    .btn, button, select, input, textarea {
        min-height: 44px;
    }
    .btn-sm {
        min-height: 36px;
    }

    [data-theme="dark"] .weight-popup {
        background: #1e1e38;
        border-color: #764ba2;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .project-cards {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== Accessibility ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===== Print ===== */
@media print {
    body {
        background: white;
    }

    .app-header {
        background: none !important;
        color: #333 !important;
        box-shadow: none;
        padding: 0;
        margin-bottom: 8px;
    }

    .app-header h1 {
        font-size: 22px;
    }

    .app-header p {
        color: #666;
    }

    form, .back-btn, .card-actions, .btn {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
    }

    .card h2 {
        display: none;
    }

    .project-detail ol li {
        break-inside: avoid;
        border-left: 2px solid #667eea;
        padding: 8px;
        margin-bottom: 8px;
    }

    .glossary-section {
        break-inside: avoid;
    }

    .summary-box {
        break-inside: avoid;
    }

    .project-detail h2 {
        border-bottom: 1px solid #333;
    }
}

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

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-content h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 12px;
}

.form-error { color: #d32; font-size: 13px; margin-left: 8px; vertical-align: middle; }
[data-theme="dark"] .form-error { color: #f66; }

.error-message {
    background: #fdf0ef;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.auth-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.auth-loading {
    text-align: center;
    padding: 16px;
    color: #667eea;
    font-weight: 600;
}

/* ===== User Badge ===== */
.user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

#userName {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

#logoutBtn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

#logoutBtn:hover {
    background: rgba(255,255,255,0.25);
}

/* Dark mode for modal and user badge */
[data-theme="dark"] .modal-content {
    background: #1e1e38;
}

[data-theme="dark"] .modal-close {
    color: #6a6a8a;
}

[data-theme="dark"] .modal-close:hover {
    color: #d0d0d8;
}

[data-theme="dark"] .modal-content h2 {
    color: #c8b8e8;
    border-bottom-color: #764ba2;
}

[data-theme="dark"] .error-message {
    background: #2a1a1a;
    color: #e07070;
}

[data-theme="dark"] .auth-switch {
    color: #9a9ab0;
}

[data-theme="dark"] .form-group input[type="email"],
[data-theme="dark"] .form-group input[type="password"],
[data-theme="dark"] .form-group input[type="text"] {
    background: #222240;
    border-color: #3a3a5a;
    color: #d0d0d8;
}

[data-theme="dark"] .form-group input:focus {
    border-color: #8a6aea;
    background: #2a2a50;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.pagination-info {
    font-size: 14px;
    color: #888;
}

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

.pagination .btn:disabled:hover {
    background: transparent;
    color: #667eea;
}

[data-theme="dark"] .pagination {
    border-top-color: #2a2a4a;
}

[data-theme="dark"] .pagination-info {
    color: #6a6a8a;
}

/* ===== Toast Notifications ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

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

.toast-success {
    background: #27ae60;
    color: #fff;
}

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

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

[data-theme="dark"] .toast-success {
    background: #1e8449;
}

[data-theme="dark"] .toast-error {
    background: #c0392b;
}

[data-theme="dark"] .toast-info {
    background: #2980b9;
}