/* Runicite Custom Styles */

:root {
    --ebon-bg: #14141b;
    --ebon-surface: #1e1e2a;
    --ebon-border: #343542;
    --gold: #c49a3a;
    --bg-primary: #14141b;
    --bg-secondary: #1e1e2a;
    --bg-tertiary: #252535;
    --bg-hover: #2a2a3a;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0b0;
    --text-muted: #707080;
    --border-color: #343542;
    --border: #343542;
    --color-primary: #c49a3a;
    --color-primary-hover: #d4aa4a;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #343542 #1e1e2a;
}

a {
    text-decoration: none;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: #1e1e2a;
}

*::-webkit-scrollbar-thumb {
    background-color: #343542;
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #47475a;
}

body {
    background: linear-gradient(180deg, #14141b 0%, #1e1e2a 100%);
    min-height: 100vh;
}

.font-display {
    font-family: 'Cinzel', serif;
}

.font-body {
    font-family: 'Lato', sans-serif;
}

/* Card Styles */
.card {
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: #c49a3a;
    box-shadow: 0 4px 20px rgba(196, 154, 58, 0.1);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #c49a3a 0%, #a8812e 100%);
    color: #14141b;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 154, 58, 0.3);
}

.btn-secondary {
    background: #343542;
    color: #e3e3e6;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    text-align: center;
    display: inline-block;
    border: none;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #47475a;
}

.btn-danger {
    background: rgba(127, 29, 29, 0.5);
    color: #fca5a5;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-danger:hover {
    background: rgba(127, 29, 29, 0.7);
}

.btn-xs {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 0.3rem;
    cursor: pointer;
    border: none;
}

.btn-restore {
    background: rgba(22, 101, 52, 0.5);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-restore:hover {
    background: rgba(22, 101, 52, 0.7);
}

.btn-danger-xs {
    background: rgba(127, 29, 29, 0.5);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger-xs:hover {
    background: rgba(127, 29, 29, 0.7);
}

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

.admin-table th {
    background: rgba(196, 154, 58, 0.1);
    color: #c49a3a;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #343542;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #2a2a38;
    color: #e3e3e6;
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

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

/* Role tag */
.role-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: rgba(196, 154, 58, 0.15);
    color: #c49a3a;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Small button variant */
.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}

/* Locked badge */
.badge-locked {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-radius: 9999px;
    font-size: 0.75rem;
}

/* Empty state td */
.empty-state-td {
    text-align: center;
    padding: 2rem;
    color: #8a8a8a;
}


.form-input {
    background: #14141b;
    border: 1px solid #343542;
    color: #e3e3e6;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    width: 100%;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #c49a3a;
    box-shadow: 0 0 0 3px rgba(196, 154, 58, 0.1);
}

.form-input::placeholder {
    color: #7c7c8a;
}

.form-label {
    display: block;
    color: #a4a4ac;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-entity {
    background: rgba(196, 154, 58, 0.15);
    color: #c49a3a;
}

.badge-world {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.badge-timeline {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.badge-deleted {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Hero Section */
.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23343442' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Entity Type Icons */
.entity-icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* Rich Content Styles */
.rich-content {
    line-height: 1.8;
    font-size: 1.0625rem;
}

.rich-content h1 {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #c49a3a;
    margin: 2rem 0 1rem;
}

.rich-content h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #d4a847;
    margin: 1.75rem 0 0.875rem;
}

.rich-content h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e3e3e6;
    margin: 1.5rem 0 0.75rem;
}

.rich-content p {
    margin: 1rem 0;
}

.rich-content blockquote {
    border-left: 4px solid #c49a3a;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #a4a4ac;
}

.rich-content a {
    color: #c49a3a;
    text-decoration: underline;
}

.rich-content a:hover {
    color: #d4a847;
}

.rich-content code {
    background: #14141b;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
}

.rich-content pre {
    background: #14141b;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.rich-content ul, .rich-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.rich-content li {
    margin: 0.5rem 0;
}

/* Spoiler/Collapsible */
.spoiler {
    background: #14141b;
    border: 1px solid #343542;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.spoiler-header {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.spoiler-content {
    padding: 0 1rem 1rem;
    display: none;
}

.spoiler.open .spoiler-content {
    display: block;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    z-index: 100;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background: #166534;
    border: 1px solid #22c55e;
    color: #dcfce7;
}

.toast-error {
    background: #991b1b;
    border: 1px solid #ef4444;
    color: #fee2e2;
}

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

/* Auto-save indicator */
.autosave-indicator {
    font-size: 0.75rem;
    color: #7c7c8a;
    transition: color 0.2s ease;
}

.autosave-indicator.saving {
    color: #c49a3a;
}

.autosave-indicator.saved {
    color: #22c55e;
}

.autosave-indicator {
    height: 1.25rem;
}

.danger-zone {
    background: rgba(127, 29, 29, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.danger-title {
    font-weight: 600;
    color: #fca5a5;
    margin-bottom: 0.5rem;
}

.danger-desc {
    color: #7c7c8a;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.divider {
    border: none;
    border-top: 1px solid #343542;
    margin: 2rem 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #c8c8ce;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: #14141b;
    border: 1px solid #343542;
    border-radius: 0.5rem;
    color: #e3e3e6;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #c49a3a;
    box-shadow: 0 0 0 3px rgba(196, 154, 58, 0.15);
}

.form-input::placeholder {
    color: #5c5c6d;
}

.form-input[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Internal Link Styles in Content */
.entity-link {
    color: #c49a3a;
    background: rgba(196, 154, 58, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.entity-link:hover {
    background: rgba(196, 154, 58, 0.2);
    color: #d4a847;
}

.entity-link-missing {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-decoration: none;
    opacity: 0.7;
    cursor: help;
}

/* Timeline Links in Content */
.timeline-link {
    color: #6b8e23;
    background: rgba(107, 142, 35, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.timeline-link:hover {
    background: rgba(107, 142, 35, 0.2);
    color: #8aad3a;
}

.timeline-link-missing {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-decoration: none;
    opacity: 0.7;
    cursor: help;
}

.internal-link {
    color: #c49a3a;
    background: rgba(196, 154, 58, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.internal-link:hover {
    background: rgba(196, 154, 58, 0.2);
    color: #d4a847;
}

/* Auth Pages */
.login-body {
    background: linear-gradient(180deg, #14141b 0%, #1e1e2a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    font-family: 'Lato', sans-serif;
    color: #e3e3e6;
}

.login-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23343442' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.auth-wrapper {
    width: 100%;
    max-width: 28rem;
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.auth-logo {
    font-size: 2rem;
    line-height: 1;
}

.auth-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
}

.auth-subtitle {
    color: #7c7c8a;
    font-size: 0.875rem;
}

.auth-card {
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.75rem;
    padding: 2rem;
}

.auth-heading {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #e3e3e6;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.back-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

/* Form overrides for auth */
.auth-card .form-input {
    width: 100%;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

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

.checkbox-input {
    width: 1rem;
    height: 1rem;
    accent-color: #c49a3a;
}

.checkbox-text {
    font-size: 0.875rem;
    color: #a4a4ac;
}

.link-gold {
    color: #c49a3a;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.link-gold:hover {
    color: #d4a847;
}

.btn-full {
    width: 100%;
    display: block;
    text-align: center;
    box-sizing: border-box;
}

.field-error {
    color: #f87171;
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

.field-hint {
    color: #7c7c8a;
    font-size: 0.75rem;
    margin-top: 0.375rem;
}

.inverse-hint {
    grid-column: 1 / -1;
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid #10b981;
    color: #10b981;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0 4px 4px 0;
    margin-top: 0.25rem;
    display: none;
}

.inverse-hint strong {
    font-weight: 600;
}

.alert-error {
    background: rgba(153, 27, 27, 0.5);
    border: 1px solid #ef4444;
    color: #fecaca;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: rgba(22, 101, 52, 0.5);
    border: 1px solid #22c55e;
    color: #bbf7d0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.text-muted {
    color: #7c7c8a;
    font-size: 0.875rem;
}

/* Dashboard */
.dashboard-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-welcome {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.dashboard-tagline {
    color: #7c7c8a;
    font-size: 0.875rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.75rem;
    padding: 0.875rem 1.25rem 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
}

.stat-icon {
    font-size: 1.75rem;
}

.stat-number {
    font-size: 1.375rem;
    font-weight: 700;
    color: #e3e3e6;
    margin: 0;
}

.stat-label {
    color: #7c7c8a;
    font-size: 0.875rem;
    margin: 0;
}

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

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e3e3e6;
}

.worlds-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.world-card {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.world-card:hover {
    border-color: #c49a3a;
    box-shadow: 0 4px 20px rgba(196, 154, 58, 0.1);
}

.world-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.world-icon {
    font-size: 2rem;
}

.world-name {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #e3e3e6;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.world-card:hover .world-name {
    color: #c49a3a;
}

.world-desc {
    color: #7c7c8a;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.world-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #5c5c6d;
    font-size: 0.875rem;
}

.world-card-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.world-card-type {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
    color: #7c7c8a;
}

.world-card-type .type-icon {
    font-size: 0.8rem;
}

.world-card-type .type-count {
    color: #d4af37;
    font-weight: 600;
}

.world-recent {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.world-recent-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #8a8a9a;
}

.world-recent-icon {
    font-size: 0.875rem;
}

.world-recent-name {
    color: #9a9ab0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-private {
    background: rgba(127, 29, 29, 0.5);
    color: #fca5a5;
}

.badge-public {
    background: rgba(22, 101, 52, 0.5);
    color: #86efac;
}

.world-type-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    background: rgba(196, 154, 58, 0.2);
    color: #c49a3a;
    text-transform: uppercase;
}

.empty-state {
    text-align: center;
    padding: 3rem;
}

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

.empty-title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e3e3e6;
    margin-bottom: 0.5rem;
}

.empty-desc {
    color: #7c7c8a;
    margin-bottom: 1.5rem;
}

.recent-activity {
    margin-top: 3rem;
}

.activity-list {
    overflow: hidden;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #343542;
}

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

.activity-icon {
    font-size: 1.5rem;
}

.activity-body {
    flex: 1;
}

.activity-link {
    font-weight: 600;
    color: #e3e3e6;
    text-decoration: none;
    transition: color 0.2s;
}

.activity-link:hover {
    color: #c49a3a;
}

.activity-world {
    color: #5c5c6d;
    font-size: 0.875rem;
}

.activity-time {
    color: #5c5c6d;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Dashboard trash banner */
.dashboard-trash-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding: 1.25rem 1.5rem;
    background: #26263a;
    border: 1px solid #3a3a50;
    border-radius: 0.75rem;
    gap: 1rem;
}

.dashboard-trash-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dashboard-trash-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.dashboard-trash-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.dashboard-trash-title {
    font-weight: 600;
    color: #e3e3e6;
    font-size: 0.9375rem;
}

.dashboard-trash-desc {
    font-size: 0.8125rem;
    color: #5c5c6d;
}

.dashboard-trash-btn {
    flex-shrink: 0;
}

@media (max-width: 500px) {
    .dashboard-trash-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* World page wiki-style sections */
.world-sections {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.world-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.world-section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #c49a3a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.world-section-icon {
    font-size: 1.25rem;
}

.world-section-more {
    font-size: 0.8125rem;
    color: #5c5c6d;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}

.world-section-more:hover {
    color: #c49a3a;
}

/* Entity cards by type */
.world-entity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.world-entity-card {
    display: block;
    padding: 1.125rem;
    text-decoration: none;
    transition: border-color 0.2s;
}

.world-entity-card:hover {
    border-color: rgba(196, 154, 58, 0.5);
}

.world-entity-card-inner {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.world-entity-card-icon {
    font-size: 1.375rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.world-entity-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.world-entity-card-title {
    font-weight: 600;
    color: #e3e3e6;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.world-entity-card:hover .world-entity-card-title {
    color: #c49a3a;
}

.world-entity-card-excerpt {
    font-size: 0.8125rem;
    color: #5c5c6d;
    line-height: 1.5;
    margin: 0;
}

.world-entity-card-meta {
    font-size: 0.6875rem;
    color: #3a3a50;
}

/* Timeline list (worlds show page) */
.wtl-timelines {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wtl-timeline {
    background: #1e1e2a;
    border: 1px solid #343542;
    border-left: 4px solid #454555;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.2s;
    cursor: pointer;
}

.wtl-timeline:hover {
    border-color: rgba(196, 154, 58, 0.5);
}

.wtl-title-link {
    color: inherit;
    text-decoration: none;
}

.wtl-title-link:hover {
    color: #c49a3a;
}

.wtl-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px 12px 20px;
    flex-wrap: wrap;
}

.wtl-header-info {
    flex: 1;
    min-width: 0;
}

.wtl-title {
    font-size: 1.05rem;
    margin: 0 0 4px;
    color: #e5e7eb;
}

.wtl-title a:hover {
    color: #c49a3a;
    text-decoration: underline !important;
}

.wtl-desc {
    color: #9ca3af;
    font-size: 0.83rem;
    margin: 0 0 6px;
}

.wtl-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wtl-year-range {
    color: #d4af37;
    font-size: 0.82rem;
}

.wtl-event-count {
    color: #6b7280;
    font-size: 0.8rem;
}

.wtl-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.wtl-empty-events {
    padding: 16px 20px;
    font-size: 0.85rem;
    color: #6b7280;
    border-top: 1px solid #2a2a3d;
}

.wtl-empty-events a { color: #60a5fa; }

.wtl-events-list {
    border-top: 1px solid #2a2a3d;
    padding: 0 16px 8px;
    margin-left: 14px;
}

.wtl-event-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.75rem;
    margin-bottom: 6px;
    margin-left: -16px;
    transition: background 0.1s;
}

.wtl-event-item:hover { background: #252d3d; }
.wtl-event-item.importance-minor { opacity: 0.6; }
.wtl-event-item.importance-major .wtl-ev-title { color: #f3d8a0; }
.wtl-event-item.importance-pivotal .wtl-ev-title { color: #d4af37; font-weight: 600; }

.wtl-ev-icon {
    font-size: 0.95rem;
    padding-top: 2px;
    flex-shrink: 0;
}

.wtl-ev-body { flex: 1; min-width: 0; }

.wtl-ev-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.wtl-ev-year {
    color: #d4af37;
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 45px;
}

.wtl-ev-title {
    margin: 0;
    font-size: 0.9rem;
    color: #f3f4f6;
}

.wtl-ev-title-link {
    color: #f3f4f6;
    text-decoration: none;
}

.wtl-ev-title-link:hover {
    color: #c49a3a;
    text-decoration: underline;
}

.wtl-ev-importance {
    font-size: 0.68rem;
    background: #d4af37;
    color: #000;
    padding: 1px 5px;
    border-radius: 6px;
    font-weight: 600;
}

.wtl-ev-desc {
    color: #9ca3af;
    font-size: 0.8rem;
    margin: 0 0 4px;
    line-height: 1.4;
}

.wtl-ev-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wtl-ev-type {
    font-size: 0.72rem;
    color: #9ca3af;
}

.wtl-ev-entities {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.wtl-ev-entity {
    font-size: 0.72rem;
    color: #60a5fa;
    text-decoration: none;
    white-space: nowrap;
}

.wtl-ev-entity:hover { text-decoration: underline; }

.wtl-ev-entity-more {
    font-size: 0.7rem;
    color: #9ca3af;
    font-style: italic;
}

.wtl-ev-edit {
    font-size: 0.72rem;
    color: #60a5fa;
    text-decoration: none;
    margin-left: auto;
}

.wtl-ev-edit:hover { text-decoration: underline; }

.wtl-more-events {
    display: block;
    padding: 8px 20px 12px;
    font-size: 0.8rem;
    color: #60a5fa;
    text-decoration: none;
    border-top: 1px solid #2a2a3d;
}

.wtl-more-events:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .world-entity-grid {
        grid-template-columns: 1fr;
    }
    .wtl-header {
        flex-direction: column;
        gap: 10px;
    }
    .wtl-header-actions {
        width: 100%;
    }
    .wtl-events-list {
        margin-left: 10px;
    }
    .wtl-event-item {
        margin-left: -10px;
    }
}

/* Existing entity list (recent activity) */
.entity-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.entity-item {
    display: block;
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    transition: border-color 0.2s;
}

.entity-item:hover {
    border-color: rgba(196, 154, 58, 0.5);
}

.entity-item-inner {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.entity-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.entity-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.entity-title {
    font-weight: 600;
    color: #e3e3e6;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.entity-item:hover .entity-title {
    color: #c49a3a;
}

.entity-date {
    font-size: 0.8125rem;
    color: #5c5c6d;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Entity type badge */
.badge-entity {
    font-size: 0.6875rem;
    background: #2e2e40;
    color: #5c5c6d;
    padding: 2px 8px;
    border-radius: 9999px;
    white-space: nowrap;
}

/* App Shell */
.app-body {
    background: linear-gradient(180deg, #14141b 0%, #1e1e2a 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Lato', sans-serif;
    color: #e3e3e6;
}

.app-main {
    flex: 1;
}

/* Navigation */
.app-nav {
    background: #1e1e2a;
    border-bottom: 1px solid #343542;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.nav-logo {
    font-size: 1.5rem;
    line-height: 1;
}

.nav-title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #c49a3a;
}

.nav-sep {
    color: #5c5c6d;
}

.nav-link {
    color: #c8c8ce;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.875rem;
}

.nav-link:hover {
    color: #c49a3a;
}

.nav-link-active {
    color: #c49a3a;
    font-weight: 600;
    pointer-events: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: inline-block;
}

.nav-search-form {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-search-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: #e0e0e6;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    width: 180px;
    transition: background 0.2s, border-color 0.2s;
}

.nav-search-input::placeholder {
    color: rgba(224, 224, 230, 0.45);
}

.nav-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.3);
}

.nav-search-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: #c8c8ce;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    transition: background 0.2s;
}

.nav-search-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.nav-user {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #c8c8ce;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.2s;
    font-size: 0.875rem;
}

.dropdown-trigger:hover {
    color: #c49a3a;
}

.nav-avatar {
    font-size: 1.25rem;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: #343542;
    border: 1px solid #47475a;
    border-radius: 0.5rem;
    min-width: 12rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
}

.dropdown-item {
    display: block;
    padding: 0.625rem 1rem;
    color: #c8c8ce;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.dropdown-item:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

.dropdown-item:hover {
    background: #47475a;
    color: #c49a3a;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid #47475a;
    margin: 0;
}

.dropdown-item-danger:hover {
    color: #f87171;
}

/* Footer */
.app-footer {
    background: #1e1e2a;
    border-top: 1px solid #343542;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
    color: #7c7c8a;
    font-size: 0.875rem;
}

/* World Show Page */
.world-show-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.world-cover-image {
    width: 100%;
    height: 18rem;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.world-cover-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 10%, #12121a 100%);
    pointer-events: none;
}

.world-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 1.5rem;
    display: block;
}
.world-show-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.world-show-info {
    flex: 1;
}

.world-show-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.world-show-desc {
    color: #7c7c8a;
    font-size: 0.875rem;
}

.world-show-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.world-show-layout {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
}

.world-sidebar {
    min-width: 0;
}

.sticky-sidebar {
    position: sticky;
    top: 5rem;
}

.sidebar-card {
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.sidebar-section-title {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 0.875rem;
    color: #c8c8ce;
    margin-bottom: 0.75rem;
}

.sidebar-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.sidebar-stat-label {
    color: #7c7c8a;
}

.sidebar-stat-value {
    font-weight: 600;
    color: #e3e3e6;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid #343542;
    margin: 1rem 0;
}

.sidebar-type-list {
    display: flex;
    flex-direction: column;
}

.sidebar-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    color: #a4a4ac;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.sidebar-type-item:hover {
    color: #c49a3a;
}

.sidebar-type-count {
    color: #5c5c6d;
}

.world-main {
    min-width: 0;
}

.world-main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.entity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.entity-item {
    display: block;
    padding: 1rem;
    transition: border-color 0.2s;
}

.entity-item:hover {
    border-color: rgba(196, 154, 58, 0.5);
}

.entity-item-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.entity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.entity-item-body {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.entity-title {
    font-weight: 600;
    color: #e3e3e6;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entity-item:hover .entity-title {
    color: #c49a3a;
}

.entity-date {
    color: #5c5c6d;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Entity Pages */
.entities-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.entities-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.entities-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.entities-page-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.25rem;
}

.entities-count {
    color: #7c7c8a;
    font-size: 0.875rem;
}

.entity-type-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #343542;
    color: #c8c8ce;
    text-decoration: none;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #47475a;
}

.filter-btn-active {
    background: #c49a3a;
    color: #14141b;
}

/* ---- Type Filter Modal ---- */

.type-filter-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.type-filter-modal.type-filter-modal-open {
    display: flex;
}

.type-filter-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 18, 0.85);
    backdrop-filter: blur(4px);
}

.type-filter-modal-content {
    position: relative;
    z-index: 1;
    background: #22222f;
    border: 1px solid #3a3a50;
    border-radius: 0.75rem;
    width: 90%;
    max-width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.type-filter-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #3a3a50;
    flex-shrink: 0;
}

.type-filter-modal-title {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: #c49a3a;
    margin: 0;
}

.type-filter-modal-close {
    background: none;
    border: none;
    color: #5c5c6d;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 0.25rem;
    transition: color 0.2s;
}

.type-filter-modal-close:hover {
    color: #c8c8ce;
}

.type-filter-modal-search {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #2e2e40;
    flex-shrink: 0;
}

.type-filter-search-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #3a3a50;
    border-radius: 0.5rem;
    background: #14141b;
    color: #e3e3e6;
    font-size: 0.9375rem;
    font-family: 'Lato', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.type-filter-search-input:focus {
    outline: none;
    border-color: #c49a3a;
}

.type-filter-modal-body {
    overflow-y: auto;
    padding: 0.75rem 0;
    flex: 1;
}

.type-filter-category {
    padding: 0.5rem 0;
}

.type-filter-category-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5c5c6d;
    padding: 0.375rem 1.5rem;
    margin: 0;
}

.type-filter-types {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.type-filter-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    color: #c8c8ce;
    font-size: 0.9rem;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}

.type-filter-item:hover {
    background: #2e2e40;
    color: #e3e3e6;
}

.type-filter-item.type-filter-item-active {
    background: rgba(196, 154, 58, 0.12);
    border-left-color: #c49a3a;
    color: #c49a3a;
}

.type-filter-item-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}

.type-filter-item-name {
    flex: 1;
}

.type-filter-item-count {
    font-size: 0.75rem;
    color: #9a9ab0;
    background: #2e2e40;
    border-radius: 9999px;
    padding: 1px 7px;
    min-width: 1.5rem;
    text-align: center;
}

.type-filter-item-count-empty {
    color: #3a3a50;
}

/* Filter button active dot indicator */
.filter-btn-modal {
    border: none;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
}

.filter-active-indicator {
    color: #c49a3a;
    font-size: 1.25rem;
    line-height: 1;
    margin-left: 2px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .type-filter-modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

.entities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.entity-card {
    display: block;
    padding: 1.25rem;
    text-decoration: none;
    transition: border-color 0.2s;
}

.entity-card:hover {
    border-color: rgba(196, 154, 58, 0.5);
}

.entity-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.entity-card-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.entity-card-body {
    flex: 1;
    min-width: 0;
}

.entity-card-title {
    font-weight: 600;
    color: #e3e3e6;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entity-card:hover .entity-card-title {
    color: #c49a3a;
}

.entity-card-words {
    color: #5c5c6d;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Entity Form */
.entity-form-container {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.timeline-form-container {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.event-form-container {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* --- Entity Avatar --- */
.entity-avatar-upload {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.entity-avatar-preview {
    flex-shrink: 0;
}

.entity-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #343542;
    display: block;
}

.entity-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #2a2a3a;
    border: 2px dashed #47475a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #5c5c6d;
}

.entity-avatar-info {
    flex: 1;
}

.entity-avatar-info h4 {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #c8c8ce;
}

.entity-avatar-info p {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    color: #5c5c6d;
}

.entity-avatar-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.entity-avatar-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #343542;
    color: #c8c8ce;
    border: 1px solid #47475a;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.entity-avatar-upload-btn:hover {
    background: #47475a;
    border-color: #c49a3a;
    color: #c49a3a;
}

.entity-avatar-remove-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: #8b949e;
    border: 1px solid #343542;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.entity-avatar-remove-btn:hover {
    color: #e05c5c;
    border-color: #e05c5c;
}

.entity-avatar-input {
    display: none;
}

/* Avatar shown in entity show header */
.entity-header-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #343542;
    flex-shrink: 0;
}

/* Cropper Modal */
.avatar-cropper-wrapper {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    background: rgba(0, 0, 0, 0.85) !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    opacity: 1 !important;
}

.cropper-crop-box {
    border: 2px solid rgba(35, 134, 54, 0.9) !important;
}

.cropper-crop-box::before {
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55) !important;
}

.cropper-line {
    border-color: rgba(35, 134, 54, 0.5) !important;
}

.cropper-point {
    background: rgba(35, 134, 54, 0.8) !important;
    width: 10px !important;
    height: 10px !important;
    opacity: 1 !important;
}

.cropper-inner {
    position: relative !important;
    z-index: 1;
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 560px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cropper-header h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #c9d1d9;
}

.cropper-hint {
    margin: 0;
    font-size: 0.75rem;
    color: #8b949e;
}

.cropper-canvas-wrapper {
    overflow: hidden;
    background: #121212;
    border-radius: 0.375rem;
    position: relative !important;
    max-height: 70vh;
}

.cropper-canvas-wrapper img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
}

/* Cropper.js overrides — STRIP EVERYTHING, let library handle it */

.cropper-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    position: relative;
    z-index: 10001 !important;
    pointer-events: auto !important;
}

.cropper-cancel-btn,
.cropper-confirm-btn {
    pointer-events: auto !important;
    position: relative;
    z-index: 10002;
}

.cropper-cancel-btn,
.cropper-confirm-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    border: 1px solid #343542;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
}

.cropper-cancel-btn {
    background: #1e1e2a;
    color: #c9d1d9;
}

.cropper-cancel-btn:hover {
    background: #2a2a3e;
}

.cropper-confirm-btn {
    background: #238636;
    color: #fff;
    border-color: #238636;
}

.cropper-confirm-btn:hover {
    background: #2ea043;
}

.entity-show-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.entity-show-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.entity-show-icon {
    font-size: 2.5rem;
}

.entity-form-header {
    margin-bottom: 1.5rem;
}

.timeline-form-header {
    margin-bottom: 1.5rem;
}

.timeline-form-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.timeline-form-subtitle {
    color: #7c7c8a;
    font-size: 0.875rem;
}

.entity-form-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.entity-form-subtitle {
    color: #7c7c8a;
    font-size: 0.875rem;
}

.entity-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: #14141b;
    border: 1px solid #343542;
    border-radius: 0.5rem;
    color: #e3e3e6;
    font-size: 0.875rem;
    font-family: inherit;
    min-height: 8rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.form-textarea:focus {
    outline: none;
    border-color: #c49a3a;
    box-shadow: 0 0 0 3px rgba(196, 154, 58, 0.15);
}

.form-textarea::placeholder {
    color: #5c5c6d;
}

.form-textarea[readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Select / Dropdown Dark Theme */
.form-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: #14141b;
    border: 1px solid #343542;
    border-radius: 0.5rem;
    color: #e3e3e6;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a4a4ac' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.5rem;
    transition: border-color 0.2s ease;
}

.form-select:focus {
    outline: none;
    border-color: #c49a3a;
    box-shadow: 0 0 0 3px rgba(196, 154, 58, 0.15);
}

.form-select option {
    background: #1e1e2a;
    color: #e3e3e6;
}

/* Form Hint Text */
.form-hint {
    display: block;
    font-size: 0.8rem;
    color: #7c7c8a;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Card Internal Padding */
.card {
    padding: 1.5rem;
}

.rich-editor {
    min-height: 24rem;
}

.word-counter {
    text-align: right;
    font-size: 0.75rem;
    color: #5c5c6d;
    margin-top: 0.25rem;
}

/* CKEditor Dark Theme - Aggressive Overrides */
.ck.ck-editor,
.ck.ck-editor__editable,
.ck.ck-toolbar,
.ck.ck-dropdown__panel,
.ck.ck-list {
    background: #1e1e2a !important;
    border-color: #343542 !important;
    color: #e0d8c8 !important;
}

.ck.ck-editor__editable {
    background: #1a1a28 !important;
    color: #e0d8c8 !important;
    min-height: 24rem;
}

.ck.ck-toolbar {
    background: #252535 !important;
    border-bottom: 1px solid #343542 !important;
}

.ck.ck-toolbar .ck-toolbar__items button,
.ck.ck-toolbar .ck-toolbar__items .ck-button {
    color: #e0d8c8 !important;
}

.ck.ck-button:hover:not(.ck-disabled),
.ck.ck-button.ck-button-on:hover,
.ck.ck-toolbar .ck-toolbar__items button:hover,
.ck.ck-toolbar .ck-toolbar__items .ck-button:hover {
    background: #343542 !important;
    color: #e0d8c8 !important;
}

.ck.ck-button.ck-button-on {
    background: #343542 !important;
    color: #c49a3a !important;
}

.ck.ck-dropdown__panel {
    background: #252535 !important;
    border: 1px solid #343542 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5) !important;
}

.ck.ck-list {
    background: #252535 !important;
}

.ck.ck-list__item:hover {
    background: #343542 !important;
}

.ck.ck-editor__editable:focus {
    border-color: #c49a3a !important;
    box-shadow: 0 0 0 2px rgba(196, 154, 58, 0.2) !important;
}

.ck.ck-input-text {
    background: #1a1a28 !important;
    color: #e0d8c8 !important;
    border-color: #343542 !important;
}

.ck.ck-labeled-input .ck.ck-input-text {
    background: #1a1a28 !important;
    color: #e0d8c8 !important;
}

/* Entity link button in toolbar */
.ck-link-btn {
    background: #343542 !important;
    border: 1px solid #c49a3a !important;
    color: #c49a3a !important;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    margin-left: 0.25rem;
}

.ck-link-btn:hover {
    background: #c49a3a !important;
    color: #1a1a28 !important;
}

.form-tip {
    color: #5c5c6d;
    font-size: 0.875rem;
}

.form-footer {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 1rem;
    border-top: 1px solid #343542;
    gap: 0.75rem;
    flex-direction: column;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* World Form */
.world-form-container {
    max-width: 42rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.world-form-header {
    margin-bottom: 1.5rem;
}

.world-form-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.world-form-subtitle {
    color: #7c7c8a;
    font-size: 0.875rem;
}

.world-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cover-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cover-preview img {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #343542;
}

.cover-upload-area {
    border: 2px dashed #343542;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.cover-upload-area:hover {
    border-color: #c49a3a;
}

.cover-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: #343542;
    color: #c8c8ce;
    border: 1px solid #47475a;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.cover-upload-btn:hover {
    background: #47475a;
    border-color: #c49a3a;
    color: #c49a3a;
}

.cover-input {
    display: none;
}

.upload-hint {
    color: #7c7c8a;
    font-size: 0.8rem;
    margin: 0.25rem 0 0;
}

/* Worlds Page */
.worlds-page-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.worlds-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.worlds-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.worlds-search-form {
    display: flex;
    align-items: center;
}

.worlds-search-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: #e0e0e6;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
    width: 200px;
    transition: background 0.2s, border-color 0.2s;
}

.worlds-search-input::placeholder {
    color: rgba(224, 224, 230, 0.45);
}

.worlds-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.3);
}

.worlds-search-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    border-radius: 0 4px 4px 0;
    color: #c8c8ce;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    transition: background 0.2s;
}

.worlds-search-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.worlds-search-results,
.worlds-empty-search {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.worlds-search-results {
    background: rgba(196, 154, 58, 0.1);
    border: 1px solid rgba(196, 154, 58, 0.3);
    color: #c49a3a;
}

.worlds-empty-search {
    background: rgba(255, 100, 100, 0.08);
    border: 1px solid rgba(255, 100, 100, 0.2);
    color: #cc8080;
}

.search-section {
    margin-bottom: 2rem;
}

.search-section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #343542;
}

.event-search-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.entity-excerpt {
    color: #7c7c8a;
    font-size: 0.8rem;
    margin-top: 2px;
    line-height: 1.4;
}

.world-timeline-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
}

.worlds-page-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.25rem;
}

.worlds-page-subtitle {
    color: #7c7c8a;
    font-size: 0.875rem;
}

.world-updated {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #343542;
    color: #5c5c6d;
    font-size: 0.75rem;
}

/* Export Page */
.export-page {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.export-header {
    margin-bottom: 2rem;
}

.export-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.25rem;
}

.export-subtitle {
    color: #7c7c8a;
    font-size: 0.875rem;
}

.export-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.export-card {
    padding: 1.5rem;
}

.export-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.export-card-title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e3e3e6;
    margin-bottom: 0.75rem;
}

.export-card-desc {
    color: #9a9ab0;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.export-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.export-back {
    padding-top: 1.5rem;
    border-top: 1px solid #343542;
}

.export-back-link {
    color: #7c7c8a;
    text-decoration: none;
    font-size: 0.9rem;
}

.export-back-link:hover {
    color: #c49a3a;
}

/* Entity Show Page */
.entity-show-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.entity-show-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.entity-show-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.entity-show-icon {
    font-size: 2.5rem;
}

.entity-show-title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.entity-show-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
}

.entity-show-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

.entity-show-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
}

.entity-show-main {
    min-width: 0;
}

.entity-show-card {
    padding: 1.5rem;
}

.entity-show-image {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    object-position: top;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.entity-show-content {
    margin-bottom: 2rem;
}

.empty-lore {
    color: #5c5c6d;
    font-style: italic;
}

.entity-show-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #343542;
}

.tag {
    background: #343542;
    color: #c8c8ce;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.entity-show-backlinks {
    padding: 1.5rem;
    margin-top: 1.5rem;
}

/* Event Show Page */
.event-show-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.event-show-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.event-show-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.event-show-icon {
    font-size: 2.5rem;
}

.event-show-title-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-show-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
}

.event-show-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.event-show-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
}

.event-show-main {
    min-width: 0;
}

.event-show-card {
    padding: 1.5rem;
}

.event-meta-block {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #343542;
}

.event-year-display {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.event-year-label {
    font-size: 0.75rem;
    color: #7c7c8a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-year-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #d4af37;
}

.event-description-block {
    margin-top: 1rem;
}

.event-description-text {
    color: #d1d5db;
    line-height: 1.6;
    white-space: pre-wrap;
}

.badge-event-type {
    background: #374151;
    color: #d1d5db;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.event-show-linked {
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.linked-entity-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.linked-entity-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #2d2d3f;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #d1d5db;
    transition: background 0.2s;
}

.linked-entity-item:hover {
    background: #3d3d4f;
}

.linked-entity-icon {
    font-size: 1rem;
}

.linked-entity-title {
    flex: 1;
}

.backlink-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.backlink-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: #a4a4ac;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.backlink-item:hover {
    background: #343542;
    color: #c49a3a;
}

.entity-show-sidebar {
    min-width: 0;
}

.entity-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #5c5c6d;
    font-size: 0.875rem;
}

.no-relationships {
    color: #5c5c6d;
    font-size: 0.875rem;
}

.relationship-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.relationship-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 0.375rem;
    color: #a4a4ac;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: color 0.2s;
}

.relationship-item:hover {
    color: #c49a3a;
}

.relationship-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.relationship-type {
    color: #5c5c6d;
    font-size: 0.75rem;
}

.revision-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Entity Timeline Events (sidebar section) */
.entity-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.entity-timeline-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.entity-timeline-tl-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #d4d4d8;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 2px 0;
}

.entity-timeline-tl-link:hover {
    color: #c49a3a;
}

.entity-timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.entity-timeline-tl-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entity-timeline-event-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.75rem;
    padding: 2px 0 2px 14px;
}

.entity-timeline-event-item:hover {
    color: #e5e7eb;
}

.entity-timeline-ev-year {
    color: #6b7280;
    font-style: italic;
    flex-shrink: 0;
    font-size: 0.72rem;
}

.entity-timeline-ev-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.revision-btn {
    background: none;
    border: none;
    color: #a4a4ac;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem;
    text-align: left;
    transition: color 0.2s;
}

.revision-btn:hover {
    color: #c49a3a;
}

@media (max-width: 1024px) {
    .entity-show-layout {
        grid-template-columns: 1fr;
    }

    .entity-show-header {
        flex-direction: column;
        gap: 1rem;
    }

    .sticky-sidebar {
        position: static;
    }

    .entities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .worlds-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .world-show-layout {
        grid-template-columns: 1fr;
    }

    .world-show-header {
        flex-direction: column;
    }

    .event-show-layout {
        grid-template-columns: 1fr;
    }

    .event-show-header {
        flex-direction: column;
        gap: 1rem;
    }

    .event-show-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .entities-grid {
        grid-template-columns: 1fr;
    }

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

    .form-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .form-actions {
        width: 100%;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        flex: 1;
    }

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

    .worlds-page-header {
        flex-direction: column;
        gap: 1rem;
    }

    .world-show-actions {
        flex-wrap: wrap;
    }

    .entity-item-inner {
        flex-wrap: wrap;
    }

    .entity-date {
        width: 100%;
        margin-left: 2.5rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-form-container,
    .timeline-form-container {
        padding: 1rem 0.75rem;
    }

    .event-show-actions,
    .timeline-show-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

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

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

/* Trash page */
.trash-container {
    max-width: 900px;
    margin: 0 auto;
}

.trash-header {
    margin-bottom: 2rem;
}

.trash-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.trash-subtitle {
    color: #8a8a8a;
    font-size: 0.9rem;
}

.trash-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.trash-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.trash-item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.trash-item-body {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.trash-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e8dcc8;
    margin: 0;
}

.trash-item-deleted {
    color: #8a8a8a;
    font-size: 0.85rem;
}

.trash-item-days {
    color: #8a8a8a;
    font-size: 0.85rem;
}

.trash-item-days-warning {
    color: #e74c3c;
}

.trash-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.trash-item-actions .btn-xs {
    padding: 4px 10px;
    font-size: 0.78rem;
    background: #374151;
    color: #e5e7eb;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    line-height: 1.4;
}

.trash-item-actions .btn-restore {
    background: rgba(22, 101, 52, 0.85);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.trash-item-actions .btn-restore:hover {
    background: #166534;
}

.trash-item-actions .btn-danger-xs {
    background: rgba(127, 29, 29, 0.85);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.trash-item-actions .btn-danger-xs:hover {
    background: #991b1b;
}

.nav-trash-link {
    color: #c49a3a !important;
}

/* Global Search */
.search-form {
    margin-bottom: 2rem;
}

.search-input-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: #c49a3a;
    background: rgba(255, 255, 255, 0.08);
}

.search-content-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #94a3b8;
    font-size: 0.9rem;
    cursor: pointer;
}

.search-content-toggle input {
    accent-color: #c49a3a;
}

.search-hint {
    text-align: center;
    color: #64748b;
    padding: 2rem;
}

.search-results-header {
    margin-bottom: 1rem;
}

.search-results-count {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* Nav Mobile (hamburger) */
.nav-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #c8c8ce;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: color 0.2s, background 0.2s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    align-items: center;
}

.nav-mobile-toggle:hover {
    color: #c49a3a;
    background: rgba(255,255,255,0.08);
}

.nav-mobile-toggle:active {
    background: rgba(255,255,255,0.15);
}

.nav-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
    pointer-events: none;
}

.nav-mobile-overlay.open {
    display: block;
}

.nav-drawer-close {
    display: none;
    background: none;
    border: none;
    color: #5c5c6d;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    text-align: right;
    width: 100%;
}

.nav-drawer-close:hover {
    color: #c8c8ce;
}

/* =====================
   MOBILE NAV MEDIA QUERY
   ===================== */
@media (max-width: 768px) {
    /* Show hamburger toggle */
    .nav-mobile-toggle {
        display: flex !important;
    }

    /* Collapse right nav into a fixed drawer */
    #navRight {
        position: fixed !important;
        top: 0 !important;
        right: -300px !important;
        width: 260px !important;
        height: 100vh !important;
        background: #1e1e2a !important;
        border-left: 1px solid #343542 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 1rem 0 !important;
        z-index: 200 !important;
        overflow-y: auto !important;
        transition: right 0.25s ease !important;
    }

    #navRight.open {
        right: 0 !important;
    }

    #navRight .nav-search-form {
        width: 100%;
        padding: 0 1rem;
        margin-bottom: 0.5rem;
    }

    #navRight .nav-search-input {
        width: 100%;
    }

    #navRight .nav-btn {
        display: block;
        text-align: center;
        margin: 0 1rem 0.5rem;
    }

    #navRight .nav-user {
        padding: 0 1rem;
    }

    #navRight .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        border: 1px solid #47475a !important;
        margin-top: 0.25rem !important;
    }

    #navRight .dropdown-trigger {
        width: 100%;
        justify-content: flex-start;
    }

    /* Nav close button inside the drawer */
    #navDrawerClose {
        display: block;
    }
}

