/* Kybootl Public Styles - Brand Colors */
:root {
    --kybootl-brown: #5D3A1A;
    --kybootl-rust: #A63D20;
    --kybootl-tan: #C4A574;
    --kybootl-cream: #E8D5B5;
    --kybootl-cloud: #6B5344;
    --kybootl-light: #FDF8F3;
    
    /* Zone Colors */
    --zone-my-space: #A63D20;      /* Rust - Dashboard, Library, Profile, Scanner */
    --zone-social: #B8860B;         /* Golden brown - Friends, Search Books */
    --zone-exchange: #4A7C59;       /* Sage green - Loans, Partner Locations */
}

/* Main Containers */
.kybootl-dashboard, .kybootl-library, .kybootl-search, .kybootl-loans, 
.kybootl-friends, .kybootl-profile, .kybootl-locations, .kybootl-scanner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base Button Styles */
.kybootl-dashboard .button,
.kybootl-library .button,
.kybootl-search .button,
.kybootl-loans .button,
.kybootl-friends .button,
.kybootl-profile .button,
.kybootl-locations .button,
.kybootl-scanner .button {
    border-radius: 25px;
    color: white !important;
    padding: 12px 24px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    display: inline-block;
}

/* Secondary button overrides */
.kybootl-dashboard .button.secondary,
.kybootl-library .button.secondary,
.kybootl-search .button.secondary,
.kybootl-loans .button.secondary,
.kybootl-friends .button.secondary,
.kybootl-profile .button.secondary,
.kybootl-locations .button.secondary,
.kybootl-scanner .button.secondary {
    background: white !important;
    border: 2px solid var(--zone-my-space);
    color: var(--zone-my-space) !important;
}

.kybootl-dashboard .button.secondary:hover,
.kybootl-library .button.secondary:hover,
.kybootl-profile .button.secondary:hover,
.kybootl-scanner .button.secondary:hover {
    background: var(--kybootl-cream) !important;
    color: var(--zone-my-space) !important;
}

/* Zone: My Space (Dashboard, Library, Profile, Scanner) */
.kybootl-dashboard,
.kybootl-library,
.kybootl-profile,
.kybootl-scanner {
    border-top: 4px solid var(--zone-my-space);
    padding-top: 25px;
}

.kybootl-dashboard h2,
.kybootl-library h2,
.kybootl-profile h2,
.kybootl-scanner h2 {
    color: var(--zone-my-space);
}

.kybootl-dashboard .button,
.kybootl-library .button,
.kybootl-profile .button,
.kybootl-scanner .button {
    background: var(--zone-my-space);
    color: white !important;
    border-radius: 25px;
}

.kybootl-dashboard .button:hover,
.kybootl-library .button:hover,
.kybootl-profile .button:hover,
.kybootl-scanner .button:hover {
    background: #8B2E18;
    color: white !important;
}

/* Zone: Social (Friends, Search Books) */
.kybootl-friends,
.kybootl-search {
    border-top: 4px solid var(--zone-social);
    padding-top: 25px;
}

.kybootl-friends h2,
.kybootl-search h2 {
    color: var(--zone-social);
}

.kybootl-friends .button,
.kybootl-search .button {
    background: var(--zone-social);
    color: white !important;
    border-radius: 25px;
}

.kybootl-friends .button:hover,
.kybootl-search .button:hover {
    background: #956F09;
    color: white !important;
}

.kybootl-friends .kybootl-stats .stat:hover,
.kybootl-search .kybootl-stats .stat:hover {
    border-color: var(--zone-social);
}

/* Zone: Exchange (Loans, Partner Locations) */
.kybootl-loans,
.kybootl-locations {
    border-top: 4px solid var(--zone-exchange);
    padding-top: 25px;
}

.kybootl-loans h2,
.kybootl-locations h2 {
    color: var(--zone-exchange);
}

.kybootl-loans .button,
.kybootl-locations .button {
    background: var(--zone-exchange);
    color: white !important;
    border-radius: 25px;
}

.kybootl-loans .button:hover,
.kybootl-locations .button:hover {
    background: #3A6247;
    color: white !important;
}

.kybootl-loans .status-badge,
.kybootl-locations .location-card:hover {
    border-color: var(--zone-exchange);
}

/* Stats Grid */
.kybootl-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.kybootl-stats .stat {
    background: linear-gradient(135deg, var(--kybootl-light) 0%, white 100%);
    border: 2px solid var(--kybootl-cream);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.kybootl-stats .stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(93, 58, 26, 0.18);
    border-color: var(--kybootl-rust);
}

.kybootl-stats .stat .num {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--kybootl-rust);
}

.kybootl-stats .stat .label {
    display: block;
    font-size: 11px;
    color: var(--kybootl-cloud);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

/* Quick Actions */
.kybootl-quick-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 25px 0;
}

.kybootl-quick-actions .button {
    padding: 14px 28px;
}

.kybootl-quick-actions .button.secondary {
    background: white;
    color: var(--kybootl-rust);
    border: 2px solid var(--kybootl-tan);
    box-shadow: none;
}

.kybootl-quick-actions .button.secondary:hover {
    background: var(--kybootl-light);
    border-color: var(--kybootl-rust);
}

/* Zone-specific secondary buttons */
.kybootl-friends .button.secondary,
.kybootl-search .button.secondary {
    color: var(--zone-social);
    border-color: var(--zone-social);
}

.kybootl-friends .button.secondary:hover,
.kybootl-search .button.secondary:hover {
    border-color: #956F09;
    background: #FFF9E6;
}

.kybootl-loans .button.secondary,
.kybootl-locations .button.secondary {
    color: var(--zone-exchange);
    border-color: var(--zone-exchange);
}

.kybootl-loans .button.secondary:hover,
.kybootl-locations .button.secondary:hover {
    border-color: #3A6247;
    background: #F0F7F2;
}

/* Zone section headers */
.kybootl-friends h3,
.kybootl-search h3 {
    color: var(--zone-social);
}

.kybootl-loans h3,
.kybootl-locations h3 {
    color: var(--zone-exchange);
}

/* Action Links (legacy, keeping for other pages) */
.kybootl-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.kybootl-links .button, 
.kybootl-scanner .button, 
.kybootl-search .button,
.button.kybootl-btn {
    background: linear-gradient(135deg, var(--kybootl-rust) 0%, #8B3018 100%);
    color: white !important;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(166, 61, 32, 0.3);
}

.kybootl-links .button:hover, 
.kybootl-scanner .button:hover,
.kybootl-search .button:hover {
    background: linear-gradient(135deg, #8B3018 0%, var(--kybootl-rust) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(166, 61, 32, 0.4);
    color: white !important;
}

/* Category Navigation */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 20px;
    padding: 12px;
    background: var(--kybootl-light);
    border-radius: 12px;
}

.category-tab {
    padding: 6px 12px;
    border: none;
    border-radius: 16px;
    background: white;
    font-size: 12px;
    font-weight: 500;
    color: var(--kybootl-cloud);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--kybootl-cream);
}

