/**
 * Level3Support — components.css
 * Lead Developer: Andres Provero (@aprovero)
 * © 2026 Level3Support
 *
 * Design System: Slate / White / Electric Blue
 * Layer: Universal UI components, widgets, and utilities
 */

@layer components {
    /* ==========================================================================
       1. Form Elements
       ========================================================================== */
    .form-group, .form-section {
        margin-bottom: 20px;
        padding: 15px;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-md);
    }

    .form-section-title {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 15px;
        color: #1f2937;
    }

    .form-container {
        background-color: white;
        border-radius: var(--border-radius-md);
        padding: 30px;
        box-shadow: var(--shadow-sm);
        margin-bottom: 30px;
    }

    label {
        display: block;
        font-weight: bold;
        margin: 10px 0 5px;
        color: #444;
    }

    .input-group {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-end !important;
        margin-bottom: 16px !important;
    }

    /* Bottom-align grid cells in all input-row variants so inputs line up
       even when labels wrap to different heights — fix applies to all tools */
    .input-row,
    .input-row-3,
    .input-row-three {
        align-items: end !important;
    }

    /* Force standard height and clear standard bottom margins for any inputs 
       nested inside unit/suffix helper wrappers globally across all tools */
    .input-with-unit {
        display: flex !important;
        align-items: stretch !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .input-with-unit input {
        flex: 1 !important;
        margin-bottom: 0 !important;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        height: 42px !important;
        box-sizing: border-box !important;
    }

    .input-with-unit select {
        width: auto !important;
        min-width: 80px !important;
        margin-bottom: 0 !important;
        border-left: none !important;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        height: 42px !important;
        box-sizing: border-box !important;
    }

    .input-with-unit .input-unit {
        background: var(--background-dark, #f1f5f9) !important;
        border: 1px solid var(--border-light, #cbd5e1) !important;
        border-left: none !important;
        padding: 0 12px !important;
        height: 42px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.9rem !important;
        color: var(--text-secondary, #64748b) !important;
        font-weight: 600 !important;
        border-top-right-radius: var(--border-radius-sm, 4px) !important;
        border-bottom-right-radius: var(--border-radius-sm, 4px) !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    }

    input, select, textarea {
        width: 100%;
        padding: 10px;
        margin-bottom: 0 !important;
        border: 1px solid var(--border-light);
        border-radius: var(--border-radius-sm);
        font-size: 16px;
        transition: border-color 0.3s;
        box-sizing: border-box !important;
    }

    input, select {
        height: 42px !important;
    }

    input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: var(--border-focus);
        box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
    }

    textarea {
        min-height: 100px;
        resize: vertical;
    }

    /* Checkbox styling */
    .checkbox-group {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 10px 0;
    }

    .checkbox-group input[type="checkbox"] {
        width: auto;
        margin: 0;
    }

    .checkbox-group label {
        margin: 0;
        display: inline;
        font-weight: normal;
    }

    /* Rating system */
    .rating-group {
        display: flex;
        margin-bottom: 15px;
        align-items: center;
    }

    .rating-title {
        font-weight: 500;
        min-width: 200px;
        padding-right: 15px;
        text-align: left;
    }

    .rating-options {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        flex-grow: 1;
        width: 100%;
    }

    .rating-option, .recommend-option {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }

    .rating-option input[type="radio"], .recommend-option input[type="radio"]{
        margin-bottom: 0px;
        width: auto;
    }

    .rating-option label, .recommend-option label {
        margin-top: 0px;
        line-height: 1;
        font-weight: normal;
        display: block;
        font-size: 0.85em;
    }

    /* Radio button styling for evaluation */
    .rating-option input[type="radio"]:checked + label {
        background-color: var(--primary-color);
        color: white;
        border-radius: var(--border-radius-sm);
        padding: 2px 5px;
    }
      
    .rating-option:hover {
        background-color: #f5f5f5;
        border-radius: var(--border-radius-sm);
        cursor: pointer;
    }
      
    .rating-option {
        transition: all 0.2s ease;
    }

    /* Recommendation options */
    .recommend-options {
        display: flex;
        gap: 20px;
        margin-top: 10px;
    }

    .recommend-option {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 3px;
    }

    .recommend-option input {
        margin-right: 0px;
        width: auto;
    }

    .recommend-option label {
        margin-top: 0;
        display: block;
        font-weight: normal;
    }

    .recommend-option input[type="radio"]:checked + label {
        background-color: var(--primary-color);
        color: white;
        border-radius: var(--border-radius-sm);
        padding: 2px 5px;
    }
      
    .recommend-option:hover {
        background-color: #f5f5f5;
        border-radius: var(--border-radius-sm);
        cursor: pointer;
    }

    /* ==========================================================================
       2. Buttons
       ========================================================================== */
    button, .submit-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        height: 42px;
        padding: 0 1.25rem;
        background-color: var(--primary-color);
        color: white;
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        font-size: 0.88rem;
        border: none;
        border-radius: var(--border-radius-sm);
        cursor: pointer;
        transition: var(--transition-default);
        margin: 0;
    }

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

    button:disabled, .submit-button:disabled {
        background-color: var(--text-light);
        cursor: not-allowed;
        opacity: 0.7;
    }

    .button-secondary {
        background-color: var(--text-secondary);
        color: white;
        height: 42px;
    }

    .button-secondary:hover {
        background-color: var(--text-color);
    }

    .lookup-btn {
        height: 40px;
        margin-top: 0;
        border-radius: 0 5px 5px 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
      
    input[type="text"]#trainingId {
        height: 40px;
        border-radius: 5px 0 0 5px;
    }
      
    .flex.items-center {
        display: flex;
        align-items: center;
    }

    .modal-button {
        background-color: var(--error-color);
        color: white;
        padding: 12px 24px;
        border: none;
        border-radius: var(--border-radius-sm);
        font-weight: bold;
        cursor: pointer;
        transition: var(--transition-default);
        display: block;
        margin: 0 auto;
        width: auto;
    }

    .modal-button:hover {
        background-color: #c82333;
    }

    #success-modal .modal-button {
        background-color: var(--success-color);
        color: white;
    }

    #success-modal .modal-button:hover {
        background-color: var(--success-color);
        filter: brightness(0.9);
    }

    .filter-item {
        cursor: pointer;
        padding: 6px 12px;
        background-color: #e9ecef;
        border-radius: var(--border-radius-sm);
        font-size: 14px;
        transition: var(--transition-quick);
    }

    .filter-item:hover {
        background-color: #dee2e6;
    }

    .filter-item.active {
        background-color: var(--info-color);
        color: white;
    }

    .admin-button {
        background-color: var(--success-color);
        color: white;
        width: 30px;
        height: 30px;
        border-radius: var(--border-radius-round);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        border: none;
        transition: var(--transition-quick);
    }

    .admin-button:hover {
        background-color: #218838;
    }

    .btn-danger {
        background-color: var(--error-color);
        color: white;
        border: none;
        border-radius: var(--border-radius-round);
        width: 28px;
        height: 28px;
        font-size: 20px;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        padding: 0;
    }

    .btn-success {
        background-color: var(--success-color);
        color: white;
        border: none;
        border-radius: var(--border-radius-sm);
        padding: 8px 12px;
        font-size: 14px;
        cursor: pointer;
        margin-top: 10px;
    }

    .view-details-btn, .hide-details-btn {
        display: block;
        width: 100%;
        padding: 8px;
        text-align: center;
        border-radius: var(--border-radius-sm);
        font-weight: bold;
        cursor: pointer;
        border: none;
        transition: var(--transition-quick);
    }

    .view-details-btn {
        background-color: var(--info-color);
        color: white;
    }

    .view-details-btn:hover {
        background-color: #0056b3;
    }

    .hide-details-btn {
        display: none;
        background-color: #6c757d;
        color: white;
        margin-top: 15px;
    }

    .hide-details-btn:hover {
        background-color: #5a6268;
    }

    .cancel-button {
        background-color: #6c757d;
        color: white;
        border: none;
        border-radius: var(--border-radius-sm);
        padding: 8px 15px;
        cursor: pointer;
    }

    /* ==========================================================================
       3. Modals & Dialogs
       ========================================================================== */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        backdrop-filter: blur(5px);
        opacity: 1;
        visibility: visible;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .modal-overlay.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .modal-content {
        background-color: white;
        padding: 1.75rem;
        border-radius: var(--border-radius-lg);
        max-width: 500px;
        width: 90%;
        box-shadow: var(--shadow-lg);
    }

    #success-modal .modal-content {
        background-color: var(--success-light);
        border-color: var(--success-border);
        color: var(--success-text);
    }

    /* ==========================================================================
       4. Messages & Alerts
       ========================================================================== */
    .message {
        margin: 15px 0;
        padding: 10px;
        border-radius: var(--border-radius-sm);
        text-align: center;
    }

    .message.success {
        background-color: var(--success-light);
        color: var(--success-text);
        border: 1px solid var(--success-border);
    }

    .message.error {
        background-color: var(--error-light);
        color: var(--error-text);
        border: 1px solid var(--error-border);
    }

    .message.info {
        background-color: var(--info-light);
        color: var(--info-text);
        border: 1px solid var(--info-border);
    }

    .message.warning {
        background-color: var(--warning-light);
        color: var(--warning-text);
        border: 1px solid var(--warning-border);
    }

    .message-details {
        border-top: 1px solid rgba(0,0,0,0.1);
        padding-top: 5px;
        margin-top: 5px;
        font-size: 0.9em;
        color: inherit;
        opacity: 0.9;
    }

    .error-message {
        text-align: center;
        padding: 20px;
        background-color: var(--error-light);
        color: var(--error-text);
        border-radius: var(--border-radius-md);
        margin: 20px 0;
    }

    #fetchStatus {
        text-align: left;
        margin-top: 5px;
    }

    /* ==========================================================================
       5. Loading Indicators & Skeletons
       ========================================================================== */
    .loading-state, #loading-spinner {
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px 0;
        text-align: center;
    }

    .spinner {
        border: 4px solid #f3f3f3;
        border-top: 4px solid var(--info-color);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        animation: spin 1s linear infinite;
        margin-bottom: 15px;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

    .loading {
        opacity: 0.7;
        pointer-events: none;
    }

    /* ==========================================================================
       6. File Upload Components
       ========================================================================== */
    .file-upload {
        border: 2px dashed var(--border-light);
        border-radius: var(--border-radius-md);
        padding: 20px;
        text-align: center;
        transition: var(--transition-default);
        cursor: pointer;
    }

    .file-upload.dragover {
        border-color: var(--border-focus);
        background-color: rgba(0,123,255,0.05);
    }

    .file-list {
        border: 1px solid var(--border-light);
        border-radius: var(--border-radius-sm);
        margin-top: 10px;
        max-height: 200px;
        overflow-y: auto;
    }

    .file-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .file-item:last-child {
        border-bottom: none;
    }

    .remove-file {
        color: var(--error-color);
        font-weight: bold;
        cursor: pointer;
        padding: 0 5px;
    }

    .remove-file:hover {
        background-color: rgba(255, 0, 0, 0.1);
        border-radius: 50%;
    }

    /* ==========================================================================
       7. Reusable Cards & Senders
       ========================================================================== */
    .resource-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin: 20px 0;
    }

    .resource-link {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f0f7ff;
        border: 1px solid #cce5ff;
        border-radius: var(--border-radius-md);
        padding: 15px;
        text-decoration: none;
        color: var(--info-color);
        transition: var(--transition-quick);
        height: 100%;
        text-align: center;
    }

    .resource-link:hover {
        background-color: #e6f0ff;
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .link-icon {
        width: 24px;
        height: 24px;
        margin-right: 10px;
    }

    .under-construction-banner {
        background-color: var(--warning-light);
        border: 1px solid var(--warning-border);
        border-left: 5px solid var(--warning-color);
        border-radius: var(--border-radius-md);
        padding: 15px 20px;
        margin: 20px 0;
        display: flex;
        align-items: center;
        box-shadow: var(--shadow-sm);
    }

    .construction-icon {
        font-size: 32px;
        margin-right: 20px;
    }

    .construction-message h2 {
        margin: 0 0 8px 0;
        font-size: 20px;
        color: var(--warning-text);
    }

    .construction-message p {
        margin: 0;
        color: var(--warning-text);
    }

    .empty-state {
        text-align: center;
        padding: 40px 20px;
        background-color: #f8f9fa;
        border-radius: var(--border-radius-md);
        margin: 20px 0;
    }

    .empty-state-icon {
        font-size: 48px;
        margin-bottom: 15px;
        color: #6c757d;
    }

    .empty-state-heading {
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 10px;
        color: #495057;
    }

    .empty-state-text {
        color: #6c757d;
        margin-bottom: 20px;
    }

    /* Warning Assumer and Results layout components */
    .warning-box {
        background: #fffbeb;
        border-left: 4px solid #d97706;
        padding: 1rem;
        border-radius: 8px;
        margin: 1.5rem 0;
        font-size: 0.9rem;
        color: #92400e;
        display: flex;
        gap: 0.75rem;
    }

    .warning-box i {
        font-size: 1.2rem;
        color: #d97706;
        margin-top: 0.1rem;
    }

    .warning-title {
        font-weight: 700;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    .assumptions-box {
        background: #f0f7ff !important;
        border-left: 4px solid #3b82f6 !important;
        padding: 1.25rem 1.5rem !important;
        border-radius: 8px !important;
        margin: 1.5rem 0 !important;
        font-size: 0.9rem !important;
        color: #1e3a8a !important;
    }

    .assumptions-title {
        font-family: 'Outfit', sans-serif !important;
        font-weight: 600 !important;
        margin-bottom: 0.75rem !important;
        color: #1e40af !important;
        font-size: 1rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .assumptions-list {
        padding-left: 1.25rem !important;
        list-style-type: disc !important;
    }

    .assumptions-list li {
        margin-bottom: 0.35rem !important;
        color: #334155 !important;
    }

    .result-panel {
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
        border-radius: 12px;
        padding: 1.5rem;
        margin: 1.5rem 0;
        color: #166534;
    }

    .result-panel.neutral {
        background: #f8fafc;
        border: 1px solid var(--border-color);
        color: var(--text-color);
    }

    .result-panel.neutral .result-header {
        border-bottom: 1px solid var(--border-color);
        color: var(--text-color);
    }

    .result-header {
        font-family: 'Outfit', sans-serif;
        font-weight: 700;
        font-size: 1.1rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid #dcfce7;
        padding-bottom: 0.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .result-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        font-size: 0.95rem;
    }

    .result-value {
        font-weight: 700;
        font-size: 1.25rem;
    }

    .search-container {
        margin-bottom: 1.5rem;
        position: relative;
        max-width: 400px;
    }

    .search-input {
        width: 100%;
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        font-size: 0.95rem;
        background: #ffffff;
        transition: all 0.2s ease;
    }

    .search-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
        outline: none;
    }

    .search-icon {
        position: absolute;
        left: 0.9rem;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 0.95rem;
    }

    /* Tool Resources Card styles */
    .tool-resources-card {
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 12px;
        padding: 1.5rem;
        margin: 2rem 0;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
        text-align: left;
    }

    .resources-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #cbd5e1;
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .resources-card-title {
        font-family: 'Outfit', sans-serif;
        font-size: 1.15rem;
        font-weight: 700;
        color: #1e293b;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .resources-basis-badge {
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 0.25rem 0.6rem;
        border-radius: 9999px;
    }

    .basis-oem { background: #e0e7ff; color: #4f46e5; }
    .basis-standard { background: #fee2e2; color: #dc2626; }
    .basis-protocol { background: #ecfdf5; color: #059669; }
    .basis-engineering { background: #fffbeb; color: #b45309; }
    .basis-field { background: #f1f5f9; color: #475569; }
    .basis-contract { background: #ecfeff; color: #0891b2; }
    .basis-project { background: #fdf2f8; color: #db2777; }
    .basis-safety { background: #fef2f2; color: #991b1b; border: 1px solid #fee2e2; }

    .resources-list {
        margin: 0 0 1rem 0;
        padding-left: 1.25rem;
        list-style-type: disc;
        color: #475569;
        font-size: 0.85rem;
    }

    .resources-list li {
        margin-bottom: 0.35rem;
    }

    .resources-ref-type {
        font-size: 0.65rem;
        font-weight: 600;
        text-transform: uppercase;
        padding: 0.1rem 0.35rem;
        border-radius: 4px;
        background: #f1f5f9;
        color: #475569;
        margin-left: 0.35rem;
        display: inline-block;
    }

    .resources-note-box {
        background: #f8fafc;
        border-left: 3px solid #64748b;
        padding: 0.75rem 1rem;
        border-radius: 4px;
        font-size: 0.8rem;
        color: #334155;
        line-height: 1.4;
        margin-bottom: 1rem;
    }

    .resources-note-title {
        font-weight: 700;
        margin-bottom: 0.2rem;
        text-transform: uppercase;
        font-size: 0.7rem;
        color: #475569;
    }

    .resources-action-row {
        display: flex;
        justify-content: flex-end;
    }

    .btn-view-hub-resources {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.82rem;
        font-weight: 600;
        color: #2563eb;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .btn-view-hub-resources:hover {
        color: #1d4ed8;
        text-decoration: underline;
    }

    /* ==========================================================================
       8. Page-Specific Sub-components
       ========================================================================== */
    /* Contacts grid & cards */
    .contacts-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        padding: 20px 0;
    }

    .contact-card {
        background: var(--background-light);
        border-radius: var(--border-radius-lg);
        box-shadow: var(--shadow-md);
        padding: 20px;
        text-align: center;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .contact-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

    .profile-pic {
        width: 120px;
        height: 120px;
        border-radius: var(--border-radius-round);
        margin: 0 auto 15px;
        overflow: hidden;
        border: 3px solid var(--info-color);
    }

    .profile-pic img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .contact-info {
        text-align: center;
    }

    .contact-name {
        font-weight: bold;
        color: var(--text-color);
        font-size: 18px;
        margin-bottom: 8px;
    }

    .contact-title {
        color: var(--text-secondary);
        font-size: 14px;
        margin-bottom: 8px;
        display: block;
    }

    .contact-expertise {
        color: var(--info-color);
        font-size: 14px;
        margin-bottom: 12px;
        padding: 4px 8px;
        background-color: #f0f7ff;
        border-radius: var(--border-radius-sm);
        display: inline-block;
    }

    .contact-email {
        display: inline-block;
        color: var(--info-color);
        text-decoration: none;
        font-size: 14px;
        padding: 8px 16px;
        border-radius: 20px;
        background-color: #f0f7ff;
        transition: var(--transition-default);
        margin-top: 8px;
    }

    .contact-email:hover {
        background-color: var(--info-color);
        color: white;
        text-decoration: none;
    }

    /* Training Cards & specific controls */
    .training-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
        margin-bottom: 40px;
    }

    .training-card {
        background-color: white;
        border-radius: var(--border-radius-md);
        box-shadow: var(--shadow-md);
        overflow: hidden;
        transition: transform 0.2s, box-shadow 0.2s;
    }

    .training-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-lg);
    }

    .card-header {
        padding: 15px;
        border-bottom: 1px solid var(--border-color);
        background-color: #f8f9fa;
    }

    .card-system-tag {
        display: inline-block;
        padding: 3px 8px;
        border-radius: var(--border-radius-sm);
        font-size: 12px;
        font-weight: bold;
        margin-bottom: 8px;
    }

    .system-pv {
        background-color: var(--system-pv-bg);
        color: var(--system-pv-text);
    }

    .system-bess {
        background-color: var(--system-bess-bg);
        color: var(--system-bess-text);
    }

    .system-other {
        background-color: var(--system-other-bg);
        color: var(--system-other-text);
    }

    .card-title {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 5px;
    }

    .card-level {
        font-size: 16px;
        color: var(--text-secondary);
        margin-bottom: 5px;
    }

    .card-duration {
        font-size: 14px;
        color: var(--text-secondary);
    }

    .card-content {
        padding: 15px;
    }

    .card-details {
        display: none;
        margin-top: 10px;
    }

    .card-details h4 {
        font-weight: bold;
        margin-bottom: 5px;
        font-size: 16px;
    }

    .card-details ul {
        padding-left: 20px;
        margin-bottom: 15px;
    }

    .card-details li {
        margin-bottom: 3px;
        font-size: 14px;
    }

    .filter-controls {
        background-color: #f8f9fa;
        border-radius: var(--border-radius-md);
        padding: 15px;
        margin-bottom: 25px;
    }

    .filter-title {
        font-weight: bold;
        margin-bottom: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .filter-section {
        margin-bottom: 15px;
    }

    .filter-label {
        font-weight: bold;
        margin-bottom: 5px;
    }

    .filter-row {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .admin-controls {
        display: flex;
        align-items: center;
    }

    .admin-form-container {
        display: none;
        background-color: var(--background-light);
        border-radius: var(--border-radius-md);
        padding: 20px;
        margin: 20px 0;
        box-shadow: var(--shadow-md);
    }

    .admin-form-container.visible {
        display: block;
    }

    .admin-form-title {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 15px;
        color: var(--text-color);
    }

    .admin-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .admin-form-section {
        grid-column: span 2;
    }

    .form-field {
        margin-bottom: 10px;
    }

    .form-field label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .form-field input,
    .form-field select,
    .form-field textarea {
        width: 100%;
        padding: 8px;
        border: 1px solid var(--border-light);
        border-radius: var(--border-radius-sm);
    }

    .admin-form-actions {
        grid-column: span 2;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin-top: 15px;
    }

    .content-item, .requirement-item {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        width: 100%;
    }

    .content-item input, .requirement-item input {
        flex: 1;
        margin-bottom: 0;
        margin-right: 10px;
    }

    .multi-input {
        margin-bottom: 10px;
    }

    .input-items {
        margin-top: 5px;
    }

    .input-item {
        display: flex;
        margin-bottom: 5px;
    }

    .input-item input {
        flex: 1;
        margin-right: 5px;
    }

    .remove-item {
        background-color: var(--error-color);
        color: white;
        border: none;
        border-radius: var(--border-radius-sm);
        padding: 0 8px;
        cursor: pointer;
    }

    .add-item {
        background-color: var(--success-color);
        color: white;
        border: none;
        border-radius: var(--border-radius-sm);
        padding: 5px 10px;
        cursor: pointer;
        font-size: 14px;
    }

    /* ==========================================================================
       9. CSS Micro-Animations & Keyframes
       ========================================================================== */
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .fade-in {
        animation: fadeIn 0.3s ease-in;
    }

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

    .slide-down {
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideUp {
        from { transform: translateY(20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    .slide-up {
        animation: slideUp 0.3s ease-out;
    }

    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
        20%, 40%, 60%, 80% { transform: translateX(5px); }
    }

    .shake {
        animation: shake 0.6s ease-in-out;
    }

    /* ==========================================================================
       10. Universal Utility Classes
       ========================================================================== */
    .hidden {
        display: none !important;
    }

    .visible {
        display: block !important;
    }

    .mt-1 { margin-top: var(--space-xs); }
    .mt-2 { margin-top: var(--space-sm); }
    .mt-3 { margin-top: var(--space-md); }
    .mt-4 { margin-top: var(--space-lg); }
    .mt-5 { margin-top: var(--space-xl); }
    .mt-6 { margin-top: var(--space-xxl); }

    .mb-1 { margin-bottom: var(--space-xs); }
    .mb-2 { margin-bottom: var(--space-sm); }
    .mb-3 { margin-bottom: var(--space-md); }
    .mb-4 { margin-bottom: var(--space-lg); }
    .mb-5 { margin-bottom: var(--space-xl); }
    .mb-6 { margin-bottom: var(--space-xxl); }

    .ml-1 { margin-left: var(--space-xs); }
    .ml-2 { margin-left: var(--space-sm); }
    .ml-3 { margin-left: var(--space-md); }
    .ml-4 { margin-left: var(--space-lg); }

    .mr-1 { margin-right: var(--space-xs); }
    .mr-2 { margin-right: var(--space-sm); }
    .mr-3 { margin-right: var(--space-md); }
    .mr-4 { margin-right: var(--space-lg); }

    .p-1 { padding: var(--space-xs); }
    .p-2 { padding: var(--space-sm); }
    .p-3 { padding: var(--space-md); }
    .p-4 { padding: var(--space-lg); }

    .flex {
        display: flex;
    }

    .flex-col {
        flex-direction: column;
    }

    .items-center {
        align-items: center;
    }

    .justify-center {
        justify-content: center;
    }

    .justify-between {
        justify-content: space-between;
    }

    .flex-grow {
        flex-grow: 1;
    }

    .flex-wrap {
        flex-wrap: wrap;
    }

    .gap-1 { gap: var(--space-xs); }
    .gap-2 { gap: var(--space-sm); }
    .gap-3 { gap: var(--space-md); }
    .gap-4 { gap: var(--space-lg); }

    .text-left { text-align: left; }
    .text-center { text-align: center; }
    .text-right { text-align: right; }

    .text-success { color: var(--success-text); }
    .text-error { color: var(--error-text); }
    .text-info { color: var(--info-text); }
    .text-warning { color: var(--warning-text); }

    .bg-success { background-color: var(--success-light); }
    .bg-error { background-color: var(--error-light); }
    .bg-info { background-color: var(--info-light); }
    .bg-warning { background-color: var(--warning-light); }

    /* Font utilities */
    .font-bold {
        font-weight: bold;
    }

    .text-sm { font-size: 14px; }
    .text-lg { font-size: 18px; }
    .text-xl { font-size: 20px; }

    /* ==========================================================================
       11. Responsive Component Queries
       ========================================================================== */
    @media (max-width: 768px) {
        .form-group, .form-section {
            padding: 10px;
            margin-bottom: 15px;
        }

        .contacts-grid {
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        }

        .modal-content {
            width: 95%;
            padding: 1.5rem;
            margin: 10px;
            max-height: 90vh;
            overflow-y: auto;
        }
        
        input, select, textarea {
            margin-bottom: 12px;
            font-size: 16px;
            padding: 8px;
        }
        
        .file-upload {
            padding: 10px;
        }
        
        #upload-text {
            font-size: 14px;
        }
        
        .message {
            font-size: 14px;
            padding: 8px;
        }
        
        button[type="submit"] {
            padding: 12px;
            font-size: 16px;
        }
        
        .rating-group {
            flex-direction: column;
            align-items: flex-start;
        }
        
        .rating-title {
            margin-bottom: 8px;
            min-width: 100%;
        }
        
        .resource-links {
            grid-template-columns: 1fr;
        }
        
        .under-construction-banner {
            flex-direction: column;
            text-align: center;
        }
        
        .construction-icon {
            margin: 0 0 10px 0;
        }

        .admin-form {
            grid-template-columns: 1fr;
        }
        
        .admin-form-section, 
        .admin-form-actions {
            grid-column: span 1;
        }
    }

    @media (max-width: 480px) {
        .form-container {
            padding: 15px;
        }

        .contact-card {
            padding: 15px;
        }

        .profile-pic {
            width: 100px;
            height: 100px;
        }
        
        .training-grid {
            grid-template-columns: 1fr;
        }
        
        .filter-row {
            flex-direction: column;
            gap: 5px;
        }
        
        .filter-item {
            width: 100%;
            text-align: center;
        }
        
        .message {
            margin: 10px 0;
        }
        
        .modal-content {
            padding: 15px;
        }
    }

    @media print {
        .submit-button, 
        .modal-button {
            display: none !important;
        }
    }

    /* Universal premium back link alignment */
    .back-link,
    .btn-back {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
        text-decoration: none !important;
        color: var(--primary-color) !important;
        font-weight: 600 !important;
        margin-bottom: 1.5rem !important;
        font-size: 0.95rem !important;
        transition: transform 0.2s ease !important;
        line-height: 1 !important;
    }

    .back-link:hover,
    .btn-back:hover {
        transform: translateX(-4px) !important;
        color: var(--primary-hover) !important;
        text-decoration: none !important;
    }

    .back-link i,
    .btn-back i {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.95rem !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}
