/* Trinico Apps (apps.trinico.cloud): sign-in and hub. 26 Sep 2026.
 * Brand: Montserrat; cobalt #1B77C9 / #1A5FAF / #134C8E carry white text
 * (4.64 / 6.36 / 8.4:1); green #ABC441 and sky #44A8DA are accents only,
 * never behind text. Radius system: 18px panels, 12px controls, pills 999px.
 * Light only on the signed-out page (house rule), hub follows the system.
 */
:root {
    --c-cobalt: #1B77C9;
    --c-cobalt-dk: #1A5FAF;
    --c-cobalt-deep: #134C8E;
    --c-night: #0E2F57;
    --c-sky: #44A8DA;
    --c-green: #ABC441;
    --c-orange: #FF6600;
    --c-ink: #13202E;
    --c-ink-2: #46566A;
    --c-ink-3: #66768A;
    --c-line: #DCE3EC;
    --c-bg: #F4F7FB;
    --c-surface: #FFFFFF;
    --c-ok: #1F7A3D;
    --c-ok-bg: #E6F4EA;
    --c-warn: #8A5300;
    --c-warn-bg: #FFF3DC;
    --c-bad: #A21C1C;
    --c-bad-bg: #FCE9E9;
    --r-lg: 18px;
    --r-md: 12px;
    --font: "Montserrat", "Segoe UI", Arial, sans-serif;
    --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--c-ink); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
a { color: var(--c-cobalt-dk); }
img { display: block; max-width: 100%; }

/* ================= Sign-in ================= */
.ts-body { min-height: 100dvh; }
.ts-shell {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(380px, 5fr);
    min-height: 100dvh;
}

.ts-stage {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px clamp(32px, 5vw, 72px) clamp(40px, 7vh, 72px);
    color: #FFFFFF;
    background:
        radial-gradient(60% 55% at 88% 12%, rgba(68, 168, 218, .42) 0%, rgba(68, 168, 218, 0) 70%),
        radial-gradient(70% 60% at 0% 100%, rgba(14, 47, 87, .85) 0%, rgba(14, 47, 87, 0) 70%),
        linear-gradient(155deg, var(--c-cobalt) 0%, var(--c-cobalt-dk) 42%, var(--c-cobalt-deep) 100%);
}
/* Fine dot texture, fading in from the top. */
.ts-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, .11) 1px, transparent 1.3px);
    background-size: 24px 24px;
    -webkit-mask-image: linear-gradient(180deg, transparent 5%, #000 60%);
    mask-image: linear-gradient(180deg, transparent 5%, #000 60%);
    pointer-events: none;
}
/* The real cloud mark from the logo, set large and bleeding off the edge. */
.ts-mark {
    position: absolute;
    z-index: -1;
    right: -24%;
    bottom: -20%;
    width: min(80%, 940px);
    height: auto;
    opacity: .15;
    pointer-events: none;
    user-select: none;
}
.ts-logo { align-self: flex-start; border-radius: 8px; }
.ts-logo img { width: 200px; height: auto; }
.ts-logo:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 6px; }

.ts-copy { max-width: 620px; }
.ts-head {
    margin: 0 0 20px;
    font-size: clamp(40px, 4.6vw, 64px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.035em;
    padding-bottom: .12em;
    text-wrap: balance;
}
.ts-head em {
    font-style: italic;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: underline;
    text-decoration-color: var(--c-green);
    text-decoration-thickness: .1em;
    text-underline-offset: .2em;
    text-decoration-skip-ink: auto;
}
.ts-lead {
    margin: 0;
    max-width: 44ch;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.55;
    color: rgba(255, 255, 255, .88);
}

.ts-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px clamp(28px, 4vw, 64px) 28px;
    background: var(--c-bg);
}
.ts-form { width: 100%; max-width: 380px; margin: auto 0; }
.ts-title {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.02em;
}
.ts-sub { margin: 0 0 32px; font-size: 15px; line-height: 1.5; color: var(--c-ink-2); }
.ts-note {
    margin: -12px 0 20px;
    padding: 11px 14px;
    border-radius: var(--r-md);
    background: var(--c-ok-bg);
    color: var(--c-ok);
    font-size: 14px;
    font-weight: 600;
}
/* Microsoft's light sign-in button: white, grey border, the four squares. */
.ts-ms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    height: 56px;
    padding: 0 20px;
    border: 1px solid #8C8C8C;
    border-radius: var(--r-md);
    background: #FFFFFF;
    color: #3B3B3B;
    font: 600 16px/1 var(--font);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(19, 76, 142, .06), 0 10px 24px -14px rgba(19, 76, 142, .45);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.ts-ms:hover { border-color: var(--c-cobalt); transform: translateY(-1px); box-shadow: 0 1px 2px rgba(19, 76, 142, .08), 0 16px 30px -14px rgba(19, 76, 142, .5); }