.category-tab:hover {
    background: var(--kybootl-cream);
    color: var(--kybootl-brown);
}

.category-tab.active {
    background: var(--kybootl-brown);
    color: white;
    border-color: var(--kybootl-brown);
}

/* Dewey Navigation (legacy, keeping for reference) */
.dewey-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 25px 0;
    padding: 18px;
    background: linear-gradient(135deg, var(--kybootl-cream) 0%, var(--kybootl-light) 100%);
    border-radius: 12px;
    border: 1px solid var(--kybootl-tan);
}

.dewey-nav a {
    padding: 8px 14px;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: var(--kybootl-brown);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.dewey-nav a:hover {
    border-color: var(--kybootl-rust);
    color: var(--kybootl-rust);
}

.dewey-nav a.active {
    background: var(--kybootl-rust);
    color: white;
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.book-card {
    background: white;
    border: 1px solid var(--kybootl-cream);
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    border-color: var(--kybootl-tan);
    box-shadow: 0 4px 16px rgba(93, 58, 26, 0.1);
    transform: translateY(-2px);
}

.book-card .book-info {
    padding: 18px;
    flex: 1;
}

.book-card img.book-cover {
    width: 100px;
    height: auto;
    border-radius: 6px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.book-card .book-cover-placeholder {
    width: 100px;
    height: 140px;
    background: var(--kybootl-cream);
    border-radius: 6px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.book-card h4 {
    font-size: 14px;
    margin: 0 0 6px 0;
    line-height: 1.4;
    color: var(--kybootl-brown);
    font-weight: 600;
}

.book-card .author {
    font-size: 12px;
    color: var(--kybootl-cloud);
    margin: 0 0 6px 0;
}

.book-card .dewey {
    font-size: 11px;
    color: var(--kybootl-rust);
    font-weight: 500;
    margin: 0;
}

/* Book Action Buttons */
.book-actions {
    display: flex;
    border-top: 1px solid var(--kybootl-cream);
}

.book-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.book-action-btn:first-child {
    border-right: 1px solid var(--kybootl-cream);
}

.book-action-btn:hover {
    background: var(--kybootl-light);
}

.book-action-btn.active {
    background: #E8F5E9;
}

.book-action-btn.active .action-icon,
.book-action-btn.active .action-label {
    color: #2E7D32;
}

.book-action-btn .action-icon {
    font-size: 18px;
    color: var(--kybootl-cloud);
}

.book-action-btn .action-label {
    font-size: 10px;
    color: var(--kybootl-cloud);
    font-weight: 500;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.filter-tab {
    padding: 8px 14px;
    border: none;
    border-radius: 20px;
    background: var(--kybootl-cream);
    font-size: 12px;
    font-weight: 500;
    color: var(--kybootl-cloud);
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    background: var(--kybootl-tan);
    color: white;
}

.filter-tab.active {
    background: var(--kybootl-rust);
    color: white;
}

/* Library Header */
.library-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.library-header h2 {
    margin: 0;
}

.book-card .owner {
    font-size: 11px;
    color: var(--kybootl-tan);
    margin: 6px 0;
}

.book-card .status {
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 500;
}

.book-card .status.available {
    background: #E8F5E9;
    color: #2E7D32;
}

.book-card .status.checked_out, 
.book-card .status.pending {
    background: var(--kybootl-cream);
    color: var(--kybootl-brown);
}

/* Loans List */
.loans-list {
    display: grid;
    gap: 18px;
}

.loan-card {
    background: white;
    border: 2px solid #E8F5E9;
    border-left: 4px solid var(--zone-exchange);
    border-radius: 12px;
    padding: 22px;
    transition: all 0.2s;
}

.loan-card:hover {
    border-color: var(--zone-exchange);
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.12);
}

.loan-card .loan-type {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--zone-exchange);
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.loan-card h4 {
    margin: 0 0 10px 0;
    color: var(--kybootl-brown);
}

.loan-card .code {
    font-size: 20px;
    background: linear-gradient(135deg, #F0F7F2 0%, #E8F5E9 100%);
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 0;
    font-family: "SF Mono", Monaco, monospace;
    font-weight: 600;
    color: var(--zone-exchange);
    letter-spacing: 2px;
}

.loan-card .due {
    color: var(--kybootl-cloud);
    font-size: 14px;
}

/* Friends Grid */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.friend-card {
    background: white;
    border: 2px solid #FFF8E6;
    border-left: 4px solid var(--zone-social);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.friend-card:hover {
    border-color: var(--zone-social);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.15);
}

.friend-card strong {
    color: var(--kybootl-brown);
}

.friend-card .score {
    font-size: 12px;
    color: var(--zone-social);
    font-weight: 500;
}

/* Locations List */
.locations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.location-card {
    background: white;
    border: 1px solid var(--kybootl-cream);
    border-radius: 12px;
    padding: 22px;
    transition: all 0.2s;
}

.location-card:hover {
    border-color: var(--kybootl-tan);
    box-shadow: 0 4px 12px rgba(93, 58, 26, 0.08);
}

.location-card h4 {
    margin: 0 0 10px 0;
    color: var(--kybootl-brown);
    font-size: 16px;
}

.location-card p {
    color: var(--kybootl-cloud);
    margin: 6px 0;
}

.location-card .rating {
    color: #F59E0B;
    font-weight: 500;
}

.location-card .exchanges {
    font-size: 12px;
    color: var(--kybootl-tan);
}

/* Scanner Section */
.kybootl-scanner .add-method {
    background: linear-gradient(135deg, var(--kybootl-light) 0%, white 100%);
    border: 2px solid var(--kybootl-cream);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.kybootl-scanner .add-method h3 {
    color: var(--kybootl-brown);
    margin: 0 0 15px 0;
}

.kybootl-scanner input[type="text"],
.kybootl-search input[type="search"] {
    padding: 12px 16px;
    border: 2px solid var(--kybootl-cream);
    border-radius: 8px;
    width: 320px;
    max-width: 100%;
    font-size: 16px;
    transition: border-color 0.2s;
}

.kybootl-scanner input[type="text"]:focus,
.kybootl-search input[type="search"]:focus {
    outline: none;
    border-color: var(--kybootl-rust);
}

/* Book Preview */
.book-preview {
    display: flex;
    gap: 18px;
    align-items: center;
    background: white;
    padding: 18px;
    border-radius: 10px;
    margin-top: 18px;
    border: 1px solid var(--kybootl-cream);
}

.book-preview img {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.book-preview .button.added {
    background: #2E7D32;
}

/* Section Headers */
.kybootl-dashboard h2,
.kybootl-library h2,
.kybootl-search h2,
.kybootl-loans h2,
.kybootl-friends h2,
.kybootl-profile h2,
.kybootl-locations h2,
.kybootl-scanner h2 {
    color: var(--kybootl-brown);
    font-weight: 600;
    margin-bottom: 5px;
}

.kybootl-friends h3,
.kybootl-locations h3 {
    color: var(--kybootl-cloud);
    font-size: 16px;
    margin: 25px 0 15px 0;
}

/* Responsive */
@media (max-width: 600px) {
    .kybootl-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kybootl-scanner input[type="text"],
    .kybootl-search input[type="search"] {
        width: 100%;
    }
    
    .kybootl-links {
        flex-direction: column;
    }
    
    .kybootl-links .button {
        text-align: center;
    }
}

/* Community Stats Banner */
.kybootl-community-banner {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--kybootl-brown) 0%, var(--kybootl-rust) 100%);
    border-radius: 12px;
    margin-bottom: 25px;
}

.community-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

.community-stat .stat-number {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.community-stat .stat-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 480px) {
    .kybootl-community-banner {
        gap: 20px;
        padding: 16px 20px;
    }
    
    .community-stat .stat-number {
        font-size: 24px;
    }
    
    .community-stat .stat-label {
        font-size: 12px;
    }
}

/* Welcome Box (logged out) */
.kybootl-welcome-box {
    background: linear-gradient(135deg, var(--kybootl-light) 0%, white 100%);
    border: 2px solid var(--kybootl-cream);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
}

.kybootl-welcome-box h2 {
    color: var(--kybootl-brown);
    margin: 0 0 15px 0;
    font-size: 28px;
}

.kybootl-welcome-box p {
    color: var(--kybootl-cloud);
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

.kybootl-auth-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.kybootl-auth-buttons .button {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 25px;
}

.kybootl-auth-buttons .button-secondary {
    background: white;
    color: var(--kybootl-rust);
    border: 2px solid var(--kybootl-rust);
    box-shadow: none;
    border-radius: 25px;
}

.kybootl-auth-buttons .button-secondary:hover {
    background: var(--kybootl-light);
}

/* Features Grid */
.kybootl-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.kybootl-features .feature {
    text-align: center;
    padding: 25px;
}

.kybootl-features .feature .icon {
    font-size: 40px;
    display: block;
    margin-bottom: 15px;
}

.kybootl-features .feature h4 {
    color: var(--kybootl-brown);
    margin: 0 0 10px 0;
    font-size: 16px;
}

.kybootl-features .feature p {
    color: var(--kybootl-cloud);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

/* Pending Alert */
.kybootl-pending-alert {
    background: linear-gradient(135deg, var(--kybootl-cream) 0%, var(--kybootl-light) 100%);
    border-left: 4px solid var(--kybootl-rust);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.kybootl-pending-alert strong {
    color: var(--kybootl-brown);
}

.kybootl-pending-alert a {
    color: var(--kybootl-rust);
    font-weight: 600;
    text-decoration: none;
}

/* Section Headers */
.kybootl-section {
    margin: 35px 0;
}

.kybootl-section h3 {
    color: var(--kybootl-brown);
    font-size: 18px;
    margin: 0 0 15px 0;
    font-weight: 600;
}

/* User Search */
.kybootl-user-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.kybootl-user-search input {
    flex: 1;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid var(--kybootl-cream);
    border-radius: 8px;
    font-size: 15px;
}

.kybootl-user-search input:focus {
    outline: none;
    border-color: var(--kybootl-rust);
}

/* User Results */
.user-results {
    display: grid;
    gap: 12px;
}

.user-result-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid var(--kybootl-cream);
    border-radius: 10px;
    padding: 15px 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.user-result-card .user-info strong {
    color: var(--kybootl-brown);
    display: block;
}

.user-result-card .user-stats {
    font-size: 12px;
    color: var(--kybootl-cloud);
}

.user-result-card .user-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tag.friend {
    background: #E8F5E9;
    color: #2E7D32;
}

.tag.pending {
    background: var(--kybootl-cream);
    color: var(--kybootl-brown);
}

/* Small Buttons */
.button.small {
    padding: 8px 14px;
    font-size: 13px;
}

.button.secondary, .button.small.secondary {
    background: white;
    color: var(--kybootl-rust);
    border: 1px solid var(--kybootl-tan);
    box-shadow: none;
}

.button.secondary:hover, .button.small.secondary:hover {
    background: var(--kybootl-light);
    color: var(--kybootl-rust);
}

/* Friend Requests */
.friend-requests-list {
    display: grid;
    gap: 12px;
}

.friend-request-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--kybootl-light) 0%, white 100%);
    border: 2px solid var(--kybootl-cream);
    border-radius: 10px;
    padding: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.friend-request-card .request-info strong {
    color: var(--kybootl-brown);
}

.friend-request-card .request-message {
    font-size: 13px;
    color: var(--kybootl-cloud);
    font-style: italic;
    margin: 5px 0 0 0;
}

.friend-request-card .request-actions {
    display: flex;
    gap: 8px;
}

/* Counts */
.kybootl-counts {
    color: var(--kybootl-cloud);
    margin: 0 0 25px 0;
}

/* Profile Header */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.profile-header h2 {
    margin: 0;
}

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

/* Empty State */
.kybootl-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--kybootl-cloud);
    background: var(--kybootl-light);
    border-radius: 10px;
}

.kybootl-empty a {
    color: var(--kybootl-rust);
    text-decoration: none;
    font-weight: 500;
}

.kybootl-empty a:hover {
    text-decoration: underline;
}

/* Scanner Page */
.kybootl-scanner {
    max-width: 500px;
    margin: 0 auto;
}

.scanner-section {
    background: white;
    border: 2px solid var(--kybootl-cream);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.scanner-section h3 {
    margin: 0 0 10px 0;
    color: var(--kybootl-brown);
    font-size: 18px;
}

.scanner-hint {
    color: var(--kybootl-cloud);
    font-size: 14px;
    margin: 0 0 20px 0;
}

#scanner-container {
    text-align: center;
}

#reader {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

#reader video {
    border-radius: 8px;
}

#scanner-controls {
    margin-top: 15px;
}

.scanning-status {
    text-align: center;
    color: var(--kybootl-rust);
    font-weight: 500;
    padding: 15px;
    background: var(--kybootl-light);
    border-radius: 8px;
    margin: 10px 0;
}

.scanner-divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.scanner-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--kybootl-cream);
}

