﻿/* =========================================================
   VARIABLES
   ========================================================= */


:root {
    --blue: #00205C;
    --orange: #FFC107;
    --light-orange: #FFB300;
    --blue-rgb: 0, 32, 92;
    --orange-rgb: 255, 143, 0;
    --white: #ffffff;
    --bg-main: #06101f;
    --bg-panel: rgba(0, 32, 92, 0.22);
    --bg-panel-strong: rgba(0, 32, 92, 0.34);
    --bg-panel-soft: rgba(0, 32, 92, 0.14);
    --border: rgba(255, 255, 255, 0.14);
    --border-strong: rgba(255, 143, 0, 0.55);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.78);
    --gradient-main:var(--blue);
 
   /* --gradient-main: linear-gradient(135deg, var(--blue), black);
    --shadow-blue: 0 12px 30px rgba(var(--blue-rgb), 0.45);
    --shadow-strong: 0 18px 45px rgba(var(--blue-rgb), 0.6);*/
}

/* =========================================================
   RESET & BASE
   ========================================================= */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /*transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease, color 0.25s ease;*/
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    background: white;
    color: var(--text-main);
}

.text-primary{
    background-color: var(--bg-main)!important;
}

.accent-color {
    background-color: var(--orange) !important;
}


/* =========================================================
   HEADER
   ========================================================= */
.app-header {
    background: var(--gradient-main);
    backdrop-filter: blur(12px);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    /*box-shadow: 0 8px 28px rgba(var(--blue-rgb), 0.5);*/
}

.brand-title {
    color: var(--white);
    font-weight: 800;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    letter-spacing: 0.2px;
}

.brand-icon {
    font-size: 2rem;
    animation: pulse 2s infinite ease-in-out;
    color:var(--orange)
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* =========================================================
   CONTENT WRAPPER
   ========================================================= */
.content-wrapper {
    padding: 1.5rem 1rem 6rem;
    max-width: 600px;
    min-height: calc(100svh - 120px);
    display: flex;
    flex-direction: column;
}

/* =========================================================
   QUICK STATS
   ========================================================= */

.stat-card {
    background: var(--gradient-main);
    width: 45%;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.4rem;
    text-align: center;
    /*box-shadow: 0 12px 30px rgba(var(--blue-rgb), 0.35);*/
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* =========================================================
   ACTION CARDS
   ========================================================= */
.action-card {
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: 1.2rem;
    background: var(--gradient-main);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    /*box-shadow: 0 14px 35px rgba(var(--blue-rgb), 0.38);*/
    transition: 0.35s ease;
    display: flex;
    flex: 1;
    height: 100%;
    color:white;
    text-decoration:none;
}

    .action-card:hover {
        transform: translateY(-4px);
        /*box-shadow: var(--shadow-strong);*/
        border-color: rgba(255, 255, 255, 0.22);
    }

    .action-card:active {
        transform: scale(0.98);
    }

.action-button {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem;
    text-align: center;
}

.action-icon {
    width: 90px;
    height: 90px;
    font-size: 2.5rem;
    transition: transform 0.3s ease;
    color:var(--orange);
}

.action-card:hover .action-icon {
    transform: rotate(6deg) scale(1.05);
}

.action-title {
    font-size: 1.2rem;
    font-weight: 800;
}

.action-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.action-arrow {
    font-size: 1.4rem;
    color: var(--text-muted);
    transition: 0.3s ease;
}

.action-card:hover .action-arrow {
    transform: translateX(6px);
    color: var(--orange);
}


/* =========================================================
   BOTTOM NAVIGATION
   ========================================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: var(--gradient-main);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--border);
    padding: 0.45rem 0;
    z-index: 1000;
    
    /*box-shadow: 0 -8px 26px rgba(var(--blue-rgb), 0.45);*/
}

.nav-text{
    color:white;
}

.nav-items {
    display: flex;
    justify-content: space-around;
    max-width: 600px;
    margin: auto;
    color:var(--white);
}

.nav-link-custom {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.75rem;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    color: var(--orange);
}

    .nav-link-custom i {
        font-size: 1.4rem;
    }

    .nav-link-custom span {
        font-size: 0.7rem;
        font-weight: 600;
    }

    .nav-link-custom.active {
        color: var(--orange);
    }

        .nav-link-custom.active i {
            transform: translateY(-3px);
        }

        .nav-link-custom.active::before {
            content: "";
            position: absolute;
            top: -8px;
            left: 50%;
            transform: translateX(-50%);
            width: 40px;
            height: 3px;
            background: linear-gradient(90deg, var(--blue), var(--orange));
            border-radius: 3px;
        }

/* =========================================================
   LAYOUT (FULL WIDTH MOBILE FIRST)
   ========================================================= */

.login-container {
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.6rem; /* 👈 tiny edge margin */
}

.login-wrapper {
    width: 100%;
    max-width: 100%; /* 👈 FULL WIDTH */
}

/* =========================================================
   HEADER (TIGHT + COMPACT)
   ========================================================= */

.login-header {
    text-align: center;
    margin-bottom: 0.2rem;
}

.login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.6rem;
    border-radius: 18px;
    background: var(--gradient-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--orange);
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--blue);
}

