.tm-workspace {
    --tm-red: #ff365b;
    --tm-red-soft: rgba(255, 54, 91, .12);
    --tm-line: rgba(255, 255, 255, .085);
    --tm-panel: rgba(14, 15, 19, .96);
    display: grid;
    gap: 16px;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    color: #f7f7f9;
}

.tm-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 190px;
    padding: 28px 30px;
    border: 1px solid var(--tm-line);
    border-radius: 22px;
    background:
        linear-gradient(105deg, rgba(255, 54, 91, .1), transparent 43%),
        linear-gradient(145deg, rgba(22, 23, 28, .98), rgba(10, 11, 14, .98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.tm-hero::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .36;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, #000, transparent 75%);
}

.tm-hero::after {
    content: '';
    position: absolute;
    z-index: -1;
    width: 320px;
    height: 320px;
    right: -130px;
    top: -175px;
    border-radius: 50%;
    background: rgba(255, 54, 91, .2);
    filter: blur(40px);
}

.tm-hero-main { display: flex; align-items: flex-start; gap: 18px; min-width: 0; }
.tm-hero-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border: 1px solid rgba(255, 76, 107, .28);
    border-radius: 16px;
    color: #ff5775;
    background: linear-gradient(145deg, rgba(255, 54, 91, .16), rgba(255, 54, 91, .04));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 25px rgba(255,54,91,.08);
    font-size: 22px;
}
.tm-hero-copy { min-width: 0; max-width: 760px; }
.tm-kicker { display: block; color: #ff6c85; font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.tm-hero h2 { margin: 8px 0 8px; color: #fff; font-size: clamp(29px, 3vw, 42px); line-height: 1.06; letter-spacing: -.04em; }
.tm-hero p { margin: 0; max-width: 710px; color: #aeb0b9; font-size: 15px; line-height: 1.65; }
.tm-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.tm-hero-badges span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 11px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 999px;
    color: #c3c5cc;
    background: rgba(255,255,255,.035);
    font-size: 12px;
    font-weight: 650;
}
.tm-hero-badges i { color: #ff5775; }

.tm-quota {
    position: relative;
    min-width: 210px;
    padding: 18px 19px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 17px;
    background: rgba(5, 6, 8, .42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}
.tm-quota::before { content: ''; position: absolute; top: 18px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: #57d993; box-shadow: 0 0 0 6px rgba(87,217,147,.09); }
.tm-quota span { display: block; color: #92949d; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.tm-quota strong { display: block; max-width: 170px; margin-top: 10px; color: #fff; font-size: 21px; line-height: 1.2; letter-spacing: -.02em; }
.tm-quota small { display: block; margin-top: 6px; color: #9da0a9; font-size: 12px; line-height: 1.4; }

.tm-layout { display: grid; grid-template-columns: minmax(330px, .92fr) minmax(0, 1.45fr); gap: 16px; align-items: stretch; }
.tm-inbox-card,
.tm-messages-card {
    min-width: 0;
    border: 1px solid var(--tm-line);
    border-radius: 21px;
    background: linear-gradient(155deg, rgba(19, 20, 24, .98), rgba(10, 11, 14, .98));
    box-shadow: 0 20px 55px rgba(0, 0, 0, .23);
}
.tm-inbox-card { padding: 22px; }
.tm-messages-card { display: flex; flex-direction: column; padding: 22px; }

.tm-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.tm-card-head-label { display: flex; gap: 11px; align-items: center; }
.tm-card-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 11px;
    color: #ff5b77;
    background: rgba(255,54,91,.075);
}
.tm-card-head span { color: #8f929c; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.tm-card-head h3 { margin: 3px 0 0; color: #fff; font-size: 19px; letter-spacing: -.02em; }
.tm-live { display: inline-flex; align-items: center; gap: 8px; min-height: 31px; padding: 0 11px; border: 1px solid rgba(87,217,147,.13); border-radius: 999px; color: #65dd9b; background: rgba(87,217,147,.055); font-size: 12px; font-weight: 750; }
.tm-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(101,221,155,.09); }

.tm-config-warning { display: none; gap: 10px; margin-bottom: 14px; padding: 12px 13px; border: 1px solid rgba(255,187,75,.2); border-radius: 13px; color: #ffd07a; background: rgba(255,187,75,.065); font-size: 13px; line-height: 1.5; }
.tm-config-warning.is-visible { display: flex; }
.tm-config-warning i { margin-top: 3px; }

.tm-mailbox-stage {
    position: relative;
    overflow: hidden;
    min-height: 196px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 17px;
    background:
        radial-gradient(circle at 50% -20%, rgba(255,54,91,.13), transparent 48%),
        rgba(255,255,255,.022);
}
.tm-mailbox-stage::after { content: ''; position: absolute; inset: auto 11% 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,54,91,.4), transparent); }
.tm-empty-address,
.tm-address-box { min-height: 196px; padding: 24px; }
.tm-empty-address { display: grid; place-items: center; text-align: center; }
.tm-empty-visual { position: relative; display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto; border: 1px solid rgba(255,83,117,.2); border-radius: 17px; color: #ff5b77; background: rgba(255,54,91,.08); font-size: 23px; }
.tm-empty-visual::after { content: ''; position: absolute; inset: -7px; border: 1px solid rgba(255,54,91,.06); border-radius: 21px; }
.tm-empty-address strong { display: block; margin-top: 16px; color: #fff; font-size: 17px; }
.tm-empty-address p { max-width: 290px; margin: 6px auto 0; color: #979aa4; font-size: 13px; line-height: 1.55; }
.tm-address-box { display: none; align-content: center; }
.tm-address-box.is-visible { display: grid; }
.tm-address-label { color: #92959e; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.tm-address-row { display: flex; align-items: center; gap: 9px; margin: 10px 0 23px; }
.tm-address-row code { min-width: 0; flex: 1; overflow-wrap: anywhere; color: #fff; font: 700 15px/1.5 "JetBrains Mono", monospace; letter-spacing: -.02em; }
.tm-copy { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; color: #fff; background: rgba(255,255,255,.045); cursor: pointer; transition: .18s ease; }
.tm-copy:hover { color: #ff5b77; border-color: rgba(255,83,117,.4); background: rgba(255,54,91,.08); transform: translateY(-1px); }
.tm-timer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #9da0aa; font-size: 13px; }
.tm-timer-row strong { color: #fff; font: 800 18px "JetBrains Mono", monospace; }
.tm-progress { height: 7px; margin-top: 10px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.065); }
.tm-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ff365b, #ff7890); box-shadow: 0 0 15px rgba(255,54,91,.35); transition: width 1s linear; }

.tm-status-line { min-height: 20px; margin: 11px 0 0; color: #92959e; font-size: 12px; text-align: center; }
.tm-status-line.is-error { color: #ff768d; }
.tm-primary { display: inline-flex; justify-content: center; align-items: center; gap: 9px; width: 100%; min-height: 50px; margin-top: 8px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #ff365b, #e7284d); box-shadow: 0 13px 28px rgba(255,54,91,.18), inset 0 1px 0 rgba(255,255,255,.16); font-size: 14px; font-weight: 800; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.tm-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 17px 32px rgba(255,54,91,.25), inset 0 1px 0 rgba(255,255,255,.18); }
.tm-primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }

.tm-guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 17px; }
.tm-guide-item { min-width: 0; padding: 12px 10px; border: 1px solid rgba(255,255,255,.065); border-radius: 13px; background: rgba(255,255,255,.022); }
.tm-guide-item i { display: block; margin-bottom: 8px; color: #ff5b77; font-size: 14px; }
.tm-guide-item b { display: block; color: #e7e8ec; font-size: 12px; }
.tm-guide-item span { display: block; margin-top: 3px; color: #858892; font-size: 10px; line-height: 1.35; }
.tm-domain-line { display: flex; align-items: center; gap: 8px; margin-top: 13px; color: #8f929c; font-size: 12px; }
.tm-domain-line i { color: #ff5b77; }
.tm-domain-line b { color: #c9cbd1; font-family: "JetBrains Mono", monospace; font-size: 11px; overflow-wrap: anywhere; }

.tm-refresh { display: inline-flex; align-items: center; gap: 7px; min-height: 37px; padding: 0 13px; border: 1px solid rgba(255,255,255,.085); border-radius: 11px; color: #a5a8b1; background: rgba(255,255,255,.03); font-size: 12px; font-weight: 700; cursor: pointer; transition: .18s ease; }
.tm-refresh:hover { color: #fff; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05); }
.tm-message-list { display: grid; align-content: start; gap: 9px; min-height: 390px; }
.tm-message-empty { display: grid; place-items: center; min-height: 390px; border: 1px dashed rgba(255,255,255,.07); border-radius: 16px; color: #8f929b; text-align: center; background: rgba(255,255,255,.012); }
.tm-message-empty i { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 15px; border: 1px solid rgba(255,255,255,.07); border-radius: 17px; color: #63666f; background: rgba(255,255,255,.025); font-size: 21px; }
.tm-message-empty strong { color: #e9eaed; font-size: 16px; }
.tm-message-empty p { max-width: 350px; margin: 6px auto 0; color: #8f929b; font-size: 13px; line-height: 1.55; }
.tm-message { border: 1px solid rgba(255,255,255,.075); border-radius: 15px; overflow: hidden; background: rgba(255,255,255,.022); transition: border-color .18s ease, background .18s ease; }
.tm-message:hover,
.tm-message[open] { border-color: rgba(255,83,117,.2); background: rgba(255,255,255,.032); }
.tm-message summary { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 14px; cursor: pointer; list-style: none; }
.tm-message summary::-webkit-details-marker { display: none; }
.tm-sender-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,83,117,.12); border-radius: 12px; color: #ff5b77; background: rgba(255,54,91,.07); }
.tm-message-copy { min-width: 0; }
.tm-message-copy strong,
.tm-message-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-message-copy strong { color: #f1f2f4; font-size: 14px; }
.tm-message-copy span { margin-top: 4px; color: #92959e; font-size: 12px; }
.tm-message-meta { color: #838690; font-size: 11px; text-align: right; }
.tm-message-body { margin: 0 14px 15px 69px; padding: 14px; border: 1px solid rgba(255,255,255,.055); border-radius: 12px; color: #d4d5da; background: rgba(0,0,0,.18); font: 400 12px/1.75 "JetBrains Mono", monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.tm-attachment-note { display: block; margin-top: 12px; color: #ffc66d; font-family: Inter, sans-serif; }

@media (max-width: 1040px) {
    .tm-layout { grid-template-columns: 1fr; }
    .tm-message-list,
    .tm-message-empty { min-height: 300px; }
}

@media (max-width: 720px) {
    .tm-hero { grid-template-columns: 1fr; min-height: 0; padding: 23px; }
    .tm-quota { width: 100%; min-width: 0; }
}

@media (max-width: 560px) {
    .tm-workspace { gap: 12px; }
    .tm-hero,
    .tm-inbox-card,
    .tm-messages-card { padding: 17px; border-radius: 17px; }
    .tm-hero-main { gap: 12px; }
    .tm-hero-icon { width: 45px; height: 45px; flex-basis: 45px; border-radius: 13px; font-size: 18px; }
    .tm-hero h2 { margin-top: 6px; font-size: 28px; }
    .tm-hero p { font-size: 14px; }
    .tm-hero-badges span { font-size: 11px; }
    .tm-guide-grid { grid-template-columns: 1fr; }
    .tm-guide-item { display: grid; grid-template-columns: 22px minmax(0,1fr); column-gap: 7px; align-items: center; }
    .tm-guide-item i { grid-row: 1 / 3; margin: 0; }
    .tm-message summary { grid-template-columns: 38px minmax(0,1fr); }
    .tm-sender-icon { width: 38px; height: 38px; }
    .tm-message-meta { display: none; }
    .tm-message-body { margin-left: 13px; }
}