.scanner-divider span {
    background: white;
    padding: 0 20px;
    color: var(--kybootl-cloud);
    position: relative;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

/* Book Preview (scanner result) */
.book-preview {
    display: flex;
    gap: 15px;
    align-items: center;
    background: var(--kybootl-light);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
}

.book-preview .book-cover {
    width: 60px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.book-preview .book-info {
    flex: 1;
}

.book-preview .book-info strong {
    color: var(--kybootl-brown);
    display: block;
    margin-bottom: 4px;
}

.book-preview .book-info .author {
    color: var(--kybootl-cloud);
    font-size: 14px;
}

.book-preview .add-book {
    white-space: nowrap;
}

.book-preview .add-book.added {
    background: #2E7D32;
    cursor: default;
}

/* ISBN Form */
#isbn-form {
    display: flex;
    gap: 10px;
}

#isbn-form input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--kybootl-cream);
    border-radius: 8px;
    font-size: 16px;
}

#isbn-form input:focus {
    outline: none;
    border-color: var(--kybootl-rust);
}

.error {
    color: #C62828;
    background: #FFEBEE;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.success {
    color: #2E7D32;
    background: #E8F5E9;
    padding: 12px 15px;
    border-radius: 8px;
    margin: 10px 0;
}

/* Locations Page */
.kybootl-locations {
    max-width: 800px;
    margin: 0 auto;
}

