/* Base Setup */
@font-face {
    font-family: "Sohne";
    src: url("assets/fonts/sohne/test-soehne-halbfett.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: "Outfit", sans-serif;
    background-color: var(--color-bg-cream);
    color: var(--color-text-charcoal);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

#app {
    height: 100vh;
}

/* App Shell */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
}

/* Top Navigation */
.top-nav {
    height: 64px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    flex-shrink: 0;
    z-index: 20;
    /* Normalized to higher z-index from CRUD */
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary-blue);
    text-decoration: none;
}

.brand-logo {
    height: 36px;
    width: auto;
    display: block;
}

.brand-text {
    font-family: "Sohne", "Outfit", sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* Main Layout Containers */
.main-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    min-height: 0;
    height: calc(100vh - 64px);
}

/* Stage Patterns */
.center-stage {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
    min-height: 0;
    width: 100%;
    height: 100%;
}

.conv-item.active {
    background: var(--color-surface-active);
    border-left: 3px solid var(--color-primary-red);
    color: var(--color-text-primary);
}

.left-stage {
    background: var(--color-surface-alt);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: relative;
    flex-shrink: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    order: -1;
}

.left-stage.collapsed {
    width: 50px !important;
}

/* CRUD Layout Patterns (normalized where possible) */
.workspace {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

.list-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px 32px;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
}

.editor-pane {
    width: 450px;
    background: var(--color-bg-white);
    border-left: 1px solid var(--color-border-light);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.03);
    z-index: 10;
    transition: width 0.2s;
}

/* Shared Header/Toolbar Patterns */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--color-primary-blue);
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--color-text-body);
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

/* Resizers */
.resizer {
    position: absolute;
    z-index: 100;
    transition: background 0.2s;
    touch-action: none;
}

.resizer.x {
    width: 12px;
    top: 0;
    bottom: 0;
    cursor: col-resize;
    background: rgba(0, 0, 0, 0);
}

.resizer.x:hover,
.resizer.x.dragging,
.resizer.x:active {
    background: rgba(0, 0, 0, 0.1);
}
