main > .container {
    padding: 70px 15px 20px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

.help-block {
    color: #ff6868;
    margin-bottom: 10px;
    padding: 0px 20px;
    font-size: 14px;
    text-align: center;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .nav li > form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

.form-group {
    margin-bottom: 1rem;
}


/* --- Figma-exact styles --- */
:root{
    --rail-w: 218px;
    --brand: #126286;
    --page-bg: #f9f9fa;
    --panel: #ffffff;
    --ink: #000000;
    --muted: #000000;
    --shadow: 0px 4px 4px rgba(0,0,0,0.25);
    --radius: 15px;
}

* { box-sizing: border-box; }
html,body{
    margin:0;
    padding:0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--page-bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Two-column layout --- */
.layout{
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Left rail - fixed sidebar */
.rail{
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--rail-w);
    background: var(--brand);
    color: #fff;
    display: flex;
    flex-direction: column;
    border-top-right-radius: 15px;
    border-bottom-right-radius: 15px;
    box-shadow: var(--shadow);
    z-index: 100;
    overflow: hidden;
}

.rail-header{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px 20px 20px;
}

.rail-header img{
    height: 70px;
}

.rail-title{
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.2px;
    display: none; /* Logo only in Figma */
}

/* Stepper navigation */
.rail-steps{
    flex: 1;
    display: flex;
    padding: 10px 0 30px 0;
    overflow-y: visible;
}

.rail-steps ol{
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: 0;
    height: 100%;
}

.rail-steps li{
    position: relative;
    margin-bottom: 0;
    flex-shrink: 0;
}

.rail-steps li:last-child {
    margin-bottom: 0;
}

/* Connecting lines between steps */
.rail-steps li:not(:last-child)::after{
    content: "";
    position: absolute;
    top: 45px;
    left: 50%;
    width: 2px;
    height: calc(100% + 20px);
    transform: translateX(-50%);
    background: rgba(255,255,255,0.4);
}

.rail-steps li:last-child::after{
    display: none;
}

/* Step circles */
.rail-steps a{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--brand);
    border: 1px solid rgba(255,255,255,0.55);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.rail-steps a[aria-current="true"],
.rail-steps a.active{
    background: #fff;
    color: var(--brand);
    border-color: #fff;
}

/* Right column - main content */
.content{
    margin-left: var(--rail-w);
    flex: 1;
    padding: 40px 200px;
    max-width: 1920px;
    overflow-y: auto;
}

/* Hero / Intro section */
.hero{
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 49px 70px 49px 70px;
    margin-bottom: 60px;
}

.hero h1{
    margin: 0 0 30px;
    font-size: 46px;
    font-weight: 700;
    letter-spacing: 4.6px;
    line-height: normal;
    color: #000000;
}

.lede{
    font-size: 24px;
    letter-spacing: 2.4px;
    line-height: 1.5;
    margin: 0 0 37px;
    color: #000000;
    max-width: 1393px;
}

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

.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 20px;
    height: 56px;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.5);
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 22px;
    letter-spacing: 2.2px;
    transition: all 0.2s ease;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary{
    background: var(--brand);
}

.btn img{
    width: 18px;
    height: 18px;
}

/* Steps container */
.steps{
    display: grid;
    gap: 60px;
    margin: 0;
}

/* Individual step card */
.step{
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 70px 48px 70px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
    min-height: 800px;
}

.step .copy {
    display: flex;
    flex-direction: column;
}

.step .media {
    display: flex;
    justify-content: flex-end;
}

.step .media img{
    width: 345px;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Step eyebrow label */
.eyebrow{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 134px;
    height: 45px;
    padding: 8px 20px;
    border-radius: 15px;
    border: 2px solid #000000;
    background: transparent;
    color: #000000;
    font-weight: 500;
    font-size: 24px;
    letter-spacing: 2.4px;
    text-align: center;
    line-height: 1;
    margin-bottom: 39px;
}

.step h3{
    margin: 0 0 40px;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 4.8px;
    line-height: 1.2;
    color: #000000;
}

.step p{
    font-size: 24px;
    letter-spacing: 2.4px;
    line-height: 1.5;
    color: #000000;
    margin: 0 0 30px;
}

.step .cta-inline{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 460px;
    height: 56px;
    padding: 16px 17px;
    gap: 10px;
    background: var(--brand);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 15px;
    color: #fff;
    font-weight: 600;
    font-size: 22px;
    letter-spacing: 2.2px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.content .btn {
    width: max-content;
}

#back-to-os-choose-btn:hover,
.open-link-btn:hover,
.download-config-btn:hover,
.step .cta-inline:hover {
    opacity: 0.9;
    background: var(--brand) !important;
    color: white;
    border-color: var(--brand);
}

.step .cta-inline img{
    width: 18px;
    height: 18px;
}

#logout-btn,
#back-to-os-choose-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: var(--brand);
    text-decoration: none;
    border-radius: 15px;
    padding: 10px 30px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    box-shadow: var(--shadow);
}

#logout-btn {
    top: 20px;
    bottom: unset;
    background: #ff3f31;
}

#logout-btn:hover {
    opacity: 0.9;
}

/* Mobile responsive */
@media (max-width: 1400px){
    .content{
        padding: 40px 50px;
    }
    .step {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 40px;
    }
    .step .media {
        justify-content: center;
    }
    .step .media img {
        max-width: 100%;
    }
}

@media (max-width: 920px){
    .layout{
        flex-direction: column;
    }
    .rail{
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        border-radius: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
    }
    .rail-header {
        padding: 16px 0;
        flex-shrink: 0;
    }
    .rail-header img {
        width: 70px;
        height: 60px;
    }
    .rail-steps {
        padding: 0;
        justify-content: center;
        flex: 1;
    }
    .rail-steps ol{
        flex-direction: row;
        gap: 8px;
        padding: 10px;
        justify-content: flex-end;
    }
    .rail-steps li {
        margin-bottom: 0;
    }
    .rail-steps li::after{
        display: none;
    }
    .rail-steps a {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    .content{
        margin-left: 0;
        padding: 30px 20px;
    }
    .hero {
        padding: 30px 20px;
        margin-bottom: 40px;
    }
    .hero h1 {
        font-size: 28px;
        letter-spacing: 2px;
        margin-bottom: 20px;
    }
    .lede {
        font-size: 16px;
        letter-spacing: 1px;
        margin-bottom: 20px;
    }
    .btn {
        font-size: 16px;
        letter-spacing: 1px;
        padding: 12px 16px;
        height: auto;
        width: 100% !important;
    }
    .steps {
        gap: 40px;
    }
    .step {
        padding: 30px 20px;
    }
    .step h3 {
        font-size: 24px;
        letter-spacing: 2px;
        margin-bottom: 20px;
    }
    .step p {
        font-size: 16px;
        letter-spacing: 1px;
    }
    .eyebrow {
        font-size: 16px;
        letter-spacing: 1px;
        width: auto;
        height: auto;
        padding: 6px 12px;
        margin-bottom: 20px;
    }
    .step .cta-inline {
        width: 100%;
        font-size: 16px;
        letter-spacing: 1px;
        height: auto;
        padding: 12px 16px;
    }

    .android-layout #step-5,
    .android-layout #step-4,
    .android-layout #step-2,
    .android-layout #step-6,
    .ios-layout #step-5,
    .ios-layout #step-4,
    .ios-layout #step-2 {
        gap: 0px;
    }

    #back-to-os-choose-btn {
        right: 10px;
        bottom: 20px;
        width: fit-content;
    }

    #logout-btn {
        left: 10px;
        bottom: 20px;
        width: fit-content;
        top: unset;
    }

    .login-card {
        padding: 30px !important;
    }
}