/* Admin Users page */
.admin-users-container {
    max-width: 1100px;
    margin: 0 auto;
}

.admin-users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.admin-users-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.25rem;
}

.admin-users-subtitle {
    color: #8a8a8a;
    font-size: 0.9rem;
}

.admin-users-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem;
}

.admin-users-search .form-input {
    flex: 1;
}

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

.admin-users-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: #8a8a8a;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #343542;
}

.admin-users-table td {
    padding: 0.75rem 1rem;
    color: #e8dcc8;
    font-size: 0.9rem;
    border-bottom: 1px solid #2a2a38;
    vertical-align: middle;
}

.admin-users-table tr:last-child td {
    border-bottom: none;
}

.admin-users-table tr:hover td {
    background: #26263a;
}

/* Admin Dashboard page */
.admin-dashboard-container {
    max-width: 900px;
    margin: 0 auto;
}

.admin-dashboard-header {
    margin-bottom: 2rem;
}

.admin-dashboard-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.admin-dashboard-subtitle {
    color: #8a8a8a;
    font-size: 0.95rem;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.admin-dashboard-card {
    display: flex;
    flex-direction: column;
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.75rem;
    padding: 1.75rem;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.admin-dashboard-card:hover {
    border-color: #c49a3a;
    background: #26263a;
}

.admin-dashboard-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.admin-dashboard-card h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e8dcc8;
    margin-bottom: 0.5rem;
}

.admin-dashboard-card p {
    color: #8a8a8a;
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.admin-dashboard-card .card-link {
    color: #c49a3a;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Admin Search page */
.admin-page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-page-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.admin-page-subtitle {
    color: #8a8a8a;
    font-size: 0.95rem;
    margin: 0;
}

.admin-search-container {
    max-width: 1100px;
    margin: 0 auto;
}

.admin-search-header {
    margin-bottom: 2rem;
}

.admin-search-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.admin-search-subtitle {
    color: #8a8a8a;
    font-size: 0.95rem;
}

.admin-search-form-card {
    padding: 1.5rem;
}

.admin-search-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.admin-search-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.admin-search-form .form-group {
    min-width: 140px;
}

.admin-search-form .flex-1 {
    flex: 1;
    min-width: 200px;
}

.admin-search-form select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 8px;
    color: #e3e3e6;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a8a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.admin-search-form select:focus {
    outline: none;
    border-color: #c49a3a;
    box-shadow: 0 0 0 2px rgba(196, 154, 58, 0.2);
}

.admin-search-results-card {
    overflow-x: auto;
}

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

.admin-search-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    color: #8a8a8a;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #343542;
}

.admin-search-table td {
    padding: 0.75rem 1rem;
    color: #e8dcc8;
    font-size: 0.9rem;
    border-bottom: 1px solid #2a2a38;
    vertical-align: middle;
}

.admin-search-table tr:last-child td {
    border-bottom: none;
}

.admin-search-table tr:hover td {
    background: #26263a;
}

.admin-search-table td a {
    color: #e8dcc8;
    text-decoration: none;
    font-weight: 500;
}

.admin-search-table td a:hover {
    color: #f0c060;
    text-decoration: underline;
}

.actions-cell {
    white-space: nowrap;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: #4a2c2c;
    color: #e74c3c;
    border: 1px solid #7a3c3c;
}

.badge-moderator {
    background: #2c3e50;
    color: #3498db;
    border: 1px solid #3d5a73;
}

.badge-user {
    background: #2c382c;
    color: #27ae60;
    border: 1px solid #3c5a3c;
}

/* Status dot */
.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.status-dot::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-active {
    color: #27ae60;
}

.status-active::before {
    background: #27ae60;
}

.status-inactive {
    color: #8a8a8a;
}

.status-inactive::before {
    background: #8a8a8a;
}

/* Inline forms in table */
.inline {
    display: inline;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pagination-info {
    color: #8a8a8a;
    font-size: 0.9rem;
}

/* User form */
.user-form {
    padding: 1.5rem;
}

.user-form .form-group {
    margin-bottom: 1.25rem;
}

/* =====================================================
   ATLAS STYLES
   ===================================================== */

.atlases-page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.atlases-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.atlases-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #e3e3e6;
    margin: 0 0 0.25rem;
}

.atlases-page-subtitle {
    color: #7c7c8a;
    margin: 0;
    font-size: 0.9rem;
}

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

.atlas-card {
    display: block;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.atlas-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.atlas-card-map {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #14141b;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.atlas-card-placeholder {
    font-size: 3rem;
    opacity: 0.4;
}

.atlas-card-body {
    padding: 1rem;
}

.atlas-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e3e3e6;
    margin: 0 0 0.5rem;
}

.atlas-card-desc {
    color: #7c7c8a;
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.atlas-card-meta {
    color: #7c7c8a;
    font-size: 0.8rem;
}

/* Atlas Show */
.atlas-show-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.atlas-show-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.atlas-show-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e3e3e6;
    margin: 0 0 0.25rem;
}

.atlas-show-desc {
    color: #7c7c8a;
    margin: 0;
    font-size: 0.9rem;
}

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

.atlas-map-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 0 0 0.75rem 0.75rem;
    overflow: auto;
    border: 1px solid #343542;
    border-top: none;
    margin-bottom: 1.5rem;
    max-height: 80vh;
}

