/* =====================================================
   RAIN2RIDE - MODERN IOT DASHBOARD
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


:root {
    --blue-900: #062b4a;
    --blue-800: #075b99;
    --blue-700: #087bd9;
    --blue-600: #09a1e5;

    --blue-100: #eaf6ff;
    --blue-050: #f4fbff;

    --text: #102a43;
    --muted: #71869a;

    --border: #dcecf7;

    --white: #ffffff;

    --green: #16c784;
    --red: #ef5b63;

    --shadow:
        0 18px 50px rgba(25, 103, 155, 0.10);
}


html {
    scroll-behavior: smooth;
}


body {
    font-family: "Poppins", sans-serif;

    color: var(--text);

    background: #eef7ff;

    -webkit-font-smoothing: antialiased;
}


a {
    text-decoration: none;
}


button {
    font-family: inherit;
}


/* =====================================================
   WELCOME PAGE
===================================================== */

.welcome-page {
    min-height: 100vh;
    width: 100%;

    position: relative;

    overflow: hidden;

    display: flex;

    justify-content: center;
    align-items: center;

    color: white;

    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(51, 177, 255, 0.35),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #031b32 0%,
            #064b83 50%,
            #0794dc 100%
        );
}


.welcome-content {
    position: relative;

    z-index: 5;

    text-align: center;

    padding: 30px;

    animation: fadeIn 0.8s ease;
}


.logo {
    width: 85px;
    height: 85px;

    margin: 0 auto 25px;

    display: flex;

    justify-content: center;
    align-items: center;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.1);

    border:
        1px solid rgba(255, 255, 255, 0.35);

    backdrop-filter: blur(10px);

    font-size: 20px;

    font-weight: 700;

    letter-spacing: 3px;

    box-shadow:
        0 0 40px rgba(255, 255, 255, 0.12);
}


.small-title {
    font-size: 11px;

    letter-spacing: 5px;

    color:
        rgba(255, 255, 255, 0.7);

    margin-bottom: 15px;
}


.welcome-content h1 {
    font-size:
        clamp(55px, 10vw, 100px);

    font-weight: 700;

    letter-spacing: 7px;

    line-height: 1;

    color: white;
}


.welcome-content h1 span {
    color: #66d1ff;
}


.welcome-description {
    margin-top: 25px;

    font-size: 16px;

    line-height: 1.8;

    color:
        rgba(255, 255, 255, 0.8);
}


/* START BUTTON */

.start-button {
    margin-top: 45px;

    width: 190px;

    padding:
        15px 18px 15px 30px;

    display: inline-flex;

    align-items: center;

    justify-content: space-between;

    border-radius: 50px;

    background: white;

    color: #086db8;

    font-size: 13px;

    font-weight: 700;

    letter-spacing: 2px;

    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.25);

    transition: 0.3s;
}


.start-button:hover {
    transform:
        translateY(-5px);
}


.arrow {
    width: 38px;
    height: 38px;

    display: flex;

    justify-content: center;
    align-items: center;

    border-radius: 50%;

    background: #087bd9;

    color: white;

    font-size: 19px;
}


/* DECORATION */

.circle {
    position: absolute;

    border-radius: 50%;

    border:
        1px solid rgba(255, 255, 255, 0.12);
}


.circle-one {
    width: 600px;
    height: 600px;

    right: -300px;
    bottom: -300px;
}


.circle-two {
    width: 450px;
    height: 450px;

    right: -225px;
    bottom: -225px;
}


.circle-three {
    width: 300px;
    height: 300px;

    right: -150px;
    bottom: -150px;
}


/* =====================================================
   DASHBOARD
===================================================== */

.dashboard-page {
    min-height: 100vh;

    padding-bottom: 105px;

    background:
        radial-gradient(
            circle at 8% 8%,
            rgba(71, 176, 255, 0.16),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 35%,
            rgba(9, 161, 229, 0.08),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #f7fcff 0%,
            #eaf6ff 100%
        );
}


/* HEADER */

