/* --- 0. Layout Utilities --- */
.w-auto { width: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.gap-4 { gap: 1.5rem !important; }
.justify-content-center { justify-content: center !important; }
.text-center { text-align: center !important; }
.text-danger { color: var(--danger-color) !important; }
.text-volt { color: var(--color-volt) !important; }
.border-danger { border: 1px solid var(--danger-color) !important; }

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.ml-1 { margin-left: 0.25rem !important; }
.ml-3 { margin-left: 1rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.pl-0 { padding-left: 0 !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.p-2 { padding: 0.5rem !important; }

/* Sizing Utilities */
.w-28 { width: 28px !important; }
.w-30 { width: 30px !important; }
.w-100 { width: 100% !important; }
.h-28 { height: 28px !important; }
.min-w-60 { min-width: 60px !important; }

/* Typography & Text Utilities */
.fs-xxs { font-size: 0.75rem !important; }
.fs-xs { font-size: 0.8rem !important; }
.fs-md { font-size: 1rem !important; }
.fs-large { font-size: 1.2rem !important; }
.text-none { text-transform: none !important; text-decoration: none !important; }
.color-inherit { color: inherit !important; }
.fw-bold { font-weight: var(--fw-bold, 700) !important; }
.ls-1 { letter-spacing: 1px !important; }
.lh-20 { line-height: 20px !important; }

/* Border & Misc */
.border { border: 1px solid var(--border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }
.border-bottom-0 { border-bottom: 0 !important; }
.rounded-sm { border-radius: var(--radius-sm, 4px) !important; }
.opacity-6 { opacity: 0.6 !important; }
.opacity-8 { opacity: 0.8 !important; }
.shadow-none { box-shadow: none !important; }
.align-middle { vertical-align: middle !important; }
.rounded-circle { border-radius: 50% !important; }

/* Order Utilities */
@media (min-width: 992px) {
    .order-lg-1 { order: 1 !important; }
    .order-lg-2 { order: 2 !important; }
}

/* --- 6. Input Groups (Design System) --- */
.input-group {
    display: flex;
    width: 100%;
}

.input-group .form-control {
    flex: 1 1 auto;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-append {
    display: flex;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    width: auto;
}

/* --- 6b. Search Form Specific (Flexbox Alignment) --- */
.search-form .input-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.search-form .input-group .form-control,
.search-form .input-group .btn {
    border-radius: var(--radius-md, 8px) !important;
}

/* Progress Bar */
.progress {
    display: flex;
    height: 1rem;
    overflow: hidden;
    background-color: var(--border-color);
    border-radius: var(--border-radius);
}
.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Page Header Standardization */
.page-header-actions h1 {
    margin-bottom: 0 !important;
}

/* --- Responsive Visibility Utilities --- */
body .d-none { display: none !important; }

@media (min-width: 992px) {
    body .d-lg-none { display: none !important; }
    body .d-lg-flex { display: flex !important; }
    body .d-lg-block { display: block !important; }
}

/* Toast Transitions */
.fade-out {
    opacity: 0 !important;
    transition: opacity 0.5s ease-out;
}

/* Animation for pulse */
@keyframes pulse-accent {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(132, 204, 22, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(132, 204, 22, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(132, 204, 22, 0); }
}

.pulse {
  animation: pulse-accent 2s infinite;
}

.strikethrough {
  text-decoration: line-through;
  opacity: 0.6;
}

/* Landing Page Split Layout */
.login-split-container {
    display: flex;
    min-height: calc(100vh - 200px);
    align-items: center;
    gap: 40px;
}

.login-pitch {
    flex: 1;
    padding-right: 20px;
}

.login-form-side {
    flex: 1;
    display: flex;
    justify-content: center;
}

.display-font {
    font-family: var(--font-score);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.subhead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.feature-bullets {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.feature-bullets li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-bullets i {
    color: var(--accent-color);
    width: 24px;
}

.landing-visual {
    font-size: 8rem;
    color: var(--accent-color);
    opacity: 0.2;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .login-split-container {
        flex-direction: column;
        padding-top: 40px;
    }
    .login-pitch {
        text-align: center;
        padding-right: 0;
    }
    .feature-bullets {
        display: inline-block;
        text-align: left;
    }
    .display-font {
        font-size: 2.5rem;
    }
}

/* --- 7. Segmented Controls --- */
.segmented-control {
    display: flex;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
}

.segmented-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.segmented-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.visually-hidden:checked + .segmented-item {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .segmented-control {
    background-color: #000000;
}

[data-theme="dark"] .segmented-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .visually-hidden:checked + .segmented-item {
    background-color: var(--card-bg);
    color: var(--primary-color);
}

/* --- 8. File Upload Styling --- */
.file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.file-upload-button {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.file-upload-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.file-upload-input {
    display: none;
}

.file-name-text {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* --- Accessibility --- */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