.atlas-map-image {
    display: block;
    max-width: 100%;
    height: auto;
}

.atlas-markers-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.atlas-map-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 0;
    background: var(--pin-color, #d4af37);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 10;
}

.atlas-map-pin:hover {
    transform: translate(-50%, -100%) scale(1.2);
    z-index: 20;
}

.atlas-map-pin-temp {
    opacity: 0.8;
    animation: pin-bounce 0.4s ease-out;
}

@keyframes pin-bounce {
    0%   { transform: translate(-50%, -80%) scale(0.5); opacity: 0; }
    60%  { transform: translate(-50%, -110%) scale(1.1); }
    100% { transform: translate(-50%, -100%) scale(1); opacity: 0.8; }
}

.atlas-click-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20,20,27,0.9);
    color: #d4af37;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    border: 1px solid #d4af37;
    pointer-events: none;
    z-index: 30;
}

.atlas-legend {
    padding: 0.5rem 0.75rem;
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.5rem 0.5rem 0 0;
    font-size: 0.8rem;
    color: #b0b0bc;
    text-align: center;
    border-bottom: none;
}

.atlas-empty-map {
    text-align: center;
    padding: 3rem;
    margin-bottom: 1.5rem;
}

/* Marker List */
.atlas-marker-list {
    margin-top: 1.5rem;
}

