:root {
    --star-bg: rgba(18, 18, 18, 0.7);
    --star-border: rgba(255, 255, 255, 0.08);
    --star-soft: rgba(255, 255, 255, 0.04);
    --star-muted: #7f8a86;
    --star-danger: #fb7185;
    --star-warning: #facc15;
}

.admin-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
}

.workspace-switch {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.workspace-tab {
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #8b9590;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12rem;
    transition: all 0.2s ease;
}

.workspace-tab.active {
    color: #04140d;
    background: var(--accent-color);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.18);
}

.workspace-tab:hover {
    color: white;
}

.workspace-view.hidden {
    display: none !important;
}

.star-journal-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 290px;
    gap: 20px;
    margin-top: 20px;
    align-items: stretch;
}

.star-panel {
    min-height: 720px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--star-border);
    border-radius: 10px;
    background: var(--star-bg);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.star-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--star-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.star-panel-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.16rem;
    color: white;
}

.star-section-kicker {
    font-size: 0.58rem;
    letter-spacing: 0.18rem;
    color: var(--accent-color);
    opacity: 0.8;
    margin-bottom: 4px;
}

.star-panel-body {
    padding: 16px 18px;
    overflow-y: auto;
}

.star-action-btn {
    border: 1px solid rgba(0, 255, 157, 0.2);
    background: rgba(0, 255, 157, 0.08);
    color: var(--accent-color);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08rem;
    padding: 10px 14px;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.star-action-btn:hover {
    color: black;
    background: var(--accent-color);
    box-shadow: 0 0 14px rgba(0, 255, 157, 0.18);
}

.star-action-btn-danger {
    border-color: rgba(251, 113, 133, 0.22);
    background: rgba(251, 113, 133, 0.08);
    color: var(--star-danger);
}

.star-action-btn-danger:hover {
    background: var(--star-danger);
    color: white;
}

.star-action-btn-muted {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: #d3d9d6;
}

.star-action-btn-muted:hover {
    background: white;
    color: black;
}

.star-action-btn-full {
    width: 100%;
    justify-content: center;
}

.star-search-wrap {
    margin-bottom: 14px;
}

.star-search-input,
.star-filter-select,
.star-form-input,
.star-form-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    transition: all 0.2s ease;
}

.star-search-input:focus,
.star-filter-select:focus,
.star-form-input:focus,
.star-form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px rgba(0, 255, 157, 0.18);
}

.star-filter-select option {
    background: #111;
}

.star-status-banner {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 157, 0.2);
    background: rgba(0, 255, 157, 0.08);
    color: #dbfff1;
    font-size: 0.78rem;
    line-height: 1.5;
}

.star-status-banner.warning {
    border-color: rgba(250, 204, 21, 0.25);
    background: rgba(250, 204, 21, 0.08);
    color: #fef3c7;
}

.star-status-banner.error {
    border-color: rgba(251, 113, 133, 0.25);
    background: rgba(251, 113, 133, 0.08);
    color: #ffe4e8;
}

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

.star-session-card {
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-session-card:hover {
    border-color: rgba(0, 255, 157, 0.28);
    transform: translateY(-1px);
}

.star-session-card.active {
    border-color: rgba(0, 255, 157, 0.4);
    box-shadow: 0 0 0 1px rgba(0, 255, 157, 0.1);
    background: linear-gradient(180deg, rgba(0, 255, 157, 0.12), rgba(255, 255, 255, 0.03));
}

.star-session-date {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14rem;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.star-session-title {
    color: white;
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.35;
}

.star-session-location {
    color: #d7dcda;
    font-size: 0.8rem;
}

.star-session-note {
    color: var(--star-muted);
    font-size: 0.78rem;
    margin-top: 10px;
    line-height: 1.5;
}

.star-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.star-tag,
.star-tag-filter-btn {
    padding: 5px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 157, 0.14);
    background: rgba(0, 255, 157, 0.08);
    color: var(--accent-color);
    font-size: 0.68rem;
    letter-spacing: 0.03rem;
}

.star-tag-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.star-tag-filter-btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-tag-filter-btn.active,
.star-tag-filter-btn:hover {
    background: var(--accent-color);
    color: black;
}

.star-empty {
    padding: 26px 18px;
    border: 1px dashed rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    color: var(--star-muted);
    text-align: center;
    line-height: 1.5;
}

.star-empty.compact {
    padding: 18px 14px;
}

.star-empty-large {
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-detail-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.star-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--star-border);
}