.locations-intro {
    color: var(--kybootl-cloud);
    font-size: 16px;
    margin-bottom: 25px;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.location-card {
    background: white;
    border: 2px solid #E8F5E9;
    border-top: 4px solid var(--zone-exchange);
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.location-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 124, 89, 0.15);
    border-color: var(--zone-exchange);
}

.location-card .location-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.location-card h4 {
    color: var(--zone-exchange);
    margin: 0 0 10px 0;
    font-size: 18px;
}

.location-card .location-address {
    color: var(--kybootl-cloud);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.location-card .location-rating {
    color: var(--zone-exchange);
    font-weight: 600;
    margin: 8px 0;
}

.location-card .location-rating span {
    color: var(--kybootl-cloud);
    font-weight: normal;
    font-size: 13px;
}

.location-card .location-exchanges {
    color: var(--kybootl-cloud);
    font-size: 13px;
    margin: 8px 0 0 0;
}

/* Suggest Location Form */
.suggest-location-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 2px solid var(--kybootl-cream);
}

.suggest-location-section h3 {
    color: var(--kybootl-brown);
    margin: 0 0 10px 0;
}

.suggest-location-section > p {
    color: var(--kybootl-cloud);
    margin-bottom: 20px;
}

.suggest-location-form {
    max-width: 500px;
}

.suggest-location-form .form-row {
    margin-bottom: 15px;
}

.suggest-location-form .form-row-split {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
}

.suggest-location-form input,
.suggest-location-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--kybootl-cream);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

.suggest-location-form input:focus,
.suggest-location-form textarea:focus {
    outline: none;
    border-color: var(--kybootl-rust);
}

.suggest-location-form textarea {
    resize: vertical;
    min-height: 60px;
}

.login-prompt {
    text-align: center;
    color: var(--kybootl-cloud);
    margin-top: 30px;
}

.login-prompt a {
    color: var(--kybootl-rust);
    font-weight: 500;
}

/* Modal */
.kybootl-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.kybootl-modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 450px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.kybootl-modal-content h3 {
    margin: 0 0 5px 0;
    color: var(--kybootl-brown);
    font-size: 22px;
}

.modal-book-title {
    color: var(--kybootl-rust);
    font-style: italic;
    margin: 0 0 25px 0;
    font-size: 16px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--kybootl-cloud);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--kybootl-brown);
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section label {
    display: block;
    font-weight: 600;
    color: var(--kybootl-brown);
    margin-bottom: 8px;
    font-size: 14px;
}

.modal-section select,
.modal-section textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--kybootl-cream);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}

.modal-section select:focus,
.modal-section textarea:focus {
    outline: none;
    border-color: var(--kybootl-rust);
}

.modal-section textarea {
    resize: vertical;
    min-height: 60px;
}

.location-options .no-locations {
    color: var(--kybootl-cloud);
    font-size: 14px;
    font-style: italic;
    background: var(--kybootl-light);
    padding: 12px 15px;
    border-radius: 8px;
    margin: 0;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.modal-actions .button {
    flex: 1;
    text-align: center;
    border-radius: 25px;
    padding: 14px 24px;
}

.modal-actions .button.secondary {
    background: white !important;
    color: var(--kybootl-cloud) !important;
    border: 2px solid var(--kybootl-cream);
    box-shadow: none;
}

.modal-actions .button.secondary:hover {
    background: var(--kybootl-light) !important;
    color: var(--kybootl-brown) !important;
}

/* Loan card location */
.loan-card .location {
    font-size: 13px;
    color: var(--kybootl-rust);
    margin: 8px 0;
    padding: 8px 12px;
    background: var(--kybootl-light);
    border-radius: 6px;
    display: inline-block;
}

.loan-card .location::before {
    content: "📍 ";
}

.loan-card .code {
    font-size: 14px;
    color: var(--kybootl-brown);
    margin: 8px 0;
    padding: 10px 15px;
    background: #FFF8E1;
    border-radius: 8px;
    border-left: 4px solid #FFC107;
}

.loan-card .code strong {
    font-size: 18px;
    letter-spacing: 2px;
}

.loan-card .due {
    font-size: 14px;
    color: var(--kybootl-cloud);
    margin: 8px 0;
}

/* Loan Actions */
.loan-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--kybootl-cream);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.loan-actions .button {
    padding: 10px 18px;
    font-size: 14px;
}

.loan-actions .waiting {
    color: var(--kybootl-cloud);
    font-style: italic;
    margin: 0;
    font-size: 14px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-requested {
    background: var(--kybootl-cream);
    color: var(--kybootl-brown);
}

.status-approved {
    background: #E3F2FD;
    color: #1565C0;
}

.status-dropped_off {
    background: #FFF3E0;
    color: #E65100;
}

.status-picked_up {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-return_dropped {
    background: #F3E5F5;
    color: #7B1FA2;
}

.status-completed {
    background: #E8F5E9;
    color: #1B5E20;
}

.status-cancelled, .status-declined {
    background: #FFEBEE;
    color: #C62828;
}

/* Location in loan card */
.loan-card .location {
    font-size: 13px;
    color: var(--kybootl-cloud);
    margin: 8px 0;
}

/* ============================================
   GAMIFICATION & LEADERBOARD STYLES
   ============================================ */

.kybootl-leaderboard {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.kybootl-leaderboard h2 {
    color: var(--kybootl-brown);
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
}

/* Your Stats Card */
.your-stats-card {
    background: linear-gradient(135deg, var(--kybootl-cream) 0%, var(--kybootl-light) 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(93, 58, 26, 0.1);
    border: 2px solid var(--kybootl-tan);
}

.your-stats-card h3 {
    color: var(--kybootl-brown);
    margin: 0 0 16px 0;
    font-size: 18px;
}

.your-stats-grid {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.your-stats-grid .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.your-stats-grid .stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--kybootl-brown);
}

.your-stats-grid .stat-label {
    font-size: 12px;
    color: var(--kybootl-cloud);
    text-transform: uppercase;
}

.next-tier-info {
    margin-top: 16px;
    font-size: 14px;
    color: var(--kybootl-cloud);
    padding: 10px 16px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
}

.your-badges {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(93, 58, 26, 0.2);
}

.your-badges h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--kybootl-cloud);
}

/* Tier Badge */
.tier-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.tier-badge.small {
    padding: 4px 10px;
    font-size: 11px;
}

/* Badge List */
.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 2px solid;
    background: rgba(255,255,255,0.5);
}

