/* PG Emissary Marketplace - MMO Auction House Theme */

:root {
    --pico-primary: #c9a84c;
    --pico-primary-hover: #dbb95e;
    --brand-gold: #c9a84c;
    --brand-gold-light: #e4c76b;
    --brand-gold-dark: #8a6d1b;
    --brand-bg: #1a1a2e;
    --brand-surface: #16213e;
    --brand-surface-light: #1e2d4f;
    --brand-border: #2a3a5c;
    --badge-buy: #3b9e6e;
    --badge-sell: #d94f4f;
    --status-open: #3b9e6e;
    --status-sold: #6b7280;
    --status-closed: #9b3a3a;
    --text-primary: #e8e0d0;
    --text-muted: #9ca3af;

    /* Override pico dark theme */
    --pico-background-color: var(--brand-bg);
    --pico-card-background-color: var(--brand-surface);
    --pico-card-border-color: var(--brand-border);
    --pico-color: var(--text-primary);
    --pico-muted-color: var(--text-muted);
}

/* Global */
body {
    background: var(--brand-bg);
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

a {
    color: var(--brand-gold-light);
}

a:hover {
    color: var(--brand-gold);
}

h1, h2, h3 {
    color: var(--brand-gold-light);
}

/* Navigation */
nav {
    background: linear-gradient(180deg, #0f1629 0%, var(--brand-surface) 100%);
    border-bottom: 2px solid var(--brand-gold-dark);
    padding: 0.5rem 0;
}

nav .brand {
    color: var(--brand-gold);
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

nav .brand:hover {
    color: var(--brand-gold-light);
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

nav ul li a:hover {
    color: var(--brand-gold);
}

nav .nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

nav .nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--brand-gold-dark);
}

nav .nav-admin {
    color: #e67e22;
    font-weight: 600;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(255,255,255,0.1);
}

.badge-sell {
    background: linear-gradient(135deg, #b83232, #d94f4f);
    color: #fff;
    border-color: #d94f4f;
}

.badge-buy {
    background: linear-gradient(135deg, #2a7d52, #3b9e6e);
    color: #fff;
    border-color: #3b9e6e;
}

/* Status badges */
.badge-status-open {
    background: linear-gradient(135deg, #2a7d52, #3b9e6e);
    color: #fff;
    border-color: #3b9e6e;
}

.badge-status-sold {
    background: linear-gradient(135deg, #4a5162, #6b7280);
    color: #d1d5db;
    border-color: #6b7280;
}

.badge-status-closed {
    background: linear-gradient(135deg, #7a2929, #9b3a3a);
    color: #e8c0c0;
    border-color: #9b3a3a;
}

/* Role badges */
.badge-role-admin {
    background: linear-gradient(135deg, #b86e1a, #e67e22);
    color: #fff;
    border-color: #e67e22;
}

.badge-role-moderator {
    background: linear-gradient(135deg, #1e6fa3, #3498db);
    color: #fff;
    border-color: #3498db;
}

/* Page headings */
main h1 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.listing-card {
    margin: 0;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.listing-card:hover {
    border-color: var(--brand-gold-dark);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.1);
}

.listing-card header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 0.5rem;
}

.listing-card h3 {
    margin: 0.5rem 0;
    font-size: 1.05rem;
    color: var(--brand-gold-light);
}

.listing-card h3 a {
    text-decoration: none;
    color: var(--brand-gold-light);
}

.listing-card h3 a:hover {
    color: var(--brand-gold);
}

.listing-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.25rem 0;
    line-height: 1.4;
}

.listing-card footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid var(--brand-border);
    padding-top: 0.5rem;
    font-size: 0.8rem;
}

.listing-card footer small {
    color: var(--text-muted);
}

.listing-card-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

/* Card screenshot thumbnail */
.card-screenshot {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin: 0.5rem 0;
    border: 1px solid var(--brand-border);
}

/* Listing Detail */
.listing-detail {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 8px;
}

.listing-detail .listing-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.listing-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.listing-description {
    font-size: 1rem;
    white-space: pre-wrap;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Screenshot in detail view */
.screenshot-container {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(0,0,0,0.2);
    border-radius: 6px;
    border: 1px solid var(--brand-border);
    display: inline-block;
}

.screenshot-thumb {
    max-width: 400px;
    max-height: 300px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
    display: block;
}

.screenshot-thumb:hover {
    opacity: 0.85;
}

.screenshot-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.4rem;
}

/* Status form */
.status-form {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.small-select {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    margin: 0;
    background: var(--brand-surface-light);
    border: 1px solid var(--brand-border);
    color: var(--text-primary);
    border-radius: 4px;
}

/* Search Form */
.search-form {
    margin-bottom: 1.5rem;
    background: var(--brand-surface);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--brand-border);
}

.search-form .grid {
    align-items: end;
}

.search-form input,
.search-form select {
    background: var(--brand-surface-light);
    border-color: var(--brand-border);
    color: var(--text-primary);
}

.search-form button {
    background: var(--brand-gold);
    color: #1a1a2e;
    border: none;
    font-weight: 600;
}

.search-form button:hover {
    background: var(--brand-gold-light);
}

.results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Forms */
form label {
    color: var(--text-primary);
    font-weight: 500;
}

form input,
form select,
form textarea {
    background: var(--brand-surface-light);
    border: 1px solid var(--brand-border);
    color: var(--text-primary);
}

form input:focus,
form select:focus,
form textarea:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.15);
}

form button[type="submit"] {
    background: var(--brand-gold);
    color: #1a1a2e;
    border: none;
    font-weight: 600;
}

form button[type="submit"]:hover {
    background: var(--brand-gold-light);
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--brand-gold-dark);
}

.character-info {
    color: var(--text-muted);
}

.profile-bio {
    white-space: pre-wrap;
}

/* Comments */
.comments-section {
    margin-top: 2rem;
}

.comments-section h2 {
    font-size: 1.2rem;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 0.4rem;
}

.comment {
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 6px;
}

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

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-author a {
    color: var(--brand-gold-light);
    font-weight: 500;
}

.comment-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--brand-border);
}

.comment-header small {
    color: var(--text-muted);
}

.comment p {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.comment-footer {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding-top: 0;
    flex-wrap: wrap;
}

.comment-form textarea {
    margin-bottom: 0.5rem;
}

/* Report button */
.report-btn {
    background: transparent;
    border: 1px solid #9b6a1a;
    color: #d4a632;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.report-btn:hover {
    background: #9b6a1a;
    color: #fff;
}

/* Report form (toggled by JS) */
.report-form-hidden {
    display: none;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.report-form-hidden.visible {
    display: flex;
}

.report-form-hidden input {
    margin: 0;
    font-size: 0.85rem;
}

/* Listing report section */
.listing-report-section {
    margin-top: 1rem;
    padding-top: 0.5rem;
}

/* Buttons */
button, [role="button"] {
    transition: all 0.2s;
}

.small-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

.outline {
    border-color: var(--brand-border);
    color: var(--text-primary);
}

.outline:hover {
    border-color: var(--brand-gold-dark);
    color: var(--brand-gold-light);
}

.secondary {
    border-color: rgba(217, 79, 79, 0.4);
    color: #e89090;
}

.secondary:hover {
    border-color: #d94f4f;
    color: #fff;
    background: rgba(217, 79, 79, 0.2);
}

/* Inline form */
.inline-form {
    display: inline;
}

/* Banners */
.error-banner {
    border-left: 4px solid var(--badge-sell);
    background: rgba(217, 79, 79, 0.08);
}

.success-banner {
    border-left: 4px solid var(--badge-buy);
    background: rgba(59, 158, 110, 0.08);
}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    border: 1px dashed var(--brand-border);
    border-radius: 6px;
}

/* Login card */
.login-card {
    max-width: 400px;
    margin: 4rem auto;
    text-align: center;
    border: 1px solid var(--brand-border);
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
}

.pagination ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    padding: 0;
    flex-wrap: wrap;
}

.pagination li a,
.pagination li span {
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid var(--brand-border);
    transition: all 0.2s;
}

.pagination li a:hover {
    border-color: var(--brand-gold-dark);
    color: var(--brand-gold-light);
}

.pagination .current-page {
    background: var(--brand-gold);
    color: #1a1a2e;
    border-color: var(--brand-gold);
    font-weight: 600;
}

/* Admin Dashboard */
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.admin-card {
    text-align: center;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 8px;
}

.admin-stat {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--brand-gold);
}