.star-detail-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.star-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.star-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.star-meta-card {
    padding: 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.star-meta-label {
    font-size: 0.64rem;
    color: var(--star-muted);
    letter-spacing: 0.12rem;
    margin-bottom: 8px;
}

.star-meta-value {
    color: white;
    font-size: 0.9rem;
    line-height: 1.5;
}

.star-copy-block {
    padding: 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #dce2df;
    line-height: 1.75;
}

.star-cover-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.star-cover-image {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

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

.star-gallery-title,
.star-side-title {
    color: white;
    font-size: 0.82rem;
    letter-spacing: 0.14rem;
    font-weight: 700;
}

.star-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}

.star-photo-card {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.star-photo-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #060606;
    display: block;
    cursor: pointer;
}

.star-photo-body {
    padding: 12px;
}

.star-photo-caption {
    color: #dce2df;
    font-size: 0.76rem;
    line-height: 1.5;
    min-height: 38px;
    margin-bottom: 10px;
}

.star-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.star-inline-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.65rem;
    color: #dbe2df;
    background: rgba(255, 255, 255, 0.03);
}

.star-inline-btn:hover {
    border-color: rgba(0, 255, 157, 0.24);
    color: var(--accent-color);
}

.star-inline-btn.is-cover {
    color: black;
    background: var(--accent-color);
    border-color: transparent;
}

.star-side-section {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.star-side-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.star-members {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.star-member-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #dce2df;
    font-size: 0.76rem;
}

.star-member-pill.owner span:last-child {
    color: var(--accent-color);
}

.star-invite-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.star-filter-label {
    display: block;
    font-size: 0.62rem;
    color: var(--star-muted);
    letter-spacing: 0.12rem;
    margin-bottom: 8px;
}

.star-filter-label-gap {
    margin-top: 14px;
}

.star-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.star-history-item {
    padding: 12px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-history-item:hover {
    border-color: rgba(0, 255, 157, 0.2);
}

.star-history-item.active {
    border-color: rgba(0, 255, 157, 0.28);
    background: rgba(0, 255, 157, 0.08);
}

.star-modal {
    width: min(820px, 100%);
    max-height: calc(100vh - 60px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #080808;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.star-modal-header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.star-modal-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.14rem;
    color: white;
}

.star-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.star-modal-close {
    background: transparent;
    color: #9aa39f;
    font-size: 1.4rem;
    border: none;
}

.star-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.star-form-grid-full {
    grid-column: 1 / -1;
}

.star-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.star-form-label {
    font-size: 0.68rem;
    color: var(--star-muted);
    letter-spacing: 0.1rem;
}

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

.star-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.star-photo-editor-modal {
    width: min(1120px, 100%);
}

.star-photo-editor-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
    min-height: 640px;
}

.star-editor-stage {
    background: radial-gradient(circle at top, rgba(0, 255, 157, 0.08), rgba(0, 0, 0, 0.3) 60%), #050505;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.star-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.star-tool-btn {
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #dbe2df;
    font-size: 0.7rem;
    letter-spacing: 0.06rem;
}

.star-tool-btn.active,
.star-tool-btn:hover {
    background: rgba(0, 255, 157, 0.12);
    color: var(--accent-color);
    border-color: rgba(0, 255, 157, 0.24);
}

.star-canvas-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

#starPhotoEditorCanvas {
    max-width: 100%;
    height: auto;
    cursor: crosshair;
    background: #010101;
    border-radius: 8px;
}

.star-editor-side {
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.star-editor-note {
    color: var(--star-muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.star-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.star-loading {
    color: var(--star-muted);
    font-size: 0.82rem;
    text-align: center;
}

@media (max-width: 1320px) {
    .star-journal-shell {
        grid-template-columns: 290px minmax(0, 1fr);
    }

    .star-sidebar-panel {
        grid-column: 1 / -1;
        min-height: 0;
    }

    .star-sidebar-body {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px;
    }

    .star-side-section {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 1050px) {
    .admin-topbar {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .workspace-switch {
        justify-content: center;
    }

    .star-journal-shell {
        grid-template-columns: 1fr;
    }

    .star-panel {
        min-height: 0;
    }

    .star-list-panel {
        order: 1;
    }

    .star-detail-panel {
        order: 2;
    }

    .star-sidebar-panel {
        order: 3;
    }

    .star-sidebar-body,
    .star-photo-editor-shell,
    .star-detail-grid,
    .star-form-grid {
        grid-template-columns: 1fr;
    }

    .star-detail-header {
        flex-direction: column;
    }
}