/* Leaderboard Table */
.leaderboard-table {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(93, 58, 26, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 1fr 120px 80px;
    padding: 14px 20px;
    background: var(--kybootl-brown);
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 80px;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background 0.2s;
}

.leaderboard-row:hover {
    background: var(--kybootl-light);
}

.leaderboard-row.is-you {
    background: rgba(166, 61, 32, 0.08);
    border-left: 4px solid var(--kybootl-rust);
}

.leaderboard-row:last-child {
    border-bottom: none;
}

.leaderboard-row .col-rank {
    font-size: 16px;
    font-weight: bold;
    color: var(--kybootl-cloud);
}

.leaderboard-row .col-user {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.leaderboard-row .col-user a {
    color: var(--kybootl-brown);
    text-decoration: none;
    font-weight: 500;
}

.leaderboard-row .col-user a:hover {
    color: var(--kybootl-rust);
}

.leaderboard-row .founding-badge {
    font-size: 14px;
}

.leaderboard-row .mini-badge {
    font-size: 12px;
    opacity: 0.8;
}

.leaderboard-row .col-points {
    font-weight: 600;
    color: var(--kybootl-brown);
    text-align: right;
}

/* Point Guide */
.point-guide {
    background: var(--kybootl-light);
    border-radius: 12px;
    padding: 24px;
}

.point-guide h3 {
    color: var(--kybootl-brown);
    margin: 0 0 16px 0;
    font-size: 16px;
}

.point-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.point-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border-radius: 8px;
}

.point-item .points {
    font-weight: bold;
    color: #4caf50;
    font-size: 14px;
    min-width: 50px;
}

.point-item .action {
    font-size: 13px;
    color: var(--kybootl-cloud);
}

/* Profile Gamification */
.profile-name-tier {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-name-tier h2 {
    margin: 0;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* User Gamification inline display */
.user-gamification {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-gamification .user-points {
    font-size: 13px;
    color: var(--kybootl-cloud);
    font-weight: 500;
}

.user-badges-inline {
    display: flex;
    gap: 4px;
}

.user-badges-inline .badge-icon {
    font-size: 14px;
    cursor: help;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns: 50px 1fr 80px;
    }
    
    .leaderboard-header .col-tier,
    .leaderboard-row .col-tier {
        display: none;
    }
    
    .your-stats-grid {
        justify-content: center;
    }
    
    .point-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ACTIVITY FEED STYLES
   ============================================ */

.kybootl-activity-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--kybootl-light) 0%, var(--kybootl-cream) 100%);
    border-radius: 16px;
    border: 1px solid var(--kybootl-tan);
}

.activity-column {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(93, 58, 26, 0.08);
}

.activity-column h4 {
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--kybootl-cream);
    font-size: 14px;
    color: var(--kybootl-brown);
    font-weight: 600;
}

.activity-item {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    line-height: 1.5;
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-item:first-of-type {
    padding-top: 0;
}

.activity-user {
    font-weight: 600;
    color: var(--kybootl-brown);
}

.activity-book {
    font-style: italic;
    color: var(--kybootl-rust);
    display: block;
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-rating {
    color: #f4b400;
    font-size: 12px;
    letter-spacing: -1px;
}

.activity-time {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.activity-column .no-activity {
    color: #999;
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

/* Mobile Responsive for Activity Feed */
@media (max-width: 900px) {
    .kybootl-activity-feed {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .activity-column {
        padding: 14px;
    }
}

@media (max-width: 600px) {
    .kybootl-activity-feed {
        padding: 14px;
        margin-bottom: 20px;
    }
    
    .activity-column h4 {
        font-size: 13px;
    }
    
    .activity-item {
        font-size: 12px;
    }
}

/* ============================================
   SERIES PAGE STYLES
   ============================================ */

.kybootl-series {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.series-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.series-header h2 {
    margin: 0;
    color: var(--kybootl-brown);
}

.series-upgrade-notice {
    background: linear-gradient(135deg, var(--kybootl-cream) 0%, var(--kybootl-light) 100%);
    border: 2px solid var(--kybootl-tan);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
}

.series-upgrade-notice p {
    margin: 8px 0;
    color: var(--kybootl-brown);
}

.series-empty {
    text-align: center;
    padding: 40px;
    background: var(--kybootl-light);
    border-radius: 12px;
}

.series-empty p {
    color: var(--kybootl-cloud);
    margin-bottom: 16px;
}

.series-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.series-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(93, 58, 26, 0.1);
    padding: 20px;
    border: 1px solid #eee;
}

.series-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.series-card-header h3 {
    margin: 0;
    color: var(--kybootl-brown);
    font-size: 18px;
}

.series-progress {
    font-size: 14px;
    color: var(--kybootl-cloud);
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--kybootl-rust) 0%, #4caf50 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.series-books {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.series-book-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.series-book-item.owned {
    background: #e8f5e9;
}

.series-book-item.missing {
    background: #fff3e0;
}

.book-position {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--kybootl-brown);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.book-status-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.series-book-item.owned .book-status-icon {
    color: #4caf50;
}

.series-book-item.missing .book-status-icon {
    color: #ff9800;
}

.book-title {
    flex-grow: 1;
    color: var(--kybootl-brown);
}

.friend-has-book {
    font-size: 12px;
    color: #4caf50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.friend-has-book .button.small {
    padding: 4px 10px;
    font-size: 11px;
}

.no-friend-has {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.series-complete {
    margin-top: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #2e7d32;
}

/* Series Header Actions */
.series-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.edit-series-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
}

/* Series Editing Mode */
.series-card.editing {
    border: 2px solid var(--kybootl-rust);
    background: #fdf8f3;
}

.remove-from-series-btn {
    background: #ffebee;
    border: none;
    color: #c62828;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    transition: all 0.2s;
}

.remove-from-series-btn:hover {
    background: #c62828;
    color: white;
}

.series-delete-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #ffcdd2;
    text-align: center;
}

.button.danger {
    background: #c62828 !important;
    color: white !important;
}

.button.danger:hover {
    background: #b71c1c !important;
}

/* Series Modal */
.kybootl-modal {
    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: 9999;
}

.kybootl-modal .modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

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

.modal-close:hover {
    color: var(--kybootl-brown);
}

.kybootl-modal h3 {
    margin: 0 0 16px 0;
    color: var(--kybootl-brown);
}

.kybootl-modal input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--kybootl-tan);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

.series-results-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.series-result-item {
    padding: 12px;
    background: var(--kybootl-light);
    border-radius: 8px;
    cursor: pointer;
}

.series-result-item:hover {
    background: var(--kybootl-cream);
}

.series-book-count {
    color: var(--kybootl-cloud);
    font-size: 13px;
}

.search-hint {
    color: #999;
    font-style: italic;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .series-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .series-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .series-book-item {
        flex-wrap: wrap;
    }
    
    .friend-has-book {
        width: 100%;
        margin-top: 4px;
        padding-left: 34px;
    }
}


/* Series info on book cards */
.book-series-info {
    font-size: 12px;
    margin: 4px 0 0 0;
}

.book-series-info a {
    color: var(--kybootl-rust);
    text-decoration: none;
}

.book-series-info a:hover {
    text-decoration: underline;
}

.book-series-add {
    margin: 4px 0 0 0;
}

.add-to-series-btn {
    background: none;
    border: 1px dashed var(--kybootl-tan);
    color: var(--kybootl-cloud);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-to-series-btn:hover {
    background: var(--kybootl-light);
    border-color: var(--kybootl-rust);
    color: var(--kybootl-rust);
}

/* Add to Series Modal */
#add-to-series-modal .modal-content {
    max-width: 500px;
    max-height: none;
    overflow: visible;
}

#add-to-series-modal .book-being-added {
    background: var(--kybootl-light);
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
    color: var(--kybootl-brown);
}

#add-to-series-modal #series-search {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--kybootl-tan);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
}