.login-subtitle {
    font-size: 0.8rem;
    color: var(--blue);
}

/* =========================================================
   CARD (FULL WIDTH, NOT FLOATING)
   ========================================================= */

.login-card {
    width: 100%;
    border-radius: 16px;
    background: var(--blue);
    border: 1px solid var(--border);
    padding: 1rem; /* 👈 tighter */
}

/* =========================================================
   FORMS (COMPACT + CLEAN)
   ========================================================= */

.form-group {
    margin-bottom: 0.7rem; /* 👈 reduced */
}

.form-label {
    font-size: 0.7rem;
    margin-bottom: 3px;
    color: var(--orange);
    font-weight: 600;
}

/* INPUT WRAPPER */
.input-wrapper {
    position: relative;
}

/* INPUTS */
.form-control,
.form-select {
    width: 100%;
    height: 40px; /* 👈 shorter */
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(0, 32, 92, 0.35);
    color: #fff !important; /* 👈 ALWAYS WHITE TEXT */
    padding: 0 2.2rem;
    font-size: 0.9rem;
}

    /* FORCE WHITE TEXT ALWAYS */
    .form-control,
    .form-control:focus,
    .form-control:active {
        color: #fff !important;
    }

        /* placeholder */
        .form-control::placeholder {
            color: rgba(255,255,255,0.5);
        }

        /* focus */
        .form-control:focus {
            border-color: var(--orange);
            background: rgba(0, 32, 92, 0.5);
            box-shadow: 0 0 0 2px rgba(var(--orange-rgb), 0.2);
        }

/* ICON */
.input-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* PASSWORD TOGGLE */
.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: rgba(255,255,255,0.7);
}

/* =========================================================
   OPTIONS ROW (TIGHT)
   ========================================================= */

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: 0.7rem;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
}

    .custom-checkbox input {
        accent-color: var(--orange);
    }

.forgot-link {
    color: var(--white);
    text-decoration: none;
}

/* =========================================================
   BUTTON (LESS HEIGHT)
   ========================================================= */

.btn-login {
    width: 100%;
    height: 42px;
    border-radius: 10px;
    font-weight: 700;
    background: var(--blue);
    color: var(--orange);
    font-size: 0.95rem;
    margin-top: 4px;
    border: 1px solid var(--border);
}

    .btn-login:active {
        transform: scale(0.97);
    }

/* =========================================================
   DIVIDER (TIGHT)
   ========================================================= */

.divider {
    margin: 0.7rem 0;
    text-align: center;
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* =========================================================
   BIOMETRIC (SMALLER)
   ========================================================= */

.biometric-options {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
}

.biometric-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.2rem;
    background: rgba(var(--blue-rgb), 0.2);
    border: 1px solid var(--border);
    color: var(--orange);
}

