:root {
    --bg: #050914;
    --bg-soft: #09111f;
    --panel: rgba(12, 24, 41, .78);
    --panel-2: rgba(17, 31, 51, .68);

    --line: rgba(148, 163, 184, .12);
    --line-blue: rgba(56, 189, 248, .28);

    --cyan: #22d3ee;
    --blue: #38bdf8;
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;

    --text: #f8fafc;
    --sub: #94a3b8;
    --muted: #64748b;

    --shadow: 0 20px 60px rgba(0,0,0,.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Plus Jakarta Sans", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(34,211,238,.09), transparent 30%),
        radial-gradient(circle at 85% 90%, rgba(59,130,246,.08), transparent 30%),
        var(--bg);
    overflow-x: hidden;
}

button {
    font-family: inherit;
}

.bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .25;
    background-image:
        linear-gradient(rgba(56,189,248,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56,189,248,.035) 1px, transparent 1px);
    background-size: 55px 55px;
    mask-image: linear-gradient(to bottom, black, transparent);
}

.glow {
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    opacity: .13;
}

.glow-one {
    top: -150px;
    left: 260px;
    background: var(--cyan);
}

.glow-two {
    bottom: -180px;
    right: 50px;
    background: #2563eb;
}

.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* SIDEBAR */

.sidebar {
    width: 275px;
    flex-shrink: 0;
    min-height: 100vh;
    padding: 22px 17px;
    display: flex;
    flex-direction: column;
    background: rgba(5, 12, 24, .86);
    border-right: 1px solid var(--line);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-top-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 13px;
    border-radius: 18px;
    background: rgba(255,255,255,.025);
    border: 1px solid var(--line);
    margin-bottom: 21px;
}

.school-logo {
    width: 47px;
    height: 47px;
    object-fit: contain;
    background: transparent;
    transition: .3s;
    filter: drop-shadow(0 0 10px rgba(34,211,238,.18));
}

.school-logo:hover {
    transform: translateY(-2px) scale(1.06);
}

.logo-divider {
    width: 1px;
    height: 30px;
    background: var(--line);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px;
    margin-bottom: 27px;
}

.brand-icon-wrapper {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--cyan);
    background: rgba(34,211,238,.1);
    border: 1px solid rgba(34,211,238,.2);
    box-shadow: 0 0 25px rgba(34,211,238,.08);
}

.brand-text h2 {
    font-size: .93rem;
    letter-spacing: .4px;
}

.brand-text p {
    margin-top: 3px;
    font-size: .61rem;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 1.5px;
}

.menu-label {
    margin: 0 9px 11px;
    color: var(--muted);
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 13px;
    color: var(--sub);
    background: transparent;
    font-size: .81rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: .25s;
}

.nav-item svg {
    width: 18px;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255,255,255,.035);
    transform: translateX(3px);
}

.nav-item.active {
    color: var(--cyan);
    background:
        linear-gradient(90deg, rgba(34,211,238,.13), rgba(34,211,238,.025));
    border-color: rgba(34,211,238,.22);
    box-shadow: inset 3px 0 0 var(--cyan), 0 8px 25px rgba(0,0,0,.15);
}