.atlas-marker-list-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e3e3e6;
    margin: 0 0 1rem;
}

.atlas-marker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.atlas-marker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}

.atlas-marker-pin {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.atlas-marker-body {
    flex: 1;
    min-width: 0;
}

.atlas-marker-entity-link {
    display: block;
    font-weight: 600;
    color: #e3e3e6;
    text-decoration: none;
    font-size: 0.9rem;
}

.atlas-marker-entity-link:hover {
    color: #d4af37;
}

.atlas-marker-title {
    display: block;
    font-weight: 600;
    color: #e3e3e6;
    font-size: 0.9rem;
}

.atlas-marker-type {
    display: block;
    color: #7c7c8a;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.atlas-marker-coords {
    display: block;
    color: #7c7c8a;
    font-size: 0.75rem;
    font-family: monospace;
}

.atlas-marker-actions {
    display: flex;
    align-items: center;
}

/* Create/Edit */
.atlas-create-container,
.atlas-edit-container {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.atlas-create-header,
.atlas-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.atlas-create-title,
.atlas-edit-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e3e3e6;
    margin: 0;
}

.atlas-create-card,
.atlas-edit-card {
    padding: 1.5rem;
}

.atlas-edit-preview {
    margin-top: 0.75rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #343542;
}

.atlas-edit-preview-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

.modal-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
}

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

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e3e3e6;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #7c7c8a;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
}

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

