:root {
    --navy-950: #050d18;
    --navy-900: #07111f;
    --navy-850: #0a1727;
    --navy-800: #0d1c2d;
    --navy-700: #14283d;
    --copper: #c7865a;
    --copper-light: #e4ab7c;
    --cream: #f3eee8;
    --muted: #91a0af;
    --line: rgba(207, 225, 238, 0.11);
    --green: #51c894;
    --red: #ec6f6e;
    --amber: #e5aa5e;
    --blue: #62aee8;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--navy-950);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--cream);
    background:
        radial-gradient(circle at 15% 0%, rgba(199, 134, 90, 0.08), transparent 34rem),
        linear-gradient(145deg, var(--navy-900), var(--navy-950));
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

.eyebrow {
    margin: 0;
    color: var(--copper-light);
    font: 700 0.72rem/1.2 "Manrope", sans-serif;
    letter-spacing: 0.22em;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border: 1px solid rgba(228, 171, 124, 0.5);
    border-radius: 50% 50% 10% 50%;
    transform: rotate(-45deg);
    box-shadow: inset 0 0 0 7px rgba(199, 134, 90, 0.06);
}

.brand-mark::after,
.brand-mark span {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: var(--copper-light);
}

.brand-mark::after {
    position: absolute;
    transform: rotate(90deg);
}

.brand-mark.small {
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 8% 50%;
}

.brand-mark.small::after,
.brand-mark.small span {
    width: 12px;
}

.login-page {
    overflow-x: hidden;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.25fr) minmax(420px, 0.75fr);
}

.setup-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(360px, 0.72fr) minmax(600px, 1.28fr);
}

.setup-intro {
    display: flex;
    padding: clamp(42px, 6vw, 86px);
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--line);
    background:
        radial-gradient(circle at 10% 10%, rgba(199, 134, 90, 0.1), transparent 26rem),
        rgba(5, 13, 24, 0.55);
}

.setup-intro .brand-mark {
    margin-bottom: 64px;
}

.setup-intro h1 {
    max-width: 620px;
    margin: 18px 0 20px;
    font: 650 clamp(2.5rem, 4.8vw, 4.8rem)/1.02 "Manrope", sans-serif;
    letter-spacing: -0.065em;
}