.sidebar-footer {
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.connection-box {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px;
    border-radius: 13px;
    background: rgba(34,197,94,.055);
    border: 1px solid rgba(34,197,94,.12);
}

.connection-box strong {
    display: block;
    font-size: .68rem;
    color: var(--green);
}

.connection-box small {
    display: block;
    margin-top: 2px;
    font-size: .62rem;
    color: var(--sub);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot.online {
    background: var(--green);
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,100% {
        box-shadow: 0 0 0 0 rgba(34,197,94,.45);
    }
    60% {
        box-shadow: 0 0 0 8px rgba(34,197,94,0);
    }
}

/* MAIN */

.main-content {
    flex: 1;
    min-width: 0;
    padding: 30px 34px;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 27px;
}

.eyebrow,
.panel-kicker {
    color: var(--cyan);
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}

.live-dot,
.status-light {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.header-title h1 {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.7px;
}

.header-title p {
    margin-top: 5px;
    color: var(--sub);
    font-size: .78rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.refresh-btn,
.clock-card,
.header-profile {
    border: 1px solid var(--line);
    background: rgba(12,24,41,.72);
    backdrop-filter: blur(15px);
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--sub);
    border-radius: 11px;
    padding: 9px 12px;
    font-size: .71rem;
    font-weight: 700;
    cursor: pointer;
    transition: .25s;
}

.refresh-btn svg {
    width: 15px;
}

.refresh-btn:hover {
    color: var(--cyan);
    border-color: var(--line-blue);
    transform: translateY(-2px);
}

.refresh-btn.loading svg {
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.clock-card {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-radius: 11px;
    color: var(--blue);
    font-size: .72rem;
    font-weight: 800;
}

.clock-card svg {
    width: 15px;
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 13px 5px 5px;
    border-radius: 30px;
}

.avatar {
    width: 33px;
    height: 33px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #0891b2, #2563eb);
}

.avatar svg {
    width: 16px;
}

.user-name {
    display: block;
    font-size: .65rem;
    font-weight: 800;
}

.user-role {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: .57rem;
}

/* TABS */

.tab-content {
    display: none;
    animation: pageIn .35s ease;
}

.tab-content.active {
    display: block;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HERO */

.hero-banner {
    min-height: 235px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    margin-bottom: 20px;
    border-radius: 23px;
    border: 1px solid rgba(34,211,238,.2);
    background:
        radial-gradient(circle at 85% 50%, rgba(34,211,238,.12), transparent 28%),
        linear-gradient(135deg, rgba(12,34,52,.95), rgba(7,15,27,.92));
    box-shadow: var(--shadow);
}

.hero-banner:before {
    content: "";
    position: absolute;
    width: 450px;
    height: 450px;
    right: -250px;
    top: -250px;
    border-radius: 50%;
    border: 1px solid rgba(34,211,238,.09);
    animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
    to { transform: rotate(360deg); }
}

.hero-text {
    position: relative;
    z-index: 2;
    max-width: 670px;
}

.hero-small {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 9px;
    color: var(--sub);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.hero-text h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.hero-text p {
    color: var(--sub);
    font-size: .76rem;
    line-height: 1.7;
}

.badge-status-safe {
    color: var(--green);
    text-shadow: 0 0 16px rgba(34,197,94,.3);
}

.badge-status-danger {
    color: var(--red);
    text-shadow: 0 0 16px rgba(239,68,68,.4);
    animation: dangerFlash 1s infinite;
}

@keyframes dangerFlash {
    50% { opacity: .55; }
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    border-radius: 8px;
    color: var(--sub);
    background: rgba(255,255,255,.035);
    border: 1px solid var(--line);
    font-size: .6rem;
    font-weight: 800;
}

.hero-meta svg {
    width: 12px;
    color: var(--cyan);
}

/* SAFE ILLUSTRATION */

.safe-illustration {
    width: 250px;
    height: 190px;
    position: relative;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}

.safe-glow {
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(34,211,238,.12);
    filter: blur(35px);
    animation: safeGlow 3s ease-in-out infinite;
}

@keyframes safeGlow {
    50% { transform: scale(1.13); opacity: .55; }
}

.safe-body {
    width: 155px;
    height: 137px;
    position: relative;
    border-radius: 15px;
    background: linear-gradient(145deg, #1d344b, #081322);
    border: 2px solid rgba(56,189,248,.5);
    box-shadow:
        inset 0 0 25px rgba(56,189,248,.08),
        0 15px 35px rgba(0,0,0,.45);
    transform: perspective(500px) rotateY(-8deg);
}

.safe-door {
    position: absolute;
    inset: 10px;
    border-radius: 10px;
    border: 1px solid rgba(56,189,248,.25);
    background: linear-gradient(145deg, #102238, #07111f);
}

.safe-screen {
    position: absolute;
    top: 17px;
    left: 50%;
    transform: translateX(-50%);
    width: 47px;
    height: 31px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    color: var(--cyan);
    background: rgba(34,211,238,.08);
    border: 1px solid rgba(34,211,238,.22);
}

.safe-screen svg {
    width: 12px;
}

.safe-screen span {
    font-size: 5px;
    font-weight: 800;
    letter-spacing: 1px;
}

.safe-wheel {
    position: absolute;
    left: 50%;
    top: 58%;
    width: 57px;
    height: 57px;
    transform: translate(-50%,-50%);
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 5px solid #213c56;
    box-shadow:
        inset 0 0 0 3px #0a1625,
        0 0 20px rgba(34,211,238,.14);
    animation: wheelFloat 4s ease-in-out infinite;
}

@keyframes wheelFloat {
    50% { transform: translate(-50%,-50%) rotate(8deg); }
}

.wheel-center {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--cyan);
    background: #081322;
    border: 1px solid rgba(34,211,238,.35);
}

.wheel-center svg {
    width: 13px;
}

.safe-led {
    position: absolute;
    right: 11px;
    bottom: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 10px var(--green);
}

.safe-side-light {
    position: absolute;
    right: -3px;
    top: 20px;
    width: 3px;
    height: 90px;
    background: var(--cyan);
    filter: blur(2px);
    opacity: .6;
}

.safe-shadow {
    position: absolute;
    bottom: 5px;
    width: 150px;
    height: 12px;
    border-radius: 50%;
    background: #000;
    filter: blur(13px);
    opacity: .55;
}

/* CARDS */

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 35px rgba(0,0,0,.16);
}

.card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 17px;
    border-radius: 17px;
    transition: .3s;
    animation: cardIn .45s ease both;
}

.card:nth-child(2) { animation-delay: .06s; }
.card:nth-child(3) { animation-delay: .12s; }
.card:nth-child(4) { animation-delay: .18s; }

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--line-blue);
    box-shadow: 0 18px 40px rgba(0,0,0,.3);
}

.card-icon {
    width: 43px;
    height: 43px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.card-icon svg {
    width: 19px;
}

.card-icon.red {
    color: var(--red);
    background: rgba(239,68,68,.1);
}

.card-icon.cyan {
    color: var(--cyan);
    background: rgba(34,211,238,.1);
}

.card-icon.green {
    color: var(--green);
    background: rgba(34,197,94,.1);
}

.card-icon.orange {
    color: var(--orange);
    background: rgba(245,158,11,.1);
}

.card-info {
    min-width: 0;
}

.card-label {
    display: block;
    color: var(--muted);
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.card-info strong {
    display: block;
    margin-top: 4px;
    font-size: .9rem;
}

.card-info strong small {
    color: var(--muted);
    font-size: .7rem;
}

.card-info > small {
    display: block;
    margin-top: 2px;
    color: var(--sub);
    font-size: .59rem;
}

.mini-status {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: .48rem;
    font-weight: 900;
}

.mini-status.danger { color: var(--red); }
.mini-status.success { color: var(--green); }
.mini-status.warning { color: var(--orange); }

/* PANELS */

.content-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 15px;
}

.panel {
    padding: 20px;
    border-radius: 18px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
}

.panel-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: .87rem;
}

.panel-header h2 svg {
    width: 16px;
    color: var(--cyan);
}

.live-badge,
.system-ok,
.cam-online {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 7px;
    color: var(--green);
    background: rgba(34,197,94,.07);
    border: 1px solid rgba(34,197,94,.13);
    font-size: .5rem;
    font-weight: 900;
}

.live-badge span,
.cam-online span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

.log-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 255px;
    overflow-y: auto;
}

.log-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0,0,0,.17);
    border: 1px solid var(--line);
    font-size: .68rem;
    animation: logIn .3s ease;
}

