:root {
--color-white: #FFFFFF;
--color-primary: #C1121F;
--color-secondary: #E63946;
--color-accent: #FFD60A;
--transition-speed: .4s;
}

body,
html {
height: 100%;
margin: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--color-white);
overflow-x: hidden;
}

.app-container {
display: flex;
flex-direction: column;
min-height: 100vh;
width: 100%;
}

.custom-tab-header {
background-color: var(--color-primary);
box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
z-index: 10;
padding: 0 15px;

overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
scrollbar-width: thin;
-webkit-overflow-scrolling: touch;
}

.custom-tab-header::-webkit-scrollbar {
height: 8px;
}

.custom-tab-header::-webkit-scrollbar-thumb {
background: #999;
border-radius: 10px;
}

.custom-nav {
display: flex;
flex-wrap: nowrap;      
width: max-content;
}

.custom-nav::-webkit-scrollbar {
display: none;
}

.tab-item {
padding: 20px 25px;
color: rgba(255, 255, 255, .7);
cursor: pointer;
border-bottom: 4px solid transparent;
transition: all var(--transition-speed);
font-weight: 600;
text-transform: uppercase;
font-size: 1rem;
display: flex;
align-items: center;
}

.tab-item i {
margin-right: 10px;
}

.tab-item.active-tab {
color: var(--color-white);
border-bottom: 4px solid var(--color-accent);
background-color: rgba(255, 255, 255, .05);
}

.tab-item:hover {
color: var(--color-white);
background-color: rgba(255, 255, 255, .1);
}

.main-content {
flex-grow: 1;
padding: 40px;
position: relative;
background-color: var(--color-white);
}

.tab-panel {
display: none;
width: 100%;
animation: slideIn var(--transition-speed) ease-out forwards;
}

.tab-panel.active-panel {
display: block;
}

.placeholder-container {
border: 2px dashed #ddd;
border-radius: 15px;
height: 400px;
display: flex;
align-items: center;
justify-content: center;
color: #aaa;
background-color: #fcfcfc;
}

@keyframes slideIn {
from {
    opacity: 0;
    transform: translateY(20px);
}

to {
    opacity: 1;
    transform: translateY(0);
}
}

.action-footer {
padding: 20px 40px;
background: var(--color-white);
border-top: 1px solid #eee;
display: flex;
justify-content: flex-end;
gap: 15px;
}

.btn-custom {
padding: 12px 35px;
border-radius: 50px;
font-weight: 600;
transition: all .3s;
text-transform: uppercase;
letter-spacing: 1px;
}

.btn-next {
background-color: var(--color-primary);
color: white;
border: none;
}

.btn-next:hover {
background-color: var(--color-secondary);
color: white;
transform: scale(1.05);
}

.btn-prev {
background-color: #f8f9fa;
color: var(--color-primary);
border: 1px solid var(--color-primary);
}

.btn-submit {
background-color: #28a745;
color: white;
border: none;
}

@media (max-width:1200px) {
.main-content {
    padding: 30px;
}
}

@media (max-width:768px) {
.tab-item {
    padding: 15px 15px;
    font-size: .8rem;
}

.main-content {
    padding: 20px;
}

.placeholder-container {
    height: 300px;
}

h2 {
    font-size: 1.5rem;
}
}

@media (max-width:576px) {
.action-footer {
    flex-direction: column-reverse;
    padding: 20px;
}

.btn-custom {
    width: 100%;
}
}

.section-title {
color: var(--color-primary);
font-weight: 700;
border-left: 5px solid var(--color-accent);
padding-left: 15px;
margin-bottom: 20px;
text-transform: uppercase;
font-size: 1.25rem
}

.content-body-wrapper {
padding: 20px;
background: var(--color-white);
min-height: 70vh;
}

.custom-form-group {
margin-bottom: 1.5rem;
}

.custom-form-group label {
display: block;
font-weight: 600;
color: #555;
margin-bottom: 5px;
font-size: 1.3rem;
}

.form-control {
width: 100%;
padding: 10px 15px;
border: 2px solid #e1e1e1;
border-radius: 8px;
transition: all .3s ease;
background-color: #f9f9f9;
}

.form-control:focus {
outline: none;
border-color: var(--color-accent);
background-color: #fff;
box-shadow: 0 0 8px rgba(25, 93, 184, .2);
}

.tab-panel {
animation: fadeInSlide .5s ease forwards;
}

@keyframes fadeInSlide {
from {
    opacity: 0;
    transform: translateX(30px);
}

to {
    opacity: 1;
    transform: translateX(0);
}
}