.setup-intro > p:last-of-type {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.setup-steps {
    display: grid;
    margin: 54px 0 0;
    padding: 0;
    gap: 15px;
    list-style: none;
}

.setup-steps li {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #566777;
    font-size: 0.83rem;
}

.setup-steps li span {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 0.62rem;
}

.setup-steps li.is-active {
    color: var(--cream);
}

.setup-steps li.is-active span {
    color: var(--navy-950);
    border-color: var(--copper-light);
    background: var(--copper-light);
}

.setup-card {
    padding-top: 50px;
    padding-bottom: 50px;
}

.setup-form {
    max-width: 780px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.login-brand {
    position: relative;
    display: flex;
    overflow: hidden;
    padding: clamp(42px, 7vw, 108px);
    flex-direction: column;
    justify-content: center;
    background:
        linear-gradient(145deg, rgba(8, 24, 40, 0.82), rgba(5, 13, 24, 0.96)),
        repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(255, 255, 255, 0.025) 80px);
    border-right: 1px solid var(--line);
}

.login-brand::before {
    position: absolute;
    width: 460px;
    height: 460px;
    right: -260px;
    bottom: -130px;
    border: 1px solid rgba(199, 134, 90, 0.12);
    border-radius: 50%;
    box-shadow:
        0 0 0 55px rgba(199, 134, 90, 0.025),
        0 0 0 110px rgba(199, 134, 90, 0.018);
    content: "";
}

.login-brand .brand-mark {
    margin-bottom: 84px;
}

.login-brand h1 {
    max-width: 760px;
    margin: 20px 0 28px;
    font: 600 clamp(3.3rem, 6.4vw, 6.6rem)/0.98 "Manrope", sans-serif;
    letter-spacing: -0.065em;
}

.login-brand h1 em,
.dashboard-intro h1 em {
    color: var(--copper-light);
    font-family: Georgia, serif;
    font-weight: 400;
}

.brand-copy {
    max-width: 560px;
    margin: 0;
    color: #a9b5c0;
    font-size: clamp(1rem, 1.4vw, 1.22rem);
    line-height: 1.75;
}

.brand-statuses {
    display: flex;
    margin-top: 58px;
    gap: 12px;
}

.status-pip {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 16px currentColor;
}

.pip-green { color: var(--green); background: currentColor; }
.pip-red { color: var(--red); background: currentColor; }
.pip-amber { color: var(--amber); background: currentColor; }
.pip-blue { color: var(--blue); background: currentColor; }

.login-card {
    display: flex;
    padding: clamp(40px, 7vw, 100px);
    flex-direction: column;
    justify-content: center;
    background: rgba(7, 17, 31, 0.66);
    backdrop-filter: blur(20px);
}

.login-card-head {
    margin-bottom: 38px;
}

.login-card-head h2 {
    margin: 14px 0 8px;
    font: 700 clamp(2rem, 3.3vw, 2.7rem)/1.1 "Manrope", sans-serif;
    letter-spacing: -0.04em;
}

.login-card-head > p:last-child {
    margin: 0;
    color: var(--muted);
}

.login-form {
    display: grid;
    gap: 22px;
}

.login-form label > span {
    display: block;
    margin: 0 0 9px;
    color: #bdc7d0;
    font-size: 0.82rem;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    height: 57px;
    padding: 0 17px;
    color: var(--cream);
    outline: none;
    border: 1px solid rgba(182, 204, 221, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-form input:focus {
    border-color: rgba(228, 171, 124, 0.72);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 0 0 4px rgba(199, 134, 90, 0.1);
}

.login-form input::placeholder {
    color: #526171;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    padding: 8px;
    color: var(--copper-light);
    border: 0;
    background: none;
    cursor: pointer;
    transform: translateY(-50%);
    font-size: 0.76rem;
    font-weight: 700;
}

.primary-button {
    display: flex;
    height: 58px;
    margin-top: 8px;
    padding: 0 20px;
    align-items: center;
    justify-content: space-between;
    color: #07111f;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #e5b38b, #bf7950);
    box-shadow: 0 16px 35px rgba(177, 102, 63, 0.16);
    cursor: pointer;
    font-weight: 800;
    transition: transform 160ms ease, filter 160ms ease;
}

.primary-button:hover {
    filter: brightness(1.07);
    transform: translateY(-2px);
}

.primary-button:active {
    transform: translateY(0);
}

.secure-note {
    margin: 26px 0 0;
    color: #617181;
    text-align: center;
    font-size: 0.72rem;
}

.secure-note span {
    margin-right: 6px;
    color: #8fa0af;
    font-size: 0.58rem;
}

.login-card-footer {
    display: flex;
    margin-top: 26px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.login-card-footer .secure-note {
    margin: 0;
    text-align: left;
}

.registration-link {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    color: var(--copper-light);
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 750;
}

.registration-link:hover {
    color: #ffd0ab;
}

.registration-link span {
    transition: transform 160ms ease;
}

.registration-link:hover span {
    transform: translateX(3px);
}

.alert {
    margin: -16px 0 22px;
    padding: 12px 14px;
    color: #f0c78f;
    border: 1px solid rgba(229, 170, 94, 0.24);
    border-radius: 8px;
    background: rgba(229, 170, 94, 0.08);
    font-size: 0.86rem;
}

.alert-error {
    color: #f2a8a8;
    border-color: rgba(236, 111, 110, 0.24);
    background: rgba(236, 111, 110, 0.08);
}

.dashboard-page {
    background:
        radial-gradient(circle at 80% 0%, rgba(199, 134, 90, 0.07), transparent 28rem),
        var(--navy-950);
}

.topbar {
    display: flex;
    height: 76px;
    padding: 0 clamp(20px, 4vw, 64px);
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 17, 31, 0.88);
    backdrop-filter: blur(16px);
}

.wordmark,
.tablet-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    font: 400 0.92rem/1 "Manrope", sans-serif;
    letter-spacing: 0.13em;
    text-decoration: none;
}

.wordmark strong,
.tablet-brand strong {
    margin-right: 4px;
    color: var(--copper-light);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 22px;
}

.connection-pill {
    display: inline-flex;
    padding: 8px 12px;
    align-items: center;
    gap: 8px;
    color: #8ba598;
    border: 1px solid rgba(81, 200, 148, 0.12);
    border-radius: 999px;
    background: rgba(81, 200, 148, 0.04);
    font-size: 0.72rem;
}

.connection-pill i,
.pulse-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px var(--green);
}

.user-block {
    display: grid;
    padding-left: 22px;
    border-left: 1px solid var(--line);
}

.user-block strong {
    font-size: 0.8rem;
}

.user-block small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.66rem;
}

.logout-link {
    padding: 8px 0 8px 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.76rem;
}

.logout-link:hover {
    color: var(--cream);
}

.dashboard-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 62px 0 36px;
}

.dashboard-intro {
    display: flex;
    margin-bottom: 40px;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
}