/* Autocomplete */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0 0 0.5rem 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
}

.autocomplete-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #e3e3e6;
}

.autocomplete-item:hover {
    background: #2a2a3d;
}

/* === Atlas Page Styles === */
.atlas-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    position: relative;
}

.atlas-form-row {
    display: flex;
    gap: 1rem;
}

.atlas-form-group-inline {
    flex: 1;
}

.atlas-form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #c4c4cc;
    margin-bottom: 0.25rem;
}

.atlas-form-label-sm {
    font-size: 0.75rem;
    color: #7c7c8a;
    margin-bottom: 0.2rem;
}

.atlas-form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 0.5rem;
    color: #e6edf3;
    font-size: 0.9375rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.atlas-form-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.atlas-form-input.input-error {
    border-color: #f85149;
}

.atlas-form-error {
    font-size: 0.8125rem;
    color: #f85149;
    margin-top: 0.25rem;
}

.atlas-form-hint {
    font-size: 0.8125rem;
    color: #7c7c8a;
    margin-top: 0.25rem;
}

.atlas-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* === Atlas Page Layout === */
.atlases-page-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.atlases-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.atlases-page-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    align-items: center;
}

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

.atlas-card {
    background: #1e1e2a;
    border: 1px solid #343542;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.atlas-card:hover {
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}

