/* style.css */

:root {
    --primary: #0b7285;
    --primary-dark: #095a68;
    --primary-light: #ebf8ff;
    --accent: #38b2ac; /* Teal */
    --text-main: #2d3748;
    --text-muted: #718096;
    --bg-body: #f7fafc;
    --bg-card: #ffffff;
    --bg-header: #1a202c; /* Dark header */
    --border-light: #e2e8f0;
    --radius-md: 12px;
    --radius-pill: 9999px;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    outline: none;
}

body {
    margin: 0;
    background-color: var(--bg-body);
    font-family:
        'Inter',
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    -webkit-font-smoothing: antialiased;
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background-color: var(--bg-body);
    font-family: inherit;
    color: var(--text-main);
    transition: border-color 0.2s;
}
.form-control:focus {
    border-color: var(--primary);
}
.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}
.select-wrapper {
    position: relative;
}
.select-wrapper select {
    appearance: none;
    cursor: pointer;
}

/* --- Layout --- */
.main-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 550px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- System Header --- */
.system-panel {
    background-color: var(--bg-header);
    padding: 1.25rem 1.5rem;
    color: white;
}
.system-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #cbd5e0;
    margin-bottom: 0.75rem;
}
.system-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* --- Pills (Checkbox replacements) --- */
.pill-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}
.pill-label input {
    display: none;
}
.pill-content {
    display: flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
/* Pill Icon SVG sizing */
.pill-content svg {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    fill: currentColor;
}

.pill-label input:checked + .pill-content {
    background: var(--accent);
    color: #1a202c;
    box-shadow: 0 0 10px rgba(56, 178, 172, 0.4);
}

/* --- Card Body --- */
.card-body {
    padding: 2rem;
}

/* --- Typography --- */
h4 {
    margin: 0;
}
.section-label {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    color: var(--text-main);
}
.section-label svg {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}
.title-icon {
    color: var(--primary);
}
.text-info {
    color: #3182ce;
}

/* --- Divider --- */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    margin: 2rem 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}
.divider::before {
    margin-right: 1em;
}
.divider::after {
    margin-left: 1em;
}

/* --- Toggles --- */
.toggle-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    user-select: none;
}
.toggle-row input {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #cbd5e0;
    border-radius: 99px;
    margin-right: 12px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.toggle-row input:checked + .toggle-switch {
    background-color: var(--primary);
}
.toggle-row input:checked + .toggle-switch::after {
    transform: translateX(20px);
}

.toggle-text {
    font-size: 0.95rem;
    color: var(--text-main);
}

/* --- Grid for Advanced --- */
.grid-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 3rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}
.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(49, 130, 206, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background-color: var(--primary-light);
}

.mt-4 {
    margin-top: 1.5rem;
}
.mt-5 {
    margin-top: 2rem;
}

/* --- Mobile Optimizations --- */
@media (max-width: 600px) {
    body {
        padding: 0;
        background: #fff;
        display: block;
    }
    .main-card {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
    .grid-options {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .card-body {
        padding: 1.5rem;
    }
    .system-panel {
        padding: 1.5rem;
    }
}
