/* سجل النشاطات — واجهة بطاقات تفاعلية */
.aah-page {
    direction: rtl;
    padding-bottom: 32px;
}

.aah-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 24px 28px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.92) 0%, rgba(108, 76, 241, 0.88) 55%, rgba(14, 165, 233, 0.75) 100%);
    color: #fff;
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.22);
}

.aah-hero h2 {
    margin: 0 0 8px;
    font-size: 1.45rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aah-hero p {
    margin: 0;
    opacity: 0.92;
    font-size: 0.92rem;
    max-width: 520px;
    line-height: 1.65;
}

.aah-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.aah-hero-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.aah-hero-actions .btn-danger-outline {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}

.aah-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.aah-stat-pill {
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--bg-card, #fff);
    border: 1px solid rgba(108, 76, 241, 0.12);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    text-align: center;
}

.aah-stat-pill strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary, #6C4CF1);
    line-height: 1.2;
}

.aah-stat-pill span {
    font-size: 0.82rem;
    color: var(--text-muted, #64748b);
}

.aah-stat-pill--today {
    border-right: 4px solid #10b981;
}

.aah-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.aah-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.88rem;
}

.aah-breadcrumb button {
    background: none;
    border: none;
    color: var(--primary, #6C4CF1);
    cursor: pointer;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
}

.aah-breadcrumb button:hover {
    background: rgba(108, 76, 241, 0.08);
}

.aah-breadcrumb .aah-bc-sep {
    color: #94a3b8;
}

.aah-breadcrumb .aah-bc-current {
    color: #1e293b;
    font-weight: 700;
}

.aah-filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.aah-chip {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.aah-chip.active {
    background: var(--primary, #6C4CF1);
    border-color: var(--primary, #6C4CF1);
    color: #fff;
}

.aah-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.aah-user-card {
    position: relative;
    padding: 22px 18px 18px;
    border-radius: 18px;
    background: linear-gradient(160deg, #fff 0%, #f8fafc 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-align: center;
    overflow: hidden;
}

.aah-user-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--aah-accent, #6C4CF1);
}

.aah-user-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(108, 76, 241, 0.14);
    border-color: rgba(108, 76, 241, 0.35);
}

.aah-user-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    background: var(--aah-accent, #6C4CF1);
}

.aah-user-card h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.35;
}

.aah-user-card .aah-user-role {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 12px;
}

.aah-user-count {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--aah-accent, #6C4CF1);
}

.aah-user-count small {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    margin-top: 2px;
}

.aah-user-today {
    margin-top: 10px;
    font-size: 0.78rem;
    color: #10b981;
    font-weight: 700;
}

.aah-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.aah-action-card {
    padding: 20px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.aah-action-card:hover {
    border-color: var(--primary, #6C4CF1);
    box-shadow: 0 8px 24px rgba(108, 76, 241, 0.12);
}

.aah-action-card .aah-act-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 76, 241, 0.1);
    color: var(--primary, #6C4CF1);
}

.aah-action-card h5 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

.aah-action-card .aah-act-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

.aah-details-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aah-detail-card {
    padding: 16px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-right: 4px solid var(--primary, #6C4CF1);
}

.aah-detail-card .aah-d-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.aah-detail-card time {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.aah-detail-card .aah-d-action {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(108, 76, 241, 0.1);
    color: var(--primary, #6C4CF1);
}

.aah-detail-card .aah-d-body {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.55;
}

.aah-detail-card .aah-d-meta {
    margin-top: 8px;
    font-size: 0.8rem;
    color: #94a3b8;
}

.aah-day-timeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.aah-day-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.85rem;
}

.aah-day-row strong {
    color: var(--primary, #6C4CF1);
}

.aah-empty {
    text-align: center;
    padding: 48px 24px;
    color: #94a3b8;
}

.aah-loading {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .aah-users-grid {
        grid-template-columns: 1fr 1fr;
    }
}
