/* Animated Toggle Switch */
.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 10px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.range-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease-in-out;
    opacity: 0;
    background: #f1f3f4;
    border-radius: 8px;
}

.range-content.show {
    max-height: 200px;
    opacity: 1;
    padding: 15px;
    border: 1px solid #ddd;
}

#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

#loader-text {
    font-weight: 600;
    color: #444;
    font-size: 1.2rem;
}


/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 22px;
    color: var(--primary);
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and Edge */
    user-select: none;
    cursor: pointer;
}

.logo img {
    height: 35px;
}

.logo span span {
    color: #34a853;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-auth {
    display: flex;
    gap: 15px;
    align-items: center;
}

#btn-login {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

#btn-signup {
    text-decoration: none;
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
}

#btn-signup:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}


.btn {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
}

.spinner {
    border: 4px solid #f3f3f3;
    /* Light grey */
    border-top: 4px solid var(--primary);
    /* Blue */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 3000;
}

.menu-toggle div {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    margin: 5px 0;
    transition: 0.4s;
    border-radius: 2px;
}


.btn-create-cbt-animated {
    display: block;
    background: linear-gradient(45deg, #1a73e8, #34a853);
    color: white !important;
    padding: 20px;
    border-radius: 12px;
    font-size: 20px !important;
    box-shadow: 0 0 20px rgba(52, 168, 83, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Desktop vs Mobile display */
@media (max-width: 900px) {
    .desktop-only {
        display: none !important;
    }

    .menu-toggle {
        display: block;
    }
}

/* Transform Toggle to Cross */
.open .bar1 {
    transform: rotate(-45deg) translate(-5px, 6px);
    background-color: white;
}

.open .bar2 {
    opacity: 0;
}

.open .bar3 {
    transform: rotate(45deg) translate(-5px, -6px);
    background-color: white;
}

:root {
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --success: #34a853;
    --bg: #f8f9fa;
    --text-dark: #202124;
    --text-light: #5f6368;
}

body.setup-body {
    background: var(--bg);
    margin: 0;
    padding-top: 80px;
    /* Navbar space */
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.setup-container {
    width: 100%;
    max-width: 700px;
    padding: 20px;
}

.setup-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #eee;
}

/* Header */
.setup-header {
    text-align: center;
    margin-bottom: 35px;
}

.setup-header h1 {
    font-size: 2rem;
    margin: 0;
    color: var(--text-dark);
}

.setup-header p {
    color: var(--text-light);
    margin-top: 8px;
}

/* Form Elements */
.form-section {
    margin-bottom: 25px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

/* Modern File Upload */
.file-drop-area {
    position: relative;
    border: 2px dashed #dadce0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: 0.3s;
}

.file-drop-area:hover {
    border-color: var(--primary);
    background: #f8fbff;
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-msg {
    color: var(--primary);
    font-weight: 500;
}

/* Grid Layout (Desktop: 2 col, Mobile: 1 col) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-light);
}

input,
select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    transition: 0.2s;
    background: #fff;
}

input:focus,
select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

/* Range Toggle */
.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
}

/* Button */
.btn-primary {
    width: 100%;
    margin-top: 30px;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: scale(1.01);
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .setup-card {
        padding: 30px 20px;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }

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

    .setup-header h1 {
        font-size: 1.6rem;
    }

    .setup-container {
        padding: 0;
    }
}

/* Loader Styles */
#loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.main-spinner {
    width: 100%;
    height: 100%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.inner-spinner {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 50px;
    height: 50px;
    border: 4px solid transparent;
    border-bottom: 4px solid var(--success);
    border-radius: 50%;
    animation: spin 1.5s linear infinite reverse;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.loader-subtext {
    font-size: 0.9rem;
    color: #888;
    margin-top: 10px;
}

/* Switch Toggle UI */
.switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(21px);
}

#loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.loader-card {

    width: 100%;
    max-width: 470px;

    background: white;

    border-radius: 18px;

    padding: 28px;

    text-align: center;

    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);

}

.spinner {

    width: 60px;
    height: 60px;

    margin: auto;

    border-radius: 50%;

    border: 6px solid #e7e7e7;
    border-top-color: #0d6efd;

    animation: spin .9s linear infinite;

}

@keyframes spin {

    to {

        transform: rotate(360deg);

    }

}

#loader-title {

    margin-top: 18px;
    margin-bottom: 18px;

    font-size: 26px;

}

.progress-container {

    width: 100%;
    height: 8px;

    background: #ececec;

    border-radius: 50px;

    overflow: hidden;

}

.progress-bar {

    width: 35%;

    height: 100%;

    border-radius: 50px;

    background: linear-gradient(90deg,
            #0d6efd,
            #25c281);

    animation: loading 1.4s infinite ease-in-out;

}

@keyframes loading {

    0% {

        transform: translateX(-100%);

    }

    100% {

        transform: translateX(350%);

    }

}

#loader-status {

    margin-top: 18px;

    font-size: 18px;

    font-weight: 600;

    color: #222;

}

.tip-box {

    margin-top: 22px;

    background: #f4fff7;

    border: 1px solid #d7f1de;

    border-radius: 12px;

    padding: 18px;

}

.tip-title {

    font-weight: bold;

    color: #198754;

    margin-bottom: 10px;

}

#loader-tip {

    font-size: 15px;

    line-height: 1.7;

    color: #444;

}

.loader-footer {

    margin-top: 20px;

    font-size: 13px;

    color: #777;

}

/* Tablet */

@media(max-width:900px) {

    .loader-card {

        max-width: 430px;

    }

}

/* Mobile */

@media(max-width:600px) {

    .loader-card {

        padding: 22px;

        border-radius: 15px;

    }

    .spinner {

        width: 52px;
        height: 52px;

    }

    #loader-title {

        font-size: 22px;

    }

    #loader-status {

        font-size: 16px;

    }

    #loader-tip {

        font-size: 14px;

    }

    .loader-footer {

        font-size: 12px;

    }

}