.header {
    height: 76px;

    padding:
        0 max(
            5%,
            calc((100% - 1180px) / 2)
        );

    display: flex;

    justify-content: space-between;
    align-items: center;

    background:
        rgba(255, 255, 255, 0.88);

    border-bottom:
        1px solid rgba(220, 236, 248, 0.9);

    box-shadow:
        0 5px 25px rgba(30, 100, 160, 0.05);

    position: sticky;

    top: 0;

    z-index: 50;

    backdrop-filter: blur(18px);
}


.brand {
    display: flex;

    align-items: center;

    gap: 12px;
}


.brand-logo {
    width: 44px;
    height: 44px;

    display: flex;

    justify-content: center;
    align-items: center;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #0567b3,
            #25b9ff
        );

    color: white;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1px;

    box-shadow:
        0 8px 20px rgba(0, 111, 190, 0.22);
}


.brand-text h2 {
    font-size: 16px;

    letter-spacing: 2px;

    color: #123d5c;
}


.brand-text p {
    font-size: 9px;

    color: #7892a7;
}


/* CONNECTION */

.connection-pill {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 8px 13px;

    border:
        1px solid #ccefe2;

    border-radius: 999px;

    background: #f1fcf7;

    color: #13845f;

    font-size: 10px;

    font-weight: 600;

    transition: 0.25s ease;
}


.connection-pill.offline {
    background: #fff4f4;

    border-color: #ffd9da;

    color: #c44d55;
}


.connection-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 0 4px
        rgba(22, 199, 132, 0.12);
}


.connection-dot.offline {
    background: var(--red);

    box-shadow:
        0 0 0 4px
        rgba(239, 91, 99, 0.10);
}


/* =====================================================
   MAIN CONTENT
===================================================== */

.main-content {
    width: min(92%, 1180px);

    margin: auto;

    padding:
        48px 0 30px;
}


.dashboard-heading {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 25px;

    margin-bottom: 28px;
}


.heading-label,
.section-kicker {
    font-size: 9px;

    letter-spacing: 3px;

    color: #0781d1;

    font-weight: 700;
}


.dashboard-heading h1 {
    margin-top: 7px;

    font-size:
        clamp(30px, 4vw, 42px);

    line-height: 1.15;

    color: #102f49;
}


.dashboard-heading h1 span {
    color: #0781d1;
}


.dashboard-heading
> div:first-child
> p:last-child {

    margin-top: 10px;

    color: #728ba0;

    font-size: 12px;
}


.last-update-card {
    min-width: 135px;

    padding: 12px 15px;

    border:
        1px solid var(--border);

    border-radius: 15px;

    background:
        rgba(255, 255, 255, 0.72);

    text-align: right;
}


.last-update-label {
    display: block;

    color: #91a5b5;

    font-size: 8px;

    letter-spacing: 1.5px;
}


.last-update-card strong {
    display: block;

    margin-top: 2px;

    color: #174866;

    font-size: 12px;
}


/* =====================================================
   SUMMARY
===================================================== */

.summary-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 14px;

    margin-bottom: 42px;
}


.summary-card {
    min-height: 92px;

    padding: 16px;

    display: flex;

    align-items: center;

    gap: 12px;

    border:
        1px solid var(--border);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.86);

    box-shadow:
        0 10px 35px
        rgba(35, 111, 155, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.summary-card:hover {
    transform:
        translateY(-2px);

    box-shadow: var(--shadow);
}


.summary-icon {
    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    display: grid;

    place-items: center;

    border-radius: 13px;
}


.summary-icon svg,
.device-icon svg,
.sensor-icon svg,
.note-icon svg {

    width: 22px;
    height: 22px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.8;

    stroke-linecap: round;

    stroke-linejoin: round;
}


.icon-blue {
    color: #087bd9;

    background: #eaf6ff;
}


.icon-cyan {
    color: #159ccf;

    background: #e9faff;
}


.icon-green {
    color: #13a777;

    background: #e8fbf3;
}


.icon-purple {
    color: #7665c8;

    background: #f1efff;
}


.summary-card
span:not(.summary-icon) {

    display: block;

    color: #8aa0b1;

    font-size: 8px;

    font-weight: 600;

    letter-spacing: 1.3px;
}


.summary-card strong {
    display: block;

    margin-top: 4px;

    color: #183f59;

    font-size: 12px;

    line-height: 1.25;
}


/* SECTION */

.section-heading {
    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    gap: 15px;

    margin-bottom: 17px;
}


.section-heading h2 {
    margin-top: 4px;

    color: #163e58;

    font-size: 21px;
}


.live-badge {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: #5d778b;

    font-size: 9px;
}


.live-badge span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 0 4px
        rgba(22, 199, 132, 0.11);
}