/* Admin Tables */
.admin-table-wrap {
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--brand-border);
    border-radius: 6px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--brand-border);
    vertical-align: top;
}

.admin-table th {
    background: rgba(201, 168, 76, 0.08);
    font-weight: 600;
    color: var(--brand-gold-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.admin-table tbody tr:hover {
    background: rgba(201, 168, 76, 0.03);
}

.deleted-row {
    opacity: 0.4;
}

.action-cell {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.report-quote {
    font-size: 0.85rem;
    margin: 0;
    padding: 0.3rem 0.6rem;
    border-left: 3px solid var(--brand-gold-dark);
    color: var(--text-muted);
    background: rgba(0,0,0,0.15);
    border-radius: 0 4px 4px 0;
}

.admin-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--brand-border);
}

.grant-role-form {
    max-width: 600px;
}

/* Known Users table */
.user-search-input {
    max-width: 400px;
    margin-bottom: 0.75rem;
    background: var(--brand-surface-light);
    border: 1px solid var(--brand-border);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.user-search-input:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.15);
}

.user-avatar-cell {
    width: 32px;
    padding-right: 0 !important;
}

.user-avatar-tiny {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--brand-border);
    vertical-align: middle;
}

.user-avatar-placeholder {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--brand-surface-light);
    border: 1px dashed var(--brand-border);
}

