/* Kannix base layout — theme-independent structure */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}
.container { max-width: 1400px; margin: 0 auto; padding: 1rem; }
h1 { margin-bottom: 1rem; color: var(--accent); }
h2 { color: var(--accent); }

/* Board */
.board { display: flex; gap: 1rem; overflow-x: auto; min-height: 80vh; }
.column {
    background: var(--bg-secondary);
    border-radius: 8px;
    min-width: 280px;
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
}
.column-header {
    font-weight: 600;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.column-header .count {
    background: var(--accent);
    color: var(--accent-text);
    border-radius: 50%;
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
}

/* Tickets */
.ticket-list { flex: 1; min-height: 50px; }
.ticket-card {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    border-left: 3px solid var(--accent);
    transition: transform 0.1s;
}
.ticket-card:hover { transform: translateX(2px); }
.ticket-card .title { font-weight: 500; margin-bottom: 0.25rem; }
.ticket-card .meta { font-size: 0.8rem; color: var(--text-muted); }
.ticket-card a { color: inherit; text-decoration: none; }
.sortable-ghost { opacity: 0.4; }

/* Buttons */
.btn {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn:hover { opacity: 0.85; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }

/* Forms */
form.login-form {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
}
form.login-form input, .create-form input, .edit-input {
    width: 100%;
    padding: 0.5rem;
    margin: 0.5rem 0;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 4px;
}
form.login-form label { display: block; margin-top: 0.75rem; }
.error { color: var(--accent); margin-bottom: 1rem; }
.create-form { margin-bottom: 0.5rem; }
.create-form input { margin-bottom: 0.25rem; padding: 0.4rem; }

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Theme chooser */
.theme-chooser {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
}

/* Terminal */
#terminal-container {
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    resize: both;
    min-height: 200px;
    min-width: 300px;
}

/* Ticket detail form */
.ticket-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.ticket-edit-form textarea {
    padding: 0.4rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 4px;
    resize: vertical;
}