/* =====================================================
   DEVICE
===================================================== */

.device-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px;
}


.device-card {
    padding: 22px;

    border:
        1px solid var(--border);

    border-radius: 23px;

    background:
        rgba(255, 255, 255, 0.92);

    box-shadow: var(--shadow);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}


.device-card:hover {
    transform:
        translateY(-3px);

    box-shadow:
        0 22px 55px
        rgba(27, 105, 155, 0.13);
}


.device-card.is-open {
    border-color:
        rgba(22, 199, 132, 0.25);
}


.card-header {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 17px;
}


.device-icon {
    width: 49px;
    height: 49px;

    flex: 0 0 49px;

    display: grid;

    place-items: center;

    border-radius: 15px;

    background: #e8f5ff;

    color: #087bd9;
}


.device-title {
    min-width: 0;
}


.area-label {
    color: #8aa1b4;

    font-size: 8px;

    letter-spacing: 2px;

    margin-bottom: 2px;
}


.card-header h2 {
    color: #153e5b;

    font-size: 20px;
}


.device-chip {
    margin-left: auto;

    padding: 5px 9px;

    border-radius: 999px;

    background: #f2f7fa;

    color: #7a8f9f;

    font-size: 8px;

    font-weight: 600;

    white-space: nowrap;
}


.device-card.is-open
.device-chip {

    background: #e8faf3;

    color: #15966b;
}


/* =====================================================
   DEVICE PREVIEW
===================================================== */

.device-preview {
    height: 205px;

    position: relative;

    display: flex;

    align-items: flex-end;

    justify-content: center;

    overflow: hidden;

    border-radius: 18px;
}


/* GARAGE */

.garage-preview {
    background:
        linear-gradient(
            145deg,
            #b9e2fa,
            #edf9ff
        );
}


.garage-scene {
    width: 70%;

    height: 89%;

    position: relative;

    transition:
        transform 0.35s ease;
}


.garage-roof {
    height: 25px;

    background: #6f9fbd;

    border-radius:
        10px 10px 0 0;
}


.garage-door {
    height:
        calc(100% - 25px);

    position: relative;

    display: flex;

    flex-direction: column;

    justify-content: space-around;

    padding: 5px;

    background: #d5e0e7;

    border-left:
        7px solid #7192a7;

    border-right:
        7px solid #7192a7;

    transition:
        transform 0.5s ease,
        opacity 0.35s ease;

    transform-origin:
        top center;
}


.garage-door div {
    height: 2px;

    width: 100%;

    background: #9db0bd;
}


.garage-door.is-open {
    transform:
        translateY(-42%);
}


/* VISUAL STATUS */

.visual-state {
    position: absolute;

    top: 13px;

    right: 13px;

    padding: 5px 8px;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.78);

    color: #6e8494;

    font-size: 8px;

    font-weight: 700;

    letter-spacing: 0.7px;

    backdrop-filter: blur(8px);
}


.device-card.is-open
.visual-state {

    background:
        rgba(232, 250, 243, 0.9);

    color: #15966b;
}


/* BALCONY */

.balcony-preview {
    background:
        linear-gradient(
            145deg,
            #b7e6fb,
            #eaf9ff
        );
}


.balcony-house {
    width: 65%;

    height: 88%;

    transition:
        transform 0.35s ease;
}


.balcony-house.is-open {
    transform:
        translateY(-4px);
}