@media (max-width:576px) {
.content-body-wrapper {
    padding: 10px;
}

.section-title {
    font-size: 1.1rem;
}

.form-control {
    padding: 12px;
}
}

.table-responsive-custom {
background: #fff;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
}

.custom-table {
margin-bottom: 0;
}

.custom-table thead th {
background-color: var(--color-primary);
color: white;
text-transform: uppercase;
font-size: .85rem;
letter-spacing: 1px;
padding: 15px;
border: none;
}

.custom-table tbody tr {
border-bottom: 1px solid #f0f0f0;
transition: background .3s;
}

.custom-table tbody tr:hover {
background-color: rgba(25, 93, 184, .02);
}

.custom-table td {
padding: 15px;
vertical-align: middle;
}

.btn-custom-outline {
border: 2px dashed var(--color-accent);
color: var(--color-accent);
background: transparent;
padding: 10px 25px;
font-weight: 600;
border-radius: 8px;
transition: all .3s;
}

.btn-custom-outline:hover {
background: var(--color-accent);
color: white;
}

.custom-control-input:checked~.custom-control-label::before {
background-color: var(--color-accent);
border-color: var(--color-accent);
}

@media (max-width:992px) {
.custom-table thead {
    display: none
}

.custom-table td {
    display: block;
    width: 100% !important;
    text-align: left;
    padding: 5px 15px;
    border: none
}

.custom-table td:first-child {
    padding-top: 20px;
    font-weight: bold
}

.custom-table td:last-child {
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-primary)
}

.custom-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--color-primary);
    display: block;
    margin-bottom: 5px
}
}

.family-card {
background: #fff;
padding: 25px;
border: 1px solid #eef0f2;
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0, 0, 0, .02)
}

.bg-light-section {
background-color: #f8f9ff;
border-left: 3px solid var(--color-accent)
}

.custom-dynamic-table {
font-size: .85rem
}

.custom-dynamic-table th {
background: #f1f4f9;
color: var(--color-primary);
border: none
}

.uppercase {
text-transform: uppercase;
letter-spacing: 1px
}

.course-choice-select:focus {
border-color: var(--color-accent)
}

.survey-item {
transition: all .3s ease
}

.survey-item:hover {
border-color: var(--color-accent) !important;
background-color: #fff !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, .05)
}

.animated {
animation-duration: .4s;
animation-fill-mode: both
}

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

to {
    opacity: 1;
    transform: translateY(0)
}
}

.fadeIn {
animation-name: fadeIn
}

.border-left-primary {
border-left: 5px solid var(--color-primary) !important
}

.border-left-accent {
border-left: 5px solid var(--color-accent) !important
}

.btn-group-toggle .btn {
font-size: .75rem;
padding: 5px 10px
}

.btn-group-toggle .btn.active {
background-color: var(--color-accent);
color: white
}

.table-hover tbody tr:hover {
background-color: rgba(19, 0, 131, .03)
}

.btn-primary-custom {
background-color: var(--color-primary);
color: white;
border: none;
padding: 0 15px;
border-radius: 0 8px 8px 0 !important;
transition: all .3s ease;
}

.btn-primary-custom:hover {
background-color: var(--color-accent);
color: white;
}

.input-group>.form-control {
flex: 1 1 auto;
width: 1%;
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}

#region_mode_text {
font-size: .7rem;
align-self: flex-end;
transition: color .3s;
}

.custom-input-group {
display: flex;
width: 100%;
}

.btn-action-custom {
background-color: var(--color-primary);
color: #FFFFFF;
border: none;
padding: 0 18px;
border-radius: 0 8px 8px 0 !important;
transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.btn-action-custom:hover {
background-color: var(--color-accent);
color: #FFFFFF;
box-shadow: -3px 0 10px rgba(0, 0, 0, .1);
}

.custom-input-group>.form-control {
flex: 1;
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}

#province_hint {
transition: all .3s ease;
font-weight: 500;
}

:root {
--white-main: #FFFFFF;
--navy-primary: #130083;
--blue-accent: #195DB8;
--white-bg: #FFFFFF;
}

html {
font-size: 16px
}

@media (max-width:1200px) {
html {
    font-size: 15px
}
}

@media (max-width:992px) {
html {
    font-size: 14px
}
}

@media (max-width:768px) {
html {
    font-size: 13px
}
}

@media (max-width:576px) {
html {
    font-size: 12px
}
}

.toggle-hint {
font-size: .7rem;
cursor: pointer;
font-weight: 600;
transition: all .3s;
}

.btn-theme-toggle {
background-color: var(--navy-primary);
color: var(--white-main);
border: none;
border-radius: 0 8px 8px 0 !important;
padding: 0 15px;
transition: all .3s ease;
}

