:root {
    --font-serif: 'Merriweather', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --color-bg: #ffffff;
    --color-text: #292929;
    --color-accent: #1a8917;
    --color-gray: #757575;
    --color-light-gray: #f2f2f2;
    --max-width: 1000px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 700;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    border-bottom: 1px solid var(--color-light-gray);
    padding: 20px 0;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

/* Form Section */
.form-section {
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-text);
}

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-sans);
    box-sizing: border-box;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.region-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
}

.region-checkbox:hover {
    background-color: #fafafa;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: #156d12;
}

.btn-danger {
    background-color: #d93025;
    color: white;
}

/* Results Section */
.results-section {
    display: none;
    /* Hidden by default */
    margin-top: 40px;
    border-top: 1px solid var(--color-light-gray);
    padding-top: 40px;
}

.status-card {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.log-window {
    background: #292929;
    color: #eee;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.instance-list {
    width: 100%;
    border-collapse: collapse;
}

.instance-list th,
.instance-list td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

.status-running {
    background: #e3f2fd;
    color: #1565c0;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-error {
    background: #ffebee;
    color: #c62828;
}

/* Main Layout */
.main-layout {
    display: flex;
    gap: 30px;
}

/* Sidebar */
.sidebar {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-right: 1px solid #eee;
    padding-right: 20px;
}

.content-area {
    flex: 1;
    min-width: 0;
}

/* Tabs */
.tab-btn {
    padding: 12px 16px;
    border: none;
    background: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--color-gray);
    text-align: left;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-btn svg {
    flex-shrink: 0;
}

.tab-btn.active {
    color: var(--color-text);
    background-color: var(--color-light-gray);
    font-weight: 600;
}

.tab-btn:hover {
    color: var(--color-text);
    background-color: #f8f8f8;
}


/* Warning Banner */
.warning-banner {
    background: #fff3e0;
    border: 1px solid #ffb74d;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.warning-banner strong {
    color: #e65100;
    font-size: 1.1rem;
}

.warning-banner p {
    color: #bf360c;
    margin: 10px 0 15px;
}


/* Link Button */
.btn-link {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-weight: normal;
}

.btn-link:hover {
    color: #156d12;
}