@keyframes logIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.badge {
    padding: 4px 6px;
    border-radius: 5px;
    font-size: .48rem;
    font-weight: 900;
}

.badge.info {
    color: var(--cyan);
    background: rgba(34,211,238,.08);
}

.badge.danger {
    color: var(--red);
    background: rgba(239,68,68,.08);
}

.badge.success {
    color: var(--green);
    background: rgba(34,197,94,.08);
}

.log-text {
    flex: 1;
    color: var(--sub);
}

.log-time {
    color: var(--muted);
    font-size: .54rem;
}

.device-status-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 11px;
    background: rgba(0,0,0,.16);
    border: 1px solid var(--line);
    transition: .25s;
}

.device-item:hover {
    border-color: var(--line-blue);
}

.device-info {
    display: flex;
    align-items: center;
    gap: 9px;
}

.device-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--cyan);
    background: rgba(34,211,238,.07);
}

.device-icon svg {
    width: 14px;
}

.device-info h4 {
    font-size: .68rem;
}

.device-info p {
    margin-top: 2px;
    color: var(--muted);
    font-size: .57rem;
}

/* SECTION */

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 19px;
}

.section-heading h2 {
    margin-top: 4px;
    font-size: 1.25rem;
}

.section-heading p {
    margin-top: 4px;
    color: var(--sub);
    font-size: .7rem;
}