.btn-theme-toggle:hover {
background-color: var(--blue-accent);
color: var(--white-main);
}

.custom-form-group {
margin-bottom: 1.5rem;
}

.form-control {
border-radius: 8px;
border: 1px solid #ced4da;
height: calc(2.25rem + 10px);
}

.input-error, .input-error-family-background, .input-error-other-information {
border: 2px solid red !important;
}

@keyframes shake {
0% {
    transform: translateX(0)
}

25% {
    transform: translateX(-5px)
}

50% {
    transform: translateX(5px)
}

75% {
    transform: translateX(-5px)
}

100% {
    transform: translateX(0)
}
}

.shake, .shake-family-background, .shake-other-information {
animation: shake .3s;
}

.is-invalid {
border: 1px solid red !important;
}

.shake, .shake-family-background, .shake-other-information {
animation: shake .3s;
}

@keyframes shake {
0% {
    transform: translateX(0)
}

25% {
    transform: translateX(-5px)
}

50% {
    transform: translateX(5px)
}

75% {
    transform: translateX(-5px)
}

100% {
    transform: translateX(0)
}
}

@keyframes shake-family-background {
0% {
    transform: translateX(0)
}

25% {
    transform: translateX(-5px)
}

50% {
    transform: translateX(5px)
}

75% {
    transform: translateX(-5px)
}

100% {
    transform: translateX(0)
}
}

@keyframes shake-other-information {
0% {
    transform: translateX(0)
}

25% {
    transform: translateX(-5px)
}

50% {
    transform: translateX(5px)
}

75% {
    transform: translateX(-5px)
}

100% {
    transform: translateX(0)
}
}

/* Note: Using #130083 (30%) for the toggle background */
.na-toggle-box {
background-color: var(--color-primary); /* #130083 */
border-left: 5px solid var(--color-accent); /* #195DB8 (10%) */
transition: all 0.3s ease;
}

/* Custom Switch Sizing for better touch targets on mobile */
.custom-switch-lg .custom-control-label::before {
height: 1.5rem;
width: 2.75rem;
border-radius: 1rem;
}
.custom-switch-lg .custom-control-label::after {
width: calc(1.5rem - 4px);
height: calc(1.5rem - 4px);
border-radius: 1rem;
}
.custom-switch-lg .custom-control-input:checked ~ .custom-control-label::after {
transform: translateX(1.25rem);
}

/* Responsive Text for the toggle */
@media (max-width: 576px) {
.na-text-group h6 { font-size: 0.85rem !important; }
.na-text-group p { font-size: 0.65rem !important; }
}

/* Highlight inputs when N/A is applied */
.input-na-active {
background-color: #f8f9fa !important;
color: var(--color-accent) !important;
font-weight: bold;
font-style: italic;
}

/* Table Styling */
.custom-imm-table { border-collapse: separate; border-spacing: 0 10px; }
.bg-primary-navy { background-color: var(--navy-primary); }

/* Button Colors for Status */
.btn-outline-navy {
    border-color: var(--navy-primary);
    color: var(--navy-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-navy:not(:disabled):not(.disabled).active, 
.btn-outline-navy:not(:disabled):not(.disabled):active {
    background-color: var(--blue-accent);
    border-color: var(--blue-accent);
    color: #fff;
}

/* Disabled Visual Style */
.disabled-style {
    opacity: 0.4;
    cursor: not-allowed !important;
    pointer-events: none;
    background-color: #f8f9fa;
}

/* Row Highlight when active */
.imm-row.row-active {
    background-color: rgba(25, 93, 184, 0.05);
}

/* MOBILE RESPONSIVENESS (Card Layout for XS and SM) */
@media (max-width: 767.98px) {
    .custom-imm-table, .custom-imm-table tbody, .custom-imm-table tr, .custom-imm-table td {
        display: block;
        width: 100%;
    }
    .custom-imm-table thead { display: none; }
    .imm-row {
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        margin-bottom: 20px;
        padding: 15px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    }
    .custom-imm-table td {
        border: none;
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }
    .custom-imm-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--navy-primary);
        text-transform: uppercase;
        font-size: 0.75rem;
        margin-right: 15px;
    }
    .status-cell, .other-cell { flex-direction: column; align-items: flex-start !important; }
    .status-cell::before, .other-cell::before { margin-bottom: 8px; }
    .btn-group-toggle { display: flex; flex-wrap: wrap; gap: 5px; }
    .btn-group-toggle .btn { flex: 1 1 30%; font-size: 0.7rem; padding: 10px 5px; }
}