:root {
    --primary-color: #3498db;
    --primary-hover: #2980b9;
    --primary-disabled-bg: #a9d8f0;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
    --success-color: #3c763d;
    --success-bg: #dff0d8;
    --error-color: #a94442;
    --error-bg: #f2dede;
    --warning-color: #8a6d3b;
    --warning-bg: #fcf8e3;
    --info-color: #31708f;
    --info-bg: #d9edf7;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f9f9f9;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 20px;
}

/* Form Checkbox Styling */
.form-check {
    display: flex;
    align-items: center;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-bottom: 0.125rem;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.25em;
    margin-left: -1.5em;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: 1px solid var(--border-color);
    border-radius: 0.25em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-input:focus {
    border-color: var(--primary-hover);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.form-check-label {
    margin-left: 0.5rem;
    cursor: pointer;
    user-select: none;
}

/* Buttons */
/* Header & Navigation */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-left: 1.5rem;
}

.main-nav a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #3182ce;
}

.main-nav a.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #3182ce;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled,
.btn-primary[disabled] {
    background: var(--primary-disabled-bg);
    cursor: not-allowed;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.form-group:last-child {
    border-bottom: none;
}

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

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    max-width: 700px;
    padding: 12px 16px;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    margin: 4px 0 12px 0;
    box-sizing: border-box;
}

/* Focus states */
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

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

/* Make password fields slightly wider to accommodate the show/hide toggle */
input[type="password"] {
    letter-spacing: 1px;
    font-family: monospace;
    padding-right: 40px;
}

.form-actions {
    margin-top: 20px;
    text-align: right;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: var(--success-color);
    background-color: var(--success-bg);
    border-color: #d6e9c6;
}

/* Toggle Switch Styling */
.form-switch {
    display: flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.25rem 0;
    margin: 0;
}

.form-switch .form-check-input {
    width: 3.5em;
    height: 1.75em;
    margin: 0 0.75em 0 0;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
    background-position: left center;
    border-radius: 2em;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    float: none;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    background-size: 1.5em 1.5em;
    background-position: 0.15em center;
}

.form-switch .form-check-input:checked {
    background-position: right center;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

.form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
    border-color: var(--primary-color);
}

.form-switch .form-check-label {
    margin-left: 0.5em;
    cursor: pointer;
    user-select: none;
}

.alert-error {
    color: var(--error-color);
    background-color: var(--error-bg);
    border-color: #ebccd1;
}

.alert-warning {
    color: var(--warning-color);
    background-color: var(--warning-bg);
    border-color: #faebcc;
}

.alert-info {
    color: var(--info-color);
    background-color: var(--info-bg);
    border-color: #bce8f1;
}

/* Loading indicator */
.loading {
    opacity: 0.7;
    position: relative;
    pointer-events: none;
}

.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    opacity: 0;
}

.loading:disabled:after {
    opacity: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* .logo is defined earlier, this seems like a duplicate or alternative. Keeping both for now. */
.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
    color: #777;
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

.custom-select-height {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 1.25rem; /* Add left padding for placeholder text */
    /* This aims to match the height of form-control-lg more closely */
}