/* SENSOR */

.sensor-groups-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 15px;
}

.sensor-card-body {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.sensor-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 11px;
    border-radius: 10px;
    background: rgba(0,0,0,.16);
    border: 1px solid var(--line);
}

.sensor-metric .label {
    color: var(--sub);
    font-size: .65rem;
}

.sensor-metric .val {
    font-size: .72rem;
    font-weight: 900;
}

.val-sub {
    color: var(--blue);
    font-size: .65rem;
    font-weight: 700;
}

.counter {
    color: var(--orange);
}

.highlight-red { color: var(--red); }
.highlight-green { color: var(--green); }
.highlight-cyan { color: var(--cyan); }

.gauge-group {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 13px;
}

.gauge-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gauge-label {
    display: flex;
    justify-content: space-between;
    color: var(--sub);
    font-size: .62rem;
}

.gauge-label b {
    color: var(--text);
}

.progress-bar {
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255,255,255,.05);
}

.progress-bar .fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg,var(--cyan),var(--blue));
    box-shadow: 0 0 12px rgba(34,211,238,.3);
    transition: width .45s ease;
}

/* CAMERA */

.cam-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
}

.cam-card {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.18);
}

.img-wrapper {
    position: relative;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 310px;
    display: block;
    object-fit: cover;
    cursor: pointer;
    transition: .4s;
}

.cam-card:hover img {
    transform: scale(1.025);
}

.image-overlay {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border-radius: 8px;
    color: var(--cyan);
    background: rgba(5,9,20,.75);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    font-size: .54rem;
    font-weight: 800;
}

.image-overlay svg {
    width: 12px;
}

.cam-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px;
}

.cam-info strong {
    display: block;
    font-size: .68rem;
}

.cam-info span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .57rem;
}

.cam-info small {
    color: var(--blue);
    font-size: .58rem;
    white-space: nowrap;
}

/* OUTPUT */

.output-grid {
    grid-template-columns: repeat(3,1fr);
}

.actuator-panel {
    padding: 0;
}

.actuator-panel .panel-header {
    padding: 19px 20px 0;
}

.actuator-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 20px 30px;
}

.actuator-icon {
    width: 75px;
    height: 75px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    margin-bottom: 15px;
}

.actuator-icon svg {
    width: 27px;
}

.actuator-icon.red {
    color: var(--red);
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.25);
    box-shadow: 0 0 30px rgba(239,68,68,.07);
}

