/* static/css/tools.css
   Tools page (جعبه ابزار) — built on top of common.css design tokens.
   Visual language mirrors event.css / project.css on purpose so the
   whole product feels consistent: same hero, chips, cards, tags.
------------------------------------------------------------------ */

/* ============================================================
   PAGE CONTAINER
============================================================ */
.to-page {
    width: 95%;
    margin: 0 auto;
    padding: var(--gap-smm) var(--gap-smmm);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.to-page a:focus-visible,
.to-page button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ============================================================
   BREADCRUMB
============================================================ */
.to-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-2xl);
    color: var(--ink-900);
    position: absolute;
    top: 30px;
    right: 40px;
}

.to-breadcrumb a {
    color: var(--ink-900);
    text-decoration: none;
}

.to-breadcrumb .current {
    color: var(--ink-900);
    font-weight: 600;
}

/* ============================================================
   HERO
============================================================ */
.to-hero {
    position: relative;
    overflow: hidden;
    padding: var(--gap-smmm) var(--gap-2xl);
    width: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
}

.to-hero-glow-1 {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .35;
    background: var(--primary);
    top: -120px;
    inset-inline-end: -80px;
    pointer-events: none;
}

.to-hero-glow-2 {
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .30;
    background: var(--accent);
    bottom: -140px;
    inset-inline-start: -60px;
    pointer-events: none;
}

.to-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.to-hero-content-heder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-lg);
    flex-wrap: wrap;
}

.to-hero-content-eyebrow {
    display: flex;
    flex-direction: column;
    gap: var(--gap-smmm);
}

.to-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 14px;
    border-radius: 999px;
    background: #46464629;
    color: var(--ink-900);
    font-size: var(--text-lg);
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.to-hero-content h1 {
    color: var(--ink-900);
    font-size: var(--text-7xl);
    font-weight: 800;
    line-height: 1.35;
}

.to-hero-content p {
    color: var(--ink-600);
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1.9;
    max-width: 640px;
}

.to-hero-stats {
    display: flex;
    gap: var(--gap-sm);
    flex-shrink: 0;
}

.to-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: var(--card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    padding: var(--gap-smmm) var(--gap-lg);
    min-width: 90px;
}

.to-stat-chip b {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--ink-900);
}

.to-stat-chip span {
    font-size: var(--text-base);
    color: var(--ink-600);
    font-weight: 600;
}

.to-stat-chip-active b {
    color: var(--green);
}

/* ============================================================
   ALERT (info banner)
============================================================ */
.to-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: var(--radius-md);
    padding: var(--gap-smmm) var(--gap-sm);
}

.to-alert-info {
    background: var(--primary-softer);
    border: 1px solid var(--primary-soft);
    color: var(--ink-700);
}

.to-alert-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
}

.to-alert-text {
    font-size: var(--text-lg);
    line-height: 1.9;
    padding-top: 4px;
}

/* ============================================================
   SECTIONS
============================================================ */
.to-section {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.to-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.to-section-label {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--ink-900);
    padding-inline-start: 14px;
    border-inline-start: 4px solid var(--primary);
}

/* ============================================================
   TOOLS GRID / CARD
============================================================ */
.to-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--gap-sm);
}

.to-tool-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--gap-sm);
    display: flex;
    flex-direction: column;
    gap: var(--gap-smmm);
    transition: box-shadow .15s ease, transform .15s ease, opacity .15s ease;
}

.to-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.to-tool-inactive {
    opacity: .82;
}

.to-tool-inactive:hover {
    opacity: 1;
}

.to-tool-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.to-tool-icon-wrap {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.to-tool-icon-wrap svg {
    width: 24px;
    height: 24px;
}

.to-icon-green {
    background: var(--green-soft);
    color: var(--green);
}

.to-icon-amber {
    background: var(--amber-soft);
    color: var(--amber);
}

.to-tool-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.to-tool-title {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--ink-900);
    line-height: 1.5;
}

.to-tool-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.to-tool-desc {
    font-size: var(--text-lg);
    color: var(--ink-600);
    line-height: 1.9;
}

.to-tool-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.to-tool-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--text-base);
    color: var(--ink-700);
    line-height: 1.7;
}

.to-tool-features li svg {
    flex-shrink: 0;
    color: var(--green);
    margin-top: 3px;
}

.to-tool-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-xs);
    padding-top: var(--gap-smmm);
    border-top: 1px solid var(--rule);
    margin-top: auto;
}

.to-tool-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--text-lg);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    transition: filter var(--transition), transform var(--transition);
}

.to-link-active {
    background: var(--primary);
    color: #fff;
}

.to-link-active:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.to-link-green {
    background: var(--green);
}

.to-link-disabled {
    background: var(--ink-100);
    color: var(--ink-400);
    cursor: not-allowed;
}

.to-tool-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--ink-600);
    font-weight: 500;
    white-space: nowrap;
}

.to-tool-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 3px var(--green-soft);
}

.to-dot-orange {
    background: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-soft);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 640px) {
    .to-hero {
        padding: var(--gap-lg) var(--gap-sm);
        min-height: 220px;
    }

    .to-hero-content h1 {
        font-size: var(--text-5xl);
    }

    .to-hero-content-heder {
        flex-direction: column;
        align-items: flex-start;
    }

    .to-hero-stats {
        width: 100%;
    }

    .to-stat-chip {
        flex: 1;
    }

    .to-tools-grid {
        grid-template-columns: 1fr;
    }

    .to-tool-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .to-tool-status {
        justify-content: center;
    }
}