.balcony-roof {
    width: 100%;

    height: 45%;

    background: #4d8eb9;

    clip-path:
        polygon(
            50% 0,
            100% 100%,
            0 100%
        );
}


.balcony-body {
    height: 55%;

    display: flex;

    justify-content: center;

    gap: 18px;

    padding-top: 20px;

    background: #f5f9fc;
}


.balcony-window {
    width: 42px;
    height: 48px;

    background: #73c9ed;

    border:
        5px solid #4c8caf;

    border-radius: 5px;
}


/* =====================================================
   DEVICE STATUS
===================================================== */

.status-row {
    min-height: 58px;

    margin-top: 15px;

    padding:
        0 0 14px;

    border-bottom:
        1px solid #e5eef5;

    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    gap: 15px;
}


.status-label {
    display: block;

    margin-bottom: 5px;

    color: #8ba1b3;

    font-size: 8px;

    letter-spacing: 1.5px;
}


.status-main {
    display: flex;

    align-items: center;

    gap: 8px;
}


.status-main strong {
    color: #183f59;

    font-size: 12px;
}


.status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #7f95a5;

    box-shadow:
        0 0 0 4px
        rgba(127, 149, 165, 0.08);

    transition: 0.25s ease;
}


.status-dot.is-open {
    background: var(--green);

    box-shadow:
        0 0 0 4px
        rgba(22, 199, 132, 0.10),
        0 0 9px
        rgba(22, 199, 132, 0.5);
}


.response-state {
    color: #90a4b3;

    font-size: 8px;
}


/* CONTROL BUTTON */

.control-button {
    width: 100%;

    margin-top: 14px;

    min-height: 47px;

    padding: 12px 15px;

    border:
        1px solid #d6ebf8;

    border-radius: 13px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: #eaf6ff;

    color: #087bd9;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.7px;

    cursor: pointer;

    transition: 0.25s ease;
}


.control-button:hover {
    background: #087bd9;

    color: white;

    border-color: #087bd9;

    box-shadow:
        0 8px 20px
        rgba(8, 123, 217, 0.18);
}


.control-button:disabled {
    cursor: wait;

    opacity: 0.7;
}


.control-button.loading
.button-arrow {
    animation:
        spin 0.8s linear infinite;
}


.button-arrow {
    font-size: 18px;

    transition: 0.3s;
}


.control-button:hover
.button-arrow {
    transform:
        translateX(5px);
}


/* =====================================================
   SENSOR PANEL
===================================================== */

.sensor-panel {
    margin-top: 32px;

    padding: 21px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    border:
        1px solid var(--border);

    border-radius: 22px;

    background:
        rgba(255, 255, 255, 0.90);

    box-shadow: var(--shadow);

    transition: 0.3s ease;
}


.sensor-panel.rain-active {
    border-color:
        rgba(9, 161, 229, 0.35);

    box-shadow:
        0 18px 50px
        rgba(9, 161, 229, 0.12);
}


.sensor-main {
    display: flex;

    align-items: center;

    gap: 15px;
}


.sensor-icon {
    width: 55px;
    height: 55px;

    flex: 0 0 55px;

    display: grid;

    place-items: center;

    border-radius: 17px;

    background: #e8fbf3;

    color: #13a777;

    transition: 0.3s ease;
}


.sensor-icon.rain-active {
    background: #eaf6ff;

    color: #087bd9;

    animation:
        sensorPulse 1.8s ease-in-out infinite;
}


.sensor-main h2 {
    margin-top: 3px;

    color: #153e5b;

    font-size: 18px;
}


.sensor-main p:last-child {
    max-width: 530px;

    margin-top: 5px;

    color: #788fa0;

    font-size: 10px;

    line-height: 1.6;
}


.sensor-metrics {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(90px, 1fr));

    gap: 20px;
}


.sensor-metrics > div {
    min-width: 95px;
}


.sensor-metrics span {
    display: block;

    color: #93a6b5;

    font-size: 7px;

    letter-spacing: 1.3px;
}


.sensor-metrics strong {
    display: block;

    margin-top: 4px;

    color: #19435d;

    font-size: 10px;
}


