/* Dynamic Theme Colors */
:root {
    --theme-primary: #8d9e7f;
    --theme-secondary: #5e6f50;
    --theme-accent: #7d8e6f;
    --theme-header-text: #000000;
    --theme-body-text: #333333;
    --theme-button-bg: #8d9e7f;
    --theme-button-hover: #7d8e6f;
    --theme-badge-text: #ffffff;
}

/* Global Backgrounds */
body {
    background: var(--theme-primary) !important;
}

/* Buttons - Solid color, no gradient */
button:not(.btn-secondary):not(.danger):not(.theme-btn):not(.icon-btn):not(.resend-btn):not(.close-btn):not(.btn-logout):not(.btn-login),
.submit-btn,
.quick-link,
.action-btn:not(.danger),
.submit-form-btn {
    background: var(--theme-button-bg) !important;
}

button:not(.btn-secondary):not(.danger):not(.theme-btn):not(.icon-btn):not(.resend-btn):not(.close-btn):not(.btn-logout):not(.btn-login):hover,
.submit-btn:hover,
.quick-link:hover,
.action-btn:not(.danger):hover,
.submit-form-btn:hover {
    background: var(--theme-button-hover) !important;
}

/* Links - specific only */
.links a,
.nav-links a {
    color: var(--theme-primary) !important;
}

/* Badges */
.badge-admin {
    background: var(--theme-primary) !important;
    color: var(--theme-badge-text) !important;
}

.badge-manager,
.badge-staff,
.badge-user,
.badge-active,
.badge-inactive,
.badge {
    color: var(--theme-badge-text) !important;
}

/* Form Inputs Focus */
input:focus,
textarea:focus,
select:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(141, 158, 127, 0.1) !important;
}

/* Header - solid background */
.header {
    background: var(--theme-primary) !important;
}

/* Logo text - no gradient */
.header-logo-text {
    color: var(--theme-header-text) !important;
}

.nav-link {
    color: var(--theme-header-text) !important;
}

.user-name {
    color: var(--theme-body-text) !important;
}

.user-avatar {
    background: var(--theme-primary) !important;
}

/* Body text */
body,
.container,
.panel,
p, span, div {
    color: var(--theme-body-text) !important;
}

/* Headings use header text color */
h1, h2, h3, h4, h5, h6 {
    color: var(--theme-header-text) !important;
}

/* Form Builder */
.field-button {
    border: 2px solid var(--theme-button-bg) !important;
}

.field-button:hover {
    background: var(--theme-button-bg) !important;
}

.form-actions button {
    background: var(--theme-button-bg) !important;
}

.form-actions button:hover {
    background: var(--theme-button-hover) !important;
}

/* Modal */
.modal-header {
    background: var(--theme-primary) !important;
}

.modal-header h2 {
    color: var(--theme-header-text) !important;
}

.modal-section-header {
    background: var(--theme-primary) !important;
}

.modal-section-title {
    color: var(--theme-header-text) !important;
}

.modal-section-description {
    color: var(--theme-header-text) !important;
    opacity: 0.8;
}

.modal-actions button:not(.btn-secondary) {
    background: var(--theme-button-bg) !important;
}

.modal-actions button:not(.btn-secondary):hover {
    background: var(--theme-button-hover) !important;
}

/* Stat Cards */
.stat-card {
    border-left: 4px solid var(--theme-primary) !important;
}

/* Section Headers */
h2 {
    color: var(--theme-primary) !important;
}

.form-section h2 {
    color: var(--theme-primary) !important;
}

/* View Button in Submissions */
table .action-btn:not(.danger) {
    background: var(--theme-button-bg) !important;
}

table .action-btn:not(.danger):hover {
    background: var(--theme-button-hover) !important;
}

/* Text Label Section */
.text-label-section {
    border-left-color: var(--theme-primary) !important;
}

/* Active Nav Link */
.nav-link.active {
    background: var(--theme-primary) !important;
}

/* Loading States */
.loading-spinner {
    border-color: var(--theme-primary) !important;
    border-top-color: transparent !important;
}

/* Checkbox/Radio Custom Styling */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    accent-color: var(--theme-primary);
}

/* Password Requirements Valid */
.password-requirements li.valid {
    color: var(--theme-primary) !important;
}

/* Timer */
.timer {
    color: var(--theme-primary) !important;
}

/* Resend Button */
.resend-btn {
    color: var(--theme-primary) !important;
}

.resend-btn:hover {
    color: var(--theme-accent) !important;
}

/* OTP Input Focus */
.otp-input:focus {
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(141, 158, 127, 0.1) !important;
}

/* Email Display */
.email-display {
    color: var(--theme-primary) !important;
}
