*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-text: #111827;
    --color-text-secondary: #6b7280;
    --color-text-muted: #9ca3af;
    --color-border: #e5e7eb;
    --color-border-light: #f3f4f6;
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #eff6ff;
    --color-success: #059669;
    --color-warning: #d97706;
    --color-error: #dc2626;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, monospace;
    --topbar-height: 48px;
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.15);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
}

html, body {
    height: 100%;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 100;
    transition: transform var(--transition-base);
}

.topbar.hidden {
    transform: translateY(-100%);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.topbar-logo {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.topbar-divider {
    width: 1px;
    height: 20px;
    background: var(--color-border);
}

.topbar-title {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.topbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    color: var(--color-text-secondary);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.topbar-btn:hover {
    background: var(--color-border-light);
    color: var(--color-text);
}

.topbar-btn.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.topbar-btn svg {
    width: 18px;
    height: 18px;
}

.topbar-toggle {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 99;
    display: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.topbar-toggle:hover {
    background: var(--color-border-light);
}

.topbar.hidden ~ .topbar-toggle {
    display: flex;
}

.viewer-container {
    position: absolute;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    transition: top var(--transition-base);
}

.topbar.hidden ~ .viewer-container {
    top: 0;
}

.viewer-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--color-bg);
    transition: width var(--transition-slow), margin var(--transition-slow);
    display: block;
}

.viewer-iframe.device-tablet {
    width: 768px;
    margin: 0 auto;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

.viewer-iframe.device-mobile {
    width: 375px;
    margin: 0 auto;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
}

.credentials-bar {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.25rem;
    box-shadow: var(--shadow-md);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8125rem;
    max-width: 90%;
}

.credentials-label {
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.credentials-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.credentials-key {
    color: var(--color-text-secondary);
}

.credentials-value {
    font-family: var(--font-mono);
    color: var(--color-text);
    background: var(--color-border-light);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    user-select: all;
}

.credentials-close {
    border: none;
    background: none;
    color: var(--color-text-muted);
    padding: 0;
    margin-left: 0.5rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    padding: 1rem;
    overflow-y: auto;
    height: 100%;
}

.image-grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    background: var(--color-border-light);
}

.image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.image-grid-item:hover img {
    transform: scale(1.05);
}

.image-grid-item-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 0.5rem 0.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #ffffff;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.image-grid-item:hover .image-grid-item-name {
    opacity: 1;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.open {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    cursor: default;
    transition: transform var(--transition-base);
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    z-index: 210;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
    z-index: 210;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    z-index: 210;
}

.lightbox-download {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: background var(--transition-fast);
    z-index: 210;
}

.lightbox-download:hover {
    background: rgba(255, 255, 255, 0.25);
}

.video-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    background: #000000;
}

.video-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.video-element {
    flex: 1;
    width: 100%;
    background: #000000;
    display: block;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #111111;
    color: #ffffff;
    flex-shrink: 0;
}

.video-controls button {
    background: none;
    border: none;
    color: #ffffff;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.video-controls button:hover {
    opacity: 1;
}

.video-seek {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.video-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

.video-time {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    min-width: 80px;
}

.video-volume {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.video-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
}

.video-speed-select {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
}

.video-speed-select option {
    background: #111111;
    color: #ffffff;
}

.video-playlist {
    width: 280px;
    background: #0a0a0a;
    border-left: 1px solid #222222;
    overflow-y: auto;
    flex-shrink: 0;
}

.video-playlist-title {
    padding: 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid #222222;
}

.video-playlist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.video-playlist-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.video-playlist-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.code-viewer {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.code-tabs {
    display: flex;
    background: #1e1e2e;
    border-bottom: 1px solid #313244;
    overflow-x: auto;
    flex-shrink: 0;
}

.code-tab {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    background: none;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.code-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.code-tab.active {
    color: #ffffff;
    border-bottom-color: var(--color-primary);
    background: #181825;
}

.code-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.code-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: #1e1e2e;
    border-bottom: 1px solid #313244;
}

.code-toolbar-btn {
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    border: 1px solid #45475a;
    background: none;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.code-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.code-toolbar-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.code-body {
    flex: 1;
    overflow: auto;
    background: #1e1e2e;
    position: relative;
}

.code-pre {
    display: flex;
    margin: 0;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.6;
    tab-size: 4;
}

.code-pre.wrap .code-lines-content {
    white-space: pre-wrap;
    word-break: break-all;
}

.code-line-numbers {
    padding: 1rem 0;
    text-align: right;
    user-select: none;
    color: #585b70;
    min-width: 3rem;
    flex-shrink: 0;
    padding-right: 1rem;
    border-right: 1px solid #313244;
}

.code-line-numbers span {
    display: block;
    padding: 0 0.5rem;
}

.code-lines-content {
    padding: 1rem;
    flex: 1;
    min-width: 0;
    color: #cdd6f4;
    white-space: pre;
    overflow-x: auto;
}

.code-keyword { color: #cba6f7; }
.code-string { color: #a6e3a1; }
.code-comment { color: #6c7086; font-style: italic; }
.code-number { color: #fab387; }
.code-function { color: #89b4fa; }
.code-tag { color: #f38ba8; }
.code-attr { color: #f9e2af; }
.code-operator { color: #89dceb; }
.code-variable { color: #f5c2e7; }

.doc-viewer {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.doc-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.doc-toolbar button, .doc-toolbar select {
    height: 32px;
    padding: 0 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
}

.doc-toolbar button:hover {
    background: var(--color-border-light);
}

.doc-page-input {
    width: 3rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.doc-embed {
    flex: 1;
    border: none;
    width: 100%;
}

.doc-sidebar {
    width: 240px;
    background: #f9fafb;
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    flex-shrink: 0;
}

.doc-sidebar-item {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    transition: background var(--transition-fast);
    font-family: inherit;
}

.doc-sidebar-item:hover {
    background: var(--color-border-light);
}

.doc-sidebar-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

.url-redirect {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.url-redirect-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1.5rem;
}

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

.url-redirect-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}

.url-redirect-link {
    font-size: 0.8125rem;
    color: var(--color-primary);
    word-break: break-all;
}

.file-card {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    text-align: center;
}

.file-card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-border-light);
    border-radius: var(--radius-lg);
    color: var(--color-text-muted);
}

.file-card-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.file-card-meta {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.file-card-meta span {
    display: inline-block;
    margin: 0 0.375rem;
}

.file-card-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background var(--transition-fast);
    font-family: inherit;
}

.file-card-download:hover {
    background: var(--color-primary-hover);
    color: #ffffff;
}

.file-card-hint {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 1rem;
}

.file-card-notes {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-light);
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.feedback-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    font-family: inherit;
}

.feedback-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.feedback-btn svg {
    width: 18px;
    height: 18px;
}

.feedback-panel {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 160;
    width: 380px;
    max-height: 80vh;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.feedback-panel.open {
    display: flex;
}

.feedback-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.feedback-panel-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.feedback-panel-close {
    border: none;
    background: none;
    color: var(--color-text-muted);
    padding: 0;
}

.feedback-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
}

.feedback-panel-tab {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.feedback-panel-tab:hover {
    color: var(--color-text);
}

.feedback-panel-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.feedback-form {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.feedback-field {
    margin-bottom: 1rem;
}

.feedback-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.375rem;
}

.feedback-input,
.feedback-select,
.feedback-textarea {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.feedback-input:focus,
.feedback-select:focus,
.feedback-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.feedback-textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.5;
}

.feedback-type-options {
    display: flex;
    gap: 0.375rem;
}

.feedback-type-btn {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.feedback-type-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.feedback-type-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.feedback-type-btn.type-approve.active {
    background: var(--color-success);
    border-color: var(--color-success);
}

.feedback-type-btn.type-revision.active {
    background: var(--color-warning);
    border-color: var(--color-warning);
}

.feedback-submit {
    width: 100%;
    padding: 0.625rem;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-family: inherit;
}

.feedback-submit:hover {
    background: var(--color-primary-hover);
}

.feedback-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feedback-success {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-success);
}

.feedback-success-icon {
    margin-bottom: 0.75rem;
}

.feedback-success-text {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feedback-success-sub {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.feedback-history {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.feedback-history-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border-light);
}

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

.feedback-history-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.feedback-history-author {
    font-size: 0.8125rem;
    font-weight: 600;
}

.feedback-history-badge {
    font-size: 0.6875rem;
    padding: 0.0625rem 0.375rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.feedback-history-badge.type-comment {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.feedback-history-badge.type-approve {
    background: #ecfdf5;
    color: var(--color-success);
}

.feedback-history-badge.type-revision {
    background: #fffbeb;
    color: var(--color-warning);
}

.feedback-history-status {
    font-size: 0.6875rem;
    padding: 0.0625rem 0.375rem;
    border-radius: var(--radius-full);
    background: var(--color-border-light);
    color: var(--color-text-muted);
}

.feedback-history-message {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.feedback-history-time {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.annotation-pin {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    background: var(--color-primary);
    transform: rotate(-45deg) translate(-50%, -50%);
    cursor: pointer;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-fast);
}

.annotation-pin:hover {
    transform: rotate(-45deg) translate(-50%, -50%) scale(1.2);
}

.annotation-pin-number {
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 700;
}

.archived-banner {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    background: #fef3c7;
    border-bottom: 1px solid #fcd34d;
    padding: 0.625rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #92400e;
    font-weight: 500;
    z-index: 90;
}

.archived-banner ~ .viewer-container {
    top: calc(var(--topbar-height) + 40px);
}

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: #fafafa;
}

.error-card {
    max-width: 440px;
    width: 100%;
    text-align: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
}

.error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--color-border-light);
    color: var(--color-text-muted);
}

.error-icon-warning {
    background: #fef3c7;
    color: var(--color-warning);
}

.error-icon-denied {
    background: #fef2f2;
    color: var(--color-error);
}

.error-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.error-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.error-contact {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.error-contact a {
    color: var(--color-primary);
}

.error-brand {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border-light);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.password-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: #fafafa;
}

.password-card {
    max-width: 400px;
    width: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
}

.password-icon {
    margin: 0 auto 1.25rem;
    color: var(--color-text-muted);
}

.password-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.password-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.password-error {
    padding: 0.625rem;
    background: #fef2f2;
    color: var(--color-error);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.password-form {
    text-align: left;
}

.password-form input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    font-family: inherit;
}

.password-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.password-form button {
    width: 100%;
    padding: 0.625rem;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
}

.password-form button:hover {
    background: var(--color-primary-hover);
}

.password-brand {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

@media (max-width: 480px) {
    .feedback-panel {
        right: 0.5rem;
        left: 0.5rem;
        bottom: 0.5rem;
        width: auto;
    }

    .feedback-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .credentials-bar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

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

    .video-playlist {
        display: none;
    }

    .lightbox-nav {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 768px) {
    .topbar-center {
        display: none;
    }

    .code-viewer {
        flex-direction: column;
    }
}
