﻿:root {
    --bg: #eaf2f3;
    --panel: #f8fbfc;
    --border: #bfd3d6;
    --dark: #16343a;
    --green: #008d82;
    --green-light: #23dbc9;
    --gold: #f2bb33;
    --red: #ed4058;
    --shadow: 0 8px 22px rgba(21, 57, 65, .15);
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--dark);
    background:
        radial-gradient(circle at 15% 20%, #ffffff 0, transparent 28%),
        linear-gradient(135deg, #dfecee, #f5f9fa);
}

.app-shell {
    display: grid;
    grid-template-rows: 11vh 7vh 78vh 4vh;
    width: 100%;
    height: 100vh;
    padding: 5px;
    border: 2px solid #50cfc3;
    box-shadow:
        inset 0 0 16px rgba(22, 214, 194, .35),
        inset 0 0 3px #fff;
    animation: shellGlow 3s infinite alternate;
}

@keyframes shellGlow {
    from { border-color: #83c8c2; }
    to { border-color: #20dfcd; }
}

.top-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 0;
    padding: 8px 24px;
    border-radius: 12px 12px 5px 5px;
    color: white;
    background: linear-gradient(110deg, #143c43, #087b76);
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.logo {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-right: 13px;
    flex-shrink: 0;
    border: 2px solid #80fff1;
    border-radius: 14px;
    color: #fff;
    background: #0b5355;
    box-shadow: 0 0 12px #5dffea88;
    font-size: 20px;
    font-weight: 900;
}

.brand h1 {
    margin: 0;
    color: #eafffc;
    font-size: clamp(17px, 2vw, 29px);
    letter-spacing: 1px;
}

.brand p {
    margin: 3px 0 0;
    color: #8dfff1;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
}

.phone {
    padding: 10px 16px;
    border: 1px solid #77eadd;
    border-radius: 11px;
    background: #ffffff17;
    font-size: clamp(14px, 1.3vw, 19px);
    font-weight: 800;
}

.bell {
    position: relative;
    width: 48px;
    height: 48px;
    border: 1px solid #8bfff3;
    border-radius: 50%;
    color: white;
    background: #0f5d5d;
    box-shadow: 0 0 10px #61ffee88;
    font-size: 22px;
    cursor: pointer;
}

.bell span {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 21px;
    padding: 3px;
    border-radius: 20px;
    background: var(--red);
    font-size: 11px;
    font-weight: bold;
}

.notification-panel {
    display: none;
    position: absolute;
    z-index: 50;
    top: 65px;
    right: 10px;
    width: 320px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #60cfc4;
    border-radius: 10px;
    color: var(--dark);
    background: white;
    box-shadow: 0 15px 35px #0005;
}

.panel-title {
    padding: 11px;
    color: white;
    background: var(--green);
    font-weight: 800;
}

.empty-alert, .alert-item {
    margin: 0;
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.status-strip {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    margin: 5px 0;
    padding: 4px 18px;
    border: 1px solid #a9cdd0;
    border-radius: 7px;
    background: #f9fcfd;
    box-shadow: 0 4px 12px #244c5220;
    font-size: 12px;
    font-weight: 700;
}

.digital-clock {
    text-align: center;
    color: #4aff94;
    border: 3px ridge #8b989a;
    border-radius: 6px;
    background: #07110e;
    box-shadow: inset 0 0 10px #000;
    font-family: Consolas, monospace;
}

.digital-clock span {
    margin-right: 15px;
    color: #ffe36b;
    font-size: clamp(10px, 1vw, 14px);
}

.digital-clock strong {
    font-size: clamp(18px, 2.2vw, 30px);
    letter-spacing: 3px;
    text-shadow: 0 0 8px #24ff70;
}

.green-led {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    border-radius: 50%;
    background: #22e477;
    box-shadow: 0 0 8px #00ff66;
    animation: blink 1.7s infinite;
}

@keyframes blink {
    50% { opacity: .38; }
}

.automation-status {
    text-align: right;
}

.active-status {
    margin-left: 7px;
    padding: 4px 7px;
    border-radius: 5px;
    color: white;
    background: var(--green);
}

.main-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 23vw);
    gap: 8px;
    min-height: 0;
}

.control-panel, .analytics-card, .review-card {
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(250, 253, 253, .95);
    box-shadow: var(--shadow);
}

.control-panel {
    display: grid;
    grid-template-rows: 34px minmax(0, 1fr);
    padding: 8px;
}

.panel-heading, .card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #49676c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
}

.small-text {
    color: #91a4a7;
    font-size: 10px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: clamp(7px, 1.1vw, 15px);
    min-height: 0;
    padding: clamp(10px, 1.5vw, 20px);
    border: 5px ridge #9aabad;
    border-radius: 20px;
    background:
        radial-gradient(circle at center, #58676a, #273438);
    box-shadow:
        inset 0 0 18px #0a1517,
        0 6px 13px #0003;
}

.phone-button, .master-button {
    min-width: 0;
    min-height: 0;
    border: 3px solid #182326;
    border-radius: 16px;
    cursor: pointer;
    transition: .12s;
}

.phone-button {
    background:
        radial-gradient(circle at 35% 24%, #8e9a9c, #566367 48%, #293438);
    box-shadow:
        0 6px 0 #182124,
        0 8px 10px #0008,
        inset 2px 3px 5px #d3dddd;
}

.phone-button:hover {
    border-color: #65dfd3;
    box-shadow:
        0 6px 0 #182124,
        0 0 13px #4ffff0,
        inset 2px 3px 5px #e8ffff;
}

.phone-button:active, .master-button:active {
    transform: translateY(5px);
    box-shadow: 0 1px 0 #111;
}

.master-button {
    border-color: #987117;
    border-radius: 50%;
    color: #332300;
    background:
        radial-gradient(circle at 35% 24%, #fff8bd, #ffc938 55%, #c18400);
    box-shadow:
        0 7px 0 #765100,
        0 0 15px #ffd54f,
        inset 2px 3px 5px white;
    font-size: clamp(10px, 1.1vw, 16px);
    font-weight: 1000;
}

.right-panel {
    display: grid;
    grid-template-rows: 48% 39% 11%;
    gap: 1%;
    min-height: 0;
}

.analytics-card, .review-card {
    overflow: hidden;
    padding: 9px;
}

.live-dot {
    color: #e93a51;
    font-size: 10px;
}

.analytics-card canvas {
    width: 100%;
    height: calc(100% - 70px);
    margin-top: 5px;
    border-radius: 7px;
    background: linear-gradient(#f8ffff, #e9f5f5);
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
}

.mini-stats div {
    border-right: 1px solid #cfdddd;
}

.mini-stats div:last-child {
    border: 0;
}

.mini-stats strong, .mini-stats span {
    display: block;
}

.mini-stats strong {
    color: var(--green);
    font-size: clamp(15px, 1.5vw, 22px);
}

.mini-stats span {
    color: #74898d;
    font-size: 10px;
}

.card-heading button {
    border: 0;
    border-radius: 5px;
    color: white;
    background: var(--green);
    cursor: pointer;
}

.review-item {
    margin-top: 8px;
    padding: 7px;
    border-left: 3px solid var(--green);
    border-radius: 5px;
    background: #eef7f7;
    font-size: clamp(9px, .9vw, 12px);
}

.review-item div {
    display: flex;
    justify-content: space-between;
}

.review-item p {
    margin: 3px 0 0;
    color: #677b7f;
}

.stars {
    color: #f4b400;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}

.quick-links button {
    border: 1px solid #9fc5c7;
    border-radius: 9px;
    color: white;
    background: linear-gradient(145deg, #168f88, #075f61);
    box-shadow: 0 4px 7px #0003;
    font-size: clamp(15px, 2vw, 23px);
    font-weight: bold;
    cursor: pointer;
}

footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    color: #8dc2c2;
    border-radius: 4px;
    background: #102b31;
    font-size: clamp(8px, .8vw, 11px);
}

@media (max-width: 850px) {
    .app-shell {
        grid-template-rows: 12vh 7vh 77vh 4vh;
    }

    .main-area {
        grid-template-columns: minmax(0, 1fr) 210px;
    }

    .phone {
        display: none;
    }

    .button-grid {
        gap: 6px;
        padding: 8px;
    }

    .review-item {
        padding: 4px;
    }
}
