﻿/* =============================================
   estados.css — Modern App Design
   Prefix: est-
=============================================== */

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.est-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #0369a1 100%);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Decorative circle */
.est-header::before {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    top: -120px; right: -80px;
    pointer-events: none;
}
.est-header::after {
    content: '';
    position: absolute;
    width: 180px; height: 180px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    bottom: -60px; left: 30%;
    pointer-events: none;
}

.est-header-text { position: relative; z-index: 1; }

.est-header-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.9);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .28rem .85rem;
    border-radius: var(--radius-pill);
    margin-bottom: .9rem;
}
.est-header-eyebrow i { font-size: .7rem; }

.est-header-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    color: #fff !important;
    margin: 0 0 .4rem;
    letter-spacing: -.025em;
    line-height: 1.1;
}

.est-header-sub {
    font-size: .9rem;
    color: rgba(255,255,255,.75) !important;
    margin: 0;
    line-height: 1.5;
    max-width: 420px;
}

/* Stats block */
.est-header-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-md);
    padding: .75rem 1.25rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(8px);
}

.est-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
}

.est-stat-num {
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -.03em;
}

.est-stat-lbl {
    font-size: .65rem;
    font-weight: 600;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-top: 2px;
}

.est-stat-div {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,.2);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════
   SEARCH BAR
══════════════════════════════════════════ */
.est-search-wrap {
    position: relative;
    max-width: 480px;
    margin-bottom: 1.5rem;
}

.est-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .95rem;
    pointer-events: none;
    transition: color .18s;
}

.est-search-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius-pill);
    padding: .7rem 2.8rem .7rem 2.6rem;
    font-size: .95rem;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    box-shadow: var(--shadow-soft);
}

.est-search-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-glow);
}

.est-search-input:focus ~ .est-search-icon,
.est-search-wrap:focus-within .est-search-icon {
    color: var(--accent-primary);
}

.est-search-input::placeholder { color: var(--text-muted); }

.est-search-clear {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    border: none; border-radius: 50%;
    background: var(--bg-surface-2);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: .75rem;
    transition: var(--trans-fast);
}
.est-search-clear:hover { background: #fee2e2; color: #ef4444; }

/* ══════════════════════════════════════════
   GRID
══════════════════════════════════════════ */
.est-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

/* ══════════════════════════════════════════
   CARD
══════════════════════════════════════════ */
.est-card {
    display: flex;
    align-items: center;
    gap: .9rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.2rem;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-soft);
    transition: var(--trans-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.est-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14,165,233,.04), transparent 60%);
    opacity: 0;
    transition: opacity .2s ease;
}

.est-card:hover {
    border-color: rgba(14,165,233,.3);
    box-shadow: 0 8px 28px rgba(14,165,233,.12);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.est-card:hover::before { opacity: 1; }

/* Icon */
.est-card-icon-wrap {
    width: 50px; height: 50px;
    background: linear-gradient(135deg, rgba(14,165,233,.1), rgba(14,165,233,.05));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: var(--trans-fast);
    border: 1px solid rgba(14,165,233,.1);
}

.est-card-icon {
    font-size: 1.3rem;
    color: var(--accent-primary);
    transition: var(--trans-fast);
}

.est-card:hover .est-card-icon-wrap {
    background: linear-gradient(135deg, var(--accent-primary), #0369a1);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(14,165,233,.3);
}

.est-card:hover .est-card-icon { color: #fff; }

/* Body */
.est-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.est-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.est-card-meta {
    font-size: .8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.est-card:hover .est-card-meta { color: var(--accent-primary); }

/* Chevron */
.est-card-chev {
    font-size: .75rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--trans-fast);
    opacity: .5;
}

.est-card:hover .est-card-chev {
    color: var(--accent-primary);
    opacity: 1;
    transform: translateX(3px);
}

/* Skeleton state */
.est-card--skeleton {
    pointer-events: none;
    cursor: default;
}
.est-card--skeleton::before { display: none; }

/* ══════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════ */
.est-empty {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.5rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: .92rem;
    margin-top: .5rem;
}

.est-empty i { font-size: 1.3rem; color: var(--text-muted); }

/* ══════════════════════════════════════════
   MOBILE
══════════════════════════════════════════ */
@media (max-width: 767.98px) {
    .est-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.1rem;
        padding: 1.4rem 1.25rem;
    }

    .est-header-stats {
        width: 100%;
        justify-content: center;
    }

    .est-header-title { font-size: 1.6rem !important; }

    .est-search-wrap { max-width: 100%; }

    .est-grid {
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
    }

    .est-card {
        flex-direction: column;
        align-items: flex-start;
        gap: .6rem;
        padding: .85rem .9rem;
    }

    .est-card-chev { display: none; }

    .est-card-name { font-size: .85rem; white-space: normal; }
}

@media (max-width: 400px) {
    .est-grid { grid-template-columns: 1fr; }
    .est-card { flex-direction: row; }
    .est-card-chev { display: flex; }
}