.dashboard-intro h1 {
    margin: 12px 0 12px;
    font: 600 clamp(2.15rem, 4.4vw, 4.1rem)/1.02 "Manrope", sans-serif;
    letter-spacing: -0.06em;
}

.dashboard-intro > div:first-child > p:last-child {
    max-width: 690px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.clock-card {
    display: grid;
    min-width: 160px;
    justify-items: end;
}

.clock-card span {
    font: 500 2.1rem/1 "Manrope", sans-serif;
    letter-spacing: -0.06em;
}

.clock-card small {
    margin-top: 8px;
    color: var(--muted);
    text-transform: capitalize;
}

.current-card {
    --tone: var(--green);
    --tone-rgb: 81, 200, 148;
    display: grid;
    min-height: 128px;
    padding: 27px 30px;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
    overflow: hidden;
    border: 1px solid rgba(var(--tone-rgb), 0.25);
    border-radius: 14px;
    background:
        linear-gradient(100deg, rgba(var(--tone-rgb), 0.11), rgba(255, 255, 255, 0.025)),
        var(--navy-850);
    box-shadow: inset 3px 0 0 var(--tone);
    transition: border-color 250ms ease, background 250ms ease;
}

.tone-green { --tone: var(--green); --tone-rgb: 81, 200, 148; }
.tone-red { --tone: var(--red); --tone-rgb: 236, 111, 110; }
.tone-amber { --tone: var(--amber); --tone-rgb: 229, 170, 94; }
.tone-blue { --tone: var(--blue); --tone-rgb: 98, 174, 232; }

.current-orb {
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border: 1px solid rgba(var(--tone-rgb), 0.4);
    border-radius: 50%;
    background: rgba(var(--tone-rgb), 0.1);
}

.current-orb span {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--tone);
    box-shadow: 0 0 24px var(--tone);
}

.current-copy {
    display: grid;
}

.current-copy small {
    color: rgba(var(--tone-rgb), 0.92);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.current-copy strong {
    margin: 7px 0 5px;
    font: 700 1.35rem/1.1 "Manrope", sans-serif;
}

.current-copy span,
.current-meta span {
    color: var(--muted);
    font-size: 0.8rem;
}

.current-meta {
    display: grid;
    min-width: 112px;
    justify-items: end;
}

.current-meta strong {
    margin-top: 5px;
    font-size: 1.2rem;
}

.status-section {
    margin-top: 46px;
}

.device-card {
    display: grid;
    margin-top: 32px;
    padding: 26px 28px;
    grid-template-columns: minmax(300px, 0.85fr) minmax(360px, 1.15fr);
    align-items: center;
    gap: 32px;
    border: 1px solid rgba(199, 134, 90, 0.2);
    border-radius: 14px;
    background:
        linear-gradient(115deg, rgba(199, 134, 90, 0.08), transparent 55%),
        rgba(14, 29, 46, 0.7);
}

.device-card-copy {
    display: flex;
    align-items: center;
    gap: 18px;
}

.device-number {
    display: grid;
    min-width: 48px;
    height: 48px;
    place-items: center;
    color: var(--copper-light);
    border: 1px solid rgba(199, 134, 90, 0.28);
    border-radius: 50%;
    font: 700 0.72rem/1 "Manrope", sans-serif;
}

.device-card h2 {
    margin: 7px 0 5px;
    font: 650 1.12rem/1.2 "Manrope", sans-serif;
}

.device-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.device-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.device-link-row input {
    min-width: 0;
    height: 47px;
    padding: 0 13px;
    color: #8293a3;
    outline: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.14);
    font-size: 0.72rem;
}

.copy-button {
    padding: 0 17px;
    color: var(--navy-950);
    border: 0;
    border-radius: 8px;
    background: var(--copper-light);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
}

.copy-button:hover {
    filter: brightness(1.08);
}

.section-title {
    display: flex;
    margin-bottom: 18px;
    align-items: center;
    justify-content: space-between;
}

.section-title h2 {
    margin: 0;
    font: 600 1rem/1.2 "Manrope", sans-serif;
}

