/* CSS Variables matching constraints */
:root {
    --bg-main: #fafafa;
    --sidebar-bg: #2d2d2d;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --text-dark: #111827;
    --text-light: #9ca3af;
    --text-white: #f3f4f6;
    --border-color: #e5e7eb;
    --panel-bg: #ffffff;
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: rgba(255,255,255,0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
    color: var(--text-white);
    background-color: rgba(255,255,255,0.05);
}

.sidebar-nav a.nav-accent {
    color: var(--accent);
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #fff;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.topbar {
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--panel-bg);
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

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

.btn-secondary {
    background-color: #e5e7eb;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Tickets List */
.ticket-row {
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ticket-row:hover {
    background-color: rgba(0,0,0,0.02);
}

.ticket-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ticket-id {
    font-family: var(--font-mono);
    color: var(--text-light);
    font-size: 0.85rem;
}

.ticket-title {
    font-weight: 600;
    font-size: 1rem;
}

.ticket-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.status, .priority {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    font-family: var(--font-mono);
}

.status-OPEN { background-color: #dbeafe; color: #1e40af; }
.status-CLOSED { background-color: #d1fae5; color: #065f46; }
.status-IN-REVIEW { background-color: #fef3c7; color: #92400e; }
.status-PRIVATE { background-color: #fee2e2; color: #991b1b; }

/* Detail Panel */
.detail-panel {
    width: 380px;
    background-color: var(--panel-bg);
    overflow-y: auto;
}

.panel-content {
    padding: 32px;
}

.panel-content h3 {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.metadata {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.description {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 32px;
}

.timeline {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.attachment-img {
    width: 100%;
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

/* Playground Specific Styles */
.playground-body {
    background-color: #1e1e1e;
    color: #d4d4d4;
}

.playground-layout {
    display: grid;
    grid-template-rows: 60px 1fr;
    grid-template-columns: 1fr 300px;
    height: 100vh;
}

.playground-header {
    grid-column: 1 / -1;
    background-color: var(--sidebar-bg);
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.playground-header h2 {
    color: var(--accent);
    font-size: 1.25rem;
}

.playground-header h2 span {
    color: #666;
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.playground-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-right: 1px solid #333;
}

.editor-pane, .response-pane, .schema-explorer {
    display: flex;
    flex-direction: column;
}

.editor-pane { border-right: 1px solid #333; }

.pane-header {
    padding: 12px 16px;
    background-color: #252526;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pane-header h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9cdcfe;
    font-weight: 600;
}

.code-editor, .code-output {
    flex: 1;
    background-color: #1e1e1e;
    color: #d4d4d4;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 16px;
    border: none;
    resize: none;
    outline: none;
}

.code-editor { color: #ce9178; }
.code-output { color: #9cdcfe; overflow-y: auto; margin: 0; white-space: pre-wrap; }

.schema-explorer {
    background-color: #252526;
}

.schema-content {
    padding: 16px;
    overflow-y: auto;
}

.schema-hint {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

.schema-type {
    padding: 8px 0;
    border-bottom: 1px solid #333;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.schema-type strong { color: #4ec9b0; }
.schema-type span { color: #569cd6; float: right; }

.status-ok { color: #4ec9b0; font-family: var(--font-mono); font-size: 0.85rem; }
.status-err { color: #f48771; font-family: var(--font-mono); font-size: 0.85rem; }