.discord-id {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--brand-border);
    color: var(--text-muted);
    padding: 0.15rem 0.3rem;
    border-radius: 3px;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 0.25rem;
    line-height: 1;
    transition: all 0.15s;
}

.copy-btn:hover {
    border-color: var(--brand-gold-dark);
    color: var(--brand-gold-light);
}

.copy-btn-done {
    border-color: #3b9e6e;
    color: #3b9e6e;
}

/* Source badges */
.badge-source-web {
    background: linear-gradient(135deg, #1e6fa3, #3498db);
    color: #fff;
    border-color: #3498db;
}

.badge-source-bot {
    background: linear-gradient(135deg, #5a4a8a, #7c6bc4);
    color: #fff;
    border-color: #7c6bc4;
}

/* Edit listing */
.edit-meta {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edit-screenshot-preview {
    margin: 1rem 0;
}

.edit-screenshot-img {
    display: block;
    max-width: 300px;
    max-height: 200px;
    border-radius: 6px;
    border: 1px solid var(--brand-border);
    margin: 0.5rem 0;
}

.edit-screenshot-remove {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
}

.edit-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

/* ========================== */
/* Page Layout & Sidebar      */
/* ========================== */

.page-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 160px);
}

.sidebar {
    position: sticky;
    top: 0;
    height: fit-content;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 1rem 0.75rem;
    background: var(--brand-surface);
    border-right: 1px solid var(--brand-border);
}

.sidebar-section {
    margin-bottom: 1.25rem;
}

.sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: block;
    padding: 0.4rem 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 4px;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.sidebar-link:hover {
    background: rgba(201, 168, 76, 0.08);
    color: var(--brand-gold-light);
    border-left-color: var(--brand-gold-dark);
}

.sidebar-link.active {
    background: rgba(201, 168, 76, 0.12);
    color: var(--brand-gold);
    border-left-color: var(--brand-gold);
    font-weight: 600;
}

.main-content {
    padding: 1.5rem 2rem;
    min-width: 0;
}

/* Sidebar toggle button (mobile) */
.sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--brand-border);
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.75rem;
    line-height: 1;
}