/* Login Page Styles */
.login-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.login-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/res/login-bg.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Platform page background */
.platform-page .login-bg {
    background-image: url('/res/platform-bg.webp');
}

.login-card {
    position: relative;
    z-index: 2;
    background: var(--brand);
    width: 1020px;
    border-radius: 15px;
    box-shadow: 0px 4px 4px rgba(30, 30, 30, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px;
    height: fit-content;
}

.login-page:not(.platform-page) .login-card {
    width: fit-content;
    padding: 40px 150px;
}

.login-logo {
    margin-bottom: 30px;
    margin-top: 20px;
}

.login-logo img {
    width: 284px;
    height: 190px;
    object-fit: contain;
}

.login-instruction {
    color: #ffffff;
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    letter-spacing: 0.1em;
    text-align: center;
    margin-bottom: 15px;
}

.login-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 15px;
}

.code-box {
    width: 40px;
    height: 45px;
    border: 2px solid #ffffff;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #126286;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    transition: all 0.3s ease;
    caret-color: #126286;
}

.code-box:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 1);
    box-shadow: unset;
}

#code-separator {
    color: white;
}

.code-dash {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 4px;
    user-select: none;
}

.login-btn {
    text-align: center;
    width: 300px;
    margin-bottom: 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: 15px;
    background: #FFFFFF;
    border: 1px solid #126286;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    line-height: 17px;
    letter-spacing: 0.1em;
    color: #126286;
    height: 45px;
}

.login-btn:hover {
    background: var(--brand);
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive for login page */
@media (max-width: 1200px) {
    .login-card {
        width: 90%;
        max-width: 800px;
        padding: 40px 30px;
    }

    .login-logo img {
        width: 200px;
        height: 130px;
    }

    .code-box {
        width: 35px;
        height: 42px;
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .login-card {
        width: 95%;
    }

    .login-logo img {
        width: 150px;
        height: 100px;
    }

    .login-instruction {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .code-box {
        width: 32px;
        height: 38px;
        font-size: 18px;
    }

    .code-dash {
        font-size: 24px;
        margin: 0 2px;
    }


}

/* Platform Selection Page Styles */
.platform-buttons {
    display: flex;
    gap: 48px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.platform-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #ffffff;
    border: 1px solid var(--brand);
    color: var(--brand);
    width: 406px;
    height: 62px;
    padding: 0 30px;
    border-radius: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.platform-btn:hover {
    background: var(--brand);
    color: #ffffff;
    border-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.platform-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.platform-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
    flex-shrink: 0;
}

.platform-btn:hover .platform-icon {
    filter: brightness(0) invert(1);
}

.platform-text {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 2.2px;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    white-space: nowrap;
}

/* Platform page mobile responsive */
@media (max-width: 1200px) {
    .platform-buttons {
        gap: 30px;
    }

    .platform-btn {
        width: 350px;
        height: 56px;
    }

    .platform-text {
        font-size: 18px;
        letter-spacing: 1.8px;
    }

    .platform-icon {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 768px) {
    .platform-buttons {
        gap: 20px;
        flex-direction: column;
        width: 100%;
        padding: 0 10px;
    }

    .platform-btn {
        width: 100%;
        max-width: 320px;
        height: 52px;
        gap: 12px;
    }

    .platform-text {
        font-size: 16px;
        letter-spacing: 1.6px;
    }

    .platform-icon {
        width: 28px;
        height: 28px;
    }
}