/* Ariavon Dashboard — Linear/Stripe-stijl met #28a745 accent */

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

:root {
    --accent: #28a745;
    --accent-hover: #218838;
    --bg: #0f1115;
    --bg-pane: #161a1f;
    --bg-pane-2: #1c2128;
    --bg-hover: #21262d;
    --border: #2a2f37;
    --text: #e6edf3;
    --text-dim: #8b949e;
    --text-muted: #6e7681;
    --danger: #f85149;
    --warning: #d29922;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body { display: flex; min-height: 100vh; }

/* ============ SIDEBAR ============ */
.sidebar {
    width: 240px;
    background: var(--bg-pane);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sidebar-header { padding: 20px 16px; border-bottom: 1px solid var(--border); }
.logo { font-size: 18px; font-weight: 600; color: var(--accent); letter-spacing: -0.5px; }
.subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.nav { padding: 12px 8px; flex: 1; }
.nav-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; border-radius: 6px;
    color: var(--text-dim); text-decoration: none;
    font-size: 13px; font-weight: 500;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--bg-hover); color: var(--text); border-left: 2px solid var(--accent); padding-left: 10px; }
.nav-item.disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.nav-count {
    background: var(--accent); color: white;
    padding: 1px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600;
}
.nav-soon { font-size: 10px; color: var(--text-muted); font-style: italic; }

.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); }
.user-info { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.btn-logout {
    background: none; border: 1px solid var(--border); color: var(--text-dim);
    padding: 5px 10px; border-radius: 5px; font-size: 12px;
    cursor: pointer; transition: all 0.15s;
}
.btn-logout:hover { background: var(--bg-hover); color: var(--text); }

/* ============ MAIN ============ */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.main-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg);
}
.main-header h1 {
    font-size: 18px; font-weight: 600;
    display: flex; align-items: center; gap: 10px;
}
.count-badge {
    background: var(--accent); color: white;
    padding: 2px 10px; border-radius: 12px;
    font-size: 12px; font-weight: 600;
}
.header-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.dot { color: var(--border); }

/* ============ LAYOUT ============ */
.layout { flex: 1; display: flex; min-height: 0; }
.list-pane {
    width: 420px;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    background: var(--bg-pane);
}
.list-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
}
.list-item:hover { background: var(--bg-hover); }
.list-item.selected { background: var(--bg-pane-2); border-left: 2px solid var(--accent); padding-left: 16px; }
.list-item-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.list-item-from { font-size: 13px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item-category {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px;
    padding: 2px 7px; border-radius: 3px; font-weight: 600;
    background: var(--bg-hover); color: var(--text-dim);
    flex-shrink: 0;
}
.cat-tracking { background: rgba(40,167,69,0.18); color: #4ec76f; }
.cat-cancel { background: rgba(248,81,73,0.18); color: #f97870; }
.cat-product_question { background: rgba(56,139,253,0.18); color: #6cb2f8; }
.cat-unhappy { background: rgba(210,153,34,0.18); color: #e8b341; }
.cat-address { background: rgba(163,113,247,0.2); color: #b88dfa; }
.list-item-subject { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item-summary { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ============ DETAIL PANE ============ */
.detail-pane { flex: 1; overflow-y: auto; padding: 24px 32px; }
.detail-empty {
    height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-muted); gap: 12px;
}
.detail-empty-icon { font-size: 32px; opacity: 0.5; }

.detail-section { margin-bottom: 24px; }
.detail-section h3 {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); margin-bottom: 10px; font-weight: 600;
}
.detail-meta-grid {
    display: grid; grid-template-columns: 130px 1fr; gap: 6px 16px;
    font-size: 13px;
}
.detail-meta-grid dt { color: var(--text-muted); }
.detail-meta-grid dd { color: var(--text); }

.detail-body {
    background: var(--bg-pane); border: 1px solid var(--border);
    border-radius: 6px; padding: 14px 16px;
    font-size: 13px; line-height: 1.6;
    white-space: pre-wrap;
    max-height: 320px; overflow-y: auto;
}
.detail-draft {
    background: rgba(40,167,69,0.06);
    border: 1px solid rgba(40,167,69,0.3);
    border-radius: 6px; padding: 14px 16px;
    font-size: 13px; line-height: 1.6;
    white-space: pre-wrap;
}

.detail-actions {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-top: 16px; padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ============ BUTTONS ============ */
.btn {
    padding: 8px 16px; border-radius: 6px; border: 1px solid var(--border);
    font-size: 13px; font-weight: 500; cursor: pointer;
    background: var(--bg-pane); color: var(--text);
    transition: all 0.15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--bg-hover); border-color: var(--text-muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ EDIT-TEXTAREA (v0.2) ============ */
.detail-draft-edit {
    width: 100%;
    min-height: 220px;
    background: rgba(40,167,69,0.06);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 14px 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
}
.detail-draft-edit:focus { outline: none; border-color: var(--accent-hover); }

/* ============ NOTITIE (v0.2) ============ */
.note-input {
    width: 100%;
    min-height: 70px;
    background: var(--bg-pane);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}
.note-input:focus { outline: none; border-color: var(--accent); }
.note-status {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
}
.note-status.saved { color: var(--accent); }
.note-status.error { color: var(--danger); }

/* ============ TOAST (v0.2) ============ */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-pane-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1000;
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============ LOGIN ============ */
.login-body {
    background: var(--bg); display: flex;
    align-items: center; justify-content: center; min-height: 100vh;
}
.login-card {
    background: var(--bg-pane); border: 1px solid var(--border);
    border-radius: 10px; padding: 36px; width: 360px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.login-header { text-align: center; margin-bottom: 28px; }
.login-logo { font-size: 22px; font-weight: 600; color: var(--accent); }
.login-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.login-form label { display: block; margin-bottom: 14px; }
.login-form label span { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 5px; }
.login-form input {
    width: 100%; padding: 9px 12px; border-radius: 6px;
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-size: 13px; font-family: inherit;
}
.login-form input:focus { outline: none; border-color: var(--accent); }
.login-form button { width: 100%; padding: 10px; margin-top: 6px; }
.login-error {
    background: rgba(248,81,73,0.12); border: 1px solid rgba(248,81,73,0.3);
    color: #f97870; padding: 10px 12px; border-radius: 6px;
    font-size: 13px; margin-bottom: 18px;
}

/* ============ EMPTY ============ */
.empty {
    padding: 60px 20px; text-align: center; color: var(--text-muted);
}
.empty-icon { font-size: 38px; color: var(--accent); margin-bottom: 12px; }
.empty-text { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.empty-sub { font-size: 13px; }

/* Status badges in detail */
.status-pill {
    display: inline-block; padding: 2px 8px;
    border-radius: 10px; font-size: 11px; font-weight: 500;
    background: var(--bg-hover); color: var(--text-dim);
}