/* =====================================================
   HISTORY
===================================================== */

.history-section {
    margin-top: 35px;
}


.clear-history {
    padding: 6px 10px;

    border:
        1px solid #dcecf7;

    border-radius: 9px;

    background: white;

    color: #71899b;

    font-size: 8px;

    cursor: pointer;

    transition: 0.2s ease;
}


.clear-history:hover {
    border-color: #b9dff5;

    color: #087bd9;
}


.timeline {
    padding:
        4px 5px 4px 20px;

    border:
        1px solid var(--border);

    border-radius: 19px;

    background:
        rgba(255, 255, 255, 0.78);
}


.timeline-item {
    min-height: 58px;

    position: relative;

    display: flex;

    align-items: center;

    border-left:
        1px solid #dcecf7;

    padding-left: 19px;
}


.timeline-item:last-child {
    border-left-color:
        transparent;
}


.timeline-dot {
    position: absolute;

    left: -5px;

    top: 50%;

    width: 9px;
    height: 9px;

    border-radius: 50%;

    transform:
        translateY(-50%);

    background: #087bd9;

    box-shadow:
        0 0 0 4px #eaf6ff;
}


.timeline-item.auto
.timeline-dot {
    background: #13a777;

    box-shadow:
        0 0 0 4px #e8fbf3;
}


.timeline-item.sensor
.timeline-dot {
    background: #7665c8;

    box-shadow:
        0 0 0 4px #f1efff;
}


.timeline-item.device
.timeline-dot {
    background: #159ccf;

    box-shadow:
        0 0 0 4px #e9faff;
}


.timeline-content {
    width: 100%;

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;
}


.timeline-content strong {
    color: #34566c;

    font-size: 10px;

    font-weight: 500;
}


.timeline-content span {
    flex-shrink: 0;

    color: #98aab7;

    font-size: 8px;
}


.empty-history {
    min-height: 70px;

    display: flex;

    align-items: center;

    gap: 9px;

    color: #91a4b2;

    font-size: 9px;
}


.empty-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #c7d5de;
}


/* =====================================================
   SYSTEM NOTE
===================================================== */

.system-note {
    margin-top: 25px;

    padding: 15px 17px;

    display: flex;

    align-items: center;

    gap: 12px;

    border:
        1px solid #dcecf7;

    border-radius: 16px;

    background:
        rgba(245, 251, 255, 0.8);
}


.note-icon {
    width: 35px;
    height: 35px;

    flex: 0 0 35px;

    display: grid;

    place-items: center;

    border-radius: 10px;

    background: #eaf6ff;

    color: #087bd9;
}


.note-icon svg {
    width: 17px;
    height: 17px;
}


.system-note strong {
    color: #34566c;

    font-size: 9px;
}


.system-note p {
    margin-top: 2px;

    color: #8aa0b0;

    font-size: 8px;

    line-height: 1.5;
}


/* =====================================================
   BOTTOM HOME NAVIGATION
===================================================== */