.section-title span {
    color: #657586;
    font-size: 0.72rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.status-card {
    --tone: var(--green);
    --tone-rgb: 81, 200, 148;
    position: relative;
    display: grid;
    min-height: 122px;
    padding: 22px;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 17px;
    color: var(--cream);
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(14, 29, 46, 0.72);
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.status-card:hover {
    border-color: rgba(var(--tone-rgb), 0.38);
    background:
        linear-gradient(rgba(var(--tone-rgb), 0.06), rgba(var(--tone-rgb), 0.06)),
        var(--navy-800);
    transform: translateY(-2px);
}

.status-card:focus-visible {
    outline: 3px solid rgba(var(--tone-rgb), 0.35);
    outline-offset: 3px;
}

.status-card:disabled {
    cursor: wait;
}

.status-card.is-active,
.status-card.is-selected {
    border-color: rgba(var(--tone-rgb), 0.46);
    background:
        linear-gradient(rgba(var(--tone-rgb), 0.09), rgba(var(--tone-rgb), 0.09)),
        var(--navy-800);
}

.status-card.is-active {
    box-shadow: inset 2px 0 0 var(--tone);
}

.status-card.is-selected:not(.is-active) {
    box-shadow: inset 0 0 0 1px var(--tone), 0 10px 28px rgba(var(--tone-rgb), 0.08);
}

.status-icon {
    display: grid;
    width: 49px;
    height: 49px;
    place-items: center;
    border: 1px solid rgba(var(--tone-rgb), 0.26);
    border-radius: 11px;
    background: rgba(var(--tone-rgb), 0.09);
}

.status-icon i {
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--tone);
    border-radius: 50%;
}

.status-icon i::after {
    position: absolute;
    width: 6px;
    height: 6px;
    top: 4px;
    left: 4px;
    border-radius: 50%;
    background: var(--tone);
    content: "";
}

.status-card-copy {
    display: grid;
}

.status-card-copy strong {
    margin-bottom: 7px;
    font: 600 1rem/1.1 "Manrope", sans-serif;
}

.status-card-copy small {
    max-width: 370px;
    color: #798999;
    line-height: 1.45;
}

.selection-indicator {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    font-size: 0.72rem;
}

.status-card.is-selected .selection-indicator {
    color: var(--navy-950);
    border-color: var(--tone);
    background: var(--tone);
}

.status-grid.is-loading {
    opacity: 0.68;
}

.custom-message-field {
    margin-top: 18px;
    padding: 19px 20px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background:
        linear-gradient(110deg, rgba(199, 134, 90, 0.05), transparent 42%),
        rgba(14, 29, 46, 0.55);
}

.custom-message-head {
    display: flex;
    margin-bottom: 10px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.custom-message-head label {
    color: #d7dde3;
    font-size: 0.82rem;
    font-weight: 700;
}

.custom-message-head label small {
    margin-left: 7px;
    color: var(--copper-light);
    font-size: 0.65rem;
    font-weight: 600;
}

.custom-message-head > span {
    color: #68798a;
    font-size: 0.68rem;
}

.custom-message-field textarea {
    display: block;
    width: 100%;
    min-height: 74px;
    padding: 14px 15px;
    resize: vertical;
    color: var(--cream);
    outline: none;
    border: 1px solid rgba(182, 204, 221, 0.15);
    border-radius: 9px;
    background: rgba(3, 10, 18, 0.34);
    font: 500 0.88rem/1.55 "Avenir Next", "Segoe UI", system-ui, sans-serif;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.custom-message-field textarea:focus {
    border-color: rgba(228, 171, 124, 0.58);
    background: rgba(3, 10, 18, 0.5);
    box-shadow: 0 0 0 4px rgba(199, 134, 90, 0.08);
}

.custom-message-field textarea::placeholder {
    color: #536475;
}

.custom-message-field > p {
    margin: 9px 0 0;
    color: #68798a;
    font-size: 0.67rem;
    line-height: 1.45;
}

.status-actions {
    display: flex;
    margin-top: 18px;
    padding: 18px 20px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(14, 29, 46, 0.55);
}

.status-actions p {
    display: flex;
    margin: 0;
    align-items: center;
    gap: 10px;
    color: #718191;
    font-size: 0.78rem;
}

.status-actions p span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 12px var(--green);
}

.status-actions p.has-change {
    color: #c7a98e;
}

.status-actions p.has-change span {
    background: var(--copper-light);
    box-shadow: 0 0 12px var(--copper-light);
}

.update-status-button {
    display: flex;
    min-width: 248px;
    height: 51px;
    padding: 0 18px;
    align-items: center;
    justify-content: space-between;
    color: var(--navy-950);
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #e5b38b, #bf7950);
    cursor: pointer;
    font-weight: 800;
    transition: opacity 160ms ease, transform 160ms ease, filter 160ms ease;
}

.update-status-button:not(:disabled):hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.update-status-button:disabled {
    color: #687684;
    background: #1b2a39;
    cursor: not-allowed;
    opacity: 0.7;
}

.update-status-button.is-loading strong {
    animation: breathe 1s ease infinite;
}

.dashboard-footer {
    display: flex;
    margin-top: 44px;
    padding-top: 22px;
    align-items: center;
    justify-content: space-between;
    color: #617181;
    border-top: 1px solid var(--line);
    font-size: 0.7rem;
}

.dashboard-footer p {
    margin: 0;
}

.dashboard-footer .pulse-dot {
    width: 5px;
    height: 5px;
    margin-right: 8px;
}

.dashboard-footer strong {
    color: #8998a6;
}

.site-credit {
    color: #718191;
    font-size: 0.68rem;
    letter-spacing: 0.025em;
    text-align: center;
    text-decoration: none;
    transition: color 160ms ease;
}

.site-credit:hover,
.site-credit:focus-visible {
    color: var(--copper-light);
}

.floating-credit {
    position: fixed;
    bottom: 12px;
    left: 50%;
    z-index: 5;
    margin: 0;
    padding: 6px 12px;
    border: 1px solid rgba(199, 134, 90, 0.12);
    border-radius: 999px;
    background: rgba(7, 17, 31, 0.74);
    backdrop-filter: blur(8px);
    transform: translateX(-50%);
    white-space: nowrap;
}

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10;
    max-width: 360px;
    padding: 14px 18px;
    color: #b7ead2;
    border: 1px solid rgba(81, 200, 148, 0.3);
    border-radius: 9px;
    background: #10271f;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast.is-error {
    color: #f6b2b2;
    border-color: rgba(236, 111, 110, 0.3);
    background: #2b151a;
}

.tablet-page {
    --tone: var(--green);
    --tone-rgb: 81, 200, 148;
    --tone-bright: #8ff0bd;
    --tone-bright-rgb: 143, 240, 189;
    height: 100vh;
    overflow: hidden;
    background: #10271f;
    transition: background 500ms ease;
}

.tablet-page.tone-green {
    --tone-bright: #8ff0bd;
    --tone-bright-rgb: 143, 240, 189;
    background:
        radial-gradient(circle at 50% 44%, rgba(74, 218, 148, 0.2), transparent 34%),
        linear-gradient(145deg, #0b3024, #061d17 68%, #04150f);
}

.tablet-page.tone-red {
    --tone-bright: #ff9b95;
    --tone-bright-rgb: 255, 155, 149;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 69, 69, 0.3), transparent 32%),
        linear-gradient(145deg, #681b22, #3f0b12 64%, #25060a);
}

.tablet-page.tone-amber {
    --tone-bright: #dca17a;
    --tone-bright-rgb: 220, 161, 122;
    background:
        radial-gradient(circle at 50% 38%, rgba(204, 127, 84, 0.18), transparent 32%),
        linear-gradient(145deg, #172332, #0b121c 58%, #130d0d);
}

.tablet-page.tone-blue {
    --tone-bright: #6edcff;
    --tone-bright-rgb: 110, 220, 255;
    background:
        radial-gradient(circle at 50% 42%, rgba(37, 180, 255, 0.24), transparent 32%),
        linear-gradient(145deg, #062f4d, #041827 60%, #020b13);
}

.tablet-page::before {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.025), transparent 38%),
        repeating-linear-gradient(90deg, transparent 0, transparent 99px, rgba(255, 255, 255, 0.013) 100px);
    content: "";
    pointer-events: none;
}

.tablet-page.tone-red::before {
    background:
        linear-gradient(rgba(94, 7, 14, 0.22), rgba(94, 7, 14, 0.22)),
        repeating-linear-gradient(-45deg, transparent 0 42px, rgba(255, 112, 104, 0.045) 43px 46px);
}

.tablet-page.tone-amber::before {
    background:
        radial-gradient(circle at 12% 18%, rgba(220, 161, 122, 0.05), transparent 22%),
        linear-gradient(rgba(220, 161, 122, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 161, 122, 0.025) 1px, transparent 1px);
    background-size: auto, 72px 72px, 72px 72px;
}

.tablet-page.tone-blue::before {
    background:
        linear-gradient(rgba(4, 24, 39, 0.45), rgba(4, 24, 39, 0.45)),
        linear-gradient(rgba(71, 198, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(71, 198, 255, 0.08) 1px, transparent 1px);
    background-size: auto, 42px 42px, 42px 42px;
    mask-image: linear-gradient(to bottom, transparent 4%, black 42%, black 78%, transparent 100%);
}

.tablet-display {
    position: relative;
    z-index: 1;
    display: grid;
    height: 100%;
    min-height: 520px;
    padding: clamp(24px, 4vw, 56px);
    grid-template-rows: auto 1fr auto;
}

.tablet-header,
.tablet-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tablet-header {
    padding-bottom: clamp(18px, 3vh, 32px);
    border-bottom: 1px solid rgba(var(--tone-bright-rgb), 0.22);
}

.tablet-room {
    padding: 9px 14px;
    color: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: clamp(0.68rem, 1.5vw, 0.84rem);
}

.tablet-content {
    display: flex;
    min-height: 0;
    padding: clamp(18px, 4vh, 50px) 0;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    transition: opacity 250ms ease, transform 250ms ease;
}

.tablet-page.is-changing .tablet-content {
    opacity: 0.32;
    transform: scale(0.98);
}

.status-visual {
    position: relative;
    display: grid;
    width: clamp(130px, 17vw, 205px);
    height: clamp(130px, 17vw, 205px);
    margin-bottom: clamp(24px, 4vh, 44px);
    place-items: center;
}

.visual-orbit {
    position: absolute;
    inset: 7%;
    border: 1px solid rgba(var(--tone-bright-rgb), 0.42);
    border-radius: 50%;
}

.visual-orbit.orbit-two {
    inset: 21%;
    border-style: dashed;
    opacity: 0.55;
    animation: visual-spin 12s linear infinite reverse;
}

.visual-orbit.orbit-one {
    animation: visual-spin 18s linear infinite;
}

.visual-core {
    position: relative;
    z-index: 3;
    display: grid;
    width: 44%;
    height: 44%;
    place-items: center;
    border: 2px solid var(--tone-bright);
    border-radius: 50%;
    background: rgba(var(--tone-rgb), 0.2);
    box-shadow:
        0 0 34px rgba(var(--tone-bright-rgb), 0.38),
        inset 0 0 24px rgba(var(--tone-rgb), 0.28);
}

.visual-node {
    position: absolute;
    z-index: 4;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tone-bright);
    box-shadow: 0 0 16px var(--tone-bright);
}

.node-one { top: 11%; left: 48%; }
.node-two { right: 13%; bottom: 24%; }
.node-three { left: 17%; bottom: 20%; }

.visual-mark {
    display: block;
    background: var(--tone-bright);
    box-shadow: 0 0 16px rgba(var(--tone-bright-rgb), 0.5);
}

.visual-grid {
    display: none;
}

/* Müsait: açık kapı ve görüşmeye davet */
.tablet-page.tone-green .visual-core {
    width: 42%;
    height: 56%;
    border-radius: 8px;
    border-width: 3px;
    transform: perspective(160px) rotateY(-8deg);
}

.tablet-page.tone-green .mark-one {
    width: 3px;
    height: 100%;
    justify-self: start;
    transform: translateX(17px);
}

.tablet-page.tone-green .mark-two {
    width: 9px;
    height: 9px;
    justify-self: end;
    border-radius: 50%;
    transform: translateX(-10px);
}

/* Toplantı: kesintisiz kırmızı uyarı / duraklatma işareti */
.tablet-page.tone-red .visual-core {
    width: 54%;
    height: 54%;
    border-width: 3px;
    background: rgba(131, 5, 16, 0.52);
    box-shadow: 0 0 58px rgba(255, 55, 55, 0.48), inset 0 0 28px rgba(255, 90, 85, 0.18);
}

.tablet-page.tone-red .visual-mark {
    position: absolute;
    width: 15%;
    height: 42%;
    border-radius: 4px;
}

.tablet-page.tone-red .mark-one { transform: translateX(-62%); }
.tablet-page.tone-red .mark-two { transform: translateX(62%); }

.tablet-page.tone-red .status-visual {
    filter: drop-shadow(0 0 35px rgba(255, 30, 40, 0.2));
}

/* Rahatsız etmeyin: modern kurumsal kapalı oda göstergesi */
.tablet-page.tone-amber .visual-core {
    width: 62%;
    height: 68%;
    border: 1px solid rgba(220, 161, 122, 0.78);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(220, 161, 122, 0.12), rgba(10, 17, 25, 0.5));
    box-shadow:
        0 24px 65px rgba(0, 0, 0, 0.3),
        0 0 48px rgba(220, 161, 122, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.tablet-page.tone-amber .visual-core::after {
    position: absolute;
    right: 14%;
    bottom: 19%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tone-bright);
    box-shadow: 0 0 14px rgba(220, 161, 122, 0.72);
    content: "";
}

.tablet-page.tone-amber .visual-orbit {
    border-color: rgba(220, 161, 122, 0.26);
    border-radius: 28%;
    animation-duration: 28s;
}

.tablet-page.tone-amber .orbit-two {
    border-style: solid;
    border-radius: 36%;
    transform: rotate(45deg);
    animation: corporate-breathe 3.2s ease-in-out infinite;
}

.tablet-page.tone-amber .visual-node {
    width: 6px;
    height: 6px;
    background: #dca17a;
    box-shadow: 0 0 12px rgba(220, 161, 122, 0.65);
}

.tablet-page.tone-amber .node-three {
    display: none;
}

.tablet-page.tone-amber .mark-one {
    position: absolute;
    width: 46%;
    height: 58%;
    border: 2px solid var(--tone-bright);
    border-radius: 5px;
    background: transparent;
    box-shadow: inset 0 0 20px rgba(220, 161, 122, 0.08);
}

.tablet-page.tone-amber .mark-two {
    position: absolute;
    right: 24%;
    width: 6px;
    height: 2px;
    border-radius: 999px;
    background: var(--tone-bright);
}

.tablet-page.tone-amber .status-visual::after {
    position: absolute;
    right: 50%;
    bottom: -6px;
    z-index: 5;
    padding: 7px 12px;
    color: #e5b797;
    border: 1px solid rgba(220, 161, 122, 0.25);
    border-radius: 999px;
    background: rgba(9, 15, 23, 0.84);
    content: "LÜTFEN BEKLEYİN";
    font: 700 clamp(0.52rem, 0.9vw, 0.68rem)/1 "Manrope", sans-serif;
    letter-spacing: 0.16em;
    white-space: nowrap;
    transform: translateX(50%);
}

/* Online görüşme: yörünge, veri düğümleri ve siber aydınlatma */
.tablet-page.tone-blue .visual-grid {
    position: absolute;
    display: block;
    inset: 0;
    border-radius: 50%;
    background:
        linear-gradient(transparent 49%, rgba(88, 211, 255, 0.22) 50%, transparent 51%),
        linear-gradient(90deg, transparent 49%, rgba(88, 211, 255, 0.22) 50%, transparent 51%);
    animation: cyber-pulse 2.2s ease-in-out infinite;
}

.tablet-page.tone-blue .visual-core {
    border-radius: 18px;
    transform: rotate(45deg);
}

.tablet-page.tone-blue .visual-mark {
    position: absolute;
    width: 42%;
    height: 2px;
}

.tablet-page.tone-blue .mark-one { transform: rotate(45deg); }
.tablet-page.tone-blue .mark-two { transform: rotate(-45deg); }

.tablet-page.tone-blue .visual-node {
    animation: cyber-pulse 1.6s ease-in-out infinite alternate;
}

@keyframes visual-spin {
    to { transform: rotate(360deg); }
}

@keyframes breathe {
    0% { opacity: 0.7; transform: scale(0.9); }
    75%, 100% { opacity: 0; transform: scale(1.22); }
}

@keyframes cyber-pulse {
    0% { opacity: 0.42; filter: brightness(0.78); }
    100% { opacity: 1; filter: brightness(1.28); }
}

@keyframes corporate-breathe {
    0%, 100% { opacity: 0.34; transform: rotate(45deg) scale(0.94); }
    50% { opacity: 0.72; transform: rotate(45deg) scale(1.02); }
}

.tablet-kicker {
    margin: 0 0 14px;
    color: var(--tone-bright);
    font-size: clamp(0.72rem, 1.4vw, 0.95rem);
    font-weight: 700;
    letter-spacing: 0.32em;
}

.tablet-content h1 {
    max-width: 1100px;
    margin: 0;
    font: 800 clamp(3.5rem, 8.6vw, 8.2rem)/0.92 "Manrope", sans-serif;
    letter-spacing: -0.075em;
    text-wrap: balance;
    text-shadow: 0 0 44px rgba(var(--tone-rgb), 0.26);
}

.tablet-page.tone-amber .tablet-content h1 {
    max-width: 1250px;
    font-size: clamp(3rem, 7.4vw, 7.1rem);
    letter-spacing: -0.055em;
}

.tablet-page.tone-red .tablet-brand strong,
.tablet-page.tone-red .tablet-kicker {
    color: #ff9b95;
}

.tablet-page.tone-blue .tablet-brand strong {
    color: #6edcff;
    text-shadow: 0 0 14px rgba(64, 200, 255, 0.55);
}

.tablet-page.tone-green .tablet-brand strong {
    color: #8ff0bd;
}

.tablet-page.tone-amber .tablet-brand strong {
    color: #dca17a;
}

.tablet-content > p:last-child {
    max-width: 850px;
    margin: clamp(22px, 4vh, 38px) 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(1rem, 2.4vw, 1.75rem);
    line-height: 1.45;
    text-wrap: balance;
}

.tablet-footer {
    position: relative;
    padding-top: clamp(18px, 3vh, 32px);
    color: rgba(255, 255, 255, 0.58);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: clamp(0.68rem, 1.4vw, 0.82rem);
}

.tablet-credit {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    color: rgba(255, 255, 255, 0.34);
    font-size: clamp(0.55rem, 1vw, 0.68rem);
    letter-spacing: 0.035em;
    text-align: center;
    text-decoration: none;
    transform: translateX(-50%);
    transition: color 160ms ease;
    white-space: nowrap;
}

.tablet-credit:hover,
.tablet-credit:focus-visible {
    color: var(--tone-bright);
}

.tablet-live {
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: 0.13em;
}

.tablet-live .pulse-dot {
    background: var(--tone-bright);
    box-shadow: 0 0 14px var(--tone-bright);
}

.tablet-time {
    display: grid;
    justify-items: center;
}

.tablet-time strong {
    color: white;
    font: 600 clamp(1.4rem, 3vw, 2.3rem)/1 "Manrope", sans-serif;
}

.tablet-time span {
    margin-top: 5px;
    text-transform: capitalize;
}

.tablet-updated {
    text-align: right;
}

.tablet-updated strong {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.82);
}