.atlas-card-preview {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: #161b22;
}

.atlas-card-preview-placeholder {
    width: 100%;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #161b22;
    color: #3d3d4d;
    font-size: 3rem;
}

.atlas-card-body {
    padding: 1rem;
}

.atlas-card-title {
    font-family: 'Cinzel', serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 0.5rem;
}

.atlas-card-desc {
    font-size: 0.875rem;
    color: #7c7c8a;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.atlas-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid #2a2a3d;
}

.atlas-card-stats {
    font-size: 0.8125rem;
    color: #7c7c8a;
}

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

.atlases-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #7c7c8a;
}

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

.atlases-empty-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #c4c4cc;
    margin-bottom: 0.5rem;
}

.atlases-empty-desc {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* === Atlas Show Page === */
.atlas-show-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.atlas-show-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.atlas-show-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    color: #d4af37;
    margin-bottom: 0.5rem;
}

.atlas-show-desc {
    color: #7c7c8a;
    font-size: 0.9375rem;
    max-width: 60ch;
}

.atlas-show-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

.atlas-map-wrapper {
    position: relative;
    width: 100%;
    border-radius: 0 0 0.75rem 0.75rem;
    overflow: auto;
    background: #161b22;
    border: 1px solid #343542;
    border-top: none;
    margin-bottom: 2rem;
    max-height: 80vh;
}