.home-button {
    position: fixed;

    left: 50%;

    bottom:
        max(
            20px,
            env(safe-area-inset-bottom)
        );

    transform:
        translateX(-50%);

    z-index: 100;

    min-width: 132px;

    min-height: 50px;

    padding: 10px 19px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    border:
        1px solid
        rgba(255, 255, 255, 0.15);

    border-radius: 999px;

    background:
        linear-gradient(
            135deg,
            #056bb8,
            #09a1e5
        );

    color: white;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1px;

    box-shadow:
        0 12px 35px
        rgba(8, 123, 217, 0.28);

    backdrop-filter: blur(12px);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


.home-button:hover {
    transform:
        translateX(-50%)
        translateY(-3px);

    box-shadow:
        0 16px 40px
        rgba(8, 123, 217, 0.34);
}


.home-icon {
    width: 18px;
    height: 19px;

    position: relative;

    display: block;

    flex-shrink: 0;
}


/* =====================================================
   HOME ROOF
   PERBAIKAN:
   ATAP BENAR-BENAR SEGITIGA
===================================================== */

.home-roof {
    position: absolute;

    width: 0;
    height: 0;

    left: 1px;
    top: -1px;

    border-left:
        8px solid transparent;

    border-right:
        8px solid transparent;

    border-bottom:
        8px solid white;

    transform: none;
}


.home-body {
    width: 13px;
    height: 12px;

    position: absolute;

    left: 2.5px;

    bottom: 0;

    background: white;
}


.home-door {
    width: 3px;
    height: 6px;

    position: absolute;

    left: 7.5px;

    bottom: 0;

    background: #087bd9;

    z-index: 2;
}


/* =====================================================
   TOAST
===================================================== */

.toast {
    position: fixed;

    left: 50%;

    bottom: 86px;

    z-index: 120;

    transform:
        translate(-50%, 15px);

    opacity: 0;

    pointer-events: none;

    display: flex;

    align-items: center;

    gap: 9px;

    max-width:
        min(90vw, 360px);

    padding: 10px 13px;

    border:
        1px solid #dcecf7;

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.96);

    color: #31546a;

    box-shadow:
        0 15px 40px
        rgba(27, 105, 155, 0.16);

    font-size: 9px;

    transition: 0.25s ease;

    backdrop-filter: blur(14px);
}


.toast.show {
    opacity: 1;

    transform:
        translate(-50%, 0);
}


.toast-icon {
    width: 19px;
    height: 19px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background: #e8fbf3;

    color: #13a777;

    font-size: 10px;

    font-weight: 700;
}


.toast.error .toast-icon {
    background: #fff0f1;

    color: #d64e58;
}


/* =====================================================
   ANIMATION
===================================================== */

@keyframes fadeIn {

    from {
        opacity: 0;

        transform:
            translateY(15px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


@keyframes spin {

    to {
        transform:
            rotate(360deg);
    }
}


@keyframes sensorPulse {

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

    50% {
        transform:
            scale(1.04);
    }
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 950px) {

    .summary-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .sensor-panel {
        align-items: flex-start;

        flex-direction: column;
    }


    .sensor-metrics {
        width: 100%;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 700px) {

    .header {
        height: 70px;

        padding:
            0 18px;
    }


    .main-content {
        width: 92%;

        padding-top: 30px;
    }


    .dashboard-heading {
        align-items: flex-start;

        flex-direction: column;

        margin-bottom: 23px;
    }


    .last-update-card {
        width: 100%;

        text-align: left;
    }


    .summary-grid {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 10px;

        margin-bottom: 32px;
    }


    .summary-card {
        min-height: 82px;

        padding: 12px;
    }


    .summary-icon {
        width: 38px;
        height: 38px;

        flex-basis: 38px;
    }


    .device-grid {
        grid-template-columns: 1fr;
    }


    .device-preview {
        height: 190px;
    }


    .sensor-panel {
        padding: 17px;
    }


    .sensor-metrics {
        grid-template-columns:
            repeat(3, 1fr);

        gap: 10px;
    }


    .timeline-content {
        align-items: flex-start;

        flex-direction: column;

        gap: 3px;
    }


    .timeline-item {
        min-height: 68px;
    }


    .home-button {
        min-width: 126px;

        min-height: 48px;

        bottom:
            max(
                15px,
                env(safe-area-inset-bottom)
            );
    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 500px) {

    .brand-text h2 {
        font-size: 14px;
    }


    .brand-text p {
        font-size: 8px;
    }


    .connection-pill {
        padding: 7px 9px;
    }


    .summary-grid {
        grid-template-columns:
            1fr 1fr;
    }


    .summary-card {
        gap: 8px;
    }


    .summary-card strong {
        font-size: 10px;
    }


    .device-card {
        padding: 17px;

        border-radius: 19px;
    }


    .device-chip {
        font-size: 7px;

        padding:
            4px 7px;
    }


    .sensor-main {
        align-items: flex-start;
    }


    .sensor-metrics strong {
        font-size: 9px;
    }


    .home-button {
        min-width: 120px;
    }

}