.offline-banner {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 9;
    padding: 9px 18px;
    color: #281b08;
    border-radius: 0 0 8px 8px;
    background: #f0b85f;
    font-size: 0.78rem;
    opacity: 0;
    transform: translate(-50%, -100%);
    transition: opacity 180ms ease, transform 180ms ease;
}

.offline-banner.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand {
        min-height: 44vh;
        padding: 42px 30px;
    }

    .login-brand .brand-mark {
        margin-bottom: 42px;
    }

    .login-card {
        min-height: 56vh;
        padding: 52px max(28px, 8vw);
    }

    .setup-shell {
        grid-template-columns: 1fr;
    }

    .setup-intro {
        min-height: 390px;
        padding: 42px 30px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .setup-intro .brand-mark {
        margin-bottom: 38px;
    }

    .setup-steps {
        margin-top: 32px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .dashboard-shell {
        padding-top: 42px;
    }
}

@media (max-width: 680px) {
    .topbar {
        height: 68px;
    }

    .connection-pill,
    .user-block {
        display: none;
    }

    .dashboard-shell {
        width: min(100% - 28px, 1180px);
    }

    .dashboard-intro {
        display: block;
    }

    .clock-card {
        display: none;
    }

    .current-card {
        min-height: 118px;
        padding: 22px 18px;
        grid-template-columns: auto 1fr;
        gap: 15px;
    }

    .current-orb {
        width: 52px;
        height: 52px;
    }

    .current-meta {
        display: none;
    }

    .current-copy span {
        line-height: 1.4;
    }

    .section-title span {
        display: none;
    }

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

    .status-card {
        min-height: 108px;
        padding: 18px;
    }

    .dashboard-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .status-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .update-status-button {
        width: 100%;
        min-width: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .setup-steps {
        display: none;
    }

    .device-card {
        padding: 22px 18px;
    }

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

    .copy-button {
        height: 45px;
    }

    .tablet-display {
        padding: 22px;
    }

    .tablet-brand {
        font-size: 0.74rem;
    }

    .tablet-room {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-height: 820px) and (orientation: landscape) {
    .tablet-display {
        padding: 24px 42px;
    }

    .tablet-header {
        padding-bottom: 16px;
    }

    .tablet-content {
        padding: 10px 0;
    }

    .status-visual {
        width: 122px;
        height: 122px;
        margin-bottom: 14px;
    }

    .tablet-kicker {
        margin-bottom: 8px;
    }

    .tablet-content h1,
    .tablet-page.tone-amber .tablet-content h1 {
        font-size: clamp(3.4rem, 6.7vw, 5.55rem);
        line-height: 0.92;
    }

    .tablet-content > p:last-child {
        margin-top: 14px;
        font-size: clamp(1rem, 2vw, 1.38rem);
    }

    .tablet-footer {
        padding-top: 14px;
    }
}

@media (max-height: 650px) and (orientation: landscape) {
    .tablet-display {
        padding: 22px 32px;
    }

    .status-visual {
        width: 74px;
        height: 74px;
        margin-bottom: 20px;
    }

    .tablet-content {
        padding: 12px 0;
    }

    .tablet-content h1 {
        font-size: clamp(3rem, 8vw, 5.2rem);
    }

    .tablet-content > p:last-child {
        margin-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
