/* ============================================================
   Team Tool Access — Member Dashboard Styles
   ============================================================ */

.tta-dash-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Header ---- */
.tta-dash-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    border-radius: 14px;
    padding: 24px 28px;
    color: #fff;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.tta-dash-avatar {
    width: 56px; height: 56px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800;
    flex-shrink: 0;
}
.tta-dash-user-info { flex: 1; }
.tta-dash-user-info h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; color: #fff; }
.tta-dash-user-info p  { margin: 0; opacity: .75; font-size: 14px; }
.tta-dash-logout {
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 7px;
    padding: 7px 14px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s;
}
.tta-dash-logout:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ---- Stats bar ---- */
.tta-dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
@media (max-width: 640px) { .tta-dash-stats { grid-template-columns: repeat(2,1fr); } }
.tta-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.tta-stat-num {
    font-size: 30px; font-weight: 800;
    color: #2563eb; line-height: 1;
}
.tta-stat-label {
    font-size: 12px; color: #9ca3af;
    margin-top: 6px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px;
}

/* ---- Warning banner ---- */
.tta-dash-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #92400e;
    margin-bottom: 24px;
}

/* ---- Section title ---- */
.tta-dash-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Tools grid ---- */
.tta-dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

/* ---- Dashboard tool card ---- */
.tta-dash-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow .2s, transform .15s;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.tta-dash-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.09);
    transform: translateY(-2px);
}
.tta-card-expiring {
    border-color: #fde68a;
    background: #fffdf0 !important;
}
.tta-dash-card-expired {
    opacity: .7;
    pointer-events: none;
}
.tta-dash-card-expired:hover { transform: none; box-shadow: none; }

/* Card top: logo + meta */
.tta-dash-card-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.tta-dash-logo {
    width: 52px; height: 52px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    background: #fafafa;
    padding: 4px;
    flex-shrink: 0;
}
.tta-dash-logo-placeholder {
    width: 52px; height: 52px;
    background: linear-gradient(135deg,#2563eb,#7c3aed);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800; color: #fff;
    flex-shrink: 0;
}
.tta-dash-card-meta { flex: 1; min-width: 0; }
.tta-dash-tool-name {
    margin: 4px 0 4px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}
.tta-dash-tool-desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Validity row ---- */
.tta-validity-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}
.tta-validity-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: #f0fdf4; color: #15803d;
    width: fit-content;
}
.tta-validity-badge.expiring { background: #fff8e1; color: #d97706; }
.tta-validity-badge.unlimited { background: #eff6ff; color: #2563eb; }
.tta-validity-date { font-size: 11px; color: #9ca3af; }
.tta-last-access    { font-size: 11px; color: #9ca3af; }

/* Validity progress bar */
.tta-validity-bar {
    height: 5px;
    background: #e5e7eb;
    border-radius: 99px;
    overflow: hidden;
    margin-top: 2px;
}
.tta-validity-fill {
    height: 100%;
    border-radius: 99px;
    transition: width .4s;
}

/* Access button on dashboard */
.tta-dash-access-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

/* ---- Empty state ---- */
.tta-dash-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}
.tta-dash-empty h3 { font-size: 18px; color: #374151; margin: 12px 0 6px; }
.tta-dash-empty p  { font-size: 14px; }

/* ---- Notice for logged-out users ---- */
.tta-dash-notice {
    padding: 20px 24px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-size: 15px;
    color: #0369a1;
}
.tta-dash-notice a { color: #2563eb; font-weight: 700; }