.ts-ms:active { transform: translateY(1px); }
.ts-ms:focus-visible { outline: 3px solid rgba(27, 119, 201, .45); outline-offset: 3px; }
.ts-ms.is-busy { pointer-events: none; opacity: .75; }
.ts-fine { margin: 20px 0 0; font-size: 13px; line-height: 1.55; color: var(--c-ink-3); }

.ts-foot {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 32px;
    font-size: 13px;
    color: var(--c-ink-3);
}
.ts-foot a { font-weight: 600; text-decoration: none; }
.ts-foot a:hover { text-decoration: underline; }

/* One quiet entrance: the mark settles, the words rise. */
@media (prefers-reduced-motion: no-preference) {
    .ts-mark { animation: ts-mark 1.1s var(--ease) both; }
    .ts-head, .ts-lead, .ts-form { animation: ts-rise .6s var(--ease) both; }
    .ts-lead { animation-delay: .08s; }
    .ts-form { animation-delay: .14s; }
    @keyframes ts-mark { from { opacity: 0; transform: translate(4%, 6%) scale(.96); } to { opacity: .15; transform: none; } }
    @keyframes ts-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 900px) {
    .ts-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .ts-stage { min-height: 46dvh; padding: 22px 16px 30px; gap: 40px; }
    .ts-logo img { width: 156px; }
    .ts-mark { right: -30%; bottom: -18%; width: 120%; }
    .ts-head { font-size: 36px; margin-bottom: 12px; }
    .ts-lead { font-size: 15px; }
    .ts-side { padding: 32px 16px 20px; justify-content: flex-start; }
    .ts-form { max-width: none; margin: 0; }
    .ts-sub { margin-bottom: 24px; }
}