/* =========================================================
   SIGNUP
   ========================================================= */

.signup-prompt {
    margin-top: 0.6rem;
    text-align: center;
    font-size: 0.75rem;
}

/* =========================================================
   ALERT
   ========================================================= */

.alert-custom {
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
}

/* =========================================================
   HEIGHT FIX (NO SCROLL)
   ========================================================= */

/* Scale down slightly on short screens */
@media (max-height: 700px) {
    .login-container {
        align-items: flex-start;
        padding-top: 0.5rem;
    }

    .login-card {
        padding: 0.8rem;
    }
}

        /* =========================================================
   WIZARD / WORKFLOW CARDS
   ========================================================= */
.workflow-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    margin: 0 auto;
    /* THIS is the key */
    max-width: clamp(320px, 90vw, 700px);
}
.workflow-step {
    display: none; /* hide by default */
    flex: 1;
 /*   animation: fadeUp 0.5s ease;*/
}

.workflow-step.active {
    display: flex; /* show only the active step */
    flex-direction: column;
    gap: 1rem;
}
/* Optional: animate transitions between steps */
.workflow-step {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.workflow-step.active {
    opacity: 1;
    transform: translateY(0);
}

.workflow-step {
    text-align: center;
}

.action-card {
    width: 100%;
    border-radius: 12px;
}

/* Modal overlay */
.custom-modal {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,32,92,0.85);
    backdrop-filter: blur(12px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Modal content */
.custom-modal-content {
    background: var(--bg-panel);
    padding: 2rem;
    border-radius: 20px;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-strong);
    animation: fadeUp 0.5s ease;
}

/* Modal text */
.custom-modal h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.custom-modal p {
    color: var(--blue);
    margin-bottom: 1.5rem;
}

/* Modal buttons */
.custom-modal .btn {
    margin: 0 0.5rem;
}

/* Fade-up animation (already in your CSS) */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*Home Page*/

.page-title {
    font-size: 2rem;
    margin-bottom: 0.2rem;
    color: var(--blue);
}

.page-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

.stats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--blue);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    /*box-shadow: 0 4px 12px rgba(0,0,0,0.05);*/
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--orange);
}

.stat-title {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--orange)!important;
}

/* Full-width Book Out button */
.book-out-container {
    width: 100%;
    max-width: 600px;
}

.btn-book-out {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    color: var(--blue);
    text-decoration:none;
    background-color: var(--orange, #FF8F00);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-book-out:hover {
    background-color: #e67e00;
}

/* =========================================================
   PROFILE PAGE
   ========================================================= */
.profile-card {
    background: var(--gradient-main); /* Matches other panels */
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    /*box-shadow: 0 15px 40px rgba(var(--blue-rgb), 0.5);*/
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.profile-name {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--white);
    margin: 0;
}

.profile-department {
    font-size: 1rem;
    font-weight: 600;
    color: var(--orange);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

    .profile-info p {
        font-size: 0.95rem;
        color: var(--text-main);
        margin: 0;
    }

    .profile-info a {
        color: var(--orange);
        text-decoration: none;
    }

        .profile-info a:hover {
            text-decoration: underline;
        }


/* =========================================================
   SHARE MODAL - BLUE & YELLOW THEME
   ========================================================= */
/* Modal */
.custom-modal {
    display: none; /* hidden initially */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,32,92,0.85);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.custom-modal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,32,92,0.4);
}

.custom-modal h3 {
    margin-bottom: 1rem;
    color: var(--blue);
}

.custom-modal img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.custom-modal input {
    width: 100%;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    text-align: center;
    margin-bottom: 1rem;
}

.custom-modal .btn-close {
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--yellow));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .custom-modal .btn-close:hover {
        transform: translateY(-2px);
    }



