:root {
    --bg: #ffffff;
    --surface: #f8f9fa;
    --muted: #666666;
    --accent: #1a73e8;
    --accent-hover: #1765cc;
    --error: #d32f2f;
    --error-hover: #c62828;
    --border: #dadce0;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --success: #1e8e3e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    padding: 24px;
    background: linear-gradient(135deg, #A3B087 0%, #313647 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 680px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 6px 24px rgba(49,54,71,0.12);
}

h1 {
    font-size: 28px;
    font-weight: 500;
    margin: 0 0 32px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    padding-bottom: 16px;
}

h2 {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 16px;
    color: var(--accent);
}

.settings-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.settings-section:last-child {
    border: none;
}

.setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

p {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-primary);
}

.help-text {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

/* Toggle Switch Styling */
.switch {
    display: inline-block;
    position: relative;
}

.switch input {
    display: none;
}

.slider {
    width: 48px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.slider:after {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
    background: var(--accent);
}

.switch input:checked + .slider:after {
    transform: translateX(22px);
}

.label-text {
    display: inline-block;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 400;
}

/* Form Styling */
.mapping-form {
    display: flex;
    gap: 10px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.mapping-form input {
    flex: 1;
    min-width: 100px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.mapping-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.mapping-form input::placeholder {
    color: var(--muted);
}

/* Button Styling */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: var(--accent);
    color: white;
    transition: all 0.2s ease;
    font-family: inherit;
}

button:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: #5f6368;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: #4a4d50;
}

button.delete {
    background: var(--error);
    padding: 6px 12px;
    font-size: 12px;
}

button.delete:hover {
    background: var(--error-hover);
}

/* Table Styling */
.table-wrapper {
    overflow-x: auto;
    margin: 16px 0;
    border-radius: 8px;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

th {
    background: var(--surface);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

td {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: var(--text-primary);
}

tbody tr:hover {
    background: #f8f9fa;
}

/* Status Messages */
.status {
    padding: 14px 16px;
    border-radius: 8px;
    background: #e8f0fe;
    color: var(--accent);
    font-size: 14px;
    margin: 0;
    border-left: 4px solid var(--accent);
}

.status:empty {
    display: none;
}

.status.error {
    background: #fce8e6;
    color: var(--error);
    border-left-color: var(--error);
}

.status.success {
    background: #e6f4ea;
    color: var(--success);
    border-left-color: var(--success);
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 12px;
    }
    
    .container {
        padding: 20px;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .mapping-form {
        flex-direction: column;
    }
    
    .mapping-form input {
        width: 100%;
    }
}
