/* ═══════════════════════════════════════════════════════════════════
   echelon Dashboard — Shared tile styles
   Matches the mini-tile pattern from Brett's echelon-portal.html POC.
   Shared via <link> from each tile component.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Tile card ──────────────────────────────────────────────────── */

.ech-tile {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.ech-tile:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ─── Tile header ────────────────────────────────────────────────── */

.ech-tile-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0.5rem;
    justify-content: space-between;
}

.ech-tile-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ech-tile-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.ech-tile-icon svg {
    width: 16px;
    height: 16px;
}

.ech-tile-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a1a2e;
}

.ech-tile-count {
    font-size: 0.68rem;
    font-weight: 600;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 0.1rem 0.45rem;
    border-radius: 8px;
}

/* ─── Tile items ─────────────────────────────────────────────────── */

.ech-tile-items {
    padding: 0 1rem 0.5rem;
    flex: 1;
}

.ech-tile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-top: 1px solid #f3f4f6;
    font-size: 0.75rem;
    gap: 0.5rem;
    cursor: pointer;
    transition: background 0.15s ease;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.ech-tile-item:first-child {
    border-top: none;
}

.ech-tile-item:hover {
    background: rgba(17, 198, 131, 0.08);
}

.ech-tile-item-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1a1a2e;
}

.ech-tile-item-meta {
    font-size: 0.68rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* ─── Tile footer ────────────────────────────────────────────────── */

.ech-tile-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.ech-tile-link {
    font-size: 0.72rem;
    color: #11C683;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.ech-tile-link:hover {
    color: #0eaa6f;
    text-decoration: underline;
}

/* ─── CTA tile variant (Services "Request a Service") ───────────── */

.ech-tile-cta-desc {
    font-size: 0.78rem;
    color: #4b5563;
    line-height: 1.4;
    padding: 0.5rem 0 0.75rem;
}

.ech-tile-footer-cta {
    justify-content: space-between;
}

/* ─── Status pills ───────────────────────────────────────────────── */

.ech-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.ech-pill-green { background: #ecfdf5; color: #11C683; }
.ech-pill-amber { background: #fffbeb; color: #f59e0b; }
.ech-pill-red   { background: #fef2f2; color: #ef4444; }
.ech-pill-blue  { background: #eff6ff; color: #3b82f6; }
.ech-pill-grey   { background: #f3f4f6; color: #6b7280; }
.ech-pill-purple { background: #f5f3ff; color: #7c3aed; }
.ech-pill-navy   { background: rgba(26, 26, 46, 0.08); color: #1a1a2e; }

/* ─── Avatar ─────────────────────────────────────────────────────── */

.ech-tile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, #11C683, #0eaa6f);
}

.ech-tile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ─── Loading placeholder ────────────────────────────────────────── */

.ech-tile-loading {
    padding: 0.5rem 0;
}

.ech-tile-placeholder {
    height: 12px;
    background: #f3f4f6;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    animation: ech-pulse 1.5s ease-in-out infinite;
}

.ech-tile-placeholder:nth-child(1) { width: 80%; }
.ech-tile-placeholder:nth-child(2) { width: 60%; }
.ech-tile-placeholder:nth-child(3) { width: 70%; }

@keyframes ech-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ─── Empty state ────────────────────────────────────────────────── */

.ech-tile-empty {
    padding: 1rem 0;
    text-align: center;
    color: #9ca3af;
    font-size: 0.78rem;
}

/* ─── Allocation line (portfolio tile) ──────────────────────────── */

.ech-tile-allocation {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    color: #6b7280;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    text-align: center;
}