.actuator-icon.green {
    color: var(--green);
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.22);
    box-shadow: 0 0 30px rgba(34,197,94,.07);
}

.actuator-card h3 {
    font-size: .92rem;
}

.actuator-card p {
    margin-top: 6px;
    color: var(--sub);
    font-size: .63rem;
}

/* ABOUT */

.about-grid {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 15px;
}

.about-photo-card {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    border-radius: 19px;
    border: 1px solid var(--line);
    background: var(--panel);
}

.about-photo-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.about-photo-card:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,.75));
}

.photo-overlay-tag {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 9px;
    color: var(--cyan);
    background: rgba(5,9,20,.75);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    font-size: .58rem;
    font-weight: 800;
}

.photo-overlay-tag svg {
    width: 13px;
}

.about-title {
    max-width: 650px;
    margin-top: 8px;
    font-size: 1.35rem;
    line-height: 1.35;
}

.about-desc {
    margin: 14px 0 22px;
    color: var(--sub);
    font-size: .72rem;
    line-height: 1.8;
}

.team-title {
    margin-bottom: 11px;
    font-size: .78rem;
}

.team-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.team-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 11px;
    background: rgba(0,0,0,.16);
    border: 1px solid var(--line);
    transition: .25s;
}

.team-card:hover {
    border-color: var(--line-blue);
    transform: translateY(-2px);
}

.team-card .num {
    min-width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--cyan);
    background: rgba(34,211,238,.08);
    font-size: .65rem;
    font-weight: 900;
}

.member-info h4 {
    font-size: .65rem;
}

.member-info p {
    margin-top: 2px;
    color: var(--muted);
    font-size: .56rem;
}

/* MODAL */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: rgba(0,0,0,.86);
    backdrop-filter: blur(12px);
}

.modal.show {
    display: flex;
    animation: fade .25s ease;
}

@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content-img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 15px;
    border: 1px solid var(--line-blue);
    box-shadow: 0 20px 80px rgba(0,0,0,.7);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text);
    background: rgba(255,255,255,.05);
    cursor: pointer;
}

.close-modal svg {
    width: 18px;
}

/* TOAST */

.toast {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    padding: 12px;
    border-radius: 13px;
    background: rgba(9,18,31,.95);
    border: 1px solid var(--line-blue);
    box-shadow: var(--shadow);
    transform: translateY(130px);
    opacity: 0;
    transition: .35s;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--green);
    background: rgba(34,197,94,.1);
}

.toast-icon svg {
    width: 15px;
}

.toast strong,
.toast span {
    display: block;
}

.toast strong {
    font-size: .67rem;
}

.toast span {
    margin-top: 2px;
    color: var(--sub);
    font-size: .59rem;
}

/* RESPONSIVE */

@media (max-width: 1200px) {

    .sidebar {
        width: 235px;
    }

    .main-content {
        padding: 25px;
    }

    .cards-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .safe-illustration {
        transform: scale(.85);
        margin-right: -20px;
    }
}

@media (max-width: 900px) {

    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-menu {
        flex-direction: row;
        overflow-x: auto;
    }

    .nav-item {
        min-width: max-content;
    }

    .sidebar-footer {
        display: none;
    }

    .content-grid,
    .about-grid,
    .sensor-groups-grid {
        grid-template-columns: 1fr;
    }

    .output-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {

    .main-content {
        padding: 18px 13px;
    }

    .top-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-profile {
        display: none;
    }

    .hero-banner {
        padding: 22px;
    }

    .safe-illustration {
        display: none;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .team-list {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .refresh-btn span {
        display: none;
    }

    .refresh-btn {
        padding: 9px;
    }

    .hero-text h2 {
        font-size: 1.05rem;
    }

    .clock-card {
        flex: 1;
    }

    .img-wrapper img {
        height: 230px;
    }
}