:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f9fafb;
    --card-bg: #ffffff;
    --text-color: #1f2937;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
}

body.dark-theme {
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    --bg-color: #111827;
    --card-bg: #1f2937;
    --text-color: #f3f4f6;
    --border-color: #374151;
}

body.dark-theme select, 
body.dark-theme textarea, 
body.dark-theme input[type="file"], 
body.dark-theme input[type="text"], 
body.dark-theme input[type="number"] {
    background-color: #111827;
    color: #f3f4f6;
    border-color: #4b5563;
}

body.dark-theme .readonly-field {
    background-color: #374151 !important;
    color: #9ca3af;
}

body.dark-theme .intro-text {
    background-color: #111827;
    color: #d1d5db;
    border-left-color: #6366f1;
}

body.dark-theme .partition-card {
    background-color: #111827;
    border-color: #4b5563;
}

body.dark-theme .form-section {
    background-color: #1f2937;
    border-color: #374151;
}

body.dark-theme .warning-box {
    background-color: #4a3f12;
    color: #fde68a;
    border-color: #78631c;
}

body.dark-theme .warning-box a {
    color: #fde68a;
}

body.dark-theme .partition-card h4 {
    color: #d1d5db;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-container h1 {
    margin-bottom: 0;
}

.theme-toggle {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background-color: var(--border-color);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 32px;
    width: 100%;
    position: relative;
    max-width: 500px;
    box-sizing: border-box;
}

h1 {
    margin-top: 0;
    font-size: 1.5rem;
    color: var(--text-color);
}

.intro-text {
    background-color: var(--bg-color);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    border-left: 4px solid var(--primary-color);
}

.intro-text p {
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.intro-text p:last-child {
    margin-bottom: 0;
}

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

.form-section {
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    background-color: #fcfcfc;
}

.form-section h3 {
    margin-top: 0;
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-color);
}

.partition-card {
    background-color: white;
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.partition-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: #4b5563;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.required {
    color: var(--error-color);
    margin-left: 2px;
}

.dynamic-required::after {
    content: " *";
    color: var(--error-color);
    margin-left: 2px;
}

select, textarea, input[type="file"], input[type="text"], input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #fff;
}

.readonly-field {
    background-color: #f3f4f6 !important;
    color: #6b7280;
    cursor: not-allowed;
}

textarea {
    resize: vertical;
}

select:focus, textarea:focus, input[type="file"]:focus, input[type="text"]:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.contact-inputs {
    display: flex;
    gap: 10px;
}

.contact-inputs select {
    width: 35%;
}

.contact-inputs input {
    width: 65%;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 0.9rem;
    margin-top: 12px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    margin-bottom: 0;
}

.checkbox-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.checkbox-label:has(input[type="checkbox"]:disabled) {
    color: #9ca3af;
    cursor: not-allowed;
}

.help-text {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 4px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--primary-hover);
}

button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

#status-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.warning-box {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.warning-box a {
    color: #856404;
    font-weight: 600;
}

#status-message.success a {
    color: #047857;
    text-decoration: underline;
    font-weight: 600;
}

body.dark-theme #status-message.success a {
    color: #6ee7b7;
}
