/* --- STUDIO EXTEND EXACT REPLICA STYLES --- */

:root {
    --bg-main: #0d0d0d;
    --bg-card: #141414;
    --bg-card-hover: #181818;
    --border-color: #222222;
    --border-gold: #443827;
    --gold: #c5a059;
    --gold-hover: #b08d47;
    --text-main: #e5e5e5;
    --text-muted: #a3a3a3;

}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    selection-background-color: var(--gold);
    selection-color: #000;
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 48px;
    background-color: rgba(13, 13, 13, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.brand-logo-box {
    background: #ffffff;
    color: #000000;
    font-weight: 900;
    font-size: 18px;
    padding: 6px 10px;
    letter-spacing: 1px;
    border-radius: 2px;
}

.brand-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
}

.brand-subtitle {
    font-size: 10px;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff;
}

.nav-link.active {
    border-bottom: 2px solid var(--gold);
    padding-bottom: 2px;
}

/* --- BUTTONS --- */
.btn-outline-gold {
    background-color: #1a1612;
    border: 1px solid var(--border-gold);
    color: var(--gold);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 10px 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-gold:hover {
    background-color: #2b241d;
    color: #dfb466;
}

.btn-gold {
    background-color: var(--gold);
    color: #000;
    font-weight: 600;
    font-size: 12px;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-gold:hover {
    background-color: var(--gold-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid #333;
    color: var(--text-muted);
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-outline:hover {
    border-color: #555;
    color: #fff;
}

/* --- VIEWS --- */
.view-container {
    display: none;
    max-width: 1440px;
    margin: 0 auto;
    padding: 40px 48px;
}

.view-container.active {
    display: block;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
    cursor: pointer;
}

.breadcrumb span:hover {
    color: #ffffff;
}

.breadcrumb-active {
    color: var(--gold);
}

.page-header {
    margin-bottom: 40px;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 48px;
    font-weight: 300;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 600px;
}

.italic {
    font-style: italic;
}

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

/* --- LANDING CATEGORIES GRID --- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

@media(max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media(max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

.category-card {
    position: relative;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.category-card:hover {
    border-color: #444;
}

.category-card.featured {
    border-color: var(--border-gold);
    box-shadow: 0 0 30px rgba(197, 160, 89, 0.12);
}

.category-card.featured:hover {
    border-color: var(--gold);
}

.card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    opacity: 1.35;
    transition: opacity 0.5s, transform 0.7s;
}

.category-card:hover .card-bg {
    opacity: 0.55;
    transform: scale(1.03);
}

.card-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #101010 10%, rgba(16,16,16,0.85) 60%, transparent 100%);
}

.card-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-icon-box {
    background: #1a1a1a;
    border: 1px solid #333;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon-box.gold {
    background: #221b12;
    border-color: #55442b;
    color: var(--gold);
}

.badge {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 4px;
}

.badge.gold {
    background: rgba(197, 160, 89, 0.15);
    color: var(--gold);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.badge.muted {
    background: #222;
    color: var(--text-muted);
    border: 1px solid #333;
}

.card-content {
    position: relative;
    z-index: 1;
    margin-top: 32px;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.category-card:hover .card-title {
    color: #dfb466;
}

.card-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.link-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-card:hover .link-text {
    color: var(--gold);
}

.tag-interactive {
    font-size: 10px;
    color: var(--gold);
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
}

/* --- FEATURE BANNERS --- */
.feature-banners {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: #111111;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
}

@media(max-width: 1024px) {
    .feature-banners {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media(max-width: 640px) {
    .feature-banners {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    background: #1a1612;
    border: 1px solid var(--border-gold);
    color: var(--gold);
    padding: 12px;
    border-radius: 8px;
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 11px;
    color: var(--text-muted);
}

.footer-note {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* --- VIEW 2: INTERIOR DETAIL LAYOUT --- */
.interior-layout {
    display: flex;
    min-height: calc(100vh - 73px);
}

@media(max-width: 1024px) {
    .interior-layout {
        flex-direction: column;
    }
}

.sidebar {
    width: 300px;
    background: #111111;
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

@media(max-width: 1024px) {
    .sidebar {
        width: 100%;
    }
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 24px;
}

.back-btn:hover {
    color: #fff;
}

.sidebar-header {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--gold);
    margin-bottom: 4px;
}

.sidebar-header h2 {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 500px;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-item:hover {
    background: #181818;
    color: #eee;
}

.sidebar-item.active {
    background: #1e1913;
    color: #fff;
    border-left: 2px solid var(--gold);
    font-weight: 500;
}

.sidebar-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-item-count {
    font-size: 9px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.sidebar-nda-box {
    margin-top: 32px;
    background: #16130f;
    border: 1px solid #3b3021;
    border-radius: 10px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.nda-icon-box {
    background: #262017;
    border: 1px solid #4d3f2b;
    color: var(--gold);
    padding: 8px;
    border-radius: 6px;
    width: fit-content;
    margin-bottom: 12px;
}

.sidebar-nda-box h4 {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.sidebar-nda-box p {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 16px;
}

.btn-gold-full {
    width: 100%;
    background-color: var(--gold);
    color: #000;
    font-weight: 600;
    font-size: 11px;
    padding: 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-gold-full:hover {
    background-color: var(--gold-hover);
}

/* --- INTERIOR MAIN CONTENT --- */
.interior-main {
    flex: 1;
    padding: 40px;
    background: var(--bg-main);
}

.interior-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
}

@media(max-width: 1024px) {
    .interior-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.interior-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-btn {
    background: #181818;
    border: 1px solid #333;
    color: var(--text-main);
    font-size: 11px;
    padding: 8px 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.toolbar-btn:hover {
    border-color: var(--gold);
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.search-box input {
    background: #141414;
    border: 1px solid #333;
    color: #fff;
    font-size: 11px;
    padding: 8px 12px 8px 32px;
    border-radius: 6px;
    outline: none;
    width: 220px;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--gold);
}

/* --- TABS --- */
.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 32px;
}

.tab-btn {
    background: #181818;
    border: 1px solid #333;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #222;
    color: #fff;
}

.tab-btn.active {
    background: var(--gold);
    color: #000;
    font-weight: 600;
    border-color: var(--gold);
}

/* --- SHEETS GRID --- */
.sheets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

@media(max-width: 1200px) {
    .sheets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media(max-width: 640px) {
    .sheets-grid {
        grid-template-columns: 1fr;
    }
}

.sheet-card {
    background: var(--bg-card);
    border: 1px solid #262626;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s;
}

.sheet-card:hover {
    border-color: rgba(197, 160, 89, 0.6);
}

.sheet-preview-box {
    background: #f0ede6;
    color: #000;
    padding: 16px;
    aspect-ratio: 3/4;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: filter 0.2s;
}

.sheet-preview-box:hover {
    filter: brightness(1.03);
}

.sheet-preview-box:hover .preview-overlay {
    opacity: 1;
}

.preview-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 8px;
}

.preview-brand-sm {
    font-size: 10px;
    font-weight: 900;
}

.preview-brand-sub {
    font-size: 6px;
    color: #555;
}

.preview-index-title {
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    border-left: 1px solid rgba(0,0,0,0.2);
    padding-left: 6px;
    text-align: right;
}

.preview-body {
    margin: auto 0;
}

.preview-doc-title {
    font-family: var(--font-serif);
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.preview-project-info {
    font-size: 7px;
    color: #444;
    margin-bottom: 8px;
}

.preview-project-name {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 8px;
    text-transform: uppercase;
}

.preview-index-list {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 6px;
    opacity: 0.8;
}

.preview-index-item {
    font-family: var(--font-mono);
    font-size: 5.5px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.preview-footer-table {
    border-top: 1px solid rgba(0,0,0,0.2);
    padding-top: 4px;
    font-family: var(--font-mono);
    font-size: 5.5px;
}

.preview-status {
    font-weight: bold;
    color: #444;
    margin-bottom: 2px;
}

.preview-table-head, .preview-table-row {
    display: grid;
    grid-template-columns: 1fr 2fr 3fr;
    gap: 2px;
}

.preview-table-head {
    color: #666;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 2px;
}

.preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.preview-pill {
    background: var(--gold);
    color: #000;
    font-weight: 600;
    font-size: 11px;
    padding: 6px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sheet-card-footer {
    padding: 16px;
    background: #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
}

.sheet-card-footer h4 {
    font-family: var(--font-serif);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.sheet-card-footer p {
    font-size: 10px;
    color: var(--text-muted);
}

.btn-icon {
    background: #1a1612;
    border: 1px solid var(--border-gold);
    color: var(--gold);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: #2b241d;
}

/* --- BOTTOM CTA BANNER --- */
.bottom-cta-banner {
    background: linear-gradient(to right, #18140f, #111111);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

@media(max-width: 768px) {
    .bottom-cta-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.bottom-cta-banner h3 {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.bottom-cta-banner p {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 600px;
}

/* --- MODALS --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #141414;
    border: 1px solid #333;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    padding: 32px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.viewer-modal-box {
    max-width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.viewer-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #222;
    background: #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.viewer-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-close, .modal-close-in {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
}

.modal-close-in:hover, .modal-close:hover {
    color: #fff;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

.modal-header p {
    font-size: 11px;
    color: var(--text-muted);
}

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

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #ddd;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--gold);
}

.form-notice {
    font-size: 11px;
    color: var(--text-muted);
    background: #1a1612;
    border: 1px solid #333;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.viewer-modal-body {
    padding: 24px;
    background: #0a0a0a;
    display: flex;
    gap: 24px;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

@media(max-width: 768px) {
    .viewer-modal-body {
        flex-direction: column;
    }
}

/* --- TOAST --- */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: #1a1a1a;
    border: 1px solid var(--gold);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Utility icons helper */
.icon-xs { width: 14px; height: 14px; display: inline-block; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; display: inline-block; vertical-align: middle; }
.no-scrollbar::-webkit-scrollbar { display: none; }


.sheet-preview-box.visualization-preview-box {
    padding: 0px !important;
}