/* =========================================================
   TABLET SIZE BOOST (JUST MAKE EVERYTHING BIGGER)
   ========================================================= */

/* 768px+ (standard tablets) */
@media (min-width: 768px) {

    html {
        font-size: 18px; /* base scale up */
    }

    .content-wrapper {
        max-width: 1000px; /* slightly wider */
      
    }

    /* TEXT */
    .page-title {
        font-size: 2.4rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    /* CARDS */
    .stat-card,
    .action-card,
    .card,
    .login-card {
        padding: 2rem;
        border-radius: 22px;
    }
    .action-icon {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

        .action-icon i {
            display: block;
        }

    .stat-icon {
        font-size: 2.4rem;
    }

    /* BUTTONS */
    .btn-primary,
    .btn-login,
    .btn-secondary {
        font-size: 1.05rem;
        padding: 1rem 1.4rem;
    }

    /* FORM INPUTS */
    .form-control,
    .form-select {
        padding: 1rem 1.2rem;
        font-size: 1rem;
    }

    /* LOGIN */
    .login-title {
        font-size: 2.2rem;
    }

    .login-card {
        padding: 2.5rem;
    }

    /* NAV */
    .nav-link-custom i {
        font-size: 1.6rem;
    }

    .nav-link-custom span {
        font-size: 0.8rem;
    }

    .book-out-container {
        max-width: 100%; /* remove the restriction */
        display: flex;
        justify-content: center; /* center the button inside */
    }

    .taser-content {
        margin: 0;
        font-size: 2rem;
        max-width: 100%;
        display: flex;
        justify-content: center; /* horizontal */
        align-items: center; /* vertical */
        height: 10vh;
        padding-bottom: 300px;
    }

    
}


/* 1024px+ (big tablets like iPad Pro) */
@media (min-width: 1024px) {

    html {
        font-size: 20px; /* even bigger */
    }

    .content-wrapper {
        max-width: 100%;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .workflow-container {
        max-width: 700px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .action-icon {
        width: 110px;
        height: 110px;
        font-size: 3rem;
    }

    .app-header {
        display: flex;
        justify-content: center;
    }


    .stat-card,
    .action-card {
        padding: 2.2rem;
    }

    .btn-primary,
    .btn-login {
        font-size: 1.1rem;
    }

    .btn-book-out {
        display: flex;
        width: fit-content; 
        margin: 0 auto; 
        padding: 1rem 2rem; 
        font-size: 1.2rem;
        font-weight: bold;
        justify-content: center;
        align-items: center;
        text-align: center;
        color: var(--blue);
        text-decoration: none;
        background-color: var(--orange, #FF8F00);
        border: none;
        border-radius: 10px;
        cursor: pointer;
        transition: background-color 0.2s;
    }

     .btn-book-out {
        width: fit-content;   /* remove full width */
        margin: 0 auto;       /* center it */
        padding: 1.2rem 2.5rem; /* make it feel bigger */
    }

    .book-out-container {
        max-width: 100%; /* remove the restriction */
        display: flex;
        justify-content: center; /* center the button inside */
    }

}




/* Force smaller layout for iPhone SE (320px width) */
@media (max-height: 750px) and (max-width: 600px) {

    .stat-card {
        padding: 0.25rem !important;
        margin-bottom: 0.4rem !important;
    }

        .stat-card .stat-icon i {
            font-size: 1rem !important;
        }

        .stat-card .stat-title {
            font-size: 0.95rem !important;
            margin-bottom: 0.2rem !important;
            line-height: 1.1 !important;
        }

        .stat-card .stat-value {
            font-size: 0.9rem !important;
        }

    .content-wrapper {
        padding: 0.5rem !important;
    }

    .book-out-container .btn {
        font-size: 1rem !important;
        padding: 0.3rem !important;
    }
}


/* 1. Fix scaling on small devices */
.stat-title {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
}

.stat-value {
    font-size: clamp(1rem, 3vw, 1.3rem)!important;
}

.stat-icon i {
    font-size: clamp(1.6rem, 5vw, 2.5rem);
}

/* 2. Prevent overflow/squishing */
.stats-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
   
}

.stat-value {
    word-break: break-word;
}

/* 3. Ultra-small device fixes (this is what you're missing) */
@media (max-width: 400px) {

    .stats-container {
        gap: 0.5rem !important;
    }

    .stat-card {
        padding: 0.6rem;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .page-subtitle {
        font-size: 0.85rem;
    }

    /* shrink icons a bit more */
    .stat-icon i {
        font-size: 1.4rem;
    }
}

/* 4. Fix weird Bootstrap flex shrink issues */
.stat-card > * {
    min-width: 0;
}


body.scanner-active {
    background: transparent !important;
}

    body.scanner-active .content-wrapper {
        opacity: 0;
        pointer-events: none;
    }


.scanner-modal {
    width: 95%;
    max-width: 500px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

    .scanner-modal .modal-body {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.small-card {
    padding: 10px !important;
}

    .small-card .action-title {
        font-size: 0.9rem;
    }

    .small-card .action-description {
        display: none; /* removes clutter */
    }

    .small-card .action-icon i {
        font-size: 1.2rem;
    }


/* =========================
   DEVICE TYPE SECTION
========================= */

.device-section {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.device-section h5 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: white;
}


/* Buttons tighter + nicer */
.device-btn {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    border-radius: 10px;
    margin-bottom: 8px;
    border-color: var(--orange);
    background-color: transparent;
    color: var(--orange);
}

/* Active state (optional but nice) */
.device-btn.active {
    background-color: var(--orange);
    color: #fff;
    border-color: var(--orange);
}

/* =========================
   MOBILE FIX (KEY PART)
========================= */

@media (max-width: 576px) {

    .device-section {
        max-width: 100%;
        padding: 0 10px;
    }

    .device-btn {
        padding: 8px;
        font-size: 0.9rem;
    }

    .profile-card {
        padding: 10px !important;
    }
}

#deviceSavedModal .custom-modal-content {
    max-width: 320px;
    border-radius: 14px;
    padding: 15px;
}

#deviceSavedModal h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

#deviceSavedModal p {
    font-size: 0.95rem;
    color: #666;
}

.custom-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

/* ================= LAYOUT FIX ================= */

/* ================= FIX LAYOUT PROPERLY ================= */

/* Let page scroll naturally */
.container {
    display: block;
    height: auto;
}

/* Stop card from stretching too much */
.profile-card {
    display: block;
}

/* Normal flow inside card */
.card-body {
    display: block;
}

/* Keep buttons side-by-side */
.device-row {
    display: flex;
    gap: 8px;
}

.device-btn {
    flex: 1;
}

/* Make sure share button ALWAYS shows */
#shareBtn {
    display: block;
    width: 100%;
    margin: 15px auto 30px;
    margin-bottom:100px;
}
/* Tighten spacing slightly (NOT squished) */
.profile-info p {
    margin-bottom: 6px;
}

/* SMALL SCREENS ONLY */
@media (max-height: 700px) {

    .page-title {
        font-size: 1.3rem;
        margin-top: 10px;
        padding-top: 0px;
    }

    .page-subtitle {
        margin-bottom: 10px;
    }
    .mobile-pt-0 {
        padding-top: 0px !important;
    }
    .profile-name {
        font-size: 1.1rem;
    }

    .profile-info p {
        font-size: 0.85rem;
    }

    .device-btn {
        padding: 6px;
        font-size: 0.85rem;
    }
}
/* ================= DEVICE SAVED MODAL UPGRADE ================= */

#deviceSavedModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 32, 92, 0.75);
    backdrop-filter: blur(10px);
    z-index: 9999;
}

    /* Modal box */
    #deviceSavedModal .custom-modal-content {
        background: var(--gradient-main);
        border-radius: 18px;
        padding: 20px 18px;
        width: 90%;
        max-width: 320px;
        margin: auto;
        text-align: center;
        border: 1px solid var(--border);
        animation: fadeUp 0.35s ease;
    }

    #deviceSavedModal .modal-header {
        display: flex !important;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

        #deviceSavedModal .modal-header h3 {
            font-size: 1.2rem;
            font-weight: 800;
            color: var(--white);
            margin-bottom: 6px;
        }


    /* Body text */
    #deviceSavedModal .modal-body p {
        font-size: 0.9rem;
        color: var(--text-muted);
        margin-bottom: 16px;
    }

    /* Button */
    #deviceSavedModal .modal-footer .btn {
        width: 100%;
        border-radius: 10px;
        font-weight: 700;
        padding: 10px;
        background: var(--orange);
        color: var(--blue);
        border: none;
        transition: transform 0.15s ease, box-shadow 0.2s ease;
    }

        #deviceSavedModal .modal-footer .btn:hover {
            transform: translateY(-2px);
        }

        #deviceSavedModal .modal-footer .btn:active {
            transform: scale(0.97);
        }