/* ================= Hub ================= */
.tp-skip { position: absolute; left: -999px; top: 8px; background: #FFFFFF; padding: 8px 12px; border-radius: 8px; z-index: 20; }
.tp-skip:focus { left: 16px; }
.tp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tp-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    color: #FFFFFF;
    background: linear-gradient(120deg, var(--c-cobalt) 0%, var(--c-cobalt-deep) 100%);
    box-shadow: 0 6px 20px -12px rgba(14, 47, 87, .6);
}
.tp-bar-in { max-width: 1280px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tp-bar-logo { display: flex; align-items: center; gap: 12px; color: #FFFFFF; text-decoration: none; }
.tp-bar-logo img { width: 150px; height: auto; }
.tp-bar-name { padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, .35); font-weight: 600; font-size: 15px; }
.tp-bar-user { display: flex; align-items: center; gap: 16px; font-size: 13.5px; min-width: 0; }
.tp-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255, 255, 255, .9); }
.tp-signout { color: #FFFFFF; font-weight: 600; text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45); white-space: nowrap; transition: background-color .2s var(--ease); }
.tp-signout:hover { background: rgba(255, 255, 255, .12); }

.tp-main { max-width: 1280px; margin: 0 auto; padding: 36px 24px 64px; }
.tp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.tp-h1 { margin: 0 0 6px; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.tp-lead { margin: 0; color: var(--c-ink-2); font-size: 15px; }
.tp-tools { display: flex; gap: 10px; align-items: center; }
.tp-search input {
    height: 42px; width: 240px; padding: 0 14px;
    font: 500 14px var(--font); color: var(--c-ink);
    background: var(--c-surface); border: 1.5px solid var(--c-line); border-radius: var(--r-md);
}
.tp-search input:focus { outline: none; border-color: var(--c-cobalt); box-shadow: 0 0 0 4px rgba(27, 119, 201, .15); }
.tp-refresh {
    height: 42px; padding: 0 16px; border: 0; border-radius: var(--r-md);
    background: var(--c-cobalt); color: #FFFFFF; font: 600 14px var(--font); cursor: pointer;
    transition: background-color .2s var(--ease);
}
.tp-refresh:hover { background: var(--c-cobalt-dk); }
.tp-refresh:focus-visible { outline: 3px solid rgba(27, 119, 201, .4); outline-offset: 2px; }
.tp-refresh[disabled] { opacity: .7; cursor: progress; }
.tp-checked { margin: 10px 0 24px; font-size: 13px; color: var(--c-ink-3); }

.tp-servers { display: grid; gap: 28px; }
.tp-server { background: var(--c-surface); border-radius: var(--r-lg); box-shadow: 0 1px 2px rgba(19, 76, 142, .06), 0 14px 34px -22px rgba(19, 76, 142, .35); overflow: hidden; }
.tp-server-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 22px 24px 18px; border-bottom: 1px solid var(--c-line); }
.tp-server-name { margin: 0 0 4px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.tp-server-role { margin: 0; font-size: 14px; color: var(--c-ink-2); }
.tp-server-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.tp-chip { padding: 5px 10px; border-radius: 999px; background: var(--c-bg); color: var(--c-ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }

.tp-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0; }
.tp-app { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px; border-bottom: 1px solid var(--c-line); border-right: 1px solid var(--c-line); }
.tp-app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tp-app-name { margin: 0; font-size: 16px; font-weight: 700; }
.tp-app-what { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--c-ink-2); flex: 1; }
.tp-app-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; }
.tp-app-facts { font-size: 12.5px; color: var(--c-ink-3); font-variant-numeric: tabular-nums; }
.tp-open {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
    border-radius: var(--r-md); background: var(--c-cobalt); color: #FFFFFF;
    font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
    transition: background-color .2s var(--ease), transform .15s var(--ease);
}
.tp-open:hover { background: var(--c-cobalt-dk); }
.tp-open:active { transform: translateY(1px); }
.tp-open:focus-visible { outline: 3px solid rgba(27, 119, 201, .4); outline-offset: 2px; }
.tp-caution { font-size: 12.5px; font-weight: 600; color: var(--c-warn); }

.tp-state { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tp-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tp-state.is-up { background: var(--c-ok-bg); color: var(--c-ok); }
.tp-state.is-warn { background: var(--c-warn-bg); color: var(--c-warn); }
.tp-state.is-down { background: var(--c-bad-bg); color: var(--c-bad); }
.tp-state.is-wait { background: var(--c-bg); color: var(--c-ink-3); }

.tp-box { padding: 18px 24px 22px; }
.tp-box-title { margin: 0 0 12px; font-size: 14px; font-weight: 700; }
.tp-conts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tp-cont { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--c-bg); font-size: 13px; }
.tp-cont-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-cont-sub { display: block; font-weight: 500; color: var(--c-ink-3); font-size: 12px; }
.tp-facts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.tp-empty { text-align: center; color: var(--c-ink-2); padding: 40px 0; }
.tp-skel { height: 180px; border-radius: var(--r-lg); background: linear-gradient(90deg, #E9EEF5 0%, #F4F7FB 50%, #E9EEF5 100%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) {
    .tp-skel { animation: tp-shimmer 1.4s linear infinite; }
    @keyframes tp-shimmer { to { background-position: -200% 0; } }
}

@media (max-width: 700px) {
    .tp-bar-in { padding: 0 16px; }
    .tp-bar-logo img { width: 120px; }
    .tp-bar-name { display: none; }
    .tp-user { display: none; }
    .tp-main { padding: 24px 16px 48px; }
    .tp-tools { width: 100%; }
    .tp-search { flex: 1; }
    .tp-search input { width: 100%; }
    .tp-apps { grid-template-columns: 1fr; }
    .tp-app { border-right: 0; }
    .tp-server-head, .tp-app, .tp-box { padding-left: 16px; padding-right: 16px; }
}
