/* Экран «Сегодня»: четыре главных действия и то, что ждёт внимания. В тоне панели клуба. */
.td-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.td-action {
    --tone: var(--primary, #0e7c74);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--crm-line, #e5e9e8);
    border-radius: 14px;
    background: var(--surface, #fff);
    color: var(--crm-ink, #14201b);
    text-decoration: none;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    animation: td-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 50ms);
}

.td-action--ticket { --tone: #2563eb; }
.td-action--check { --tone: #7c3aed; }
.td-action--coin { --tone: #d97706; }

.td-action:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--tone) 40%, transparent);
    box-shadow: 0 14px 26px -18px var(--tone);
    color: var(--crm-ink, #14201b);
}

.td-action:active { transform: scale(0.98); }

.td-action__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--tone) 12%, var(--surface, #fff));
    color: var(--tone);
    transition: background-color 0.22s ease, color 0.22s ease;
}

.td-action:hover .td-action__icon { background: var(--tone); color: #fff; }

.td-action__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.td-action__text { min-width: 0; }
.td-action__text b { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-action__text small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--crm-muted, #6b7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.td-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.td-col { display: grid; gap: 16px; min-width: 0; }

.td-card {
    padding: 18px 20px;
    border: 1px solid var(--crm-line, #e5e9e8);
    border-radius: 16px;
    background: var(--surface, #fff);
    animation: td-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.td-card--alert { border-color: color-mix(in srgb, #f59e0b 40%, transparent); }

.td-card__head { display: flex; align-items: center; gap: 10px; }
.td-card__head h2 { flex: 1; margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

.td-card__head em {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f59e0b;
    color: #fff;
    font-size: 12.5px;
    font-style: normal;
    font-weight: 700;
    vertical-align: 2px;
}

.td-card__head em.is-warn { background: #fef3c7; color: #92400e; }

.td-card__hint { margin: 6px 0 4px; font-size: 13px; line-height: 1.45; color: var(--crm-muted, #6b7280); }

.td-dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f59e0b;
    animation: td-pulse 2s ease-out infinite;
}

.td-link { font-size: 13px; font-weight: 600; color: var(--primary, #0e7c74); text-decoration: none; white-space: nowrap; }
.td-link:hover { text-decoration: underline; }

.td-list { margin: 8px 0 0; padding: 0; list-style: none; }
.td-list > li { border-top: 1px solid var(--crm-line, #eef2f1); animation: td-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(var(--i, 0) * 45ms + 80ms); }
.td-list > li:first-child { border-top: 0; }

.td-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }

.td-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--primary, #0e7c74) 12%, var(--surface, #fff));
    color: var(--primary, #0e7c74);
    font-weight: 700;
}

.td-row__main { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.td-row__main b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-row__main small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--crm-muted, #6b7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.td-row__main:hover b { color: var(--primary, #0e7c74); }

.td-row__sum { font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.td-row form { margin: 0; }

.td-btn {
    height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--primary, #0e7c74);
    color: #fff;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.td-btn:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 18px -12px var(--primary, #0e7c74); }
.td-btn:active { transform: scale(0.97); }
.td-btn[disabled], .td-btn.is-off { opacity: 0.6; pointer-events: none; display: inline-grid; place-items: center; }

.td-more { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--primary, #0e7c74); text-decoration: none; }

.td-class {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 8px;
    margin: 0 -8px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.18s ease;
}

.td-class:hover { background: color-mix(in srgb, var(--primary, #0e7c74) 5%, transparent); color: inherit; }
.td-class time { flex: none; width: 48px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.td-class.is-past time, .td-class.is-done time { color: var(--crm-muted, #6b7280); }

.td-meter { flex: none; width: 64px; height: 6px; border-radius: 99px; background: var(--crm-line, #e5e9e8); overflow: hidden; }
.td-meter i { display: block; height: 100%; border-radius: inherit; background: var(--primary, #0e7c74); transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1); }

.td-pill { flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #f1f5f4; color: #55635f; }
.td-pill.is-todo { background: #fef3c7; color: #92400e; }
.td-pill.is-now { background: #dbeafe; color: #1d4ed8; }
.td-pill.is-done { background: #d9f5e6; color: #0b6b3d; }

.td-money { display: grid; gap: 2px; position: relative; }
.td-money__label { font-size: 13px; color: var(--crm-muted, #6b7280); }
.td-money__sum { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.td-money__note { font-size: 13px; color: var(--crm-muted, #6b7280); }
.td-money .td-link { position: absolute; top: 18px; right: 20px; }

.td-tiles { display: grid; gap: 8px; margin-top: 12px; }

.td-tile {
    --tone: #64748b;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid var(--crm-line, #e5e9e8);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    animation: td-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms + 120ms);
}

.td-tile.is-warn { --tone: #d97706; }
.td-tile.is-danger { --tone: #dc2626; }
.td-tile.is-info { --tone: #2563eb; }
.td-tile.is-good { --tone: #0e9f6e; }

.td-tile:hover { transform: translateX(2px); border-color: color-mix(in srgb, var(--tone) 45%, transparent); background: color-mix(in srgb, var(--tone) 4%, transparent); color: inherit; }

.td-tile > b {
    flex: none;
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--tone) 13%, var(--surface, #fff));
    color: var(--tone);
    font-size: 16px;
    font-weight: 700;
}

.td-tile span { flex: 1; min-width: 0; }
.td-tile strong { display: block; font-size: 14px; font-weight: 600; }
.td-tile small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--crm-muted, #6b7280); }
.td-tile i { font-style: normal; color: var(--crm-muted, #6b7280); transition: transform 0.2s ease, color 0.2s ease; }
.td-tile:hover i { transform: translateX(3px); color: var(--tone); }

.td-empty { margin: 12px 0 2px; font-size: 13.5px; color: var(--crm-muted, #6b7280); }

@keyframes td-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes td-pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(245, 158, 11, 0); } }

html[data-theme="dark"] .td-pill { background: rgba(255, 255, 255, 0.08); color: #cbd5d1; }
html[data-theme="dark"] .td-pill.is-todo { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
html[data-theme="dark"] .td-pill.is-done { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
html[data-theme="dark"] .td-pill.is-now { background: rgba(59, 130, 246, 0.22); color: #93c5fd; }
html[data-theme="dark"] .td-card__head em.is-warn { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }

@media (max-width: 1100px) { .td-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .td-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .td-card { padding: 16px; }
    .td-row { flex-wrap: wrap; }
    .td-row__main { flex-basis: calc(100% - 50px); }
    .td-row__sum { margin-left: 50px; }
    .td-row form { margin-left: auto; }
    .td-meter { display: none; }
    .td-action { padding: 12px; }
    .td-action__text small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .td-action, .td-card, .td-list > li, .td-tile, .td-dot { animation: none; } }