.sidebar-toggle:hover {
    border-color: var(--brand-gold-dark);
    color: var(--brand-gold);
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.visible {
    display: block;
}

/* ========================== */
/* Info Pages                 */
/* ========================== */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.info-card {
    margin: 0 0 1rem;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    padding: 1.25rem;
}

.info-card header {
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.info-card header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.info-card footer {
    border-top: 1px solid var(--brand-border);
    padding-top: 0.5rem;
    margin-top: 0.75rem;
}

.info-highlight {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--brand-gold);
    margin: 0.25rem 0;
}

.info-row {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(42, 58, 92, 0.4);
    line-height: 1.5;
}

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

.text-muted {
    color: var(--text-muted);
}

/* News sections */
.news-section {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.news-section.notice-banner {
    border-left: 4px solid #e67e22;
}

.news-section.maintenance-banner {
    border-left: 4px solid #d94f4f;
}

.news-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.news-title {
    margin: 0;
    font-size: 1.1rem;
    color: var(--brand-gold-light);
}

.news-content {
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    max-height: 600px;
    overflow-y: auto;
}

.badge-notice {
    background: linear-gradient(135deg, #b86e1a, #e67e22);
    color: #fff;
    border-color: #e67e22;
}

/* Moon phase display */
.moon-phase-display {
    text-align: center;
    padding: 2rem;
}

.moon-phase-icon {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.moon-phase-name {
    color: var(--brand-gold);
    margin: 0.5rem 0;
}

.moon-progress-bar {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
    margin: 0.5rem auto;
    max-width: 300px;
    border: 1px solid var(--brand-border);
}

.moon-progress-bar.large {
    height: 12px;
    max-width: 400px;
}

.moon-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-gold-dark), var(--brand-gold), var(--brand-gold-light));
    border-radius: 6px;
    transition: width 0.3s;
}

/* Mushroom grid */
.mushroom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.mushroom-item {
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border-left: 3px solid var(--brand-border);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.mushroom-item.best {
    border-left-color: #3b9e6e;
}

.mushroom-item.worst {
    border-left-color: #d94f4f;
}

.mushroom-item.good {
    border-left-color: #7ec49e;
}

.mushroom-item.normal {
    border-left-color: var(--brand-gold-dark);
}

.mushroom-item.poor {
    border-left-color: #e89090;
}

.mushroom-name {
    flex: 1;
}

.badge-mushroom-best {
    background: linear-gradient(135deg, #2a7d52, #3b9e6e);
    color: #fff;
    border-color: #3b9e6e;
}

.badge-mushroom-good {
    background: linear-gradient(135deg, #4a8a6a, #7ec49e);
    color: #fff;
    border-color: #7ec49e;
}

.badge-mushroom-normal {
    background: linear-gradient(135deg, #8a6d1b, #c9a84c);
    color: #fff;
    border-color: #c9a84c;
}

.badge-mushroom-poor {
    background: linear-gradient(135deg, #9b5a5a, #c97070);
    color: #fff;
    border-color: #c97070;
}

.badge-mushroom-worst {
    background: linear-gradient(135deg, #7a2929, #9b3a3a);
    color: #e8c0c0;
    border-color: #9b3a3a;
}

.mushroom-card-best {
    border-top: 3px solid #3b9e6e;
}

.mushroom-card-worst {
    border-top: 3px solid #d94f4f;
}

/* Phase reference table */
.current-phase-row {
    background: rgba(201, 168, 76, 0.08);
}

.current-phase-row td {
    color: var(--brand-gold-light);
    font-weight: 500;
}

.phase-emoji {
    font-size: 1.1rem;
    margin-right: 0.25rem;
}

/* Footer */
footer hr {
    border-color: var(--brand-border);
}

.footer-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========================== */
/* Activities                  */
/* ========================== */

.activity-card {
    margin: 0 0 0.75rem;
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.activity-card:hover {
    border-color: var(--brand-gold-dark);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.1);
}

.activity-card header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.activity-card h3 {
    margin: 0.25rem 0;
    font-size: 1.05rem;
    color: var(--brand-gold-light);
}

.activity-card h3 a {
    text-decoration: none;
    color: var(--brand-gold-light);
}

.activity-card h3 a:hover {
    color: var(--brand-gold);
}

.activity-card footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: 1px solid var(--brand-border);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.activity-card footer small {
    color: var(--text-muted);
}

.activity-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.25rem 0;
}

.badge-server {
    background: linear-gradient(135deg, #1e6fa3, #3498db);
    color: #fff;
    border-color: #3498db;
}

.badge-waitlist {
    background: linear-gradient(135deg, #b86e1a, #e67e22);
    color: #fff;
    border-color: #e67e22;
}

.badge-pending {
    background: linear-gradient(135deg, #8a6d1b, #c9a84c);
    color: #fff;
    border-color: #c9a84c;
}

.badge-today {
    background: linear-gradient(135deg, #2a7d52, #3b9e6e);
    color: #fff;
    border-color: #3b9e6e;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
}

.participant-list,
.waitlist-section {
    margin-top: 1.25rem;
}

.participant-list h3,
.waitlist-section h3 {
    font-size: 1rem;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 0.4rem;
    margin-bottom: 0.5rem;
}

.waitlist-section {
    border-top: 1px solid var(--brand-border);
    padding-top: 0.75rem;
}

.server-group-heading {
    font-size: 1.1rem;
    color: var(--brand-gold-light);
    margin: 1.5rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--brand-border);
}

/* ========================== */
/* Calendar                    */
/* ========================== */

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.calendar-day {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 6px;
    padding: 0.75rem;
    min-height: 200px;
}

.calendar-day.today {
    border-color: var(--brand-gold);
    box-shadow: 0 0 8px rgba(201, 168, 76, 0.15);
}

.calendar-day-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.calendar-day-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand-gold-light);
}

.calendar-day-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.calendar-moon {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(42, 58, 92, 0.4);
}

.calendar-moon-emoji {
    font-size: 1.1rem;
}

.calendar-moon-name {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-event {
    display: flex;
    gap: 0.3rem;
    align-items: flex-start;
    font-size: 0.75rem;
    line-height: 1.3;
    padding: 0.25rem 0.35rem;
    border-radius: 3px;
    border-left: 3px solid transparent;
}

.calendar-event-icon {
    flex-shrink: 0;
}

.calendar-event-content {
    flex: 1;
    min-width: 0;
}

.calendar-event-content a {
    color: var(--brand-gold-light);
    text-decoration: none;
}

.calendar-event-content a:hover {
    color: var(--brand-gold);
    text-decoration: underline;
}

.calendar-event-time {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Event type colors */
.calendar-event-type-casino {
    border-left-color: #c9a84c;
    background: rgba(201, 168, 76, 0.05);
}

.calendar-event-type-almanac {
    border-left-color: #3b9e6e;
    background: rgba(59, 158, 110, 0.05);
}

.calendar-event-type-poetry {
    border-left-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.calendar-event-type-special {
    border-left-color: #e67e22;
    background: rgba(230, 126, 34, 0.05);
}

.calendar-event-type-activity {
    border-left-color: #7c6bc4;
    background: rgba(124, 107, 196, 0.05);
}

.badge-server-name {
    display: inline;
    font-size: 0.65rem;
    color: #3498db;
    font-weight: 600;
}

.calendar-no-events {
    font-size: 0.75rem;
    font-style: italic;
    padding: 0.5rem 0;
}

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

    .sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        z-index: 100;
        border-right: 1px solid var(--brand-gold-dark);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    }

    .sidebar.open {
        display: block;
    }

    .sidebar-toggle {
        display: inline-block;
    }

    .main-content {
        padding: 1rem;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .mushroom-grid {
        grid-template-columns: 1fr;
    }

    .listing-detail .listing-header-row {
        flex-direction: column;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

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

    .action-cell {
        flex-direction: column;
    }

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

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-day {
        min-height: auto;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================== */
/* Favorites / Watchlist       */
/* ========================== */

.favorite-btn {
    background: transparent;
    border: 1px solid var(--brand-border);
    color: var(--text-muted);
    font-size: 1rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.favorite-btn:hover {
    border-color: #d94f4f;
    color: #d94f4f;
}

.favorite-btn.active {
    background: rgba(217, 79, 79, 0.15);
    border-color: #d94f4f;
    color: #d94f4f;
}

/* ========================== */
/* Star Ratings                */
/* ========================== */

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

.star-rating .star {
    color: var(--brand-border);
    font-size: 1rem;
}

.star-rating .star.filled {
    color: var(--brand-gold);
}

/* Star rating input (reverse order for CSS hover) */
.star-rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0;
}

.star-rating-input input[type="radio"] {
    display: none;
}

.star-rating-input .star-label {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--brand-border);
    padding: 0 0.1rem;
    transition: color 0.15s;
}

.star-rating-input .star-label:hover,
.star-rating-input .star-label:hover ~ .star-label,
.star-rating-input input[type="radio"]:checked ~ .star-label {
    color: var(--brand-gold);
}

/* Seller stats badge */
.seller-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.seller-stats-inline {
    display: inline-flex;
    gap: 0;
    font-size: 0.75rem;
}

.seller-stats-inline .star {
    color: var(--brand-border);
}

.seller-stats-inline .star.filled {
    color: var(--brand-gold);
}

/* ========================== */
/* Reviews                     */
/* ========================== */

.review-form {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 0.75rem;
}

.review-card {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.review-card p {
    margin: 0.25rem 0;
    line-height: 1.5;
}

.reviews-list {
    margin: 1rem 0;
}

/* ========================== */
/* Category Badge              */
/* ========================== */

.category-badge {
    background: linear-gradient(135deg, #2d5a3d, #3b7d52);
    color: #c8e6d0;
    border-color: #3b7d52;
}

/* ========================== */
/* Sort Select                 */
/* ========================== */

.sort-select {
    background: var(--brand-surface-light);
    border: 1px solid var(--brand-border);
    color: var(--text-primary);
}

/* ========================== */
/* Home Dashboard              */
/* ========================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.dashboard-card {
    background: var(--brand-surface);
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.dashboard-card-header h3 {
    margin: 0;
    font-size: 1rem;
}

/* Compact listing for dashboard */
.compact-listing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(42, 58, 92, 0.4);
    gap: 0.5rem;
}

.compact-listing:last-child {
    border-bottom: none;
}

.compact-listing a {
    color: var(--brand-gold-light);
    text-decoration: none;
    font-size: 0.9rem;
}

.compact-listing a:hover {
    color: var(--brand-gold);
}

/* Compact activity for dashboard */
.compact-activity {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(42, 58, 92, 0.4);
}

.compact-activity:last-child {
    border-bottom: none;
}

.compact-activity a {
    color: var(--brand-gold-light);
    text-decoration: none;
    font-size: 0.9rem;
}

.compact-activity a:hover {
    color: var(--brand-gold);
}

/* Review section on detail page */
.review-section h2 {
    font-size: 1.2rem;
    border-bottom: 1px solid var(--brand-border);
    padding-bottom: 0.4rem;
}