#add-to-series-modal #series-search-results-library {
    max-height: 150px;
    overflow-y: auto;
}

#add-to-series-modal .series-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: white;
    border: 2px solid #eee;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

#add-to-series-modal .series-option:hover {
    border-color: var(--kybootl-rust);
}

#add-to-series-modal .series-option.selected {
    border-color: var(--kybootl-rust);
    background: rgba(166, 61, 32, 0.05);
}

#add-to-series-modal .position-input {
    margin-top: 12px;
    padding: 12px;
    background: var(--kybootl-cream);
    border-radius: 8px;
}

#add-to-series-modal .position-input label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

#add-to-series-modal .position-input input {
    width: 80px;
    padding: 8px;
    border: 2px solid var(--kybootl-tan);
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

#add-to-series-modal .create-new-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

#add-to-series-modal .create-new-section h4 {
    margin: 0 0 10px 0;
    color: var(--kybootl-brown);
    font-size: 14px;
}

#add-to-series-modal .new-series-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

#add-to-series-modal .new-series-form input:first-child {
    grid-column: 1 / -1;
}

#add-to-series-modal .new-series-form input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid var(--kybootl-tan);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

#add-to-series-modal .modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: flex-end;
}



/* ============================================
   CURRENTLY READING STYLES
   ============================================ */

.currently-reading-section {
    background: linear-gradient(135deg, var(--kybootl-light) 0%, var(--kybootl-cream) 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--kybootl-tan);
}

.currently-reading-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.currently-reading-header h3,
.currently-reading-section > h3 {
    margin: 0;
    color: var(--kybootl-brown);
    font-size: 18px;
}

.currently-reading-books {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.currently-reading-card {
    display: flex;
    gap: 12px;
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(93, 58, 26, 0.08);
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    position: relative;
}

.currently-reading-card .cr-cover {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.currently-reading-card .cr-cover-placeholder {
    width: 60px;
    height: 90px;
    background: var(--kybootl-cream);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.cr-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cr-info h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: var(--kybootl-brown);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cr-info .cr-author {
    margin: 0 0 4px 0;
    font-size: 12px;
    color: var(--kybootl-cloud);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cr-info .cr-started {
    margin: 0;
    font-size: 11px;
    color: #999;
}

.cr-borrowed-tag {
    display: inline-block;
    font-size: 10px;
    background: var(--zone-exchange);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
}

.cr-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #ccc;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
}

.cr-remove:hover {
    color: #e74c3c;
}

.currently-reading-empty {
    color: #999;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 20px;
}

.currently-reading-slots {
    text-align: center;
    font-size: 12px;
    color: var(--kybootl-cloud);
    margin: 12px 0 0 0;
}

/* Currently Reading Modal */
#currently-reading-modal .modal-content {
    max-width: 550px;
}

#available-books-list h4 {
    margin: 16px 0 10px 0;
    color: var(--kybootl-brown);
    font-size: 14px;
}

#available-books-list h4:first-child {
    margin-top: 0;
}

.available-books-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.available-book-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--kybootl-light);
    border-radius: 8px;
    transition: background 0.2s;
}

.available-book-item:hover {
    background: var(--kybootl-cream);
}