.atlas-map-image {
    width: 100%;
    height: auto;
    display: block;
    max-height: 70vh;
    object-fit: contain;
}

.atlas-markers-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.atlas-map-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    width: 22px;
    height: 22px;
    background: var(--pin-color, #d4af37);
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.15s;
    z-index: 10;
}

.atlas-map-pin::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--pin-color, #d4af37);
}

.atlas-map-pin:hover {
    transform: translate(-50%, -100%) scale(1.15);
    z-index: 20;
}

.atlas-pin-icon {
    font-size: 0.6rem;
    line-height: 1;
}

.atlas-click-hint {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 30;
}

.atlas-empty-map {
    text-align: center;
    padding: 4rem 2rem;
    margin-bottom: 2rem;
}

.atlas-marker-list {
    margin-top: 2rem;
}

.atlas-marker-list-title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    color: #d4af37;
    margin-bottom: 1rem;
}

.atlas-marker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.atlas-marker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}

.atlas-marker-pin {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.2);
}

.atlas-marker-body {
    flex: 1;
    min-width: 0;
}

.atlas-marker-title,
.atlas-marker-entity-link {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #e6edf3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
}

.atlas-marker-entity-link:hover {
    color: #d4af37;
}

.atlas-marker-type {
    font-size: 0.75rem;
    color: #7c7c8a;
    text-transform: capitalize;
}

.atlas-marker-coords {
    font-size: 0.75rem;
    color: #5c5c6a;
    display: block;
}

.atlas-marker-actions {
    flex-shrink: 0;
}

/* === Atlas Form Pages === */
.atlas-form-container {
    max-width: 56rem;
    margin: 0 auto;
    padding: 2rem 1rem;
}

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

.atlas-form-title {
    font-family: 'Cinzel', serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #c49a3a;
    margin-bottom: 0.5rem;
}

.atlas-edit-preview {
    margin-top: 0.75rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #343542;
    max-height: 200px;
}

.atlas-edit-preview-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* === Image Upload Widget === */
.atlas-upload-widget {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.atlas-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #2a2a3d;
    border: 1px solid #343542;
    border-radius: 0.5rem;
    color: #c4c4cc;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.atlas-upload-btn:hover {
    background: #323248;
    border-color: #d4af37;
    color: #e6edf3;
}

.atlas-upload-btn input[type="file"] {
    display: none;
}

.atlas-upload-status {
    font-size: 0.8125rem;
    color: #7c7c8a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.atlas-upload-status.uploading {
    color: #d4af37;
}

.atlas-upload-status.success {
    color: #50c878;
}

.atlas-upload-status.error {
    color: #f85149;
}

.atlas-image-preview-thumb {
    max-width: 200px;
    max-height: 120px;
    border-radius: 0.5rem;
    border: 1px solid #343542;
    margin-top: 0.5rem;
    display: block;
}


/* =====================================================
   FORUM SETTINGS PAGE
   ===================================================== */
.admin-forum-settings-container {
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.admin-forum-settings-header {
    margin-bottom: 1.5rem;
}

.admin-forum-settings-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.admin-forum-settings-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.forum-settings-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.settings-section {
    padding: 1rem 0;
}

.settings-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.settings-info {
    flex: 1;
}

.settings-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.2rem;
}

