:root {
    /* Sunset Glow Palette */
    --primary: #F97316;
    --secondary: #FB923C;
    --accent: #06B6D4;
    --bg-dark: #1A1008;
    --bg-panel: #2A1A0D;
    --bg-hover: #3D2613;
    --text-main: #FDF4EB;
    --text-muted: #D1B8A3;
    --border: #4A301A;
    --danger: #EF4444;
    --success: #10B981;
    
    --radius: 12px;
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

/* Layout */
.app-layout {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.5rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

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

.search-container {
    padding: 0 1.5rem 1rem;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

#search-input {
    width: 100%;
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    color: var(--text-main);
    font-size: 0.875rem;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.meetings-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem 1rem;
}

.meeting-item {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
}

.meeting-item:hover {
    background-color: var(--bg-hover);
}

.meeting-item.active {
    background-color: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

.meeting-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meeting-item-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.meeting-item-tags {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.tag {
    background-color: var(--bg-dark);
    color: var(--accent);
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 1rem;
}

.empty-icon {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.editor-state {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
}

.editor-state.hidden {
    display: none;
}

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

.title-input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 2rem;
    font-weight: 700;
    width: 100%;
    outline: none;
}

.title-input::placeholder {
    color: rgba(209, 184, 163, 0.3);
}

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

.editor-metadata {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background-color: var(--bg-panel);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.meta-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.meta-field i {
    width: 16px;
    height: 16px;
}

.meta-field input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.875rem;
    outline: none;
    font-family: inherit;
    width: 200px;
}

.meta-field input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Editor Panes */
.editor-panes {
    display: flex;
    gap: 2rem;
    flex: 1;
    min-height: 0; /* Important for flex child scrolling */
}

.pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.pane h3 {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background-color: rgba(0,0,0,0.2);
}

.hint {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background-color: rgba(249, 115, 22, 0.05);
}

.hint code {
    background-color: var(--bg-dark);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    color: var(--primary);
}

#raw-notes {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    font-family: inherit;
}

/* Extracted Pane */
.extracted-pane {
    overflow-y: auto;
}

.extraction-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.extraction-section:last-child {
    border-bottom: none;
}

.extraction-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.extraction-section h4 i {
    width: 16px;
    height: 16px;
}

.extracted-list {
    list-style: none;
}

.extracted-list li {
    background-color: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.extracted-list li:last-child {
    margin-bottom: 0;
}

.person-tag {
    color: var(--primary);
    background-color: rgba(249, 115, 22, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-weight: 600;
    margin-right: 0.25rem;
}

.empty-msg {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn.primary {
    background-color: var(--primary);
    color: #fff;
}

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

.btn.outline {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text-main);
}

.btn.outline:hover {
    border-color: var(--text-muted);
}

.btn.danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn.danger:hover {
    background-color: var(--danger);
    color: #fff;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.icon-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-main);
}

.icon-btn.primary {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--primary);
    border-color: rgba(249, 115, 22, 0.3);
}

.icon-btn.primary:hover {
    background-color: var(--primary);
    color: #fff;
}

.icon-btn i {
    width: 16px;
    height: 16px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--success);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 1000;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}