/* Optional icon bubble */
.device-success-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--orange);
}
/* ================= ULTRA WIDE / SHORT SCREENS ================= */
/* (iPad landscape, small height tablets, weird aspect ratios) */
@media (min-width: 768px) and (max-width: 1024px) {

    /* turn card into 2 columns ONLY */
    .profile-card .card-body {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        gap: 20px;
        align-items: start;
    }

    /* LEFT SIDE (stack header + info together) */
    .profile-header,
    .profile-info {
        text-align: left;
    }

    /* RIGHT SIDE */
    .device-section {
        margin-top: 0 !important;
        text-align: left;
    }

    /* buttons stack neatly */
    .device-row {
        flex-direction: column;
    }

    .device-btn {
        width: 100%;
    }

    /* =========================
   FORCE THIN HEADER + FOOTER
   ========================= */
    :root {
        --bar-height: 56px; /* single source of truth */
    }

    /* =========================
   HEADER + FOOTER UNIFIED SIZE
   ========================= */

    .app-header,
    .bottom-nav {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        min-height: var(--bar-height);
        height: var(--bar-height);
        display: flex;
        align-items: center;
    }

    /* HEADER CONTENT ALIGNMENT */
    .app-header {
        justify-content: center;
    }

    /* FOOTER CONTENT ALIGNMENT */
    .bottom-nav {
        justify-content: center;
    }

    /* tighten brand so it fits height */
    .brand-title {
        font-size: 1.2rem !important;
        line-height: 1;
    }

    /* nav icons aligned within same bar height */
    .nav-items {
        display: flex;
        justify-content: space-around;
        width: 100%;
        padding: 0 10px;
    }
    /* icon sizing consistency */
    .nav-link-custom i {
        font-size: 1.3rem !important;
        line-height: 1;
    }

    .nav-link-custom span {
        font-size: 0.65rem !important;
        line-height: 1;
    }

    .nav-link-custom {
        padding-left: 0.5rem !important;
    }
}

/* =========================
   LOGOUT BUTTON 
========================= */

.btn-logout {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--orange);
    background: var(--blue);
    color: var(--orange);
    font-weight: 500;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    padding: 0px 0px;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    min-height: 35px;
}

.btn-share {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--orange);
    background: var(--blue);
    color: var(--orange);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    min-height: 48px;
}

    /* hover / tap feel */
    .btn-logout:active {
        transform: scale(0.97);
    }

/* hover (desktop) */
@media (hover: hover) {
    .btn-logout:hover {
        background: rgba(255, 59, 48, 0.18);
        border-color: rgba(255, 59, 48, 0.35);
    }
}
/* =========================
   PAGE TRANSITION
========================= */

.stats-container {
    display: flex !important;
    flex-wrap: wrap !important;
}
