/* Loggy — Dark Modern Styles */

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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #0e0e10;
    color: #e4e4e7;
    line-height: 1.5;
    min-height: 100vh;
}

/* ── Layout ─────────────────────────────────────────────────── */

.layout {
    display: flex;
    height: 100vh;
}

#loggy-form {
    display: flex;
    width: 100%;
    min-height: 0;
}

.panel-left {
    width: 300px;
    min-width: 300px;
    padding: 1.5rem;
    border-right: 1px solid #1c1c1f;
    overflow-y: auto;
}

.panel-right {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ── Form sections ──────────────────────────────────────────── */

.form-section {
    margin-bottom: 1.25rem;
}

.form-section > label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Category groups (left panel) ───────────────────────────── */

.category-group {
    margin-bottom: 1.25rem;
}

.category-group h3 {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #1c1c1f;
}

/* ── Select ─────────────────────────────────────────────────── */

select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #27272a;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #e4e4e7;
    background: #18181b;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ── Checkboxes ─────────────────────────────────────────────── */

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #a1a1aa;
    transition: all 0.15s;
    user-select: none;
}

.checkbox-group label:hover {
    background: #18181b;
    color: #e4e4e7;
}

.checkbox-group input:checked + span {
    font-weight: 600;
    color: #c7d2fe;
}

.checkbox-group label:has(input:checked) {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.checkbox-group input[type="checkbox"] {
    accent-color: #6366f1;
    width: 14px;
    height: 14px;
}

/* ── Work detail sections (right panel) ─────────────────────── */

.work-detail-section {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.work-detail-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: #c7d2fe;
}

.detail-entry {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.detail-entry input[type="text"] {
    flex: 1;
    padding: 0.4rem 0.6rem;
    border: 1px solid #27272a;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #e4e4e7;
    background: #0e0e10;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.detail-entry input[type="text"]::placeholder {
    color: #3f3f46;
}

.detail-entry input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-remove {
    background: transparent;
    border: 1px solid #27272a;
    border-radius: 6px;
    color: #52525b;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.btn-remove:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.btn-add {
    background: transparent;
    border: 1px dashed #27272a;
    border-radius: 6px;
    color: #52525b;
    cursor: pointer;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    width: 100%;
    transition: all 0.2s;
}

.btn-add:hover {
    color: #818cf8;
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
}

/* ── Preview ────────────────────────────────────────────────── */

.preview-section {
    margin-top: auto;
    padding-top: 1rem;
}

.preview-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}

.preview-box {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 0.82rem;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
    color: #d4d4d8;
}

.preview-empty {
    color: #3f3f46;
    font-style: italic;
    font-size: 0.82rem;
}

/* ── Submit button ──────────────────────────────────────────── */

#send-btn {
    width: 100%;
    padding: 0.7rem;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
    flex-shrink: 0;
}

#send-btn:hover {
    background: #4f46e5;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

#send-btn:disabled {
    background: #312e81;
    color: #6366f1;
    cursor: not-allowed;
    box-shadow: none;
}

/* ── Status message ─────────────────────────────────────────── */

#status-message {
    margin-top: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    text-align: center;
    flex-shrink: 0;
}

#status-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

#status-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Scrollbar ──────────────────────────────────────────────── */

.panel-left::-webkit-scrollbar,
.panel-right::-webkit-scrollbar,
.preview-box::-webkit-scrollbar {
    width: 4px;
}

.panel-left::-webkit-scrollbar-thumb,
.panel-right::-webkit-scrollbar-thumb,
.preview-box::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 4px;
}

/* ── Utility ────────────────────────────────────────────────── */

.hidden {
    display: none !important;
}
