/* ---------------------------------------------------
   PREMIUM CLEAN UI DESIGN SYSTEM (Forms)
----------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --form-accent-1: #3b82f6; /* Blue */
    --form-accent-2: #8b5cf6; /* Purple */
    
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    
    --input-bg: #f8fafc;
    --input-border: #e2e8f0;
    --input-focus: rgba(59, 130, 246, 0.2);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
}

body.dark {
    --card-bg: #1e293b;
    --card-border: #334155;
    --card-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    
    --input-bg: #0f172a;
    --input-border: #334155;
    --input-focus: rgba(59, 130, 246, 0.3);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

.premium-form-container {
    width: 100%;
    max-width: 100%;
    margin: 0 0 1.5rem 0;
    font-family: 'Outfit', sans-serif;
}

.premium-form-container.form-narrow {
    max-width: 900px;
    margin: 1rem auto;
}

.premium-form-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Gradient Top Bar */
.premium-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--form-accent-1), var(--form-accent-2), #ec4899);
}


/* Header */
.premium-form-header {
    padding: 1.25rem 1.5rem 0.75rem 1.5rem;
    text-align: left;
}

.premium-form-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.02em;
}

.premium-form-header p {
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    margin-top: 0.25rem;
}

/* Form Body */
.premium-form-body {
    padding: 0.75rem 1.5rem 1.5rem 1.5rem;
}

/* Input Styling */
.premium-form-group {
    margin-bottom: 1.5rem;
}

.premium-form-group label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: block;
}

.premium-form-group .text-danger {
    color: #ef4444 !important;
}

