:root {
    --primary-color: #2c5f7c;
    --secondary-color: #4a9bc7;
    --accent-color: #ff6f3c;
    --success-color: #28a745;
    --light-gray: #f8f9fa;
    --border-gray: #e0e0e0;
    --text-dark: #2c3e50;
}

body {
    background-color: var(--light-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0 3rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

/* Info Card */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-card h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Controls */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.input-field label {
    color: var(--text-dark);
}

.input-field input:focus + label,
.input-field textarea:focus + label {
    color: var(--secondary-color) !important;
}

.input-field input:focus,
.input-field textarea:focus {
    border-bottom: 2px solid var(--secondary-color) !important;
    box-shadow: 0 1px 0 0 var(--secondary-color) !important;
}

/* FIX 2: Correct Materialize prefix icon alignment for inputs (seen in Image 519461) */
.input-field .prefix {
    top: 0.75rem; /* Standard vertical offset to align with label/input */
    color: var(--text-dark); /* Ensure icon color is dark */
}

/* Import/Export Section */
.tools-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px dashed var(--border-gray);
}

.tools-section h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* FIX 3: Vertically align the file-upload and download columns (seen in Image 519442) */
/* Target the first column (file upload) and apply flex center alignment */
.tools-section .row > div:first-child {
    display: flex;
    align-items: center;
    height: auto;
}
/* Remove default bottom margin from the input-field inside the tools section */
.tools-section .row .file-field.input-field {
    margin-bottom: 0;
}
/* End Fix 3 */


.file-field .btn,
.tools-section .btn {
    background-color: var(--secondary-color);
    border-radius: 8px;
    text-transform: none;
    font-weight: 500;
    padding: 0 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.file-field .btn:hover,
.tools-section .btn:hover {
    background-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Target Sections */
.target-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.target-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--secondary-color);
}

.target-header i {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.target-header h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.target-header p {
    color: #666;
    font-size: 1.05rem;
}

/* Collapsible - Modern Design */
main .collapsible {
    border: none;
    box-shadow: none;
}

main .collapsible li {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-gray);
}

main .collapsible-header {
    background-color: var(--light-gray);
    border-bottom: none;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-dark);
}

main .collapsible-header:hover {
    background-color: #e8f4f8;
}

main .collapsible-header.disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

main .collapsible-header.disabled:hover {
    background-color: #f5f5f5;
}

main .collapsible-header i {
    color: var(--secondary-color);
    margin-right: 1rem;
    transition: transform 0.3s ease;
}

main .collapsible li.active .collapsible-header {
    background-color: var(--secondary-color);
    color: white;
}

main .collapsible li.active .collapsible-header i {
    color: white;
    transform: rotate(180deg);
}

main .collapsible-body {
    padding: 2rem;
    border-top: 1px solid var(--border-gray);
    background-color: white;
}

/* Questions */
.question-block {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-gray);
}

.question-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    padding-left: 0.5rem;
    border-left: 4px solid var(--secondary-color);
}

/* Answer Choices */
.answer-choices {
    background-color: #fafafa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.answer-choices label {
    font-size: 1rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    margin-bottom: 0.5rem;
}

.answer-choices label:hover {
    background-color: #f0f0f0;
}

.answer-choices [type="radio"]:checked + span,
.answer-choices [type="checkbox"]:checked + span {
    color: var(--secondary-color);
    font-weight: 500;
}

[type="radio"]:not(:checked),
[type="radio"]:checked {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

/* Notes Section */
.notes-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-gray);
}

.notes-section .input-field {
    margin-top: 0;
}

.notes-section label {
    color: #666;
    font-size: 0.95rem;
}

/* Progress Indicator */
.progress-indicator {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
    z-index: 100;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.progress {
    background-color: #e0e0e0;
    border-radius: 10px;
    height: 12px;
}

.progress .determinate {
    background-color: var(--success-color);
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* Submit Button */
.submit-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* FIX 1: Prevent text/icon clipping and ensure vertical centering (seen in Image 5194a4) */
#submit {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    border-radius: 8px;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    text-transform: none;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
    /* Use flexbox for perfect vertical centering, overriding Materialize's line-height logic */
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto; /* Allow height to adjust with padding */
    line-height: 1.25; /* Adjusted line-height to make room for font size and padding */
}

#submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}
/* End Fix 1 */

/* Responsive */
@media only screen and (max-width: 600px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }

    .form-section,
    .target-section {
        padding: 1.5rem;
    }

    main .collapsible-header {
        padding: 1rem;
        font-size: 0.95rem;
    }

    main .collapsible-body {
        padding: 1rem;
    }
}

/* Help Text */
.help-text {
    background-color: #e3f2fd;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid #2196F3;
    font-size: 0.95rem;
    color: #1565c0;
}

.help-text i {
    vertical-align: middle;
    margin-right: 0.5rem;
}/* ── Global Action Banner ─────────────────────────────────────────────────── */
@keyframes bannerSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

#global-action-banner {
    position: relative;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 24px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0,0,0,.12);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    animation: bannerSlideDown 0.35s ease;
}

/* Coloured left accent stripe */
#global-action-banner::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 5px;
    border-radius: 0 3px 3px 0;
}

/* ── Colour themes ── */
.banner-new-user  {
    background: linear-gradient(135deg, #1a6fd4 0%, #1251a3 100%);
    color: #fff;
}
.banner-new-user::before  { background: #82b1ff; }

.banner-pending   {
    background: linear-gradient(135deg, #f4733a 0%, #c84b00 100%);
    color: #fff;
}
.banner-pending::before   { background: #ffcc80; }

.banner-draft     {
    background: linear-gradient(135deg, #546e7a 0%, #263238 100%);
    color: #eceff1;
}
.banner-draft::before     { background: #90a4ae; }

/* ── Icon pill ── */
#global-action-banner .banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    flex-shrink: 0;
}
#global-action-banner .banner-icon i {
    font-size: 1.2rem;
    line-height: 36px;
}

/* ── Message text ── */
#global-action-banner .banner-message {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
#global-action-banner .banner-message span {
    opacity: .92;
    line-height: 1.4;
}

/* ── CTA button ── */
#global-action-banner .banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 16px;
    height: 34px;
    line-height: 34px;
    border-radius: 17px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
    background: rgba(255,255,255,.22);
    color: #fff !important;
    border: 1.5px solid rgba(255,255,255,.55);
    box-shadow: none;
    transition: background .2s, border-color .2s;
    cursor: pointer;
    text-decoration: none;
}
#global-action-banner .banner-btn:hover {
    background: rgba(255,255,255,.35);
    border-color: rgba(255,255,255,.9);
}
#global-action-banner .banner-btn i {
    font-size: 1rem;
}

/* ── Dismiss button ── */
#global-action-banner .banner-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: .6;
    padding: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: opacity .2s;
    flex-shrink: 0;
}
#global-action-banner .banner-dismiss:hover { opacity: 1; }
#global-action-banner .banner-dismiss i     { font-size: 1.1rem; }

/* ── /Global Action Banner ────────────────────────────────────────────────── */