.available-book-item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.available-book-item .no-cover {
    width: 40px;
    height: 60px;
    background: var(--kybootl-tan);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.available-book-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.available-book-info strong {
    font-size: 14px;
    color: var(--kybootl-brown);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.available-book-info span {
    font-size: 12px;
    color: var(--kybootl-cloud);
}

.available-book-info .borrowed-tag {
    display: inline-block;
    font-size: 10px;
    background: var(--zone-exchange);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
}

.available-book-item .add-to-cr-btn {
    flex-shrink: 0;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .currently-reading-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .currently-reading-card {
        min-width: 100%;
        max-width: 100%;
    }
}



/* Finish Book Modal */
.finish-modal {
    text-align: center;
    max-width: 400px;
}

.finish-modal h3 {
    margin-bottom: 16px;
}

.finish-book-title-wrap {
    font-size: 16px;
    margin-bottom: 20px;
}

.finish-book-title {
    color: var(--kybootl-rust);
}

.finish-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.finish-options .button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
}

.finish-note {
    font-size: 12px;
    color: #999;
    margin: 0;
}



/* ============================================
   READING STATS PAGE STYLES
   ============================================ */

.kybootl-stats {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.stats-header h2 {
    margin: 0;
    color: var(--kybootl-brown);
}

.stats-period-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-period-nav .nav-btn {
    padding: 8px 16px;
    background: var(--kybootl-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--kybootl-brown);
    font-size: 14px;
    transition: background 0.2s;
}

.stats-period-nav .nav-btn:hover {
    background: var(--kybootl-cream);
}

.stats-period-nav .nav-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.stats-period-nav .current-period {
    font-weight: 600;
    color: var(--kybootl-brown);
    min-width: 150px;
    text-align: center;
}

.stats-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(93, 58, 26, 0.1);
}

.stats-card h3 {
    margin: 0 0 20px 0;
    color: var(--kybootl-brown);
    font-size: 20px;
}

.monthly-card {
    background: linear-gradient(135deg, var(--kybootl-cream) 0%, white 100%);
    border: 2px solid var(--kybootl-tan);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-box {
    background: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-box .stat-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.stat-box .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--kybootl-brown);
    display: block;
}

.stat-box .stat-label {
    font-size: 12px;
    color: var(--kybootl-cloud);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-highlights {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--kybootl-light);
    border-radius: 8px;
}

.highlight-item .highlight-icon {
    font-size: 18px;
}

.highlight-item .highlight-text {
    font-size: 14px;
    color: var(--kybootl-brown);
}

.stats-comparison {
    text-align: center;
    font-size: 14px;
    color: var(--kybootl-cloud);
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.no-stats {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
    margin: 0;
}

/* Monthly Breakdown Chart */
.monthly-breakdown {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.monthly-breakdown h4 {
    margin: 0 0 16px 0;
    color: var(--kybootl-brown);
    font-size: 14px;
}

.breakdown-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    padding: 0 8px;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 100%;
}

.chart-bar .bar-fill {
    width: 70%;
    max-width: 30px;
    background: linear-gradient(180deg, var(--kybootl-rust) 0%, var(--kybootl-tan) 100%);
    border-radius: 4px 4px 0 0;
    position: absolute;
    bottom: 24px;
    min-height: 4px;
    transition: height 0.3s ease;
}

.chart-bar .bar-label {
    position: absolute;
    bottom: 0;
    font-size: 10px;
    color: var(--kybootl-cloud);
}

.chart-bar .bar-value {
    position: absolute;
    bottom: calc(100% + 4px);
    font-size: 11px;
    font-weight: 600;
    color: var(--kybootl-brown);
}

.alltime-card {
    background: linear-gradient(135deg, #f8f4f0 0%, #fff 100%);
}

.reading-since {
    text-align: center;
    font-size: 13px;
    color: var(--kybootl-cloud);
    margin: 16px 0 0 0;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .stats-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-period-nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-box .stat-value {
        font-size: 24px;
    }
    
    .breakdown-chart {
        height: 100px;
    }
    
    .chart-bar .bar-label {
        font-size: 8px;
    }
}



/* ============================================
   HELP PAGE STYLES
   ============================================ */

.kybootl-help {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.kybootl-help h2 {
    color: var(--kybootl-brown);
    margin-bottom: 8px;
}

.help-intro {
    font-size: 18px;
    color: var(--kybootl-cloud);
    margin-bottom: 24px;
    line-height: 1.6;
}

.help-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    padding: 16px;
    background: var(--kybootl-light);
    border-radius: 12px;
}

.help-nav a {
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    text-decoration: none;
    color: var(--kybootl-brown);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.help-nav a:hover {
    background: var(--kybootl-rust);
    color: white;
}

.help-section {
    margin-bottom: 40px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(93, 58, 26, 0.08);
}

.help-section h3 {
    color: var(--kybootl-brown);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--kybootl-cream);
    font-size: 20px;
}

.help-content {
    color: #444;
    line-height: 1.7;
}

.help-content h4 {
    color: var(--kybootl-brown);
    margin: 20px 0 12px 0;
    font-size: 16px;
}

.help-content h4:first-child {
    margin-top: 0;
}

.help-content p {
    margin-bottom: 12px;
}

.help-content ol, 
.help-content ul {
    margin: 12px 0;
    padding-left: 24px;
}

.help-content li {
    margin-bottom: 8px;
}

.help-method {
    background: var(--kybootl-light);
    padding: 16px 20px;
    border-radius: 12px;
    margin: 16px 0;
}

.help-method h4 {
    margin-top: 0;
}

.help-tip {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 14px 18px;
    border-radius: 10px;
    margin: 16px 0;
    border-left: 4px solid #ff9800;
}

.help-points-table,
.help-tiers-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.help-points-table td,
.help-tiers-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
}

.help-points-table td:last-child,
.help-tiers-table td:last-child {
    text-align: right;
    font-weight: 600;
    color: var(--kybootl-rust);
}

.tier-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-item h4 {
    margin: 0 0 8px 0;
    color: var(--kybootl-brown);
}

.faq-item p {
    margin: 0;
    color: var(--kybootl-cloud);
}

.help-footer {
    text-align: center;
    padding: 32px 20px;
    background: linear-gradient(135deg, var(--kybootl-cream) 0%, var(--kybootl-light) 100%);
    border-radius: 16px;
    margin-top: 40px;
}

.help-footer p {
    margin: 0 0 16px 0;
    color: var(--kybootl-brown);
    font-size: 16px;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .help-nav {
        flex-direction: column;
    }
    
    .help-nav a {
        text-align: center;
    }
    
    .help-section {
        padding: 16px;
    }
    
    .help-method {
        padding: 12px 14px;
    }
}



/* ============================================
   SUPPORT PAGE STYLES
   ============================================ */

.kybootl-support {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.kybootl-support h2 {
    color: var(--kybootl-brown);
    margin-bottom: 8px;
}

.support-intro {
    font-size: 16px;
    color: var(--kybootl-cloud);
    margin-bottom: 24px;
}

.support-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

.support-form-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(93, 58, 26, 0.08);
}

.support-form-section h3 {
    margin: 0 0 20px 0;
    color: var(--kybootl-brown);
    font-size: 18px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--kybootl-brown);
    margin-bottom: 8px;
    font-size: 14px;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--kybootl-tan);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

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

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

.field-hint {
    font-size: 12px;
    color: #999;
    margin: 6px 0 0 0;
}

/* Screenshot Upload */
.screenshot-upload-area {
    border: 2px dashed var(--kybootl-tan);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 120px;
}

.screenshot-upload-area:hover,
.screenshot-upload-area.dragover {
    border-color: var(--kybootl-rust);
    background: rgba(166, 61, 32, 0.02);
}

.upload-prompt {
    color: var(--kybootl-cloud);
}

.upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.upload-prompt p {
    margin: 4px 0;
}

.upload-link {
    color: var(--kybootl-rust);
    text-decoration: underline;
}

.upload-hint {
    font-size: 12px;
    color: #999;
}

.screenshot-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.screenshot-preview {
    position: relative;
    width: 100px;
    height: 100px;
}

.screenshot-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.screenshot-preview .remove-screenshot {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-preview .filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 10px;
    padding: 4px;
    border-radius: 0 0 8px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-actions {
    margin-top: 24px;
}

.form-actions .button {
    padding: 14px 32px;
    font-size: 16px;
}

/* Success Message */
.ticket-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.ticket-success h3 {
    color: var(--kybootl-brown);
    margin-bottom: 12px;
}

.ticket-success p {
    color: var(--kybootl-cloud);
    margin-bottom: 12px;
}

.ticket-success .ticket-id {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Ticket History */
.support-history-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(93, 58, 26, 0.08);
    height: fit-content;
}

.support-history-section h3 {
    margin: 0 0 16px 0;
    color: var(--kybootl-brown);
    font-size: 16px;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-item {
    padding: 12px;
    background: var(--kybootl-light);
    border-radius: 8px;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ticket-item .ticket-id {
    font-size: 12px;
    color: #999;
}

.ticket-status {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.status-open {
    background: #fff3e0;
    color: #e65100;
}

.status-progress {
    background: #e3f2fd;
    color: #1565c0;
}

.status-resolved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-closed {
    background: #f5f5f5;
    color: #757575;
}

.ticket-subject {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: var(--kybootl-brown);
}

.ticket-date {
    margin: 0;
    font-size: 12px;
    color: #999;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .support-layout {
        grid-template-columns: 1fr;
    }
    
    .support-history-section {
        order: -1;
    }
}


/* ============================================
   SUPPORT PAGE STYLES (UPDATED)
   ============================================ */

.kybootl-support {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.kybootl-support h2 {
    color: var(--kybootl-brown);
    margin-bottom: 8px;
    text-align: center;
}

.support-intro {
    font-size: 16px;
    color: var(--kybootl-cloud);
    margin-bottom: 32px;
    text-align: center;
}

/* Two-Panel Layout */
.support-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.support-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(93, 58, 26, 0.08);
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.support-panel:hover {
    border-color: var(--kybootl-tan);
}

.issue-panel .panel-header {
    border-bottom: 3px solid #ffcdd2;
}

.suggestion-panel .panel-header {
    border-bottom: 3px solid #fff9c4;
}

.panel-header {
    text-align: center;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.panel-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 8px;
}

.panel-header h3 {
    margin: 0 0 8px 0;
    color: var(--kybootl-brown);
    font-size: 20px;
}

.panel-header p {
    margin: 0;
    color: var(--kybootl-cloud);
    font-size: 14px;
}

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

.support-form label {
    display: block;
    font-weight: 600;
    color: var(--kybootl-brown);
    margin-bottom: 6px;
    font-size: 14px;
}

.support-form .required {
    color: #e74c3c;
}

.support-form input[type="text"],
.support-form input[type="email"],
.support-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--kybootl-tan);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.support-form input:focus,
.support-form textarea:focus {
    outline: none;
    border-color: var(--kybootl-rust);
}

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

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--kybootl-tan);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 80px;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--kybootl-rust);
    background: rgba(166, 61, 32, 0.02);
}

.file-upload-area .file-input {
    display: none;
}

.upload-prompt {
    color: var(--kybootl-cloud);
}

.upload-icon {
    font-size: 28px;
    display: block;
    margin-bottom: 6px;
}

.upload-prompt p {
    margin: 4px 0;
    font-size: 13px;
}

.upload-link {
    color: var(--kybootl-rust);
    text-decoration: underline;
}

.upload-hint {
    font-size: 11px;
    color: #999;
}

/* File Previews */
.file-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.file-preview {
    position: relative;
    width: 80px;
    height: 80px;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.file-preview.file-doc {
    background: var(--kybootl-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview .file-icon {
    font-size: 32px;
}

.file-preview .remove-file {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview .filename {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 9px;
    padding: 3px;
    border-radius: 0 0 8px 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Submit Button */
.support-form .submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    margin-top: 8px;
}

/* Success State */
.form-success {
    text-align: center;
    padding: 30px 20px;
}

.form-success .success-icon {
    width: 50px;
    height: 50px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.form-success h4 {
    color: var(--kybootl-brown);
    margin: 0 0 10px 0;
}

.form-success p {
    color: var(--kybootl-cloud);
    margin: 0 0 8px 0;
    font-size: 14px;
}

.form-success .ticket-number {
    font-size: 13px;
    margin-bottom: 20px;
}

/* Ticket History */
.support-history {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(93, 58, 26, 0.08);
}

.support-history h3 {
    margin: 0 0 20px 0;
    color: var(--kybootl-brown);
    font-size: 18px;
}

.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.ticket-card {
    padding: 16px;
    background: var(--kybootl-light);
    border-radius: 12px;
}

.ticket-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ticket-type-icon {
    font-size: 16px;
}

.ticket-card .ticket-id {
    font-size: 12px;
    color: #999;
}

.ticket-card .ticket-status {
    margin-left: auto;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.ticket-card h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: var(--kybootl-brown);
    line-height: 1.3;
}

.ticket-card .ticket-date {
    margin: 0;
    font-size: 12px;
    color: #999;
}

/* Status Colors */
.status-open {
    background: #fff3e0;
    color: #e65100;
}

.status-progress {
    background: #e3f2fd;
    color: #1565c0;
}

.status-resolved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-closed {
    background: #f5f5f5;
    color: #757575;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .support-panels {
        grid-template-columns: 1fr;
    }
    
    .tickets-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   WORDPRESS LOGIN/REGISTER BUTTON FIX
   ============================================ */

/* Fix for white-on-white register button */
.wp-login-register a,
a.register-link,
.login-register a,
a[href*="wp-login.php?action=register"] {
    background: var(--kybootl-rust, #a63d20) !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.wp-login-register a:hover,
a.register-link:hover,
.login-register a:hover,
a[href*="wp-login.php?action=register"]:hover {
    background: var(--kybootl-brown, #5d3a1a) !important;
    color: white !important;
}

/* If the button is next to login */
.kybootl-auth-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.kybootl-auth-buttons .button,
.kybootl-auth-buttons a {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
}

.kybootl-auth-buttons .login-btn {
    background: var(--kybootl-rust);
    color: white;
}

.kybootl-auth-buttons .register-btn {
    background: white;
    color: var(--kybootl-brown);
    border: 2px solid var(--kybootl-brown);
}

.kybootl-auth-buttons .register-btn:hover {
    background: var(--kybootl-brown);
    color: white;
}


/* ============================================
   FRIEND DISCOVERY STYLES
   ============================================ */

.friend-discovery-section {
    background: linear-gradient(135deg, #f8f4f0 0%, #fff 100%);
    border: 2px solid var(--kybootl-cream);
    border-radius: 16px;
}

/* Opt-In State */
.discovery-opt-in {
    text-align: center;
    padding: 20px;
}

.discovery-opt-in p {
    color: var(--kybootl-cloud);
    margin-bottom: 12px;
}

.discovery-opt-in ul {
    text-align: left;
    max-width: 500px;
    margin: 16px auto;
    color: var(--kybootl-brown);
}

.discovery-opt-in ul li {
    margin-bottom: 8px;
    padding-left: 8px;
}

.discovery-note {
    font-size: 13px;
    color: #999;
    font-style: italic;
    margin-bottom: 20px;
}

#enable-discovery-btn {
    padding: 12px 28px;
    font-size: 15px;
}

/* Enabled State */
.discovery-enabled {
    padding: 10px 0;
}

.discovery-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-badge.enabled {
    background: #e8f5e9;
    color: #2e7d32;
}

.discovery-message {
    color: var(--kybootl-cloud);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Suggestions Grid */
.friend-suggestions h4 {
    color: var(--kybootl-brown);
    margin: 0 0 16px 0;
    font-size: 16px;
}

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

.suggestion-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(93, 58, 26, 0.08);
    border: 1px solid var(--kybootl-cream);
    transition: transform 0.2s, box-shadow 0.2s;
}

.suggestion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 58, 26, 0.12);
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.suggestion-header strong {
    color: var(--kybootl-brown);
    font-size: 16px;
}

.compatibility-badge {
    background: linear-gradient(135deg, var(--kybootl-rust) 0%, #c45a3a 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.suggestion-details {
    margin-bottom: 14px;
}

.suggestion-stat {
    margin: 6px 0;
    font-size: 13px;
    color: var(--kybootl-cloud);
}

.shared-titles {
    margin-top: 10px;
    font-size: 12px;
    color: #888;
    font-style: italic;
    padding: 8px;
    background: var(--kybootl-light);
    border-radius: 6px;
}

.suggestion-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--kybootl-cream);
}

.suggestion-actions .button {
    flex: 1;
    text-align: center;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .suggestions-grid {
        grid-template-columns: 1fr;
    }
    
    .discovery-status {
        flex-direction: column;
        align-items: flex-start;
    }
}