.settings-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.settings-extra {
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.form-label-sm {
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.form-input-sm {
    width: 80px;
    padding: 0.25rem 0.4rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

.form-input-sm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========================
   Admin pages extra styles
   ======================== */

/* Actions cell in admin tables */
.actions-cell {
    white-space: nowrap;
}

/* Thread title link in admin */
.thread-title-link {
    color: #e3e3e6;
    font-weight: 600;
    text-decoration: none;
}
.thread-title-link:hover {
    color: #c49a3a;
    text-decoration: underline;
}

/* Thread meta info */
.thread-meta {
    font-size: 0.8rem;
    color: #8a8a8a;
    margin-top: 0.25rem;
}

/* Badge variants */
.badge-pinned {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    background: rgba(196, 154, 58, 0.15);
    color: #c49a3a;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.badge-pending {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    background: rgba(234, 179, 8, 0.15);
    color: #facc15;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.badge-resolved {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.badge-dismissed {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    background: rgba(100, 100, 100, 0.15);
    color: #a0a0a0;
    border-radius: 9999px;
    font-size: 0.75rem;
}

/* Report type badge */
.type-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-radius: 9999px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.type-badge.type-spam { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.type-badge.type-harassment { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.type-badge.type-inappropriate { background: rgba(234, 88, 12, 0.15); color: #fb923c; }

/* Report reason */
.report-reason {
    color: #c0c0c0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Small timestamp */
.time-small {
    font-size: 0.75rem;
    color: #8a8a8a;
}

/* Admin notes textarea in table */
.admin-notes-textarea {
    min-height: 3.5rem;
    font-size: 0.82rem;
    padding: 0.4rem 0.6rem;
    resize: vertical;
}

/* Admin notes preview */
.admin-notes-preview {
    font-size: 0.8rem;
    color: #8a8a8a;
    font-style: italic;
}

/* Notes cell and form */
.notes-cell {
    min-width: 200px;
}
.notes-form {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.notes-save-btn {
    align-self: flex-start;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
}

/* Settings page */
.settings-section-title {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #c49a3a;
    margin: 0 0 1rem 0;
}

.settings-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-label-sm {
    font-size: 0.8rem;
    color: #8a8a8a;
}

.admin-settings-card {
    padding: 1.5rem;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #343542;
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #e3e3e6;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #c49a3a;
}

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

.field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.settings-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0;
}

.settings-status {
    font-size: 0.82rem;
    margin: 0.4rem 0 0;
}

.status-enabled {
    color: #4caf50;
}

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

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--border-color);
    border-radius: 24px;
    transition: background-color 0.25s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.25s;
}

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

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

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================================
   ENTITY ATTRIBUTE FORM STYLES
   ===================================================== */

.attr-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

.attr-form-header {
    margin-bottom: 1.5rem;
}

.attr-form-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attr-form-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.attr-form-subtitle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

.attr-entity-icon {
    font-size: 1.25rem;
}

.attr-entity-type {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.attr-form-group-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.25rem;
}

.attr-form-tip {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.attr-form-card {
    padding: 1.5rem;
}

/* Attribute Groups */
.attr-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.attr-group:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.attr-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.attr-group-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Full width for textarea fields */
.attr-group-fields .form-group:has(.form-textarea) {
    grid-column: 1 / -1;
}

/* Attribute form specific overrides */
.attr-form .form-group {
    margin-bottom: 0;
}

.attr-form .form-label {
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.attr-form .form-input,
.attr-form .form-select,
.attr-form .form-textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.attr-form .form-input:focus,
.attr-form .form-select:focus,
.attr-form .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

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

.attr-form .form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b949e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.attr-form .form-help {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Form Footer */
.attr-form .form-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.attr-form .form-tip {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.attr-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .attr-form-container {
        padding: 1rem;
    }

    .attr-group-fields {
        grid-template-columns: 1fr;
    }

    .attr-form-title {
        font-size: 1.5rem;
    }
}

/* Entity form header actions (for Attributes button) */
.entity-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.entity-form-actions .btn-secondary {
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
}

/* =====================================================
   ENTITY VIEW — ATTRIBUTES CARD
   ===================================================== */

.entity-attributes-card {
    margin-bottom: 1.5rem;
}

.attr-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #343542;
    cursor: pointer;
    user-select: none;
}
.attr-section-header:hover { background: rgba(255,255,255,0.02); }
.attr-section-title {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #c49a3a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.attr-section-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: #c49a3a;
    border-radius: 2px;
}
.attr-section-toggle {
    color: #707080;
    font-size: 0.875rem;
    transition: transform 0.2s;
}
.attr-section.collapsed .attr-section-toggle { transform: rotate(-90deg); }
.attr-section.collapsed .attr-section-body { display: none; }

.attr-section-body { padding: 1.25rem 1.5rem; }

/* Basic Info */
.attr-basic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.attr-field { display: flex; flex-direction: column; gap: 0.25rem; }
.attr-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #707080;
    font-weight: 600;
}
.attr-value { font-size: 0.95rem; color: #f0f0f0; font-weight: 500; }
.attr-value.empty { color: #4a4a5a; font-style: italic; }

/* Stat Grid */
.attr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}
.stat-box {
    background: #14141b;
    border: 1px solid #343542;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s;
}
.stat-box:hover { border-color: #c49a3a; }
.stat-box::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--stat-color, #c49a3a), transparent);
    opacity: 0.6;
}
.stat-abbr {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--stat-color, #c49a3a);
}
.stat-name { font-size: 0.65rem; color: #707080; text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 1.375rem; font-weight: 700; color: #f0f0f0; line-height: 1; margin-top: 0.1rem; }
.stat-desc { font-size: 0.6rem; color: #5a5a6a; margin-top: 0.1rem; }

.stat-category {
    grid-column: 1 / -1;
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #c49a3a;
    padding: 0.5rem 0 0.25rem;
    border-top: 1px solid #252535;
    margin-top: 0.5rem;
}
.stat-category:first-child { border-top: none; padding-top: 0; margin-top: 0; }

/* Resource Bars */
.attr-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.resource-item { display: flex; flex-direction: column; gap: 0.35rem; }
.resource-header { display: flex; justify-content: space-between; align-items: center; }
.resource-label { font-size: 0.75rem; color: #a0a0b0; font-weight: 500; }
.resource-value { font-size: 0.875rem; color: #f0f0f0; font-weight: 700; }
.resource-bar-track { height: 6px; background: #14141b; border-radius: 3px; overflow: hidden; }
.resource-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.hp-bar { background: linear-gradient(90deg, #dc2626, #ef4444); }
.mp-bar { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.stamina-bar { background: linear-gradient(90deg, #16a34a, #4ade80); }

/* Identity Fields */
.attr-identity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.identity-field { display: flex; flex-direction: column; gap: 0.2rem; }
.identity-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: #707080; font-weight: 600; }
.identity-value { font-size: 0.9rem; color: #f0f0f0; }
.identity-value.empty { color: #4a4a5a; font-style: italic; }

.alignment-badge {
    display: inline-flex; align-items: center;
    padding: 0.2rem 0.6rem;
    background: rgba(196,154,58,0.1);
    border: 1px solid rgba(196,154,58,0.3);
    color: #c49a3a;
    border-radius: 9999px;
    font-size: 0.75rem; font-weight: 600;
}

.attr-edit-btn-wrap {
    padding: 0 1.5rem 1.25rem;
    display: flex;
    justify-content: flex-end;
}

.section-divider { border: none; border-top: 1px solid #343542; margin: 0; }

/* =====================================================
   RESPONSIVE — ENTITY SHOW & ATTRIBUTES
   ===================================================== */

@media (max-width: 768px) {
    .entity-show-layout { grid-template-columns: 1fr !important; }
    .entity-show-sidebar { position: static !important; }
    .sticky-sidebar { position: static !important; }
    .entity-show-title { font-size: 1.5rem; }
    .entity-header-avatar { width: 72px; height: 72px; }
    .attr-basic-grid { grid-template-columns: 1fr 1fr; }
    .attr-stats-grid { grid-template-columns: repeat(3, 1fr); }
    .attr-resources-grid { grid-template-columns: 1fr; }
    .attr-identity-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .entity-show-header { gap: 1rem; }
    .entity-header-avatar { width: 60px; height: 60px; }
    .entity-show-title { font-size: 1.25rem; }
    .entity-show-actions { gap: 0.375rem; }
    .btn-secondary, .btn-danger { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
    .attr-section-body { padding: 1rem; }
    .attr-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .attr-basic-grid { grid-template-columns: 1fr; }
}
