:root {
    --bg: #f3f4f6;
    --card: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #4b5563;
    --primary: #2563eb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    overflow: hidden;
}

.input-group {
    margin-bottom: 1rem;
}

.compact-grid {
    gap: 0.85rem;
}

.compact-grid .input-group {
    margin-bottom: 0.35rem;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.input-field {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-field:focus,
.model-card input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.notice {
    display: block;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.4;
}

.hidden {
    display: none;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.section-title.mb-0 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.preset-select {
    margin-bottom: 0;
}

.model-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.04);
}

.remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}

.remove-btn:hover {
    text-decoration: underline;
}

.checkbox-wrapper {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
    gap: 0.35rem;
}

.checkbox-label input {
    accent-color: var(--primary);
}

.layout {
    height: calc(100vh - 3rem);
    overflow: hidden;
}

.panel-scroll {
    height: 100%;
    overflow-y: auto;
    padding-right: 0.25rem;
}

@media (max-width: 1024px) {
    .layout {
        height: calc(100vh - 2rem);
    }
}