.premium-form-group input,
.premium-form-group select,
.premium-form-group textarea {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.premium-form-group input:focus,
.premium-form-group select:focus,
.premium-form-group textarea:focus {
    outline: none;
    border-color: var(--form-accent-1);
    box-shadow: 0 0 0 4px var(--input-focus);
    background-color: var(--card-bg);
}

.premium-form-group .form-text {
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

/* Action Buttons */
.premium-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
}

.btn-premium {
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-premium-submit,
.btn-premium-primary {
    background: linear-gradient(135deg, var(--form-accent-1, #3b82f6), var(--form-accent-2, #8b5cf6));
    color: white !important;
    flex: 1;
    border-radius: 12px;
}

.btn-premium-submit:hover,
.btn-premium-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    color: white !important;
}

.btn-premium-cancel {
    background: var(--card-bg, #ffffff);
    color: var(--text-muted, #64748b) !important;
    border: 1px solid var(--card-border, #e2e8f0);
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
}

.btn-premium-cancel:hover {
    background: #f1f5f9;
    color: var(--text-main, #0f172a) !important;
}
body.dark .btn-premium-cancel:hover {
    background: #1e293b;
}

/* ---------------------------------------------------
   PREMIUM SELECT2 STYLES
----------------------------------------------------- */
/* Main Input Container */
.select2-container--default .select2-selection--single {
    background-color: var(--input-bg) !important;
    border: 1.5px solid var(--input-border) !important;
    border-radius: 12px !important;
    min-height: 48px !important;
    padding: 0.35rem 1rem !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.3s ease !important;
    color: var(--text-main) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-main) !important;
    line-height: normal !important;
    padding-left: 0 !important;
    font-weight: 500;
    background: transparent !important;
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
}

/* Dropdown Arrow & Clear Button */
.select2-container--default .select2-selection--single .select2-selection__clear {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    margin-right: 1.5rem !important;
    color: var(--text-muted) !important;
    font-size: 1.25rem !important;
    font-weight: 400 !important;
    transition: color 0.2s ease !important;
    padding: 0 4px !important;
}

.select2-container--default .select2-selection--single .select2-selection__clear:hover {
    color: var(--form-accent-1) !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 12px !important;
    top: 0 !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: var(--text-muted) transparent transparent transparent !important;
    border-width: 6px 5px 0 5px !important;
    transition: transform 0.3s ease;
}

/* Focus and Open States */
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--form-accent-1) !important;
    box-shadow: 0 0 0 4px var(--input-focus) !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    transform: rotate(180deg);
    border-color: var(--form-accent-1) transparent transparent transparent !important;
}

/* Dropdown Menu */
.select2-dropdown {
    border: 1.5px solid var(--form-accent-1) !important;
    border-top: none !important;
    border-radius: 0 0 12px 12px !important;
    background-color: var(--card-bg) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    animation: slideDownSelect 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownSelect {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

body.dark .select2-dropdown {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

/* Search Box Area */
.select2-container--default .select2-search--dropdown {
    padding: 12px !important;
    border-bottom: 1px solid var(--input-border) !important;
    background-color: var(--card-bg) !important;
}

/* Search Input Field */
.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--input-border) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    background-color: var(--input-bg) !important;
    color: var(--text-main) !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--form-accent-1) !important;
    box-shadow: 0 0 0 3px var(--input-focus) !important;
    outline: none !important;
}

/* Results List */
.select2-results {
    padding: 4px !important;
}

.select2-container--default .select2-results__option {
    padding: 10px 14px !important;
    color: var(--text-main) !important;
    border-radius: 8px !important;
    margin-bottom: 2px !important;
    font-size: 0.95rem !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}

.select2-container--default .select2-results__option:last-child {
    margin-bottom: 0 !important;
}

/* Hover/Highlight on Options */
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--default .select2-results__option:hover {
    background-color: var(--input-focus) !important;
    color: var(--form-accent-1) !important;
    font-weight: 500 !important;
}

/* Selected Option */
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: var(--form-accent-1) !important;
    color: white !important;
    font-weight: 600 !important;
}

/* Text Crud Style */
.text-crud{
    color: #20c997;
    font-weight: bold;
}
.text-crud:hover {
    color: #198754; 
}

/* Fix Date & Time Input Icons in Dark Mode */
body.dark input[type="date"]::-webkit-calendar-picker-indicator,
body.dark input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
    cursor: pointer;
}
body.dark input[type="date"]::-webkit-calendar-picker-indicator:hover,
body.dark input[type="time"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Premium Instruction Box (100% Readable in Light & Dark Modes) */
.premium-instruction-box {
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--form-accent-1);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.premium-instruction-box .instruction-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-instruction-box .instruction-title i {
    color: var(--form-accent-1);
}

.premium-instruction-box .instruction-list {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.premium-instruction-box .instruction-list strong {
    color: var(--text-main);
}

.premium-instruction-box .instruction-list a {
    color: var(--form-accent-1);
    font-weight: 600;
    text-decoration: underline;
}

.premium-instruction-box .instruction-list a:hover {
    color: var(--form-accent-2);
}

/* ---------------------------------------------------
   PREMIUM CARD & FORM TEXT VISIBILITY (LIGHT & DARK THEMES)
----------------------------------------------------- */
.premium-form-card {
    color: var(--text-main);
}

.premium-form-header h1,
.premium-form-header h2,
.premium-form-header h3,
.premium-form-header h4,
.premium-form-header h5,
.premium-form-header h6,
.premium-form-header i {
    color: var(--text-main);
}

.premium-form-body,
.premium-form-body p,
.premium-form-body span,
.premium-form-body div,
.premium-form-body strong,
.premium-form-body label {
    color: var(--text-main);
}

/* Dark Mode Text Visibility Overrides */
body.dark .premium-form-card,
body.dark .premium-form-header h1,
body.dark .premium-form-header h2,
body.dark .premium-form-header h3,
body.dark .premium-form-header h4,
body.dark .premium-form-header h5,
body.dark .premium-form-header h6,
body.dark .premium-form-header i,
body.dark .premium-form-body,
body.dark .premium-form-body p,
body.dark .premium-form-body span,
body.dark .premium-form-body div,
body.dark .premium-form-body strong,
body.dark .premium-value,
body.dark .premium-label {
    color: #f8fafc !important;
}

body.dark .premium-form-body .text-muted,
body.dark .small.text-muted {
    color: #94a3b8 !important;
}

/* ---------------------------------------------------
   PREMIUM SCORE CARDS & DETAIL PAGE NAME LABELS
----------------------------------------------------- */
.premium-score-card,
.bg-light.border,
.bg-light.rounded,
.p-2.bg-light {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
}

.premium-score-card .small,
.premium-score-card .fw-bold,
.bg-light .small,
.bg-light .fw-bold,
.p-2.bg-light .small,
.p-2.bg-light .fw-bold {
    color: #1e293b !important;
    font-weight: 700 !important;
}

.premium-score-card.bg-dark,
.p-2.bg-dark,
.bg-dark {
    background-color: #1e293b !important;
    color: #ffffff !important;
}

.premium-score-card.bg-dark .small,
.premium-score-card.bg-dark .fw-bold,
.p-2.bg-dark .small,
.p-2.bg-dark .fw-bold,
.bg-dark .small,
.bg-dark .fw-bold {
    color: #ffffff !important;
    font-weight: 700 !important;
}


